Search Linux Wireless

Re: [PATCH 01/10] ath9k_hw: make support for PC-OEM cards optional

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

 



On 2014-10-20 09:57, Sujith Manoharan wrote:
> Felix Fietkau wrote:
>> diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
>> index 975074f..7a81f5b 100644
>> --- a/drivers/net/wireless/ath/ath9k/hw.h
>> +++ b/drivers/net/wireless/ath/ath9k/hw.h
>> @@ -244,13 +244,20 @@ enum ath9k_hw_caps {
>>  	ATH9K_HW_CAP_2GHZ			= BIT(11),
>>  	ATH9K_HW_CAP_5GHZ			= BIT(12),
>>  	ATH9K_HW_CAP_APM			= BIT(13),
>> +#ifdef CONFIG_ATH9K_PCOEM
>>  	ATH9K_HW_CAP_RTT			= BIT(14),
>>  	ATH9K_HW_CAP_MCI			= BIT(15),
>> -	ATH9K_HW_CAP_DFS			= BIT(16),
>> -	ATH9K_HW_WOW_DEVICE_CAPABLE		= BIT(17),
>> -	ATH9K_HW_CAP_PAPRD			= BIT(18),
>> -	ATH9K_HW_CAP_FCC_BAND_SWITCH		= BIT(19),
>> -	ATH9K_HW_CAP_BT_ANT_DIV			= BIT(20),
>> +	ATH9K_HW_WOW_DEVICE_CAPABLE		= BIT(16),
>> +	ATH9K_HW_CAP_BT_ANT_DIV			= BIT(17),
>> +#else
>> +	ATH9K_HW_CAP_RTT			= 0,
>> +	ATH9K_HW_CAP_MCI			= 0,
>> +	ATH9K_HW_WOW_DEVICE_CAPABLE		= 0,
>> +	ATH9K_HW_CAP_BT_ANT_DIV			= 0,
>> +#endif
>> +	ATH9K_HW_CAP_DFS			= BIT(18),
>> +	ATH9K_HW_CAP_PAPRD			= BIT(19),
>> +	ATH9K_HW_CAP_FCC_BAND_SWITCH		= BIT(20),
>>  };
> 
> Why is this needed ?
To allow the compiler to optimize out code checking for these features.
That way we don't have to #ifdef all those places where this gets used.

- 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