Search Linux Wireless

Re: [PATCH] iw: fix typos in MCS set parsing code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Berg írta:
> On Tue, 2009-08-11 at 08:47 +0200, Gabor Juhos wrote:
>> The current code uses wrong binary operator for masking,
>> and the shift values for the 'tx_max_num_spatial_streams' and
>> 'tx_unequal_modulation' fields are off-by-one.
> 
>> -			tx_max_num_spatial_streams = (mcs[12] | ((1 << 3) | (1 << 4))) + 1;
>> -			tx_unequal_modulation = !!(mcs[12] & (1 << 5));
>> +			tx_max_num_spatial_streams = (mcs[12] & ((1 << 2) | (1 << 3))) + 1;
>> +			tx_unequal_modulation = !!(mcs[12] & (1 << 4));
> 
> Are you sure? The "Supported MCS Set" field is defined as a series of
> _bits_, and the bits are transmitted the other way around within each
> byte.

Yes, I'm sure. Here are the relevant definitions from <linux/ieee80211.h>:

#define IEEE80211_HT_MCS_TX_DEFINED             0x01
#define IEEE80211_HT_MCS_TX_RX_DIFF             0x02
/* value 0 == 1 stream etc */
#define IEEE80211_HT_MCS_TX_MAX_STREAMS_MASK    0x0C
#define IEEE80211_HT_MCS_TX_MAX_STREAMS_SHIFT   2
#define         IEEE80211_HT_MCS_TX_MAX_STREAMS 4
#define IEEE80211_HT_MCS_TX_UNEQUAL_MODULATION  0x10

Gabor

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux