On Thu, Nov 26, 2015 at 09:03:22PM +0200, Jouni Malinen wrote: > On Mon, Nov 23, 2015 at 06:40:26PM +0530, Rajkumar Manoharan wrote: > > Add Transmit Power Envelope element defined in > > IEEE P802.11-REVmc/D4.3, 8.4.2.161. > > Thanks, applied. > > > diff --git a/src/ap/ieee802_11_vht.c b/src/ap/ieee802_11_vht.c > > +u8 * hostapd_eid_vht_txpwr_env(struct hostapd_data *hapd, u8 *eid) > > > + max_tx_power = chan->max_tx_power - local_pwr_constraint; > > + > > + /* > > + * Local Maximum Transmit power is encoded as 2's complement > > + * with a 0.5 dB step > > + */ > > + max_tx_power = ~(max_tx_power * 2) + 1; > > Though, this does not look correct.. That would mess up positive values > pretty badly. I think I fixed this, but anyway, please take a look at > send a patch to update this, if needed. > your change looks much better that above logic. It also takes care of special cases. > > + *eid++ = WLAN_EID_VHT_TRANSMIT_POWER_ENVELOPE; > > + *eid++ = 4; > > That length value is not correct since this is now variable length: > oops.. my bad. > > + /* > > + * Max Transmit Power count and > > + * Max Transmit Power units = 0 (EIRP) > > + */ > > + *eid++ = tx_pwr_count; > > + > > + i = 0; > > + while (i++ <= tx_pwr_count) > > + *eid++ = max_tx_power; > > Here.. Fixed the length field to match. > Sorry for the inconvenience.. Thanks a lot. -Rajkumar _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap