Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27278
b: refs/heads/master
c: ea28415
h: refs/heads/master
v: v3
  • Loading branch information
Zhu Yi authored and John W. Linville committed Apr 24, 2006
1 parent e8c41da commit ba974d6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cc9357104b19b2b0377713c33d87d78518912c3d
refs/heads/master: ea2841521a7e061b772d6cee03f5b23c58a58284
3 changes: 3 additions & 0 deletions trunk/include/net/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@
#define IEEE80211_SCTL_FRAG 0x000F
#define IEEE80211_SCTL_SEQ 0xFFF0

/* QOS control */
#define IEEE80211_QCTL_TID 0x000F

/* debug macros */

#ifdef CONFIG_IEEE80211_DEBUG
Expand Down
11 changes: 10 additions & 1 deletion trunk/net/ieee80211/ieee80211_crypt_tkip.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,11 @@ static int michael_mic(struct ieee80211_tkip_data *tkey, u8 * key, u8 * hdr,
static void michael_mic_hdr(struct sk_buff *skb, u8 * hdr)
{
struct ieee80211_hdr_4addr *hdr11;
u16 stype;

hdr11 = (struct ieee80211_hdr_4addr *)skb->data;
stype = WLAN_FC_GET_STYPE(le16_to_cpu(hdr11->frame_ctl));

switch (le16_to_cpu(hdr11->frame_ctl) &
(IEEE80211_FCTL_FROMDS | IEEE80211_FCTL_TODS)) {
case IEEE80211_FCTL_TODS:
Expand All @@ -523,7 +526,13 @@ static void michael_mic_hdr(struct sk_buff *skb, u8 * hdr)
break;
}

hdr[12] = 0; /* priority */
if (stype & IEEE80211_STYPE_QOS_DATA) {
const struct ieee80211_hdr_3addrqos *qoshdr =
(struct ieee80211_hdr_3addrqos *)skb->data;
hdr[12] = le16_to_cpu(qoshdr->qos_ctl) & IEEE80211_QCTL_TID;
} else
hdr[12] = 0; /* priority */

hdr[13] = hdr[14] = hdr[15] = 0; /* reserved */
}

Expand Down

0 comments on commit ba974d6

Please sign in to comment.