2023-09-28 07:17:35

by Kang Yang

[permalink] [raw]
Subject: [PATCH 2/4] wifi: mac80211: mlme: correct the verification of extracted bitmap

Mac80211 will extract puncturing bitmap according to the negotiated
bandwidth. After extraction, should check the new puncturing bitmap
according to the negotiated bandwidth, but here input the original bitmap.

When bandwidth downgrade occurs, this function may return an error even
though negotiated bandwidth and puncturing bitmap match correctly.

So correct it.

Fixes: aa87cd8b3573 ("wifi: mac80211: mlme: handle EHT channel puncturing")
Signed-off-by: Kang Yang <[email protected]>
---
net/mac80211/mlme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 16e15ced28a5..13fba1f1cd89 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -145,7 +145,7 @@ ieee80211_handle_puncturing_bitmap(struct ieee80211_link_data *link,
ieee80211_extract_dis_subch_bmap(eht_oper, chandef,
bitmap);

- if (cfg80211_valid_disable_subchannel_bitmap(&bitmap,
+ if (cfg80211_valid_disable_subchannel_bitmap(&extracted,
chandef))
break;
link->u.mgd.conn_flags |=
--
2.34.1