From: Felix Fietkau Date: Tue, 6 Apr 2010 19:05:01 +0000 (-0700) Subject: ath9k: fix double calls to ath_radio_enable X-Git-Tag: v3.0~5043^2^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1144601118507f8b3b676a9a392584d216d3f2cc;p=platform%2Fkernel%2Flinux-amlogic.git 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 Cc: stable@kernel.org Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 67ca4e5..115e1ae 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