At EuroBSDCon last year Mike Larkin gave me an AR5211 ath(4) device
which fails at WEP/WPA. For every encrypted frame it sends, a decryption
failure shows up in netstat -W on the AP.
This diff ports a chunk from the AR5212 code which disables hardware
WEP key table entries. This fixes the issue for me. Note that ath(4)
uses software encryption/decryption for WEP/WPA.
ok?
Thanks for the card, Mike!
Index: ar5211.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/ar5211.c,v
retrieving revision 1.46
diff -u -p -r1.46 ar5211.c
--- ar5211.c 12 Jul 2014 18:48:17 -0000 1.46
+++ ar5211.c 20 Mar 2015 08:27:46 -0000
@@ -1933,6 +1933,10 @@ ar5k_ar5211_reset_key(struct ath_hal *ha
for (i = 0; i < AR5K_AR5211_KEYCACHE_SIZE; i++)
AR5K_REG_WRITE(AR5K_AR5211_KEYTABLE_OFF(entry, i), 0);
+ /* Set NULL encryption */
+ AR5K_REG_WRITE(AR5K_AR5211_KEYTABLE_TYPE(entry),
+ AR5K_AR5211_KEYTABLE_TYPE_NULL);
+
return (AH_FALSE);
}