diff options
author | jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-03-27 12:39:52 +0000 |
---|---|---|
committer | jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-03-27 12:39:52 +0000 |
commit | e1f48d45f2bee65a7ab7e58c19f61f2a42c4b4a5 (patch) | |
tree | 9e36276e13c4699e96854961fdf2959ba810abcf /package/mac80211/patches/702-mwl8k-always-apply-configuration-even-when-device-is.patch | |
parent | 7cfbb153cd8b407bb7da221569390ee41d218acf (diff) |
mac80211: backport some upstream mwl8k fixes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36134 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/702-mwl8k-always-apply-configuration-even-when-device-is.patch')
-rw-r--r-- | package/mac80211/patches/702-mwl8k-always-apply-configuration-even-when-device-is.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/package/mac80211/patches/702-mwl8k-always-apply-configuration-even-when-device-is.patch b/package/mac80211/patches/702-mwl8k-always-apply-configuration-even-when-device-is.patch new file mode 100644 index 000000000..ff254790d --- /dev/null +++ b/package/mac80211/patches/702-mwl8k-always-apply-configuration-even-when-device-is.patch @@ -0,0 +1,44 @@ +From 5d1ed64614ccb21c26bc0ee321e9c51b6359ceb8 Mon Sep 17 00:00:00 2001 +From: Jonas Gorski <jogo@openwrt.org> +Date: Mon, 25 Mar 2013 15:37:42 +0100 +Subject: [PATCH] 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> +--- + drivers/net/wireless/mwl8k.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +--- a/drivers/net/wireless/mwl8k.c ++++ b/drivers/net/wireless/mwl8k.c +@@ -4818,16 +4818,14 @@ static int mwl8k_config(struct ieee80211 + struct mwl8k_priv *priv = hw->priv; + int rc; + +- if (conf->flags & IEEE80211_CONF_IDLE) { +- mwl8k_cmd_radio_disable(hw); +- return 0; +- } +- + rc = mwl8k_fw_lock(hw); + if (rc) + return rc; + +- rc = mwl8k_cmd_radio_enable(hw); ++ if (conf->flags & IEEE80211_CONF_IDLE) ++ rc = mwl8k_cmd_radio_disable(hw); ++ else ++ rc = mwl8k_cmd_radio_enable(hw); + if (rc) + goto out; + |