Skip to contentSkip to conversation

wifi: rtw89: fix physts IE page check

PATCH In review Ping-Ke Shih 2 participants 2 messages Nov 18, 2022 – Nov 22, 2022 Realtek wireless driver (rtw89)

lore
Share & tools
lore

Ping-Ke Shih

author maintainer
#0 lore raw

PATCH 1/1 wifi: rtw89: fix physts IE page check

From: Zong-Zhe Yang <[email protected]>

The index RTW89_PHYSTS_BITMAP_NUM is not a valid physts IE page. So, fix the check condition.

Fixes eb4e52b3f38d ("rtw89: fix incorrect channel info during scan")
---
 drivers/net/wireless/realtek/rtw89/phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw89/phy.c +1 -1
index dd46856989830..944bb0f2ee633 100644
@@ -3340,7 +3340,7 @@ void rtw89_phy_env_monitor_track(struct rtw89_dev *rtwdev)
 
 static bool rtw89_physts_ie_page_valid(enum rtw89_phy_status_bitmap *ie_page)
 {
-	if (*ie_page > RTW89_PHYSTS_BITMAP_NUM ||
+	if (*ie_page >= RTW89_PHYSTS_BITMAP_NUM ||
 	    *ie_page == RTW89_RSVD_9)
 		return false;
 	else if (*ie_page > RTW89_RSVD_9)
Signature · 1 line
2.25.1
#1 lore raw
Quoted 8 lines · Ping-Ke Shih

From: Zong-Zhe Yang <[email protected]>

The index RTW89_PHYSTS_BITMAP_NUM is not a valid physts IE page. So, fix the check condition.

Fixes eb4e52b3f38d ("rtw89: fix incorrect channel info during scan")

Patch applied to wireless-next.git, thanks.

9e2f177de1bf wifi: rtw89: fix physts IE page check

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches