summaryrefslogtreecommitdiff
path: root/net/mac80211/vht.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-07 21:24:55 (GMT)
committerJohannes Berg <johannes.berg@intel.com>2013-02-15 08:41:34 (GMT)
commitbee7f58699a406a4210ba9e0367bae7ac666abd0 (patch)
tree9925ff46a41d09667fe797460b2d3ccb07fed4dd /net/mac80211/vht.c
parent18942d3be0e0e67aa40550ce3266e48b51845d52 (diff)
downloadlinux-bee7f58699a406a4210ba9e0367bae7ac666abd0.tar.xz
mac80211: handle operating mode notif in beacon/assoc response
In beacons and association response frames an AP may include an operating mode notification element to advertise changes in the number of spatial streams it can receive. Handle this using the existing function that handles the action frame, but only handle NSS changes, not bandwidth changes which aren't allowed here. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/vht.c')
-rw-r--r--net/mac80211/vht.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/vht.c b/net/mac80211/vht.c
index 0951f74..a9549fc 100644
--- a/net/mac80211/vht.c
+++ b/net/mac80211/vht.c
@@ -141,7 +141,7 @@ void ieee80211_sta_set_rx_nss(struct sta_info *sta)
void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
struct sta_info *sta, u8 opmode,
- enum ieee80211_band band)
+ enum ieee80211_band band, bool nss_only)
{
struct ieee80211_local *local = sdata->local;
struct ieee80211_supported_band *sband;
@@ -164,6 +164,9 @@ void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
changed |= IEEE80211_RC_NSS_CHANGED;
}
+ if (nss_only)
+ goto change;
+
switch (opmode & IEEE80211_OPMODE_NOTIF_CHANWIDTH_MASK) {
case IEEE80211_OPMODE_NOTIF_CHANWIDTH_20MHZ:
sta->cur_max_bandwidth = IEEE80211_STA_RX_BW_20;
@@ -185,6 +188,7 @@ void ieee80211_vht_handle_opmode(struct ieee80211_sub_if_data *sdata,
changed |= IEEE80211_RC_NSS_CHANGED;
}
+ change:
if (changed)
rate_control_rate_update(local, sband, sta, changed);
}