If EEPROM data is provided by the AHB layer, copy it in.

This is required for the flash layer code to correctly work.

Tested:

* AR9330 SoC (carambola 2)
This commit is contained in:
Adrian Chadd 2013-06-26 04:53:33 +00:00
parent 860487123c
commit 92b9076a70
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=252238

View file

@ -640,6 +640,12 @@ ar9300_attach(u_int16_t devid, HAL_SOFTC sc, HAL_BUS_TAG st,
/* FreeBSD: to make OTP work for now, provide this.. */
AH9300(ah)->ah_cal_mem = ath_hal_malloc(HOST_CALDATA_SIZE);
/*
* If eepromdata is not NULL, copy it it into ah_cal_mem.
*/
if (eepromdata != NULL)
OS_MEMCPY(AH9300(ah)->ah_cal_mem, eepromdata, HOST_CALDATA_SIZE);
/* XXX FreeBSD: enable RX mitigation */
ah->ah_config.ath_hal_intr_mitigation_rx = 1;