85518a20387d2b8b988ff373d33795301b43f864
[openwrt/svn-archive/archive.git] / package / mac80211 / patches / 401-ath9k-dont-register-leds-on-ar9100.patch
1 --- a/drivers/net/wireless/ath9k/main.c
2 +++ b/drivers/net/wireless/ath9k/main.c
3 @@ -989,6 +989,11 @@ static void ath_unregister_led(struct at
4
5 static void ath_deinit_leds(struct ath_softc *sc)
6 {
7 +#if 0
8 + if (AR_SREV_9100(sc->sc_ah))
9 + return;
10 +#endif
11 +
12 ath_unregister_led(&sc->assoc_led);
13 sc->sc_flags &= ~SC_OP_LED_ASSOCIATED;
14 ath_unregister_led(&sc->tx_led);
15 @@ -1002,6 +1007,11 @@ static void ath_init_leds(struct ath_sof
16 char *trigger;
17 int ret;
18
19 +#if 0
20 + if (AR_SREV_9100(sc->sc_ah))
21 + return;
22 +#endif
23 +
24 /* Configure gpio 1 for output */
25 ath9k_hw_cfg_output(sc->sc_ah, ATH_LED_PIN,
26 AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
27 --- a/drivers/net/wireless/ath9k/hw.c
28 +++ b/drivers/net/wireless/ath9k/hw.c
29 @@ -3527,6 +3527,9 @@ void ath9k_hw_cfg_output(struct ath_hal
30
31 void ath9k_hw_set_gpio(struct ath_hal *ah, u32 gpio, u32 val)
32 {
33 + if (AR_SREV_9100(ah))
34 + return;
35 +
36 REG_RMW(ah, AR_GPIO_IN_OUT, ((val & 1) << gpio),
37 AR_GPIO_BIT(gpio));
38 }