aboutsummaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_crypto_ccmp.c
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2004-12-31 20:51:41 +0000
committerSam Leffler <sam@FreeBSD.org>2004-12-31 20:51:41 +0000
commit4e844c9453a586f5841ad862abd6ef51601afe28 (patch)
treee024578c6cbb2292b9de4b1ceaed0fabe38f9951 /sys/net80211/ieee80211_crypto_ccmp.c
parentd0d4cc63e3dc63cd078347ae0ac24d74bbc79e40 (diff)
downloadsrc-4e844c9453a586f5841ad862abd6ef51601afe28.tar.gz
src-4e844c9453a586f5841ad862abd6ef51601afe28.zip
correct header length calculations on tx path for QoS-encapsulated frames
when IEEE80211_F_DATAPAD is set (e.g. ath); must use ieee80211_hdrspace instead of ieee80211_hdrsize
Notes
Notes: svn path=/head/; revision=139508
Diffstat (limited to 'sys/net80211/ieee80211_crypto_ccmp.c')
-rw-r--r--sys/net80211/ieee80211_crypto_ccmp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_crypto_ccmp.c b/sys/net80211/ieee80211_crypto_ccmp.c
index 8430ac2cadd3..95873b343dc8 100644
--- a/sys/net80211/ieee80211_crypto_ccmp.c
+++ b/sys/net80211/ieee80211_crypto_ccmp.c
@@ -136,10 +136,12 @@ ccmp_setkey(struct ieee80211_key *k)
static int
ccmp_encap(struct ieee80211_key *k, struct mbuf *m, u_int8_t keyid)
{
+ struct ccmp_ctx *ctx = k->wk_private;
+ struct ieee80211com *ic = ctx->cc_ic;
u_int8_t *ivp;
int hdrlen;
- hdrlen = ieee80211_hdrsize(mtod(m, void *));
+ hdrlen = ieee80211_hdrspace(ic, mtod(m, void *));
/*
* Copy down 802.11 header and add the IV, KeyID, and ExtIV.