[PATCH] hostapd: take configured antenna set into consideration

Ben Greear greearb at candelatech.com
Sun Dec 20 13:54:27 PST 2015

On 12/20/2015 12:12 PM, Jouni Malinen wrote:
> On Wed, Dec 09, 2015 at 12:20:33PM -0800, greearb at candelatech.com wrote:
>> If user has configured TX antennas to be less than what
>> hardware advertises, the MCS reported by hardware will
>> be too large.  So, remove MCS sets accordingly.
> The nl80211 related changes seem mostly reasonable, but I'm not sure I
> understood what exactly the HT/VHT changes were supposed to do. Why are
> they different? HT uses tx_ant & rx_ant and masks values from
> cap->supported_mcs_set[] until the highest 1 bit is found. VHT masks
> values separately for TX and RX and does this with |= 0x3 << i. Is that
> really correct? Should i be "i * 2"? Why is there difference in the
> configured bitmap checks (BIT(i) vs. BIT(i - 1) and different i > 0 vs.
> i >= 0 condition)?

There might be several ways to make the math work.  I think my math
was proper enough, but maybe though more dumb luck than theoretical correctness.

And, I'm not really sure what to do when tx-antenna doesn't match

> Is it correct to find the MSB 1 from the values instead of count the
> number of 1 bits (configured antennas)?

As far as I know, there is no valid tx/rx mask that is not contiguous
for any driver.

> I'm attaching the cleaned up patches from my work branch. Please provide
> any possible updated on top of these.

I'll rebase on top of your changes when I get a chance...


Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

More information about the Hostap mailing list