summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_crypto_tkip.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-05-28 23:25:36 +0000
committersam <sam@FreeBSD.org>2008-05-28 23:25:36 +0000
commit6be5c5b31dc02a4f03bf8981291eaf6adfce5882 (patch)
tree8042ceac97a9aac2ac2cceebf3b970b1516b38de /sys/net80211/ieee80211_crypto_tkip.c
parentfae2bc824640ef5fee38c4fe973c7764f0ea12cb (diff)
downloadFreeBSD-src-6be5c5b31dc02a4f03bf8981291eaf6adfce5882.zip
FreeBSD-src-6be5c5b31dc02a4f03bf8981291eaf6adfce5882.tar.gz
Split s/w crypt/mic attributes to allow future hackery; this change
should be a noop.
Diffstat (limited to 'sys/net80211/ieee80211_crypto_tkip.c')
-rw-r--r--sys/net80211/ieee80211_crypto_tkip.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_crypto_tkip.c b/sys/net80211/ieee80211_crypto_tkip.c
index 398246f..0e6bc78 100644
--- a/sys/net80211/ieee80211_crypto_tkip.c
+++ b/sys/net80211/ieee80211_crypto_tkip.c
@@ -196,7 +196,7 @@ tkip_encap(struct ieee80211_key *k, struct mbuf *m, uint8_t keyid)
/*
* Finally, do software encrypt if neeed.
*/
- if (k->wk_flags & IEEE80211_KEY_SWCRYPT) {
+ if (k->wk_flags & IEEE80211_KEY_SWENCRYPT) {
if (!tkip_encrypt(ctx, k, m, hdrlen))
return 0;
/* NB: tkip_encrypt handles wk_keytsc */
@@ -214,7 +214,7 @@ tkip_enmic(struct ieee80211_key *k, struct mbuf *m, int force)
{
struct tkip_ctx *ctx = k->wk_private;
- if (force || (k->wk_flags & IEEE80211_KEY_SWMIC)) {
+ if (force || (k->wk_flags & IEEE80211_KEY_SWENMIC)) {
struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *);
struct ieee80211vap *vap = ctx->tc_vap;
struct ieee80211com *ic = vap->iv_ic;
@@ -302,7 +302,7 @@ tkip_decap(struct ieee80211_key *k, struct mbuf *m, int hdrlen)
* If so we just strip the header; otherwise we need to
* handle the decrypt in software.
*/
- if ((k->wk_flags & IEEE80211_KEY_SWCRYPT) &&
+ if ((k->wk_flags & IEEE80211_KEY_SWDECRYPT) &&
!tkip_decrypt(ctx, k, m, hdrlen))
return 0;
@@ -327,7 +327,7 @@ tkip_demic(struct ieee80211_key *k, struct mbuf *m, int force)
uint8_t tid;
wh = mtod(m, struct ieee80211_frame *);
- if (force || (k->wk_flags & IEEE80211_KEY_SWMIC)) {
+ if ((k->wk_flags & IEEE80211_KEY_SWDEMIC) || force) {
struct ieee80211vap *vap = ctx->tc_vap;
int hdrlen = ieee80211_hdrspace(vap->iv_ic, wh);
u8 mic[IEEE80211_WEP_MICLEN];
OpenPOWER on IntegriCloud