Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c29b9b9b0235d56e5602f61ed38702dd376aae20
Commit:     c29b9b9b0235d56e5602f61ed38702dd376aae20
Parent:     5d4ecd9370da6e32588f218a5495806635154352
Author:     Johannes Berg <[EMAIL PROTECTED]>
AuthorDate: Fri Sep 14 11:10:24 2007 -0400
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:49:26 2007 -0700

    [MAC80211]: don't send invalid QoS frames
    
    Kalle Valo noticed that QoS frames are sent with an invalid QoS control
    field; this is because we increase the header length but neither
    initialise the space nor actually have enough space in the header
    structure for the QoS control field.
    
    This patch fixes it by treating the QoS field specially and appending it
    explicitly, initialising it to zero.
    
    Signed-off-by: Johannes Berg <[EMAIL PROTECTED]>
    Acked-by: Michael Wu <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/mac80211/tx.c |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 9e952e3..0820f12 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1487,7 +1487,20 @@ int ieee80211_subif_start_xmit(struct sk_buff *skb,
                nh_pos += encaps_len;
                h_pos += encaps_len;
        }
-       memcpy(skb_push(skb, hdrlen), &hdr, hdrlen);
+
+       if (fc & IEEE80211_STYPE_QOS_DATA) {
+               __le16 *qos_control;
+
+               qos_control = (__le16*) skb_push(skb, 2);
+               memcpy(skb_push(skb, hdrlen - 2), &hdr, hdrlen - 2);
+               /*
+                * Maybe we could actually set some fields here, for now just
+                * initialise to zero to indicate no special operation.
+                */
+               *qos_control = 0;
+       } else
+               memcpy(skb_push(skb, hdrlen), &hdr, hdrlen);
+
        nh_pos += hdrlen;
        h_pos += hdrlen;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to