aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2013-03-25 11:39:54 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-03-27 13:37:37 -0400
commitfe21bb02ca3b312ba3b89382760e548fd8996a55 (patch)
tree4c4a6faee208363dfaa379c6b961bb284f6e5172
parentc55b3766054d3db7a9732c6c8a1c81afac2cfaa6 (diff)
mwl8k: always apply configuration even when device is idle
Fix settings not being applied when the device is idle and the firmware gets reloaded (because of changing from STA to AP mode). This caused the device using the wrong channel (and likely band), e.g. a 5 GHz only card still defaulted to channel 6 in the 2.4 GHz band when left unconfigured. This issue was always present, but only made visible with "mwl8k: Do not call mwl8k_cmd_set_rf_channel unconditionally" (0f4316b9), since before that the channel was (re-)configured at the next _config call even when it did not change from the mac80211 perspective. Signed-off-by: Jonas Gorski <jogo@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/mwl8k.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 0640e7d7f0c2..956c1084ebf1 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -4807,16 +4807,14 @@ static int mwl8k_config(struct ieee80211_hw *hw, u32 changed)
4807 struct mwl8k_priv *priv = hw->priv; 4807 struct mwl8k_priv *priv = hw->priv;
4808 int rc; 4808 int rc;
4809 4809
4810 if (conf->flags & IEEE80211_CONF_IDLE) {
4811 mwl8k_cmd_radio_disable(hw);
4812 return 0;
4813 }
4814
4815 rc = mwl8k_fw_lock(hw); 4810 rc = mwl8k_fw_lock(hw);
4816 if (rc) 4811 if (rc)
4817 return rc; 4812 return rc;
4818 4813
4819 rc = mwl8k_cmd_radio_enable(hw); 4814 if (conf->flags & IEEE80211_CONF_IDLE)
4815 rc = mwl8k_cmd_radio_disable(hw);
4816 else
4817 rc = mwl8k_cmd_radio_enable(hw);
4820 if (rc) 4818 if (rc)
4821 goto out; 4819 goto out;
4822 4820