Skip to content

Commit

Permalink
mwl8k: Do not call mwl8k_cmd_set_rf_channel unconditionally
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yogesh Ashok Powar authored and John W. Linville committed Jan 30, 2013
1 parent e882efc commit 0f4316b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/net/wireless/mwl8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0f4316b

Please sign in to comment.