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>
This commit is contained in:
Felix Fietkau 2010-04-06 12:05:01 -07:00 committed by John W. Linville
parent 0379185b6c
commit 1144601118
1 changed files with 1 additions and 2 deletions

View File

@ -1532,8 +1532,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
all_wiphys_idle = ath9k_all_wiphys_idle(sc); all_wiphys_idle = ath9k_all_wiphys_idle(sc);
ath9k_set_wiphy_idle(aphy, idle); ath9k_set_wiphy_idle(aphy, idle);
if (!idle && all_wiphys_idle) enable_radio = (!idle && all_wiphys_idle);
enable_radio = true;
/* /*
* After we unlock here its possible another wiphy * After we unlock here its possible another wiphy