summaryrefslogtreecommitdiffstats
path: root/sys/contrib
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2013-06-26 04:53:33 +0000
committeradrian <adrian@FreeBSD.org>2013-06-26 04:53:33 +0000
commit77339a1a63f384ca734ed13c4bd91ce55d3610ff (patch)
tree8048f796b9a2b424b4e8167adc0cd8c50696a0b4 /sys/contrib
parentf7f7ee703f502973c16e655ae3dde6437813679b (diff)
downloadFreeBSD-src-77339a1a63f384ca734ed13c4bd91ce55d3610ff.zip
FreeBSD-src-77339a1a63f384ca734ed13c4bd91ce55d3610ff.tar.gz
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)
Diffstat (limited to 'sys/contrib')
-rw-r--r--sys/contrib/dev/ath/ath_hal/ar9300/ar9300_attach.c6
1 files changed, 6 insertions, 0 deletions
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;
OpenPOWER on IntegriCloud