Search Linux Wireless

[RFC] ath9k: Make AR_SREV_5416() macro evaluate to true for AR9100

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

 



The AR_SREV_5416() macro evaluates to false for AR9100 while the
definitions for AR_SREV_5416_20_OR_LATER() and
AR_SREV_5416_22_OR_LATER() seem to assume AR9100 based chips fall
under this category. For example the last line of

#define AR_SREV_5416_20_OR_LATER(_ah) \
        (((AR_SREV_5416(_ah)) && \
         ((_ah)->hw_version.macRev >= AR_SREV_REVISION_5416_20)) || \
         ((_ah)->hw_version.macVersion >= AR_SREV_VERSION_9100))

makes no sense if AR_SREV_5416(_ah) is false when
(_ah)->hw_version.macVersion == AR_SREV_VERSION_9100.

The patch below changes AR_SREV_5416() to evaluate to true also for
AR9100. I've tested on an AR9100 based router with this patch and
haven't noticed any more problems than usual. Many code paths are
affected though so please comment.

/Björn
---
diff --git a/drivers/net/wireless/ath/ath9k/reg.h
b/drivers/net/wireless/ath/ath9k/reg.h
index 72cfa8e..39f7d66 100644
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -762,7 +762,8 @@

 #define AR_SREV_5416(_ah) \
        (((_ah)->hw_version.macVersion == AR_SREV_VERSION_5416_PCI) || \
-        ((_ah)->hw_version.macVersion == AR_SREV_VERSION_5416_PCIE))
+        ((_ah)->hw_version.macVersion == AR_SREV_VERSION_5416_PCIE) || \
+        ((_ah)->hw_version.macVersion == AR_SREV_VERSION_9100))
 #define AR_SREV_5416_20_OR_LATER(_ah) \
        (((AR_SREV_5416(_ah)) && \
         ((_ah)->hw_version.macRev >= AR_SREV_REVISION_5416_20)) || \
--
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 Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux