summaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/300-pending_work.patch
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-02-23 18:02:49 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-02-23 18:02:49 +0000
commit78bbe2dbcf777adc52b5f0dc6e43e7b1e2bec80b (patch)
tree8f6c392b7d5a36867cf4997d9e1833ad951a453e /package/mac80211/patches/300-pending_work.patch
parentc215f2d1d68e664e76bba2b749fd405cf3edccc9 (diff)
mac80211: fix monitor mode channel reporting
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35761 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/300-pending_work.patch')
-rw-r--r--package/mac80211/patches/300-pending_work.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
index c6633af8a..11c9a5af4 100644
--- a/package/mac80211/patches/300-pending_work.patch
+++ b/package/mac80211/patches/300-pending_work.patch
@@ -474,3 +474,28 @@
nla_nest_end(msg, nl_wowlan);
}
#endif
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -3285,13 +3285,19 @@ static int ieee80211_cfg_get_channel(str
+ struct cfg80211_chan_def *chandef)
+ {
+ struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
++ struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct ieee80211_chanctx_conf *chanctx_conf;
+ int ret = -ENODATA;
+
+ rcu_read_lock();
+- chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+- if (chanctx_conf) {
+- *chandef = chanctx_conf->def;
++ if (local->use_chanctx) {
++ chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
++ if (chanctx_conf) {
++ *chandef = chanctx_conf->def;
++ ret = 0;
++ }
++ } else if (local->open_count == local->monitors) {
++ *chandef = local->monitor_chandef;
+ ret = 0;
+ }
+ rcu_read_unlock();