1 From 895dd2cb9def6733323719312ead20155b43b8e5 Mon Sep 17 00:00:00 2001
2 From: Gabor Juhos <juhosg@openwrt.org>
3 Date: Thu, 5 Mar 2009 09:56:14 +0100
4 Subject: [PATCH v2 2/3] ath9k: move ar9100 version checking macros into a more appropriate place
6 All other version checking macros are in a common location within the
7 reg.h file. The AR_SREV_9100_OR_LATER macro is wrong currently, but will
8 be fixed with the next patch.
10 Changes-licensed-under: ISC
12 Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
13 Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
15 drivers/net/wireless/ath9k/reg.h | 13 ++++++-------
16 1 files changed, 6 insertions(+), 7 deletions(-)
18 --- a/drivers/net/wireless/ath9k/reg.h
19 +++ b/drivers/net/wireless/ath9k/reg.h
21 #define AR_CST_TIMEOUT_LIMIT 0xFFFF0000
22 #define AR_CST_TIMEOUT_LIMIT_S 16
24 -#define AR_SREV_VERSION_9100 0x014
26 -#define AR_SREV_9100(ah) ((ah->hw_version.macVersion) == AR_SREV_VERSION_9100)
29 #define AR_ISR_RXOK 0x00000001
30 #define AR_ISR_RXDESC 0x00000002
32 #define AR_SREV_REVISION_5416_10 0
33 #define AR_SREV_REVISION_5416_20 1
34 #define AR_SREV_REVISION_5416_22 2
35 +#define AR_SREV_VERSION_9100 0x14
36 #define AR_SREV_VERSION_9160 0x40
37 #define AR_SREV_REVISION_9160_10 0
38 #define AR_SREV_REVISION_9160_11 1
40 #define AR_SREV_REVISION_9285_11 1
41 #define AR_SREV_REVISION_9285_12 2
43 -#define AR_SREV_9100_OR_LATER(_ah) \
44 - (((_ah)->hw_version.macVersion >= AR_SREV_VERSION_5416_PCIE))
46 #define AR_SREV_5416(_ah) \
47 (((_ah)->hw_version.macVersion == AR_SREV_VERSION_5416_PCI) || \
48 ((_ah)->hw_version.macVersion == AR_SREV_VERSION_5416_PCIE))
50 ((_ah)->hw_version.macRev >= AR_SREV_REVISION_5416_22)) || \
51 ((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9100))
53 +#define AR_SREV_9100(ah) \
54 + ((ah->hw_version.macVersion) == AR_SREV_VERSION_9100)
55 +#define AR_SREV_9100_OR_LATER(_ah) \
56 + (((_ah)->hw_version.macVersion >= AR_SREV_VERSION_5416_PCIE))
58 #define AR_SREV_9160(_ah) \
59 (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9160))
60 #define AR_SREV_9160_10_OR_LATER(_ah) \