Merge tag 'mac80211-next-for-davem-2015-01-19' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Some further updates for net-next: * fix network-manager which was broken by the previous changes * fix delete-station events, which were broken by me making the genlmsg_end() mistake * fix a timer left running during suspend in some race conditions that would cause an annoying (but harmless) warning * (less important, but in the tree already) remove 80+80 MHz rate reporting since the spec doesn't distinguish it from 160 MHz; as the bitrate they're both 160 MHz bandwidth Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -1073,10 +1073,24 @@ static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate)
|
||||
if (WARN_ON_ONCE(rate->mcs > 9))
|
||||
return 0;
|
||||
|
||||
idx = rate->flags & (RATE_INFO_FLAGS_160_MHZ_WIDTH |
|
||||
RATE_INFO_FLAGS_80P80_MHZ_WIDTH) ? 3 :
|
||||
rate->flags & RATE_INFO_FLAGS_80_MHZ_WIDTH ? 2 :
|
||||
rate->flags & RATE_INFO_FLAGS_40_MHZ_WIDTH ? 1 : 0;
|
||||
switch (rate->bw) {
|
||||
case RATE_INFO_BW_160:
|
||||
idx = 3;
|
||||
break;
|
||||
case RATE_INFO_BW_80:
|
||||
idx = 2;
|
||||
break;
|
||||
case RATE_INFO_BW_40:
|
||||
idx = 1;
|
||||
break;
|
||||
case RATE_INFO_BW_5:
|
||||
case RATE_INFO_BW_10:
|
||||
default:
|
||||
WARN_ON(1);
|
||||
/* fall through */
|
||||
case RATE_INFO_BW_20:
|
||||
idx = 0;
|
||||
}
|
||||
|
||||
bitrate = base[idx][rate->mcs];
|
||||
bitrate *= rate->nss;
|
||||
@@ -1107,8 +1121,7 @@ u32 cfg80211_calculate_bitrate(struct rate_info *rate)
|
||||
modulation = rate->mcs & 7;
|
||||
streams = (rate->mcs >> 3) + 1;
|
||||
|
||||
bitrate = (rate->flags & RATE_INFO_FLAGS_40_MHZ_WIDTH) ?
|
||||
13500000 : 6500000;
|
||||
bitrate = (rate->bw == RATE_INFO_BW_40) ? 13500000 : 6500000;
|
||||
|
||||
if (modulation < 4)
|
||||
bitrate *= (modulation + 1);
|
||||
|
Reference in New Issue
Block a user