Search Linux Wireless

Re: [RFC] ath9k_hw: Fix chip revision checks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 12 March 2012 11:27 AM, Mohammed Shafi Shajakhan wrote:
From: Mohammed Shafi Shajakhan<mohammed@xxxxxxxxxxxxxxxx>

not sure if these checks are previously avoided may be those revision of
chipsets are obselete ?

Signed-off-by: Mohammed Shafi Shajakhan<mohammed@xxxxxxxxxxxxxxxx>
---
  drivers/net/wireless/ath/ath9k/reg.h |   20 +++++++++++++++-----
  1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
index 80b1856..55e3513 100644
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -821,20 +821,28 @@
  	 ((_ah)->hw_version.macRev == AR_SREV_REVISION_9160_11))
  #define AR_SREV_9280(_ah) \
  	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9280))
-#define AR_SREV_9280_20_OR_LATER(_ah) \
-	(((_ah)->hw_version.macVersion>= AR_SREV_VERSION_9280))
  #define AR_SREV_9280_20(_ah) \
  	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9280))
+#define AR_SREV_9280_10_OR_LATER(_ah) \
+	(((_ah)->hw_version.macVersion>= AR_SREV_VERSION_9280))
+#define AR_SREV_9280_20_OR_LATER(_ah) \
+	(((_ah)->hw_version.macVersion>  AR_SREV_VERSION_9280) || \
+	 (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9280)&&  \
+	  ((_ah)->hw_version.macRev>= AR_SREV_REVISION_9280_20)))

  #define AR_SREV_9285(_ah) \
  	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9285))
  #define AR_SREV_9285_12_OR_LATER(_ah) \
-	(((_ah)->hw_version.macVersion>= AR_SREV_VERSION_9285))
+	(((_ah)->hw_version.macVersion>  AR_SREV_VERSION_9285) || \
+	 (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9285)&&  \
+	  ((_ah)->hw_version.macRev>= AR_SREV_REVISION_9285_12)))

  #define AR_SREV_9287(_ah) \
  	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9287))
  #define AR_SREV_9287_11_OR_LATER(_ah) \
-	(((_ah)->hw_version.macVersion>= AR_SREV_VERSION_9287))
+	(((_ah)->hw_version.macVersion>  AR_SREV_VERSION_9287) || \
+	 (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9287)&&  \
+	  ((_ah)->hw_version.macRev>= AR_SREV_REVISION_9285_11)))

oops, also i made a mistake here, it should be AR_SREV_REVISION_9287_11


  #define AR_SREV_9287_11(_ah) \
  	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9287)&&  \
  	 ((_ah)->hw_version.macRev == AR_SREV_REVISION_9287_11))
@@ -862,7 +870,9 @@
  #define AR_SREV_9300(_ah) \
  	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9300))
  #define AR_SREV_9300_20_OR_LATER(_ah) \
-	((_ah)->hw_version.macVersion>= AR_SREV_VERSION_9300)
+	(((_ah)->hw_version.macVersion>  AR_SREV_VERSION_9300) || \
+	 (((_ah)->hw_version.macVersion == AR_SREV_VERSION_9300)&&  \
+	  ((_ah)->hw_version.macRev>= AR_SREV_REVISION_9300_20)))

  #define AR_SREV_9330(_ah) \
  	(((_ah)->hw_version.macVersion == AR_SREV_VERSION_9330))


--
thanks,
shafi
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux