svn commit: r362671 - in head/sys/dev/ath/ath_hal: ar5212 ar5416
Adrian Chadd
adrian at FreeBSD.org
Sat Jun 27 02:59:52 UTC 2020
Author: adrian
Date: Sat Jun 27 02:59:51 2020
New Revision: 362671
URL: https://svnweb.freebsd.org/changeset/base/362671
Log:
[ath_hal] Add KeyMiss for AR5212/AR5416 series chips.
This is a flag from the MAC that says the received packet didn't match
a keycache slot. This isn't technically a problem as WEP keys don't
match keycache slots (they're "global" keys), but it could be useful
for tracking down CCMP decryption failures.
Right now it's a no-op - it mirrors what the AR9300 HAL does and it
just increments a counter. But, hey, maybe one day I'll use it for
diagnosing keycache/CCMP decrypt issues.
Modified:
head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c
head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c
Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Sat Jun 27 02:31:39 2020 (r362670)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_recv.c Sat Jun 27 02:59:51 2020 (r362671)
@@ -265,7 +265,6 @@ ar5212ProcRxDesc(struct ath_hal *ah, struct ath_desc *
rs->rs_datalen = ads->ds_rxstatus0 & AR_DataLen;
rs->rs_tstamp = MS(ads->ds_rxstatus1, AR_RcvTimestamp);
rs->rs_status = 0;
- /* XXX what about KeyCacheMiss? */
rs->rs_rssi = MS(ads->ds_rxstatus0, AR_RcvSigStrength);
/* discard invalid h/w rssi data */
if (rs->rs_rssi == -128)
@@ -274,6 +273,8 @@ ar5212ProcRxDesc(struct ath_hal *ah, struct ath_desc *
rs->rs_keyix = MS(ads->ds_rxstatus1, AR_KeyIdx);
else
rs->rs_keyix = HAL_RXKEYIX_INVALID;
+ if (ads->ds_rxstatus1 & AR_KeyCacheMiss)
+ rs->rs_status |= HAL_RXERR_KEYMISS;
/* NB: caller expected to do rate table mapping */
rs->rs_rate = MS(ads->ds_rxstatus0, AR_RcvRate);
rs->rs_antenna = MS(ads->ds_rxstatus0, AR_RcvAntenna);
Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sat Jun 27 02:31:39 2020 (r362670)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sat Jun 27 02:59:51 2020 (r362671)
@@ -183,8 +183,6 @@ ar5416ProcRxDesc(struct ath_hal *ah, struct ath_desc *
rs->rs_datalen = ads->ds_rxstatus1 & AR_DataLen;
rs->rs_tstamp = ads->AR_RcvTimestamp;
- /* XXX what about KeyCacheMiss? */
-
rs->rs_rssi = MS(ads->ds_rxstatus4, AR_RxRSSICombined);
rs->rs_rssi_ctl[0] = MS(ads->ds_rxstatus0, AR_RxRSSIAnt00);
rs->rs_rssi_ctl[1] = MS(ads->ds_rxstatus0, AR_RxRSSIAnt01);
@@ -276,6 +274,9 @@ ar5416ProcRxDesc(struct ath_hal *ah, struct ath_desc *
else if (ads->ds_rxstatus8 & AR_MichaelErr)
rs->rs_status |= HAL_RXERR_MIC;
}
+
+ if (ads->ds_rxstatus8 & AR_KeyMiss)
+ rs->rs_status |= HAL_RXERR_KEYMISS;
return HAL_OK;
}
More information about the svn-src-all
mailing list