History

cfg80211: change bandwidth reporting to explicit field

For some reason, we made the bandwidth separate flags, which is rather confusing - a single rate cannot have different bandwidths at the same time. Change this to no longer be flags but use a separate field for the bandwidth ('bw') instead. While at it, add support for 5 and 10 MHz rates - these are reported as regular legacy rates with their real bitrate, but tagged as 5/10 now to make it easier to distinguish them. In the nl80211 API, the flags are preserved, but the code now can also clearly only set a single one of the flags.

Johannes Berg committed 11 years ago

Commit b51f3be1 parent 97d910d8 files · +125 −50Browse files

Showing the changes to include/uapi/linux (1 of 8 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+8−0
@@ -2281,6 +2281,12 @@ struct nl80211_sta_flag_update { · 2280 unmodified lines
2281 * @NL80211_RATE_INFO_80P80_MHZ_WIDTH: unused - 80+80 is treated the2281 * @NL80211_RATE_INFO_80P80_MHZ_WIDTH: unused - 80+80 is treated the
2282 * same as 160 for purposes of the bitrates2282 * same as 160 for purposes of the bitrates
2283 * @NL80211_RATE_INFO_160_MHZ_WIDTH: 160 MHz VHT rate2283 * @NL80211_RATE_INFO_160_MHZ_WIDTH: 160 MHz VHT rate
2284 * @NL80211_RATE_INFO_10_MHZ_WIDTH: 10 MHz width - note that this is
2285 * a legacy rate and will be reported as the actual bitrate, i.e.
2286 * half the base (20 MHz) rate
2287 * @NL80211_RATE_INFO_5_MHZ_WIDTH: 5 MHz width - note that this is
2288 * a legacy rate and will be reported as the actual bitrate, i.e.
2289 * a quarter of the base (20 MHz) rate
2284 * @__NL80211_RATE_INFO_AFTER_LAST: internal use2290 * @__NL80211_RATE_INFO_AFTER_LAST: internal use
2285 */2291 */
2286enum nl80211_rate_info {2292enum nl80211_rate_info {
@@ -2295,6 +2301,8 @@ enum nl80211_rate_info { · 8 unmodified lines
2295 NL80211_RATE_INFO_80_MHZ_WIDTH,2301 NL80211_RATE_INFO_80_MHZ_WIDTH,
2296 NL80211_RATE_INFO_80P80_MHZ_WIDTH,2302 NL80211_RATE_INFO_80P80_MHZ_WIDTH,
2297 NL80211_RATE_INFO_160_MHZ_WIDTH,2303 NL80211_RATE_INFO_160_MHZ_WIDTH,
2304 NL80211_RATE_INFO_10_MHZ_WIDTH,
2305 NL80211_RATE_INFO_5_MHZ_WIDTH,
2298 2306
2299 /* keep last */2307 /* keep last */
2300 __NL80211_RATE_INFO_AFTER_LAST,2308 __NL80211_RATE_INFO_AFTER_LAST,