summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-04-06 23:05:01 +0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-06 23:53:33 +0400
commit1144601118507f8b3b676a9a392584d216d3f2cc (patch)
tree0cbe9320677c2b11e3ab02348281c5f3a8fe6f4b /drivers/net/wireless/ath
parent0379185b6c0d1e8252023698cf1091da92a3dc03 (diff)
downloadlinux-1144601118507f8b3b676a9a392584d216d3f2cc.tar.xz
ath9k: fix double calls to ath_radio_enable
With the enable_radio being uninitialized, ath_radio_enable() might be called twice, which can leave some hardware in an undefined state. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 67ca4e5a6017..115e1aeedb59 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1532,8 +1532,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
all_wiphys_idle = ath9k_all_wiphys_idle(sc);
ath9k_set_wiphy_idle(aphy, idle);
- if (!idle && all_wiphys_idle)
- enable_radio = true;
+ enable_radio = (!idle && all_wiphys_idle);
/*
* After we unlock here its possible another wiphy