Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=69f817b654d683265118188bbfb8bc0d8978cce6
Commit:     69f817b654d683265118188bbfb8bc0d8978cce6
Parent:     6666351df90656677723f8232b3fdd26a500e51e
Author:     Helmut Schaa <[EMAIL PROTECTED]>
AuthorDate: Fri Dec 21 15:16:35 2007 +0100
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:00:50 2008 -0800

    mac80211: Restore rx.fc before every invocation of 
ieee80211_invoke_rx_handlers
    
    This patch fixes a problem with rx handling on multiple interfaces. 
Especially
    when using hardware-scanning and a wireless driver (i.e. iwlwifi) which is
    able to receive data while scanning.
    
    The rx handlers can modify the skb and the frame control field (see
    ieee80211_rx_h_remove_qos_control) but since every interface gets its own
    copy of the skb each should get its own copy of rx.fc too.
    
    In my case the wlan0-interface did not remove the qos-control from the frame
    because the corresponding flag in rx.fc was already removed while processing
    the frame on the master interface. Therefore somehow corrupted frames were
    passed to the userspace.
    
    Signed-off-by: Helmut Schaa <[EMAIL PROTECTED]>
    Acked-by: Johannes Berg <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/mac80211/rx.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 505159f..306e6fc 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1746,6 +1746,7 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct 
sk_buff *skb,
                                       prev->dev->name);
                        continue;
                }
+               rx.fc = le16_to_cpu(hdr->frame_control);
                rx.skb = skb_new;
                rx.dev = prev->dev;
                rx.sdata = prev;
@@ -1754,6 +1755,7 @@ void __ieee80211_rx(struct ieee80211_hw *hw, struct 
sk_buff *skb,
                prev = sdata;
        }
        if (prev) {
+               rx.fc = le16_to_cpu(hdr->frame_control);
                rx.skb = skb;
                rx.dev = prev->dev;
                rx.sdata = prev;
-
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