[PATCH] hostapd: Fix length of bandwidth indication subelement

Allen Ye allen.ye at mediatek.com
Wed Sep 4 22:55:28 PDT 2024


From: Shayne Chen <shayne.chen at mediatek.com>

The default length of the bandwidth indication subelement should be equal
to the minimum size of ieee80211_bw_ind_element structure.

Signed-off-by: Shayne Chen <shayne.chen at mediatek.com>
Signed-off-by: Allen Ye <allen.ye at mediatek.com>
---
 src/ap/ieee802_11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
index 230fdb7b2..aeac546ff 100644
--- a/src/ap/ieee802_11.c
+++ b/src/ap/ieee802_11.c
@@ -7306,7 +7306,7 @@ static u8 * hostapd_eid_bw_indication(struct hostapd_data *hapd, u8 *eid,
 {
 	u16 punct_bitmap = hostapd_get_punct_bitmap(hapd);
 	struct ieee80211_bw_ind_element *bw_ind_elem;
-	size_t elen = 3;
+	size_t elen = 4;
 
 	if (hapd->cs_freq_params.bandwidth <= 160 && !punct_bitmap)
 		return eid;
-- 
2.45.2




More information about the Hostap mailing list