]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
iwlwifi: fix rf_kill state inconsistent during suspend and resume
authorZhu Yi <yi.zhu@intel.com>
Thu, 6 Dec 2007 08:08:44 +0000 (16:08 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 17 Dec 2007 22:01:40 +0000 (17:01 -0500)
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.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/iwlwifi/iwl4965-base.c

index 1c3ca6ebdc4d472b09d98180e0ecc3c6d19c8e93..3d1da0759b977b0885220ce3a0404e452252033d 100644 (file)
@@ -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;
        }
index 3b31607a27fc4b34695741d788d128043f3784b7..b54fe5e6d5293c3debcf0cde2309a10f316ad6a0 100644 (file)
@@ -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;
        }