From: Yogesh Ashok Powar Date: Fri, 25 Jan 2013 10:47:45 +0000 (+0530) Subject: mwl8k: Do not call mwl8k_cmd_set_rf_channel unconditionally X-Git-Tag: MMI-PSA29.97-13-9~14842^2~28^2^2~62^2~31 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0f4316b97d045e9b5b270cafa4b924769699eb3d;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git mwl8k: Do not call mwl8k_cmd_set_rf_channel unconditionally Avoid calling mwl8k_cmd_set_rf_channel unconditionally by checking IEEE80211_CONF_CHANGE_CHANNEL. Signed-off-by: Yogesh Ashok Powar Signed-off-by: Nishant Sarmukadam Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 398b8b19ff84..78a89f6426b1 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c @@ -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;