From 77339a1a63f384ca734ed13c4bd91ce55d3610ff Mon Sep 17 00:00:00 2001 From: adrian Date: Wed, 26 Jun 2013 04:53:33 +0000 Subject: 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(+) (limited to 'sys/contrib') 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 478417c..5142115 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; -- cgit v1.1