ath9k: Pass LED polarity to ath_create_gpio_led when initializing the LEDs.
authorJohn Crispin <john@openwrt.org>
Thu, 17 Dec 2015 09:27:18 +0000 (09:27 +0000)
committerJohn Crispin <john@openwrt.org>
Thu, 17 Dec 2015 09:27:18 +0000 (09:27 +0000)
Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
SVN-Revision: 47909

package/kernel/mac80211/patches/530-ath9k_extra_leds.patch
package/kernel/mac80211/patches/531-ath9k_extra_platform_leds.patch

index 89e3c976241f37ca32dc2c1a2b4df280035303db..76aaad441aec568509137309897f0c13721413ef 100644 (file)
 +              trigger = ieee80211_get_radio_led_name(sc->hw);
  
 -      sc->led_registered = true;
-+      ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, 1);
++      ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, !sc->sc_ah->config.led_active_high);
  }
  
  void ath_fill_led_pin(struct ath_softc *sc)
index dc33cd029b5356623781aa7aeaa38aceb742d811..7c10ea6b0d042db76b703e12356f53bea36e90de 100644 (file)
@@ -59,7 +59,7 @@
 @@ -120,6 +141,12 @@ void ath_init_leds(struct ath_softc *sc)
                trigger = ieee80211_get_radio_led_name(sc->hw);
  
-       ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, 1);
+       ath_create_gpio_led(sc, sc->sc_ah->led_pin, led_name, trigger, !sc->sc_ah->config.led_active_high);
 +
 +      if (!pdata)
 +              return;