diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-03-06 09:08:51 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-16 18:09:31 -0400 |
commit | a8c96d3b225d4c9e6ff341923e3f76de401c75b2 (patch) | |
tree | e6056b9520e58fafc7db2de5152ead43e013a696 /drivers/net/wireless/ath9k/reg.h | |
parent | 978b53264235eef1d2d2e9fd16ae26b3471c0b57 (diff) | |
download | linux-a8c96d3b225d4c9e6ff341923e3f76de401c75b2.tar.bz2 |
ath9k: cleanup AR5416 version checking macros
Currently we have two different versions of this macros. Because they
would have to do the same thing, we should simplify and merge them.
Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/reg.h')
-rw-r--r-- | drivers/net/wireless/ath9k/reg.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath9k/reg.h b/drivers/net/wireless/ath9k/reg.h index d7b8c571e91e..0609e2e5eba8 100644 --- a/drivers/net/wireless/ath9k/reg.h +++ b/drivers/net/wireless/ath9k/reg.h @@ -161,10 +161,6 @@ #define AR_SREV_VERSION_9100 0x014 #define AR_SREV_9100(ah) ((ah->hw_version.macVersion) == AR_SREV_VERSION_9100) -#define AR_SREV_5416_V20_OR_LATER(_ah) \ - (AR_SREV_9100((_ah)) || AR_SREV_5416_20_OR_LATER(_ah)) -#define AR_SREV_5416_V22_OR_LATER(_ah) \ - (AR_SREV_9100((_ah)) || AR_SREV_5416_22_OR_LATER(_ah)) #define AR_ISR 0x0080 #define AR_ISR_RXOK 0x00000001 @@ -748,12 +744,19 @@ #define AR_SREV_9100_OR_LATER(_ah) \ (((_ah)->hw_version.macVersion >= AR_SREV_VERSION_5416_PCIE)) + +#define AR_SREV_5416(_ah) \ + (((_ah)->hw_version.macVersion == AR_SREV_VERSION_5416_PCI) || \ + ((_ah)->hw_version.macVersion == AR_SREV_VERSION_5416_PCIE)) #define AR_SREV_5416_20_OR_LATER(_ah) \ - (((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9160) || \ - ((_ah)->hw_version.macRev >= AR_SREV_REVISION_5416_20)) + (((AR_SREV_5416(_ah)) && \ + ((_ah)->hw_version.macRev >= AR_SREV_REVISION_5416_20)) || \ + ((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9100)) #define AR_SREV_5416_22_OR_LATER(_ah) \ - (((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9160) || \ - ((_ah)->hw_version.macRev >= AR_SREV_REVISION_5416_22)) + (((AR_SREV_5416(_ah)) && \ + ((_ah)->hw_version.macRev >= AR_SREV_REVISION_5416_22)) || \ + ((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9100)) + #define AR_SREV_9160(_ah) \ (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9160)) #define AR_SREV_9160_10_OR_LATER(_ah) \ |