From e508073ee6012fdd925e1a9bd0b0b11d2fda47f6 Mon Sep 17 00:00:00 2001 From: sam Date: Fri, 31 Dec 2004 20:59:03 +0000 Subject: correct pseudo-mic header calculation for QoS frames --- sys/net80211/ieee80211_crypto_tkip.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/net80211') diff --git a/sys/net80211/ieee80211_crypto_tkip.c b/sys/net80211/ieee80211_crypto_tkip.c index fd02918..9133946 100644 --- a/sys/net80211/ieee80211_crypto_tkip.c +++ b/sys/net80211/ieee80211_crypto_tkip.c @@ -780,7 +780,12 @@ michael_mic_hdr(const struct ieee80211_frame *wh0, uint8_t hdr[16]) break; } - hdr[12] = 0; /* XXX qos priority */ + if (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS) { + const struct ieee80211_qosframe *qwh = + (const struct ieee80211_qosframe *) wh; + hdr[12] = qwh->i_qos[0] & IEEE80211_QOS_TID; + } else + hdr[12] = 0; hdr[13] = hdr[14] = hdr[15] = 0; /* reserved */ } -- cgit v1.1