aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/main.c
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2011-10-10 04:13:14 -0400
committerLuciano Coelho <coelho@ti.com>2011-10-11 08:12:13 -0400
commitf02774343030c2794bb58b6150420dfefc31c39f (patch)
tree23278ffc3643536c70268b9328ee2206f9308a19 /drivers/net/wireless/wl12xx/main.c
parent6e8cd3310491b10db20d0f7eaf5713b05fa7b753 (diff)
wl12xx: call stop() on recovery
The recovery work should call stop() after it removed all the existing interfaces. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/main.c')
-rw-r--r--drivers/net/wireless/wl12xx/main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 08fc9d464288..433a06fae40b 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -379,6 +379,7 @@ static bool bug_on_recovery;
379static void __wl1271_op_remove_interface(struct wl1271 *wl, 379static void __wl1271_op_remove_interface(struct wl1271 *wl,
380 struct ieee80211_vif *vif, 380 struct ieee80211_vif *vif,
381 bool reset_tx_queues); 381 bool reset_tx_queues);
382static void wl1271_op_stop(struct ieee80211_hw *hw);
382static void wl1271_free_ap_keys(struct wl1271 *wl, struct wl12xx_vif *wlvif); 383static void wl1271_free_ap_keys(struct wl1271 *wl, struct wl12xx_vif *wlvif);
383 384
384 385
@@ -1220,7 +1221,7 @@ static void wl1271_recovery_work(struct work_struct *work)
1220 mutex_lock(&wl->mutex); 1221 mutex_lock(&wl->mutex);
1221 1222
1222 if (wl->state != WL1271_STATE_ON) 1223 if (wl->state != WL1271_STATE_ON)
1223 goto out; 1224 goto out_unlock;
1224 1225
1225 /* Avoid a recursive recovery */ 1226 /* Avoid a recursive recovery */
1226 set_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags); 1227 set_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags);
@@ -1259,6 +1260,8 @@ static void wl1271_recovery_work(struct work_struct *work)
1259 vif = wl12xx_wlvif_to_vif(wlvif); 1260 vif = wl12xx_wlvif_to_vif(wlvif);
1260 __wl1271_op_remove_interface(wl, vif, false); 1261 __wl1271_op_remove_interface(wl, vif, false);
1261 } 1262 }
1263 mutex_unlock(&wl->mutex);
1264 wl1271_op_stop(wl->hw);
1262 1265
1263 clear_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags); 1266 clear_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags);
1264 1267
@@ -1269,8 +1272,8 @@ static void wl1271_recovery_work(struct work_struct *work)
1269 * to restart the HW. 1272 * to restart the HW.
1270 */ 1273 */
1271 ieee80211_wake_queues(wl->hw); 1274 ieee80211_wake_queues(wl->hw);
1272 1275 return;
1273out: 1276out_unlock:
1274 mutex_unlock(&wl->mutex); 1277 mutex_unlock(&wl->mutex);
1275} 1278}
1276 1279