summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/main.c
diff options
context:
space:
mode:
authorKalle Valo <kvalo@qca.qualcomm.com>2011-10-30 21:16:33 +0200
committerKalle Valo <kvalo@qca.qualcomm.com>2011-11-11 12:58:59 +0200
commit68469341f32b566481bfccb776ee03146b63bae5 (patch)
tree4ba96e1f569ce34de3895f24835c38a5aa00a507 /drivers/net/wireless/ath/ath6kl/main.c
parent5fe4dffbc12b22507d2416667720cbd4b27c693b (diff)
downloadlinux-68469341f32b566481bfccb776ee03146b63bae5.tar.gz
linux-68469341f32b566481bfccb776ee03146b63bae5.tar.xz
linux-68469341f32b566481bfccb776ee03146b63bae5.zip
ath6kl: fix WLAN_ENABLE usage in ath6kl_close()
If ath6kl_init_hw_stop() failed with an error WLAN_ENABLED would not be cleared. Found during code review and just a theoretical issue. Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/main.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
index 717ed22abc31..def0b7f29c37 100644
--- a/drivers/net/wireless/ath/ath6kl/main.c
+++ b/drivers/net/wireless/ath/ath6kl/main.c
@@ -1147,7 +1147,6 @@ static int ath6kl_close(struct net_device *dev)
0, 0, 0, 0, 0, 0, 0, 0, 0))
return -EIO;
- clear_bit(WLAN_ENABLED, &vif->flags);
}
ath6kl_cfg80211_scan_complete_event(vif, -ECANCELED);
@@ -1157,6 +1156,8 @@ static int ath6kl_close(struct net_device *dev)
if (ret)
return ret;
+ clear_bit(WLAN_ENABLED, &vif->flags);
+
return 0;
}