406-ath9k-set-AH_USE_EEPROM-only-if-no-platform-data-present.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. --- a/drivers/net/wireless/ath/ath9k/main.c
  2. +++ b/drivers/net/wireless/ath/ath9k/main.c
  3. @@ -15,6 +15,7 @@
  4. */
  5. #include <linux/nl80211.h>
  6. +#include <linux/ath9k_platform.h>
  7. #include "ath9k.h"
  8. #include "btcoex.h"
  9. --- a/drivers/net/wireless/ath/ath9k/init.c
  10. +++ b/drivers/net/wireless/ath/ath9k/init.c
  11. @@ -542,6 +542,7 @@ static int ath9k_init_softc(u16 devid, s
  12. {
  13. struct ath_hw *ah = NULL;
  14. struct ath_common *common;
  15. + struct ath9k_platform_data *pdata;
  16. int ret = 0, i;
  17. int csz = 0;
  18. @@ -553,6 +554,10 @@ static int ath9k_init_softc(u16 devid, s
  19. ah->hw_version.subsysid = subsysid;
  20. sc->sc_ah = ah;
  21. + pdata = (struct ath9k_platform_data *) sc->dev->platform_data;
  22. + if (!pdata)
  23. + ah->ah_flags |= AH_USE_EEPROM;
  24. +
  25. common = ath9k_hw_common(ah);
  26. common->ops = &ath9k_common_ops;
  27. common->bus_ops = bus_ops;
  28. --- a/drivers/net/wireless/ath/ath9k/hw.c
  29. +++ b/drivers/net/wireless/ath/ath9k/hw.c
  30. @@ -404,10 +404,6 @@ static void ath9k_hw_init_defaults(struc
  31. ah->hw_version.magic = AR5416_MAGIC;
  32. ah->hw_version.subvendorid = 0;
  33. - ah->ah_flags = 0;
  34. - if (!AR_SREV_9100(ah))
  35. - ah->ah_flags = AH_USE_EEPROM;
  36. -
  37. ah->atim_window = 0;
  38. ah->sta_id1_defaults = AR_STA_ID1_CRPT_MIC_ENABLE;
  39. ah->beacon_interval = 100;