summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_crypto_none.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net80211/ieee80211_crypto_none.c')
-rw-r--r--sys/net80211/ieee80211_crypto_none.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_crypto_none.c b/sys/net80211/ieee80211_crypto_none.c
index b1ffbb4..30f2fc3 100644
--- a/sys/net80211/ieee80211_crypto_none.c
+++ b/sys/net80211/ieee80211_crypto_none.c
@@ -48,7 +48,8 @@ __FBSDID("$FreeBSD$");
static void *none_attach(struct ieee80211vap *, struct ieee80211_key *);
static void none_detach(struct ieee80211_key *);
static int none_setkey(struct ieee80211_key *);
-static int none_encap(struct ieee80211_key *, struct mbuf *, uint8_t);
+static void none_setiv(struct ieee80211_key *, uint8_t *);
+static int none_encap(struct ieee80211_key *, struct mbuf *);
static int none_decap(struct ieee80211_key *, struct mbuf *, int);
static int none_enmic(struct ieee80211_key *, struct mbuf *, int);
static int none_demic(struct ieee80211_key *, struct mbuf *, int);
@@ -62,6 +63,7 @@ const struct ieee80211_cipher ieee80211_cipher_none = {
.ic_attach = none_attach,
.ic_detach = none_detach,
.ic_setkey = none_setkey,
+ .ic_setiv = none_setiv,
.ic_encap = none_encap,
.ic_decap = none_decap,
.ic_enmic = none_enmic,
@@ -87,20 +89,28 @@ none_setkey(struct ieee80211_key *k)
return 1;
}
+static void
+none_setiv(struct ieee80211_key *k, uint8_t *ivp)
+{
+}
+
static int
-none_encap(struct ieee80211_key *k, struct mbuf *m, uint8_t keyid)
+none_encap(struct ieee80211_key *k, struct mbuf *m)
{
struct ieee80211vap *vap = k->wk_private;
#ifdef IEEE80211_DEBUG
struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *);
#endif
+ uint8_t keyid;
+
+ keyid = ieee80211_crypto_get_keyid(vap, k);
/*
* The specified key is not setup; this can
* happen, at least, when changing keys.
*/
IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_CRYPTO, wh->i_addr1,
- "key id %u is not set (encap)", keyid>>6);
+ "key id %u is not set (encap)", keyid);
vap->iv_stats.is_tx_badcipher++;
return 0;
}
OpenPOWER on IntegriCloud