diff options
author | Helmut Schaa <helmut.schaa@googlemail.com> | 2014-05-07 09:28:31 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-05-07 16:08:08 -0400 |
commit | 552a515707a5caf9fa9f3620d68fc28146c6b1b9 (patch) | |
tree | e32140a19f07bd915b3bfbcca2e1518336ed7b21 | |
parent | 396939f94084d5923d558e9f22db48bc51156e47 (diff) | |
download | lwn-552a515707a5caf9fa9f3620d68fc28146c6b1b9.tar.gz lwn-552a515707a5caf9fa9f3620d68fc28146c6b1b9.zip |
ath9k: Allow platform override without EEPROM override
Add a new platform data flag "use_eeprom" that indicates that the eeprom
found on the card itself should be used instead of the one present in
the platform data.
This allows to override the MAC address of a PCI card while preserving
the eeprom data from the card itself.
The default behavior is preserved.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 2 | ||||
-rw-r--r-- | include/linux/ath9k_platform.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index a6e273a2c44b..bcc7cfb1866d 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c @@ -508,7 +508,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, sc->tx99_power = MAX_RATE_POWER + 1; init_waitqueue_head(&sc->tx_wait); - if (!pdata) { + if (!pdata || pdata->use_eeprom) { ah->ah_flags |= AH_USE_EEPROM; sc->sc_ah->led_pin = -1; } else { diff --git a/include/linux/ath9k_platform.h b/include/linux/ath9k_platform.h index 8598f8eacb20..a495a959e8a7 100644 --- a/include/linux/ath9k_platform.h +++ b/include/linux/ath9k_platform.h @@ -36,6 +36,8 @@ struct ath9k_platform_data { int (*get_mac_revision)(void); int (*external_reset)(void); + + bool use_eeprom; }; #endif /* _LINUX_ATH9K_PLATFORM_H */ |