From 6c2b729de02b23c2991497c4fd8b1da3744b907b Mon Sep 17 00:00:00 2001 From: Shay Bar Date: Wed, 10 Feb 2021 13:07:18 +0200 Subject: [PATCH] Use hostapd_get_oper_chwidth() when build Transmit Power Envelope element hostapd_get_oper_chwidth(iconf) instead of direct access to iface->conf->vht_oper_chwidth is needed here to be able to use this with HE in cases where VHT is not enabled. Signed-off-by: Shay Bar --- 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 13fa450df..233da7bfc 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -6790,7 +6790,7 @@ u8 * hostapd_eid_txpower_envelope(struct hostapd_data *hapd, u8 *eid) if (i == mode->num_channels) return eid; - switch (iface->conf->vht_oper_chwidth) { + switch (hostapd_get_oper_chwidth(iconf)) { case CHANWIDTH_USE_HT: if (iconf->secondary_channel == 0) { /* Max Transmit Power count = 0 (20 MHz) */