summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-07-30 10:52:51 +0000
committerFelix Fietkau <nbd@openwrt.org>2010-07-30 10:52:51 +0000
commit941f72b11ce7e1da682329b2aa23f086f6f3e6a5 (patch)
treeebbc97685caeed32421411bf6c9aa28a40ef549b
parent42738aa9ad5e342f043c5d557b070770cad5fd65 (diff)
downloadmtk-20170518-941f72b11ce7e1da682329b2aa23f086f6f3e6a5.zip
mtk-20170518-941f72b11ce7e1da682329b2aa23f086f6f3e6a5.tar.gz
mtk-20170518-941f72b11ce7e1da682329b2aa23f086f6f3e6a5.tar.bz2
mac80211: minor fix for the offchannel status change notification
SVN-Revision: 22417
-rw-r--r--package/mac80211/patches/524-mac80211_offchannel_fix.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/package/mac80211/patches/524-mac80211_offchannel_fix.patch b/package/mac80211/patches/524-mac80211_offchannel_fix.patch
new file mode 100644
index 0000000..ce594b0
--- /dev/null
+++ b/package/mac80211/patches/524-mac80211_offchannel_fix.patch
@@ -0,0 +1,27 @@
+--- a/net/mac80211/main.c
++++ b/net/mac80211/main.c
+@@ -99,11 +99,13 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
+ int ret = 0;
+ int power;
+ enum nl80211_channel_type channel_type;
++ u32 offchannel_flag;
+
+ might_sleep();
+
+ scan_chan = local->scan_channel;
+
++ offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
+ if (scan_chan) {
+ chan = scan_chan;
+ channel_type = NL80211_CHAN_NO_HT;
+@@ -117,8 +119,9 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
+ channel_type = local->_oper_channel_type;
+ local->hw.conf.flags &= ~IEEE80211_CONF_OFFCHANNEL;
+ }
++ offchannel_flag ^= local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
+
+- if (chan != local->hw.conf.channel ||
++ if (offchannel_flag || chan != local->hw.conf.channel ||
+ channel_type != local->hw.conf.channel_type) {
+ local->hw.conf.channel = chan;
+ local->hw.conf.channel_type = channel_type;