Skip to content

Commit

Permalink
wifi: rtw89: fix physts IE page check
Browse files Browse the repository at this point in the history
[ Upstream commit 9e2f177 ]

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

Fixes: eb4e52b ("rtw89: fix incorrect channel info during scan")
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221118042322.26794-1-pkshih@realtek.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Zong-Zhe Yang authored and gregkh committed Dec 31, 2022
1 parent 60dcaf0 commit 1dc7089
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/realtek/rtw89/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -3139,7 +3139,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)
Expand Down

0 comments on commit 1dc7089

Please sign in to comment.