2010-11-03 14:55:53 +00:00
|
|
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
2011-01-24 18:54:16 +00:00
|
|
|
@@ -542,8 +542,14 @@ static int ath9k_init_softc(u16 devid, s
|
2010-11-17 03:43:24 +00:00
|
|
|
ah->hw_version.subsysid = subsysid;
|
2010-11-03 14:55:53 +00:00
|
|
|
sc->sc_ah = ah;
|
|
|
|
|
2010-12-11 01:45:12 +00:00
|
|
|
- if (!pdata)
|
|
|
|
+ if (!pdata) {
|
2010-11-03 14:55:53 +00:00
|
|
|
ah->ah_flags |= AH_USE_EEPROM;
|
|
|
|
+ sc->sc_ah->led_pin = -1;
|
|
|
|
+ } else {
|
|
|
|
+ sc->sc_ah->gpio_mask = pdata->gpio_mask;
|
|
|
|
+ sc->sc_ah->gpio_val = pdata->gpio_val;
|
|
|
|
+ sc->sc_ah->led_pin = pdata->led_pin;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
common = ath9k_hw_common(ah);
|
|
|
|
common->ops = &ath9k_common_ops;
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
2011-01-21 01:43:32 +00:00
|
|
|
@@ -794,7 +794,7 @@ struct ath_hw {
|
2010-11-03 14:55:53 +00:00
|
|
|
u32 originalGain[22];
|
|
|
|
int initPDADC;
|
|
|
|
int PDADCdelta;
|
|
|
|
- u8 led_pin;
|
|
|
|
+ int led_pin;
|
|
|
|
u32 gpio_mask;
|
|
|
|
u32 gpio_val;
|
|
|
|
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
|
2010-12-04 01:32:04 +00:00
|
|
|
@@ -139,10 +139,12 @@ void ath_init_leds(struct ath_softc *sc)
|
2010-11-03 14:55:53 +00:00
|
|
|
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
|
|
|
|
- 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
|
|
|
|
+ sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
|
|
|
|
+ }
|
|
|
|
|
|
|
|
/* Configure gpio 1 for output */
|
|
|
|
ath9k_hw_cfg_output(sc->sc_ah, sc->sc_ah->led_pin,
|
|
|
|
--- a/include/linux/ath9k_platform.h
|
|
|
|
+++ b/include/linux/ath9k_platform.h
|
|
|
|
@@ -24,6 +24,10 @@
|
|
|
|
struct ath9k_platform_data {
|
|
|
|
u16 eeprom_data[ATH9K_PLAT_EEP_MAX_WORDS];
|
|
|
|
u8 *macaddr;
|
|
|
|
+
|
|
|
|
+ int led_pin;
|
|
|
|
+ u32 gpio_mask;
|
|
|
|
+ u32 gpio_val;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _LINUX_ATH9K_PLATFORM_H */
|