mirror of
https://github.com/opnsense/src.git
synced 2026-04-28 17:49:22 -04:00
"Upgrade" the AR9285 code to support PCI/ART EEPROM on flash.
I've just verified that this boots on an Atheros AP91. I haven't verified it with traffic though, so YMMV.
This commit is contained in:
parent
a511762672
commit
c928fccc09
3 changed files with 18 additions and 8 deletions
|
|
@ -298,12 +298,12 @@ ath_hal_v4kEepromAttach(struct ath_hal *ah)
|
|||
"%s Error reading Eeprom MAGIC\n", __func__);
|
||||
return HAL_EEREAD;
|
||||
}
|
||||
}
|
||||
HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s Eeprom Magic = 0x%x\n",
|
||||
__func__, magic);
|
||||
if (magic != AR5416_EEPROM_MAGIC) {
|
||||
HALDEBUG(ah, HAL_DEBUG_ANY, "Bad magic number\n");
|
||||
return HAL_EEMAGIC;
|
||||
HALDEBUG(ah, HAL_DEBUG_ATTACH, "%s Eeprom Magic = 0x%x\n",
|
||||
__func__, magic);
|
||||
if (magic != AR5416_EEPROM_MAGIC) {
|
||||
HALDEBUG(ah, HAL_DEBUG_ANY, "Bad magic number\n");
|
||||
return HAL_EEMAGIC;
|
||||
}
|
||||
}
|
||||
|
||||
ee = ath_hal_malloc(sizeof(HAL_EEPROM_v4k));
|
||||
|
|
|
|||
|
|
@ -169,7 +169,6 @@ ar9280Attach(uint16_t devid, HAL_SOFTC sc,
|
|||
|
||||
ar5416InitState(AH5416(ah), devid, sc, st, sh, status);
|
||||
|
||||
|
||||
/*
|
||||
* Use the "local" EEPROM data given to us by the higher layers.
|
||||
* This is a private copy out of system flash. The Linux ath9k
|
||||
|
|
@ -180,7 +179,6 @@ ar9280Attach(uint16_t devid, HAL_SOFTC sc,
|
|||
AH_PRIVATE((ah))->ah_eepromRead = ath_hal_EepromDataRead;
|
||||
AH_PRIVATE((ah))->ah_eepromWrite = NULL;
|
||||
ah->ah_eepromdata = eepromdata;
|
||||
}
|
||||
|
||||
/* XXX override with 9280 specific state */
|
||||
/* override 5416 methods for our needs */
|
||||
|
|
|
|||
|
|
@ -134,6 +134,18 @@ ar9285Attach(uint16_t devid, HAL_SOFTC sc,
|
|||
|
||||
ar5416InitState(AH5416(ah), devid, sc, st, sh, status);
|
||||
|
||||
/*
|
||||
* Use the "local" EEPROM data given to us by the higher layers.
|
||||
* This is a private copy out of system flash. The Linux ath9k
|
||||
* commit for the initial AR9130 support mentions MMIO flash
|
||||
* access is "unreliable." -adrian
|
||||
*/
|
||||
if (eepromdata != AH_NULL) {
|
||||
AH_PRIVATE(ah)->ah_eepromRead = ath_hal_EepromDataRead;
|
||||
AH_PRIVATE(ah)->ah_eepromWrite = NULL;
|
||||
ah->ah_eepromdata = eepromdata;
|
||||
}
|
||||
|
||||
/* XXX override with 9285 specific state */
|
||||
/* override 5416 methods for our needs */
|
||||
AH5416(ah)->ah_initPLL = ar9280InitPLL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue