Skip to contentSkip to conversation

ath9k: fix double calls to ath_radio_enable

PATCH New Felix Fietkau 1 participant 1 message Apr 6, 2010 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

drivers/net/wireless/ath/ath9k/main.c +1 -2
@@ -1572,8 +1572,7 @@ static int ath9k_config(struct ieee80211
 		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