Search Linux Wireless

Re: [PATCH 1/5] mac80211: fix and optimize MCS mask handling

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

 



On 2013-04-15 3:38 PM, Johannes Berg wrote:
> 
>>  	for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
>> +		struct ieee80211_supported_band *sband = wiphy->bands[i];
>> +		int j;
>> +
>>  		sdata->rc_rateidx_mask[i] = mask->control[i].legacy;
>>  		memcpy(sdata->rc_rateidx_mcs_mask[i], mask->control[i].mcs,
>>  		       sizeof(mask->control[i].mcs));
>> +
>> +		sdata->rc_has_mcs_mask[i] = false;
>> +		if (!sband)
>> +			continue;
>> +
>> +		for (j = 0; j < IEEE80211_HT_MCS_MASK_LEN; j++)
> 
> I think I'd kinda prefer extra braces, but hey, I'd change that myself,
> but there's another question:
> 
>> +			if (~sdata->rc_rateidx_mcs_mask[i][j]) {
> 
> That ~ seems a bit odd to me, any reason you didn't just use ! ?
It's not a boolean, here I'm checking if any of the bits are set to 0.

- Felix
--
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 Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux