ath9k: add support for reading eeprom from platform data on PCI devices

Some embedded boards store platform data for connected PCIe AR92xx
chips in the system flash instead of a separate EEPROM chip.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Felix Fietkau
2010-11-17 04:25:33 +01:00
committed by John W. Linville
parent 458fafdd57
commit a05b5d4504
3 changed files with 30 additions and 15 deletions

View File

@@ -530,6 +530,9 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, u16 subsysid,
ah->hw_version.subsysid = subsysid;
sc->sc_ah = ah;
if (!sc->dev->platform_data)
ah->ah_flags |= AH_USE_EEPROM;
common = ath9k_hw_common(ah);
common->ops = &ath9k_common_ops;
common->bus_ops = bus_ops;