diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2007-07-14 19:58:06 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2007-07-14 19:58:06 +0000 |
commit | 5146c746e8cd39d7b3e4ad9a70d9edc9dcf5d780 (patch) | |
tree | 072bfc851caa9dd7e01dd4e60c39bd3831986448 /sys/net80211/ieee80211_crypto.c | |
parent | 8fe6e53556c8d396ae9dc93c9e995ef4c2b09b4c (diff) |
update QoS Tx/Rx sequence numbers for each TID.
add a parameter to ieee80211_decap() to handle different 802.11
header sizes.
cleanup and clarify ieee80211_classify().
Diffstat (limited to 'sys/net80211/ieee80211_crypto.c')
-rw-r--r-- | sys/net80211/ieee80211_crypto.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_crypto.c b/sys/net80211/ieee80211_crypto.c index 4f1c163cf11..a765ce910d3 100644 --- a/sys/net80211/ieee80211_crypto.c +++ b/sys/net80211/ieee80211_crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_crypto.c,v 1.14 2007/07/05 20:18:02 damien Exp $ */ +/* $OpenBSD: ieee80211_crypto.c,v 1.15 2007/07/14 19:58:04 damien Exp $ */ /* $NetBSD: ieee80211_crypto.c,v 1.5 2003/12/14 09:56:53 dyoung Exp $ */ /*- @@ -171,8 +171,14 @@ ieee80211_wep_crypt(struct ifnet *ifp, struct mbuf *m0, int txflag) if (n->m_flags & M_EXT) n->m_len = n->m_ext.ext_size; } - len = sizeof(struct ieee80211_frame); - memcpy(mtod(n, caddr_t), mtod(m, caddr_t), len); + wh = mtod(m, struct ieee80211_frame *); + if ((wh->i_fc[0] & + (IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_QOS)) == + (IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_QOS)) + len = sizeof(struct ieee80211_qosframe); + else + len = sizeof(struct ieee80211_frame); + memcpy(mtod(n, caddr_t), wh, len); wh = mtod(n, struct ieee80211_frame *); left -= len; moff = len; |