mwl8k: Do not call mwl8k_cmd_set_rf_channel unconditionally
authorYogesh Ashok Powar <yogeshp@marvell.com>
Fri, 25 Jan 2013 10:47:45 +0000 (16:17 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 30 Jan 2013 20:06:48 +0000 (15:06 -0500)
Avoid calling mwl8k_cmd_set_rf_channel unconditionally
by checking IEEE80211_CONF_CHANGE_CHANNEL.

Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwl8k.c

index 398b8b19ff8474d98ddc98a5a5567a56cce2732d..78a89f6426b1baa66a434ddd3e1e7fb8a8bffdc4 100644 (file)
@@ -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;