diff options
author | tamizhr@codeaurora.org <tamizhr@codeaurora.org> | 2018-03-27 19:16:17 +0530 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-03-29 10:19:59 +0200 |
commit | 97f5f4254a61d7a104b5e609a6a0d9a10c73d29e (patch) | |
tree | 83e2dc1aa0562a897c7bd83fe63d58575c271b38 /net/mac80211/rx.c | |
parent | 57566b20033f23bdc9f25d5fa4c36a7287aa08d2 (diff) | |
download | linux-stable-97f5f4254a61d7a104b5e609a6a0d9a10c73d29e.tar.gz linux-stable-97f5f4254a61d7a104b5e609a6a0d9a10c73d29e.tar.bz2 linux-stable-97f5f4254a61d7a104b5e609a6a0d9a10c73d29e.zip |
mac80211: Use proper chan_width enum in sta opmode event
Bandwidth change value reported via nl80211 contains mac80211
specific enum value(ieee80211_sta_rx_bw) and which is not
understand by userspace application. Map the mac80211 specific
value to nl80211_chan_width enum value to avoid using wrong value
in the userspace application. And used station's ht/vht capability
to map IEEE80211_STA_RX_BW_20 and IEEE80211_STA_RX_BW_160 with
proper nl80211 value.
Signed-off-by: Tamizh chelvam <tamizhr@codeaurora.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index f8c69acfda48..3a9f0c0a2de8 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -2922,7 +2922,8 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) rx->sta->sta.bandwidth = new_bw; sband = rx->local->hw.wiphy->bands[status->band]; - sta_opmode.bw = new_bw; + sta_opmode.bw = + ieee80211_sta_rx_bw_to_chan_width(rx->sta); sta_opmode.changed = STA_OPMODE_MAX_BW_CHANGED; rate_control_rate_update(local, sband, rx->sta, |