summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_attach.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c b/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
index d165540..30d1161 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
@@ -241,8 +241,24 @@ ar5416InitState(struct ath_hal_5416 *ahp5416, uint16_t devid, HAL_SOFTC sc,
/* Enable all ANI functions to begin with */
AH5416(ah)->ah_ani_function = 0xffffffff;
- /* Set overridable ANI methods */
- AH5212(ah)->ah_aniControl = ar5416AniControl;
+ /* Set overridable ANI methods */
+ AH5212(ah)->ah_aniControl = ar5416AniControl;
+
+ /* Default FIFO Trigger levels */
+#define AR_FTRIG_512B 0x00000080 // 5 bits total
+ /* AR9285/AR9271 need to use half the TX FIFOs */
+ if (AR_SREV_KITE(ah) || AR_SREV_9271(ah)) {
+ AH5212(ah)->ah_txTrigLev = (AR_FTRIG_256B >> AR_FTRIG_S);
+ AH5212(ah)->ah_maxTxTrigLev = ((2048 / 64) - 1);
+ } else {
+ AH5212(ah)->ah_txTrigLev = (AR_FTRIG_512B >> AR_FTRIG_S);
+ AH5212(ah)->ah_maxTxTrigLev = ((4096 / 64) - 1);
+ }
+ ath_hal_printf(ah, "%s: trigLev=%d, maxTxTrigLev=%d\n",
+ __func__,
+ AH5212(ah)->ah_txTrigLev,
+ AH5212(ah)->ah_maxTxTrigLev);
+#undef AR_FTRIG_512B
}
uint32_t
OpenPOWER on IntegriCloud