diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/wmi.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/wmi.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/wmi.c b/drivers/net/wireless/ath/ath9k/wmi.c index 8f42ea78198c..dc862f5e1162 100644 --- a/drivers/net/wireless/ath/ath9k/wmi.c +++ b/drivers/net/wireless/ath/ath9k/wmi.c | |||
@@ -120,7 +120,7 @@ void ath9k_deinit_wmi(struct ath9k_htc_priv *priv) | |||
120 | kfree(priv->wmi); | 120 | kfree(priv->wmi); |
121 | } | 121 | } |
122 | 122 | ||
123 | void ath9k_wmi_tasklet(unsigned long data) | 123 | void ath9k_swba_tasklet(unsigned long data) |
124 | { | 124 | { |
125 | struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *)data; | 125 | struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *)data; |
126 | struct ath_common *common = ath9k_hw_common(priv->ah); | 126 | struct ath_common *common = ath9k_hw_common(priv->ah); |
@@ -131,6 +131,16 @@ void ath9k_wmi_tasklet(unsigned long data) | |||
131 | 131 | ||
132 | } | 132 | } |
133 | 133 | ||
134 | void ath9k_fatal_work(struct work_struct *work) | ||
135 | { | ||
136 | struct ath9k_htc_priv *priv = container_of(work, struct ath9k_htc_priv, | ||
137 | fatal_work); | ||
138 | struct ath_common *common = ath9k_hw_common(priv->ah); | ||
139 | |||
140 | ath_dbg(common, ATH_DBG_FATAL, "FATAL Event received, resetting device\n"); | ||
141 | ath9k_htc_reset(priv); | ||
142 | } | ||
143 | |||
134 | static void ath9k_wmi_rsp_callback(struct wmi *wmi, struct sk_buff *skb) | 144 | static void ath9k_wmi_rsp_callback(struct wmi *wmi, struct sk_buff *skb) |
135 | { | 145 | { |
136 | skb_pull(skb, sizeof(struct wmi_cmd_hdr)); | 146 | skb_pull(skb, sizeof(struct wmi_cmd_hdr)); |
@@ -163,7 +173,11 @@ static void ath9k_wmi_ctrl_rx(void *priv, struct sk_buff *skb, | |||
163 | switch (cmd_id) { | 173 | switch (cmd_id) { |
164 | case WMI_SWBA_EVENTID: | 174 | case WMI_SWBA_EVENTID: |
165 | wmi->beacon_pending = *(u8 *)wmi_event; | 175 | wmi->beacon_pending = *(u8 *)wmi_event; |
166 | tasklet_schedule(&wmi->drv_priv->wmi_tasklet); | 176 | tasklet_schedule(&wmi->drv_priv->swba_tasklet); |
177 | break; | ||
178 | case WMI_FATAL_EVENTID: | ||
179 | ieee80211_queue_work(wmi->drv_priv->hw, | ||
180 | &wmi->drv_priv->fatal_work); | ||
167 | break; | 181 | break; |
168 | case WMI_TXRATE_EVENTID: | 182 | case WMI_TXRATE_EVENTID: |
169 | #ifdef CONFIG_ATH9K_HTC_DEBUGFS | 183 | #ifdef CONFIG_ATH9K_HTC_DEBUGFS |
@@ -250,7 +264,7 @@ int ath9k_wmi_cmd(struct wmi *wmi, enum wmi_cmd_id cmd_id, | |||
250 | int time_left, ret = 0; | 264 | int time_left, ret = 0; |
251 | unsigned long flags; | 265 | unsigned long flags; |
252 | 266 | ||
253 | if (wmi->drv_priv->op_flags & OP_UNPLUGGED) | 267 | if (ah->ah_flags & AH_UNPLUGGED) |
254 | return 0; | 268 | return 0; |
255 | 269 | ||
256 | skb = alloc_skb(headroom + cmd_len, GFP_ATOMIC); | 270 | skb = alloc_skb(headroom + cmd_len, GFP_ATOMIC); |