Skip to contentSkip to conversation

ieee80211: Fix header->qos_ctl endian issue

PATCH NAK Zhu Yi 1 participant 1 message Aug 21, 2006

Subsystems (2)
lore
Share & tools
lore

Zhu Yi

author
#0 lore raw

PATCH 1/7 ieee80211: Fix header->qos_ctl endian issue

---

 net/ieee80211/ieee80211_crypt_tkip.c |    2 +-
 net/ieee80211/ieee80211_tx.c         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

5f71dc4d20e5be8004f547d32012fec28d38cff6

net/ieee80211/ieee80211_crypt_tkip.c +1 -1
index 34dba0b..a61b09e 100644
@@ -528,7 +528,7 @@ static void michael_mic_hdr(struct sk_bu
 	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;
+		hdr[12] = qoshdr->qos_ctl & cpu_to_le16(IEEE80211_QCTL_TID);
 	} else
 		hdr[12] = 0;		/* priority */
 
net/ieee80211/ieee80211_tx.c +1 -1
index bf04213..f2e6131 100644
@@ -337,7 +337,7 @@ int ieee80211_xmit(struct sk_buff *skb, 
 		hdr_len += 2;
 
 		skb->priority = ieee80211_classify(skb);
-		header.qos_ctl |= skb->priority & IEEE80211_QCTL_TID;
+		header.qos_ctl |= cpu_to_le16(skb->priority & IEEE80211_QCTL_TID);
 	}
 	header.frame_ctl = cpu_to_le16(fc);
 
Signature · 1 line
1.2.6