diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-02-07 05:47:44 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-02-15 03:41:30 -0500 |
commit | e1a0c6b3a4b27ed5f21291d0bbee2167ec201ef5 (patch) | |
tree | 18e5c9bd022ea469e7350a52ca67ce505a7608e6 /include/net/mac80211.h | |
parent | 4a34215ef7487b1cbd783e7cc485eb03de893bd0 (diff) |
mac80211: stop toggling IEEE80211_HT_CAP_SUP_WIDTH_20_40
For VHT, many more bandwidth changes are possible. As a first
step, stop toggling the IEEE80211_HT_CAP_SUP_WIDTH_20_40 flag
in the HT capabilities and instead introduce a bandwidth field
indicating the currently usable bandwidth to transmit to the
station. Of course, make all drivers use it.
To achieve this, make ieee80211_ht_cap_ie_to_sta_ht_cap() get
the station as an argument, rather than the new capabilities,
so it can set up the new bandwidth field.
If the station is a VHT station and VHT bandwidth is in use,
also set the bandwidth accordingly.
Doing this allows us to get rid of the supports_40mhz flag as
the HT capabilities now reflect the true capability instead of
the current setting.
While at it, also fix ieee80211_ht_cap_ie_to_sta_ht_cap() to not
ignore HT cap overrides when MCS TX isn't supported (not that it
really happens...)
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/mac80211.h')
-rw-r--r-- | include/net/mac80211.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 7241962f9f13..1e3b4f730397 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1197,6 +1197,24 @@ enum ieee80211_sta_state { | |||
1197 | }; | 1197 | }; |
1198 | 1198 | ||
1199 | /** | 1199 | /** |
1200 | * enum ieee80211_sta_rx_bandwidth - station RX bandwidth | ||
1201 | * @IEEE80211_STA_RX_BW_20: station can only receive 20 MHz | ||
1202 | * @IEEE80211_STA_RX_BW_40: station can receive up to 40 MHz | ||
1203 | * @IEEE80211_STA_RX_BW_80: station can receive up to 80 MHz | ||
1204 | * @IEEE80211_STA_RX_BW_160: station can receive up to 160 MHz | ||
1205 | * (including 80+80 MHz) | ||
1206 | * | ||
1207 | * Implementation note: 20 must be zero to be initialized | ||
1208 | * correctly, the values must be sorted. | ||
1209 | */ | ||
1210 | enum ieee80211_sta_rx_bandwidth { | ||
1211 | IEEE80211_STA_RX_BW_20 = 0, | ||
1212 | IEEE80211_STA_RX_BW_40, | ||
1213 | IEEE80211_STA_RX_BW_80, | ||
1214 | IEEE80211_STA_RX_BW_160, | ||
1215 | }; | ||
1216 | |||
1217 | /** | ||
1200 | * struct ieee80211_sta - station table entry | 1218 | * struct ieee80211_sta - station table entry |
1201 | * | 1219 | * |
1202 | * A station table entry represents a station we are possibly | 1220 | * A station table entry represents a station we are possibly |
@@ -1218,6 +1236,7 @@ enum ieee80211_sta_state { | |||
1218 | * @uapsd_queues: bitmap of queues configured for uapsd. Only valid | 1236 | * @uapsd_queues: bitmap of queues configured for uapsd. Only valid |
1219 | * if wme is supported. | 1237 | * if wme is supported. |
1220 | * @max_sp: max Service Period. Only valid if wme is supported. | 1238 | * @max_sp: max Service Period. Only valid if wme is supported. |
1239 | * @bandwidth: current bandwidth the station can receive with | ||
1221 | */ | 1240 | */ |
1222 | struct ieee80211_sta { | 1241 | struct ieee80211_sta { |
1223 | u32 supp_rates[IEEE80211_NUM_BANDS]; | 1242 | u32 supp_rates[IEEE80211_NUM_BANDS]; |
@@ -1228,6 +1247,7 @@ struct ieee80211_sta { | |||
1228 | bool wme; | 1247 | bool wme; |
1229 | u8 uapsd_queues; | 1248 | u8 uapsd_queues; |
1230 | u8 max_sp; | 1249 | u8 max_sp; |
1250 | enum ieee80211_sta_rx_bandwidth bandwidth; | ||
1231 | 1251 | ||
1232 | /* must be last */ | 1252 | /* must be last */ |
1233 | u8 drv_priv[0] __aligned(sizeof(void *)); | 1253 | u8 drv_priv[0] __aligned(sizeof(void *)); |
@@ -2086,7 +2106,9 @@ enum ieee80211_frame_release_type { | |||
2086 | * enum ieee80211_rate_control_changed - flags to indicate what changed | 2106 | * enum ieee80211_rate_control_changed - flags to indicate what changed |
2087 | * | 2107 | * |
2088 | * @IEEE80211_RC_BW_CHANGED: The bandwidth that can be used to transmit | 2108 | * @IEEE80211_RC_BW_CHANGED: The bandwidth that can be used to transmit |
2089 | * to this station changed. | 2109 | * to this station changed. The actual bandwidth is in the station |
2110 | * information -- for HT20/40 the IEEE80211_HT_CAP_SUP_WIDTH_20_40 | ||
2111 | * flag changes, for HT and VHT the bandwidth field changes. | ||
2090 | * @IEEE80211_RC_SMPS_CHANGED: The SMPS state of the station changed. | 2112 | * @IEEE80211_RC_SMPS_CHANGED: The SMPS state of the station changed. |
2091 | * @IEEE80211_RC_SUPP_RATES_CHANGED: The supported rate set of this peer | 2113 | * @IEEE80211_RC_SUPP_RATES_CHANGED: The supported rate set of this peer |
2092 | * changed (in IBSS mode) due to discovering more information about | 2114 | * changed (in IBSS mode) due to discovering more information about |