diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-03-06 03:08:51 -0500 |
---|---|---|
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) |
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 @@ | |||
161 | #define AR_SREV_VERSION_9100 0x014 | 161 | #define AR_SREV_VERSION_9100 0x014 |
162 | 162 | ||
163 | #define AR_SREV_9100(ah) ((ah->hw_version.macVersion) == AR_SREV_VERSION_9100) | 163 | #define AR_SREV_9100(ah) ((ah->hw_version.macVersion) == AR_SREV_VERSION_9100) |
164 | #define AR_SREV_5416_V20_OR_LATER(_ah) \ | ||
165 | (AR_SREV_9100((_ah)) || AR_SREV_5416_20_OR_LATER(_ah)) | ||
166 | #define AR_SREV_5416_V22_OR_LATER(_ah) \ | ||
167 | (AR_SREV_9100((_ah)) || AR_SREV_5416_22_OR_LATER(_ah)) | ||
168 | 164 | ||
169 | #define AR_ISR 0x0080 | 165 | #define AR_ISR 0x0080 |
170 | #define AR_ISR_RXOK 0x00000001 | 166 | #define AR_ISR_RXOK 0x00000001 |
@@ -748,12 +744,19 @@ | |||
748 | 744 | ||
749 | #define AR_SREV_9100_OR_LATER(_ah) \ | 745 | #define AR_SREV_9100_OR_LATER(_ah) \ |
750 | (((_ah)->hw_version.macVersion >= AR_SREV_VERSION_5416_PCIE)) | 746 | (((_ah)->hw_version.macVersion >= AR_SREV_VERSION_5416_PCIE)) |
747 | |||
748 | #define AR_SREV_5416(_ah) \ | ||
749 | (((_ah)->hw_version.macVersion == AR_SREV_VERSION_5416_PCI) || \ | ||
750 | ((_ah)->hw_version.macVersion == AR_SREV_VERSION_5416_PCIE)) | ||
751 | #define AR_SREV_5416_20_OR_LATER(_ah) \ | 751 | #define AR_SREV_5416_20_OR_LATER(_ah) \ |
752 | (((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9160) || \ | 752 | (((AR_SREV_5416(_ah)) && \ |
753 | ((_ah)->hw_version.macRev >= AR_SREV_REVISION_5416_20)) | 753 | ((_ah)->hw_version.macRev >= AR_SREV_REVISION_5416_20)) || \ |
754 | ((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9100)) | ||
754 | #define AR_SREV_5416_22_OR_LATER(_ah) \ | 755 | #define AR_SREV_5416_22_OR_LATER(_ah) \ |
755 | (((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9160) || \ | 756 | (((AR_SREV_5416(_ah)) && \ |
756 | ((_ah)->hw_version.macRev >= AR_SREV_REVISION_5416_22)) | 757 | ((_ah)->hw_version.macRev >= AR_SREV_REVISION_5416_22)) || \ |
758 | ((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9100)) | ||
759 | |||
757 | #define AR_SREV_9160(_ah) \ | 760 | #define AR_SREV_9160(_ah) \ |
758 | (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9160)) | 761 | (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9160)) |
759 | #define AR_SREV_9160_10_OR_LATER(_ah) \ | 762 | #define AR_SREV_9160_10_OR_LATER(_ah) \ |