diff options
author | Eliad Peller <eliad@wizery.com> | 2014-03-03 13:37:14 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-03-03 13:48:13 +0100 |
commit | 1c37a72c1bd0b83be8b95cff7f1bc9b1f32bd433 (patch) | |
tree | bc759ac5b4ff6a996cd7ffb47b16aed0cc670bf4 /net | |
parent | cb664981607a6b5b3d670ad57bbda893b2528d96 (diff) |
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')
-rw-r--r-- | net/mac80211/chan.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index f43613a97dd..0c1ecfdf9a1 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; |