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 <yogeshp@marvell.com>
Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Yogesh Ashok Powar 2013-01-25 16:17:45 +05:30 committed by John W. Linville
parent e882efc96d
commit 0f4316b97d
1 changed files with 5 additions and 3 deletions

View 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;