[PATCH] ieee80211: fix TKIP QoS bug
authorJohannes Berg <johannes@sipsolutions.net>
Mon, 15 Oct 2007 14:50:54 +0000 (16:50 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 17 Oct 2007 00:58:12 +0000 (20:58 -0400)
The commit 65b6a277 titled "ieee80211: Fix header->qos_ctl endian issue"
*introduced* an endianness bug. Partially revert it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/ieee80211/ieee80211_crypt_tkip.c

index 6cc54eeca3edf54b11f76f6d23ca7b43d2adeec5..72e6ab66834fb74ffafe799131796c56640fcbf1 100644 (file)
@@ -586,7 +586,7 @@ static void michael_mic_hdr(struct sk_buff *skb, u8 * hdr)
        if (stype & IEEE80211_STYPE_QOS_DATA) {
                const struct ieee80211_hdr_3addrqos *qoshdr =
                        (struct ieee80211_hdr_3addrqos *)skb->data;
-               hdr[12] = qoshdr->qos_ctl & cpu_to_le16(IEEE80211_QCTL_TID);
+               hdr[12] = le16_to_cpu(qoshdr->qos_ctl) & IEEE80211_QCTL_TID;
        } else
                hdr[12] = 0;            /* priority */