diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-03-19 13:55:40 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-03-30 14:15:15 -0400 |
commit | 6de66dd963ddd669667a81a2401f2fd6472ff55c (patch) | |
tree | 4ab0cca2a88c388f93c3bfe6af6f022a894af0c5 /drivers/net/wireless/ath/ath9k/init.c | |
parent | 6fb1b1e18fe3d141c54182c5d5b3af823bed455f (diff) | |
download | lwn-6de66dd963ddd669667a81a2401f2fd6472ff55c.tar.gz lwn-6de66dd963ddd669667a81a2401f2fd6472ff55c.zip |
ath9k: add support for overriding LED pin and GPIO settings from platform data
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/init.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index e22e8215d941..cdb0f1c89a0e 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -553,8 +553,14 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid, ah->hw_version.subsysid = subsysid; sc->sc_ah = ah; - if (!pdata) + if (!pdata) { 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; |