wil6210: Call skb_orphan() right before Rx indication
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Mon, 28 Jan 2013 16:31:02 +0000 (18:31 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 30 Jan 2013 20:07:14 +0000 (15:07 -0500)
Other parts of Rx path (BACK logic) will need to access associated data

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/wil6210/txrx.c

index e7ea5384a61401661acd8db9fd19c536bb3274d7..649f50476105ddd1de56bfbaa4c562ba8e9b7ab7 100644 (file)
@@ -430,6 +430,8 @@ static void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev)
        int rc;
        unsigned int len = skb->len;
 
+       skb_orphan(skb);
+
        if (in_interrupt())
                rc = netif_rx(skb);
        else
@@ -464,8 +466,6 @@ void wil_rx_handle(struct wil6210_priv *wil)
                wil_hex_dump_TXRX("Rx ", DUMP_PREFIX_OFFSET, 16, 1,
                                  skb->data, skb_headlen(skb), false);
 
-               skb_orphan(skb);
-
                if (wil->wdev->iftype == NL80211_IFTYPE_MONITOR) {
                        skb->dev = ndev;
                        skb_reset_mac_header(skb);