Skip to contentSkip to conversation

iwlwifi: fix rf_kill state inconsistent during suspend and resume

PATCH New Zhu Yi 1 participant 1 message Dec 6, 2007 Networking drivers (wireless)

lore
Share & tools
lore

Zhu Yi

author
#0 lore raw

PATCH 1/1 iwlwifi: fix rf_kill state inconsistent during suspend and resume

The patch fixes the STATUS_RF_KILL_HW state is not cleared problem if the device goes to suspend when the rf_kill switch is enabled. The bug causes the driver always thinks the rf_kill switch is enabled (although it is disabled) after resume.

---
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    4 +++-
 drivers/net/wireless/iwlwifi/iwl4965-base.c |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
drivers/net/wireless/iwlwifi/iwl3945-base.c +3 -1
index 4bdf237..5eabce7 100644
@@ -4743,8 +4743,10 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
 		 *   when we loaded driver, and is now set to "enable".
 		 * After we're Alive, RF_KILL gets handled by
 		 *   iwl_rx_card_state_notif() */
-		if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status))
+		if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) {
+			clear_bit(STATUS_RF_KILL_HW, &priv->status);
 			queue_work(priv->workqueue, &priv->restart);
+		}
 
 		handled |= CSR_INT_BIT_RF_KILL;
 	}
drivers/net/wireless/iwlwifi/iwl4965-base.c +3 -1
index 8f85564..3097323 100644
@@ -5059,8 +5059,10 @@ static void iwl_irq_tasklet(struct iwl_priv *priv)
 		 *   when we loaded driver, and is now set to "enable".
 		 * After we're Alive, RF_KILL gets handled by
 		 *   iwl_rx_card_state_notif() */
-		if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status))
+		if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) {
+			clear_bit(STATUS_RF_KILL_HW, &priv->status);
 			queue_work(priv->workqueue, &priv->restart);
+		}
 
 		handled |= CSR_INT_BIT_RF_KILL;
 	}
Signature · 1 line
1.5.3.6