Skip to content

Commit

Permalink
ath9k: fix double calls to ath_radio_enable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Apr 6, 2010
1 parent 0379185 commit 1144601
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1144601

Please sign in to comment.