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 <shay.bar@celeno.com>
This commit is contained in:
Shay Bar 2021-02-10 13:07:18 +02:00 committed by Jouni Malinen
parent 5d3c4496fb
commit 6c2b729de0

View file

@ -6790,7 +6790,7 @@ u8 * hostapd_eid_txpower_envelope(struct hostapd_data *hapd, u8 *eid)
if (i == mode->num_channels) if (i == mode->num_channels)
return eid; return eid;
switch (iface->conf->vht_oper_chwidth) { switch (hostapd_get_oper_chwidth(iconf)) {
case CHANWIDTH_USE_HT: case CHANWIDTH_USE_HT:
if (iconf->secondary_channel == 0) { if (iconf->secondary_channel == 0) {
/* Max Transmit Power count = 0 (20 MHz) */ /* Max Transmit Power count = 0 (20 MHz) */