Commit 552a5157 authored by Helmut Schaa's avatar Helmut Schaa Committed by John W. Linville

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: default avatarHelmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 396939f9
...@@ -508,7 +508,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, ...@@ -508,7 +508,7 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
sc->tx99_power = MAX_RATE_POWER + 1; sc->tx99_power = MAX_RATE_POWER + 1;
init_waitqueue_head(&sc->tx_wait); init_waitqueue_head(&sc->tx_wait);
if (!pdata) { if (!pdata || pdata->use_eeprom) {
ah->ah_flags |= AH_USE_EEPROM; ah->ah_flags |= AH_USE_EEPROM;
sc->sc_ah->led_pin = -1; sc->sc_ah->led_pin = -1;
} else { } else {
......
...@@ -36,6 +36,8 @@ struct ath9k_platform_data { ...@@ -36,6 +36,8 @@ struct ath9k_platform_data {
int (*get_mac_revision)(void); int (*get_mac_revision)(void);
int (*external_reset)(void); int (*external_reset)(void);
bool use_eeprom;
}; };
#endif /* _LINUX_ATH9K_PLATFORM_H */ #endif /* _LINUX_ATH9K_PLATFORM_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment