Skip to contentSkip to conversation

mwl8k: Do not call mwl8k_cmd_set_rf_channel unconditionally

PATCH New Yogesh Ashok Powar 1 participant 1 message Jan 25, 2013 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mwl8k: Do not call mwl8k_cmd_set_rf_channel unconditionally

Avoid calling mwl8k_cmd_set_rf_channel unconditionally by checking IEEE80211_CONF_CHANGE_CHANNEL.

---
 drivers/net/wireless/mwl8k.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/net/wireless/mwl8k.c +5 -3
index 0b2428d..a48b137 100644
@@ -4797,9 +4797,11 @@ static int mwl8k_config(struct ieee80211_hw *hw, u32 changed)
 	if (rc)
 		goto out;
 
-	rc = mwl8k_cmd_set_rf_channel(hw, conf);
-	if (rc)
-		goto out;
+	if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
+		rc = mwl8k_cmd_set_rf_channel(hw, conf);
+		if (rc)
+			goto out;
+	}
 
 	if (conf->power_level > 18)
 		conf->power_level = 18;
Signature · 1 line
1.8.0.3