diff options
author | 2010-05-16 14:50:28 +0000 | |
---|---|---|
committer | 2010-05-16 14:50:28 +0000 | |
commit | 7d91c60ee9c9d7e3dcbb8850316c988d954336db (patch) | |
tree | 72cdafa0747e29c61346a2e49487a2baf2ad4b7d | |
parent | cleanup hardware key cache management (not used yet) (diff) | |
download | wireguard-openbsd-7d91c60ee9c9d7e3dcbb8850316c988d954336db.tar.xz wireguard-openbsd-7d91c60ee9c9d7e3dcbb8850316c988d954336db.zip |
no need to set the MAC address to 0 for TKIP MIC entries; the key
cache is already cleared at startup and entries >64 will never have
their MAC addresses set. removes pairs of writes in set_key.
-rw-r--r-- | sys/dev/ic/athn.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c index d96423fd2b0..86226d6372a 100644 --- a/sys/dev/ic/athn.c +++ b/sys/dev/ic/athn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: athn.c,v 1.44 2010/05/16 14:34:19 damien Exp $ */ +/* $OpenBSD: athn.c,v 1.45 2010/05/16 14:50:28 damien Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -969,9 +969,6 @@ athn_set_key(struct ieee80211com *ic, struct ieee80211_node *ni, AR_WRITE(sc, AR_KEYTABLE_KEY4(micentry), 0); AR_WRITE(sc, AR_KEYTABLE_TYPE(micentry), AR_KEYTABLE_TYPE_CLR); - /* MAC address is reserved for the MIC entry. */ - AR_WRITE(sc, AR_KEYTABLE_MAC0(micentry), 0); - AR_WRITE(sc, AR_KEYTABLE_MAC1(micentry), 0); /* Rx MIC is at entry + 64 + 32. */ micentry = entry + 64 + 32; @@ -986,9 +983,6 @@ athn_set_key(struct ieee80211com *ic, struct ieee80211_node *ni, AR_WRITE(sc, AR_KEYTABLE_KEY4(micentry), 0); AR_WRITE(sc, AR_KEYTABLE_TYPE(micentry), AR_KEYTABLE_TYPE_CLR); - /* MAC address is reserved for the MIC entry. */ - AR_WRITE(sc, AR_KEYTABLE_MAC0(micentry), 0); - AR_WRITE(sc, AR_KEYTABLE_MAC1(micentry), 0); } else { /* Tx+Rx MIC is at entry + 64. */ micentry = entry + 64; @@ -1005,9 +999,6 @@ athn_set_key(struct ieee80211com *ic, struct ieee80211_node *ni, micbuf[6] | micbuf[7] << 16); AR_WRITE(sc, AR_KEYTABLE_TYPE(micentry), AR_KEYTABLE_TYPE_CLR); - /* MAC address is reserved for the MIC entry. */ - AR_WRITE(sc, AR_KEYTABLE_MAC0(micentry), 0); - AR_WRITE(sc, AR_KEYTABLE_MAC1(micentry), 0); } } AR_WRITE(sc, AR_KEYTABLE_KEY0(entry), keybuf[0] | keybuf[1] << 16); |