diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-03-14 11:40:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-15 13:45:03 -0400 |
commit | f3eef64521f82330b4b173584d776b8a04b3e795 (patch) | |
tree | b9f9b9700322951c24f38f978fd76c5ffd2d81e8 /drivers/net/wireless/ath/ath9k/hw.c | |
parent | 99ac8cd6ff44e733acdff0d36475dce2d3fe6a6b (diff) |
ath9k: optimize register access functions
By checking for NR_CPUS, the compiler can optimize out register access
serialization code on non-SMP kernels
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/hw.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index b92cf01cfd19..ce9577ebaf2b 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -556,7 +556,7 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
556 | return -EIO; | 556 | return -EIO; |
557 | } | 557 | } |
558 | 558 | ||
559 | if (ah->config.serialize_regmode == SER_REG_MODE_AUTO) { | 559 | if (NR_CPUS > 1 && ah->config.serialize_regmode == SER_REG_MODE_AUTO) { |
560 | if (ah->hw_version.macVersion == AR_SREV_VERSION_5416_PCI || | 560 | if (ah->hw_version.macVersion == AR_SREV_VERSION_5416_PCI || |
561 | ((AR_SREV_9160(ah) || AR_SREV_9280(ah)) && | 561 | ((AR_SREV_9160(ah) || AR_SREV_9280(ah)) && |
562 | !ah->is_pciexpress)) { | 562 | !ah->is_pciexpress)) { |