aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwmc3200wifi/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwmc3200wifi/rx.c')
-rw-r--r--drivers/net/wireless/iwmc3200wifi/rx.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c
index 40dbcbc16593..14a2a0b3d614 100644
--- a/drivers/net/wireless/iwmc3200wifi/rx.c
+++ b/drivers/net/wireless/iwmc3200wifi/rx.c
@@ -1078,6 +1078,7 @@ static int iwm_ntf_wifi_if_wrapper(struct iwm_priv *iwm, u8 *buf,
1078 return 0; 1078 return 0;
1079} 1079}
1080 1080
1081#define CT_KILL_DELAY (30 * HZ)
1081static int iwm_ntf_card_state(struct iwm_priv *iwm, u8 *buf, 1082static int iwm_ntf_card_state(struct iwm_priv *iwm, u8 *buf,
1082 unsigned long buf_size, struct iwm_wifi_cmd *cmd) 1083 unsigned long buf_size, struct iwm_wifi_cmd *cmd)
1083{ 1084{
@@ -1090,7 +1091,20 @@ static int iwm_ntf_card_state(struct iwm_priv *iwm, u8 *buf,
1090 flags & IWM_CARD_STATE_HW_DISABLED ? "ON" : "OFF", 1091 flags & IWM_CARD_STATE_HW_DISABLED ? "ON" : "OFF",
1091 flags & IWM_CARD_STATE_CTKILL_DISABLED ? "ON" : "OFF"); 1092 flags & IWM_CARD_STATE_CTKILL_DISABLED ? "ON" : "OFF");
1092 1093
1093 wiphy_rfkill_set_hw_state(wiphy, flags & IWM_CARD_STATE_HW_DISABLED); 1094 if (flags & IWM_CARD_STATE_CTKILL_DISABLED) {
1095 /*
1096 * We got a CTKILL event: We bring the interface down in
1097 * oder to cool the device down, and try to bring it up
1098 * 30 seconds later. If it's still too hot, we'll go through
1099 * this code path again.
1100 */
1101 cancel_delayed_work_sync(&iwm->ct_kill_delay);
1102 schedule_delayed_work(&iwm->ct_kill_delay, CT_KILL_DELAY);
1103 }
1104
1105 wiphy_rfkill_set_hw_state(wiphy, flags &
1106 (IWM_CARD_STATE_HW_DISABLED |
1107 IWM_CARD_STATE_CTKILL_DISABLED));
1094 1108
1095 return 0; 1109 return 0;
1096} 1110}