hostapd: make entropy collection contribute to the kernel pool
[openwrt.git] / package / mac80211 / patches / 409-ath9k_platform_settings.patch
1 --- a/drivers/net/wireless/ath/ath9k/init.c
2 +++ b/drivers/net/wireless/ath/ath9k/init.c
3 @@ -553,8 +553,14 @@ static int ath9k_init_softc(u16 devid, s
4 ah->hw_version.subsysid = subsysid;
5 sc->sc_ah = ah;
6
7 - if (!pdata)
8 + if (!pdata) {
9 ah->ah_flags |= AH_USE_EEPROM;
10 + sc->sc_ah->led_pin = -1;
11 + } else {
12 + sc->sc_ah->gpio_mask = pdata->gpio_mask;
13 + sc->sc_ah->gpio_val = pdata->gpio_val;
14 + sc->sc_ah->led_pin = pdata->led_pin;
15 + }
16
17 common = ath9k_hw_common(ah);
18 common->ops = &ath9k_common_ops;
19 --- a/drivers/net/wireless/ath/ath9k/hw.h
20 +++ b/drivers/net/wireless/ath/ath9k/hw.h
21 @@ -794,7 +794,7 @@ struct ath_hw {
22 u32 originalGain[22];
23 int initPDADC;
24 int PDADCdelta;
25 - u8 led_pin;
26 + int led_pin;
27 u32 gpio_mask;
28 u32 gpio_val;
29
30 --- a/drivers/net/wireless/ath/ath9k/gpio.c
31 +++ b/drivers/net/wireless/ath/ath9k/gpio.c
32 @@ -44,12 +44,14 @@ void ath_init_leds(struct ath_softc *sc)
33 if (AR_SREV_9100(sc->sc_ah))
34 return;
35
36 - if (AR_SREV_9287(sc->sc_ah))
37 - sc->sc_ah->led_pin = ATH_LED_PIN_9287;
38 - else if (AR_SREV_9485(sc->sc_ah))
39 - sc->sc_ah->led_pin = ATH_LED_PIN_9485;
40 - else
41 - sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
42 + if (sc->sc_ah->led_pin < 0) {
43 + if (AR_SREV_9287(sc->sc_ah))
44 + sc->sc_ah->led_pin = ATH_LED_PIN_9287;
45 + else if (AR_SREV_9485(sc->sc_ah))
46 + sc->sc_ah->led_pin = ATH_LED_PIN_9485;
47 + else
48 + sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
49 + }
50
51 /* Configure gpio 1 for output */
52 ath9k_hw_cfg_output(sc->sc_ah, sc->sc_ah->led_pin,
53 --- a/include/linux/ath9k_platform.h
54 +++ b/include/linux/ath9k_platform.h
55 @@ -24,6 +24,10 @@
56 struct ath9k_platform_data {
57 u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS];
58 u8 *macaddr;
59 +
60 + int led_pin;
61 + u32 gpio_mask;
62 + u32 gpio_val;
63 };
64
65 #endif /* _LINUX_ATH9K_PLATFORM_H */
This page took 0.04221 seconds and 5 git commands to generate.