On Tue, Dec 08, 2020 at 05:20:19PM +0200, Shay Bar wrote: > According to latest IEEE802.11 spec, Transmit Power Envelope element should > also be added to 11ax and is no longer called VHT Transmit Power Envelope. IEEE P802.11ax/D8.0 seems to have conditions on when this is included. Only the 6 GHz HE AP case seems to be unconditionally including this element. > Remove the VHT naming from the element. > move hostapd_eid_txpower_envelope() from ieee802_11_vht.c to ieee802_11.c. > use hostapd_get_oper_chwidth(iconf) instead of iface->conf->vht_oper_chwidth. That type of renaming should be in a separate patch alone to make the changes easier to review. > diff --git a/src/ap/beacon.c b/src/ap/beacon.c > index 47b260e81..c6597c6cd 100644 > --- a/src/ap/beacon.c > +++ b/src/ap/beacon.c > @@ -559,13 +559,14 @@ static u8 * hostapd_gen_probe_resp(struct hostapd_data *hapd, > !is_6ghz_op_class(hapd->iconf->op_class)) { > pos = hostapd_eid_vht_capabilities(hapd, pos, 0); > pos = hostapd_eid_vht_operation(hapd, pos); > - pos = hostapd_eid_txpower_envelope(hapd, pos); > } > #endif /* CONFIG_IEEE80211AC */ > > if ((hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac) || > - (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax)) > + (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax)) { > pos = hostapd_eid_wb_chsw_wrapper(hapd, pos); > + pos = hostapd_eid_txpower_envelope(hapd, pos); > + } The order of the IEs is strictly specified in the standard and the Transmit Power Envelope element needs to be before the Channel Switch Wrapper element, so this type of reordering of the elements is not correct. Are the conditions for including Transmit Power Envelope element in that manner correct? In particular, is this correct to include in all 2.4 GHz cases? > @@ -1287,13 +1288,14 @@ int ieee802_11_build_ap_params(struct hostapd_data *hapd, > if (hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac) { > tailpos = hostapd_eid_vht_capabilities(hapd, tailpos, 0); > tailpos = hostapd_eid_vht_operation(hapd, tailpos); > - tailpos = hostapd_eid_txpower_envelope(hapd, tailpos); > } > #endif /* CONFIG_IEEE80211AC */ > > if ((hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac) || > - (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax)) > + (hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax)) { > tailpos = hostapd_eid_wb_chsw_wrapper(hapd, tailpos); > + tailpos = hostapd_eid_txpower_envelope(hapd, tailpos); > + } Same comments apply here. -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap