Commit c27aa56a authored by Arend van Spriel's avatar Arend van Spriel Committed by Johannes Berg

cfg80211: add VHT rate entries for MCS-10 and MCS-11

Observed the warning in cfg80211_calculate_bitrate_vht() using an
11ac chip reporting MCS-11. Since devices reporting non-standard
MCS-9 is already supported add similar entries for MCS-10 and MCS-11.
Actually, the value of MCS-9@20MHz is slightly off so corrected that.
Signed-off-by: default avatarArend van Spriel <arend.vanspriel@broadcom.com>
Link: https://lore.kernel.org/r/20210105105839.3795-1-arend.vanspriel@broadcom.com
[fix array size]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 7f7aa94b
...@@ -1224,7 +1224,7 @@ static u32 cfg80211_calculate_bitrate_edmg(struct rate_info *rate) ...@@ -1224,7 +1224,7 @@ static u32 cfg80211_calculate_bitrate_edmg(struct rate_info *rate)
static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate) static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate)
{ {
static const u32 base[4][10] = { static const u32 base[4][12] = {
{ 6500000, { 6500000,
13000000, 13000000,
19500000, 19500000,
...@@ -1235,7 +1235,9 @@ static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate) ...@@ -1235,7 +1235,9 @@ static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate)
65000000, 65000000,
78000000, 78000000,
/* not in the spec, but some devices use this: */ /* not in the spec, but some devices use this: */
86500000, 86700000,
97500000,
108300000,
}, },
{ 13500000, { 13500000,
27000000, 27000000,
...@@ -1247,6 +1249,8 @@ static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate) ...@@ -1247,6 +1249,8 @@ static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate)
135000000, 135000000,
162000000, 162000000,
180000000, 180000000,
202500000,
225000000,
}, },
{ 29300000, { 29300000,
58500000, 58500000,
...@@ -1258,6 +1262,8 @@ static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate) ...@@ -1258,6 +1262,8 @@ static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate)
292500000, 292500000,
351000000, 351000000,
390000000, 390000000,
438800000,
487500000,
}, },
{ 58500000, { 58500000,
117000000, 117000000,
...@@ -1269,12 +1275,14 @@ static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate) ...@@ -1269,12 +1275,14 @@ static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate)
585000000, 585000000,
702000000, 702000000,
780000000, 780000000,
877500000,
975000000,
}, },
}; };
u32 bitrate; u32 bitrate;
int idx; int idx;
if (rate->mcs > 9) if (rate->mcs > 11)
goto warn; goto warn;
switch (rate->bw) { switch (rate->bw) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment