From 92b9076a70afb3d3a505781baaef5800116db48a Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Wed, 26 Jun 2013 04:53:33 +0000 Subject: [PATCH] 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) --- sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c index 478417cd971f..51421154b952 100644 --- a/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c +++ b/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c @@ -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;