diff options
author | Eliad Peller <eliad@wizery.com> | 2014-03-03 06:37:14 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-03-03 07:48:13 -0500 |
commit | 1c37a72c1bd0b83be8b95cff7f1bc9b1f32bd433 (patch) | |
tree | bc759ac5b4ff6a996cd7ffb47b16aed0cc670bf4 /net/mac80211/chan.c | |
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/mac80211/chan.c')
-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 f43613a97dd6..0c1ecfdf9a12 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, | |||
100 | } | 100 | } |
101 | max_bw = max(max_bw, width); | 101 | max_bw = max(max_bw, width); |
102 | } | 102 | } |
103 | |||
104 | /* use the configured bandwidth in case of monitor interface */ | ||
105 | sdata = rcu_dereference(local->monitor_sdata); | ||
106 | if (sdata && rcu_access_pointer(sdata->vif.chanctx_conf) == conf) | ||
107 | max_bw = max(max_bw, conf->def.width); | ||
108 | |||
103 | rcu_read_unlock(); | 109 | rcu_read_unlock(); |
104 | 110 | ||
105 | return max_bw; | 111 | return max_bw; |