backport mac80211, hostapd, iw, crda from trunk as of r26369
[openwrt-10.03/.git] / package / mac80211 / patches / 401-ath9k-dont-register-leds-on-ar9100.patch
index 166c133a612318377153b01261acf2015025e9b9..d60be760d6174e68c341b9ceaf039965db0ae573 100644 (file)
@@ -1,22 +1,12 @@
 --- a/drivers/net/wireless/ath/ath9k/gpio.c
 +++ b/drivers/net/wireless/ath/ath9k/gpio.c
-@@ -120,6 +120,9 @@ static void ath_unregister_led(struct at
- void ath_deinit_leds(struct ath_softc *sc)
+@@ -41,6 +41,9 @@ void ath_init_leds(struct ath_softc *sc)
  {
-+      if (AR_SREV_9100(sc->sc_ah))
-+              return;
-+
-       ath_unregister_led(&sc->assoc_led);
-       sc->sc_flags &= ~SC_OP_LED_ASSOCIATED;
-       ath_unregister_led(&sc->tx_led);
-@@ -133,6 +136,9 @@ void ath_init_leds(struct ath_softc *sc)
-       char *trigger;
        int ret;
  
 +      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 (sc->sc_ah->led_pin < 0) {
+               if (AR_SREV_9287(sc->sc_ah))
+                       sc->sc_ah->led_pin = ATH_LED_PIN_9287;