diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2010-05-16 14:50:29 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2010-05-16 14:50:29 +0000 |
commit | cea899937fd2de4081c300e5251bbba36851af63 (patch) | |
tree | 8732d4f5712d45f14e055c7b8c6949d68b6b971b | |
parent | a2ca1e3197e352361be0827457d1da054bce8631 (diff) |
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); |