Skip to content

Commit 070571b

Browse files
committed
wifi: cfg80211: handle 2x996 RU allocation in cfg80211_calculate_bitrate_he()
jira LE-2157 cve CVE-2024-43879 Rebuild_History Non-Buildable kernel-5.14.0-503.14.1.el9_5 commit-author Baochen Qiang <[email protected]> commit bcbd771 Currently NL80211_RATE_INFO_HE_RU_ALLOC_2x996 is not handled in cfg80211_calculate_bitrate_he(), leading to below warning: kernel: invalid HE MCS: bw:6, ru:6 kernel: WARNING: CPU: 0 PID: 2312 at net/wireless/util.c:1501 cfg80211_calculate_bitrate_he+0x22b/0x270 [cfg80211] Fix it by handling 2x996 RU allocation in the same way as 160 MHz bandwidth. Fixes: c4cbaf7 ("cfg80211: Add support for HE") Signed-off-by: Baochen Qiang <[email protected]> Link: https://msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]> (cherry picked from commit bcbd771) Signed-off-by: Jonathan Maple <[email protected]>
1 parent cfe7b1b commit 070571b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

net/wireless/util.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1524,7 +1524,9 @@ static u32 cfg80211_calculate_bitrate_he(struct rate_info *rate)
15241524
if (WARN_ON_ONCE(rate->nss < 1 || rate->nss > 8))
15251525
return 0;
15261526

1527-
if (rate->bw == RATE_INFO_BW_160)
1527+
if (rate->bw == RATE_INFO_BW_160 ||
1528+
(rate->bw == RATE_INFO_BW_HE_RU &&
1529+
rate->he_ru_alloc == NL80211_RATE_INFO_HE_RU_ALLOC_2x996))
15281530
result = rates_160M[rate->he_gi];
15291531
else if (rate->bw == RATE_INFO_BW_80 ||
15301532
(rate->bw == RATE_INFO_BW_HE_RU &&

0 commit comments

Comments
 (0)