summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_crypto_wep.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2004-12-31 20:51:41 +0000
committersam <sam@FreeBSD.org>2004-12-31 20:51:41 +0000
commit886a744d99602259fd5a6f098cb28a5c42776ad3 (patch)
treee024578c6cbb2292b9de4b1ceaed0fabe38f9951 /sys/net80211/ieee80211_crypto_wep.c
parent58871563b42047c363403fc016399a46b3244742 (diff)
downloadFreeBSD-src-886a744d99602259fd5a6f098cb28a5c42776ad3.zip
FreeBSD-src-886a744d99602259fd5a6f098cb28a5c42776ad3.tar.gz
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
Diffstat (limited to 'sys/net80211/ieee80211_crypto_wep.c')
-rw-r--r--sys/net80211/ieee80211_crypto_wep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_crypto_wep.c b/sys/net80211/ieee80211_crypto_wep.c
index 040fab6..c0ceb4c 100644
--- a/sys/net80211/ieee80211_crypto_wep.c
+++ b/sys/net80211/ieee80211_crypto_wep.c
@@ -120,11 +120,12 @@ static int
wep_encap(struct ieee80211_key *k, struct mbuf *m, u_int8_t keyid)
{
struct wep_ctx *ctx = k->wk_private;
+ struct ieee80211com *ic = ctx->wc_ic;
u_int32_t iv;
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.
OpenPOWER on IntegriCloud