d80211: Fix issues with QOS ops This patch fixes various bitwise ops dealing with QOS that didn't get converted properly during the transition to IEEE80211_ style names. Thanks to Jouni Malinen for pointing this out.
Signed-off-by: Michael Wu <[EMAIL PROTECTED]> --- net/d80211/ieee80211.c | 6 +++--- net/d80211/wme.c | 4 ++-- net/d80211/wpa.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net/d80211/ieee80211.c b/net/d80211/ieee80211.c index 60eca90..bf0e86b 100644 --- a/net/d80211/ieee80211.c +++ b/net/d80211/ieee80211.c @@ -250,7 +250,7 @@ int ieee80211_get_hdrlen(u16 fc) case IEEE80211_FTYPE_DATA: if ((fc & IEEE80211_FCTL_FROMDS) && (fc & IEEE80211_FCTL_TODS)) hdrlen = 30; /* Addr4 */ - if ((fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_QOS_DATA) + if (fc & IEEE80211_STYPE_QOS_DATA) hdrlen += 2; /* QoS Control Field */ break; case IEEE80211_FTYPE_CTL: @@ -1519,7 +1519,7 @@ static int ieee80211_subif_start_xmit(st sta = sta_info_get(local, hdr.addr1); if (sta) { if (sta->flags & WLAN_STA_WME) { - fc |= IEEE80211_STYPE_QOS_DATA << 4; + fc |= IEEE80211_STYPE_QOS_DATA; hdrlen += 2; } sta_info_put(sta); @@ -4009,7 +4009,7 @@ static void ieee80211_remove_tx_extra(st struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; u16 fc = le16_to_cpu(hdr->frame_control); if ((fc & 0x8C) == 0x88) /* QoS Control Field */ { - fc &= ~(IEEE80211_STYPE_QOS_DATA << 4); + fc &= ~IEEE80211_STYPE_QOS_DATA; hdr->frame_control = cpu_to_le16(fc); memmove(skb->data + 2, skb->data, hdrlen - 2); skb_pull(skb, 2); diff --git a/net/d80211/wme.c b/net/d80211/wme.c index c3c961d..fc2a113 100644 --- a/net/d80211/wme.c +++ b/net/d80211/wme.c @@ -76,7 +76,7 @@ ieee80211_rx_h_remove_qos_control(struct memmove(data + 2, data, ieee80211_get_hdrlen(fc) - 2); hdr = (struct ieee80211_hdr *) skb_pull(rx->skb, 2); /* change frame type to non QOS */ - rx->fc = fc &= ~(IEEE80211_STYPE_QOS_DATA << 4); + rx->fc = fc &= ~IEEE80211_STYPE_QOS_DATA; hdr->frame_control = cpu_to_le16(fc); return TXRX_CONTINUE; @@ -199,7 +199,7 @@ static inline int classify80211(struct s } /* is this a QoS frame? */ - qos = fc & (IEEE80211_STYPE_QOS_DATA << 4); + qos = fc & IEEE80211_STYPE_QOS_DATA; if (!qos) { skb->priority = 0; /* required for correct WPA/11i MIC */ diff --git a/net/d80211/wpa.c b/net/d80211/wpa.c index 7919620..fe5861f 100644 --- a/net/d80211/wpa.c +++ b/net/d80211/wpa.c @@ -70,7 +70,7 @@ int ieee80211_get_hdr_info(const struct a4_included = (fc & (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS)) == (IEEE80211_FCTL_TODS | IEEE80211_FCTL_FROMDS); if ((fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA && - (fc & IEEE80211_FCTL_STYPE) & IEEE80211_STYPE_QOS_DATA) { + fc & IEEE80211_STYPE_QOS_DATA) { pos = (u8 *) &hdr->addr4; if (a4_included) pos += 6;
pgpq4dlZPhxa2.pgp
Description: PGP signature