From 3f91b2d7460fb69438ba7563635558566c86d578 Mon Sep 17 00:00:00 2001 From: Muna Sinada Date: Wed, 19 Oct 2022 13:19:59 -0700 Subject: [PATCH] hostapd: readd check for hw EHT support in EHT Operation IE Currently EHT Operation IE is present when hardware does not support EHT due to regression from package upgrade. Readd check for hardware EHT support before adding EHT Operation IE. Signed-off-by: Muna Sinada --- src/ap/ieee802_11_eht.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletions(-) --- a/src/ap/ieee802_11_eht.c +++ b/src/ap/ieee802_11_eht.c @@ -212,12 +212,17 @@ u8 * hostapd_eid_eht_capab(struct hostap u8 * hostapd_eid_eht_operation(struct hostapd_data *hapd, u8 *eid, enum ieee80211_op_mode opmode) { + struct hostapd_hw_modes *mode; struct hostapd_config *conf = hapd->iconf; struct ieee80211_eht_operation *oper; u8 *pos = eid, seg0 = 0, seg1 = 0, *length_pos; enum oper_chan_width chwidth; - if (!hapd->iface->current_mode) + mode = hapd->iface->current_mode; + if (!mode) + return eid; + + if (!mode->eht_capab[opmode].eht_supported) return eid; // if (hapd->iconf->punct_bitmap)