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.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by Zhu Yi and committed by John W. Linville 53e49093 1a8d1227

+6 -2
+3 -1
drivers/net/wireless/iwlwifi/iwl3945-base.c
··· 4743 * when we loaded driver, and is now set to "enable". 4744 * After we're Alive, RF_KILL gets handled by 4745 * iwl_rx_card_state_notif() */ 4746 - if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) 4747 queue_work(priv->workqueue, &priv->restart); 4748 4749 handled |= CSR_INT_BIT_RF_KILL; 4750 }
··· 4743 * when we loaded driver, and is now set to "enable". 4744 * After we're Alive, RF_KILL gets handled by 4745 * iwl_rx_card_state_notif() */ 4746 + if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) { 4747 + clear_bit(STATUS_RF_KILL_HW, &priv->status); 4748 queue_work(priv->workqueue, &priv->restart); 4749 + } 4750 4751 handled |= CSR_INT_BIT_RF_KILL; 4752 }
+3 -1
drivers/net/wireless/iwlwifi/iwl4965-base.c
··· 5059 * when we loaded driver, and is now set to "enable". 5060 * After we're Alive, RF_KILL gets handled by 5061 * iwl_rx_card_state_notif() */ 5062 - if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) 5063 queue_work(priv->workqueue, &priv->restart); 5064 5065 handled |= CSR_INT_BIT_RF_KILL; 5066 }
··· 5059 * when we loaded driver, and is now set to "enable". 5060 * After we're Alive, RF_KILL gets handled by 5061 * iwl_rx_card_state_notif() */ 5062 + if (!hw_rf_kill && !test_bit(STATUS_ALIVE, &priv->status)) { 5063 + clear_bit(STATUS_RF_KILL_HW, &priv->status); 5064 queue_work(priv->workqueue, &priv->restart); 5065 + } 5066 5067 handled |= CSR_INT_BIT_RF_KILL; 5068 }