summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2014-03-03 13:37:14 +0200
committerJohannes Berg <johannes.berg@intel.com>2014-03-03 13:48:13 +0100
commit1c37a72c1bd0b83be8b95cff7f1bc9b1f32bd433 (patch)
treebc759ac5b4ff6a996cd7ffb47b16aed0cc670bf4 /net/mac80211
parentcb664981607a6b5b3d670ad57bbda893b2528d96 (diff)
downloadop-kernel-dev-1c37a72c1bd0b83be8b95cff7f1bc9b1f32bd433.zip
op-kernel-dev-1c37a72c1bd0b83be8b95cff7f1bc9b1f32bd433.tar.gz
mac80211: consider virtual mon when calculating min_def
When calculating the current max bw required for a channel context, we didn't consider the virtual monitor interface, resulting in its channel context being narrower than configured. This broke monitor mode with iwlmvm, which uses the minimal width. Reported-by: Ido Yariv <idox.yariv@intel.com> Signed-off-by: Eliad Peller <eliadx.peller@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/chan.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index f43613a..0c1ecfd 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -100,6 +100,12 @@ ieee80211_get_chanctx_max_required_bw(struct ieee80211_local *local,
}
max_bw = max(max_bw, width);
}
+
+ /* use the configured bandwidth in case of monitor interface */
+ sdata = rcu_dereference(local->monitor_sdata);
+ if (sdata && rcu_access_pointer(sdata->vif.chanctx_conf) == conf)
+ max_bw = max(max_bw, conf->def.width);
+
rcu_read_unlock();
return max_bw;
OpenPOWER on IntegriCloud