{nl,cfg}80211: support high bitrates

Until now, a u16 value was used to represent bitrate value.
With VHT bitrates this becomes too small.

Introduce a new 32-bit bitrate attribute. nl80211 will report
both the new and the old attribute, unless the bitrate doesn't
fit into the old u16 attribute in which case only the new one
will be reported.

User space tools encouraged to prefer the 32-bit attribute, if
available (since it won't be available on older kernels.)

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
[reword commit message and comments a bit]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Vladimir Kondratiev
2012-07-05 14:25:49 +03:00
committed by Johannes Berg
parent c5a7e58249
commit 8eb41c8dfb
4 changed files with 18 additions and 4 deletions

View File

@@ -900,7 +900,7 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev,
return err;
}
u16 cfg80211_calculate_bitrate(struct rate_info *rate)
u32 cfg80211_calculate_bitrate(struct rate_info *rate)
{
int modulation, streams, bitrate;