X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/b8702bf547fc3fc1d363e15202a24cd123ac4e7b..3ae6fa17227b88b37c45f865b4040e5bcae0a45f:/package/mac80211/patches/409-ath9k_platform_settings.patch diff --git a/package/mac80211/patches/409-ath9k_platform_settings.patch b/package/mac80211/patches/409-ath9k_platform_settings.patch index ef3035cb2..6ce43b600 100644 --- a/package/mac80211/patches/409-ath9k_platform_settings.patch +++ b/package/mac80211/patches/409-ath9k_platform_settings.patch @@ -1,17 +1,9 @@ --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c -@@ -17,6 +17,7 @@ - #include - #include - -+#include "linux/ath9k_platform.h" - #include "ath9k.h" - - static char *dev_info = "ath9k"; -@@ -535,8 +536,14 @@ static int ath9k_init_softc(u16 devid, s +@@ -553,8 +553,14 @@ static int ath9k_init_softc(u16 devid, s + ah->hw_version.subsysid = subsysid; sc->sc_ah = ah; - pdata = (struct ath9k_platform_data *) sc->dev->platform_data; - if (!pdata) + if (!pdata) { ah->ah_flags |= AH_USE_EEPROM; @@ -26,7 +18,7 @@ common->ops = &ath9k_common_ops; --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h -@@ -750,7 +750,7 @@ struct ath_hw { +@@ -794,7 +794,7 @@ struct ath_hw { u32 originalGain[22]; int initPDADC; int PDADCdelta; @@ -37,17 +29,21 @@ --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c -@@ -147,10 +147,12 @@ void ath_init_leds(struct ath_softc *sc) +@@ -44,12 +44,14 @@ void ath_init_leds(struct ath_softc *sc) if (AR_SREV_9100(sc->sc_ah)) return; - if (AR_SREV_9287(sc->sc_ah)) - sc->sc_ah->led_pin = ATH_LED_PIN_9287; +- else if (AR_SREV_9485(sc->sc_ah)) +- sc->sc_ah->led_pin = ATH_LED_PIN_9485; - else - sc->sc_ah->led_pin = ATH_LED_PIN_DEF; + if (sc->sc_ah->led_pin < 0) { + if (AR_SREV_9287(sc->sc_ah)) + sc->sc_ah->led_pin = ATH_LED_PIN_9287; ++ else if (AR_SREV_9485(sc->sc_ah)) ++ sc->sc_ah->led_pin = ATH_LED_PIN_9485; + else + sc->sc_ah->led_pin = ATH_LED_PIN_DEF; + }