From: Felix Fietkau <nbd@openwrt.org>
To: Sujith Manoharan <sujith@msujith.org>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com
Subject: Re: [PATCH 01/10] ath9k_hw: make support for PC-OEM cards optional
Date: Mon, 20 Oct 2014 10:53:16 +0200 [thread overview]
Message-ID: <5444CD7C.1020807@openwrt.org> (raw)
In-Reply-To: <21572.49230.430784.951715@gargle.gargle.HOWL>
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
prev parent reply other threads:[~2014-10-20 8:53 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-18 17:02 [PATCH 01/10] ath9k_hw: make support for PC-OEM cards optional Felix Fietkau
2014-10-18 17:02 ` [PATCH 02/10] ath9k_hw: remove support for UB124 tx gain table Felix Fietkau
2014-10-20 7:58 ` Sujith Manoharan
2014-10-20 8:54 ` Felix Fietkau
2014-10-18 17:02 ` [PATCH 03/10] ath9k: fix processing RXORN interrupts Felix Fietkau
2014-10-20 8:15 ` Sujith Manoharan
2014-10-20 9:01 ` Felix Fietkau
2014-10-18 17:02 ` [PATCH 04/10] ath9k: clean up debugfs print of reset causes Felix Fietkau
2014-10-18 17:02 ` [PATCH 05/10] ath9k: restart hardware after noise floor calibration failure Felix Fietkau
2014-10-20 8:30 ` Sujith Manoharan
2014-10-18 17:02 ` [PATCH 06/10] ath9k_hw: do not run NF and periodic calibration at the same time Felix Fietkau
2014-10-20 8:41 ` Sujith Manoharan
2014-10-18 17:02 ` [PATCH 07/10] ath9k_hw: start initial NF calibration after PA calibration on <AR9003 Felix Fietkau
2014-10-20 8:45 ` Sujith Manoharan
2014-10-18 17:02 ` [PATCH 08/10] ath9k: add support for endian swap of eeprom from platform data Felix Fietkau
2014-10-18 17:02 ` [PATCH 09/10] ath9k: allow disabling bands via " Felix Fietkau
2014-10-18 17:02 ` [PATCH 10/10] ath9k: use a random MAC address if the EEPROM address is invalid Felix Fietkau
2014-10-20 7:57 ` [PATCH 01/10] ath9k_hw: make support for PC-OEM cards optional Sujith Manoharan
2014-10-20 8:53 ` Felix Fietkau [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5444CD7C.1020807@openwrt.org \
--to=nbd@openwrt.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=sujith@msujith.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.