diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-12-17 10:47:56 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-12-19 14:46:55 -0500 |
commit | 8a30930563521c9dba73c93b5631be1d0993f78f (patch) | |
tree | 859d5bd92689fc934aa6c7eea98f1d37891fb293 /drivers/net/wireless/ath/ath9k/pci.c | |
parent | 104cfa881006c18af9b118e1631dcf1f8378994a (diff) |
ath9k_hw: make bluetooth coexistence support optional at compile time
Many systems (e.g. embedded systems) do not have wifi modules connected to
bluetooth modules, so bluetooth coexistence is irrelevant there. With the
addition of MCI support, ath9k picked up quite a bit of extra code that
can be compiled out this way.
This patch redefines ATH9K_HW_CAP_MCI and adds an inline wrapper for
querying the bluetooth coexistence scheme, allowing the compiler to
eliminate code that uses it, with only very little use of #ifdef.
On MIPS this reduces the total size for the modules by about 20k.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/pci.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index a439edc5dc06..77dc327def8d 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -121,7 +121,7 @@ static void ath_pci_aspm_init(struct ath_common *common) | |||
121 | if (!parent) | 121 | if (!parent) |
122 | return; | 122 | return; |
123 | 123 | ||
124 | if (ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE) { | 124 | if (ath9k_hw_get_btcoex_scheme(ah) != ATH_BTCOEX_CFG_NONE) { |
125 | /* Bluetooth coexistance requires disabling ASPM. */ | 125 | /* Bluetooth coexistance requires disabling ASPM. */ |
126 | pci_read_config_byte(pdev, pos + PCI_EXP_LNKCTL, &aspm); | 126 | pci_read_config_byte(pdev, pos + PCI_EXP_LNKCTL, &aspm); |
127 | aspm &= ~(PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1); | 127 | aspm &= ~(PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1); |