[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1370589567-24043-1-git-send-email-roy.qing.li@gmail.com>
Date: Fri, 7 Jun 2013 15:19:27 +0800
From: roy.qing.li@...il.com
To: netdev@...r.kernel.org
Subject: [PATCH net] taging: csr: fix the skb mac header reset
From: Li RongQing <roy.qing.li@...il.com>
mac_header can be offset if NET_SKBUFF_DATA_USES_OFFSET is set, so
we should call skb_reset_mac_header to reset mac_header.
Or it will not work on net-next since "net: Use 16bits for *_headers
fields of struct skbuff" commit is introduced.
Signed-off-by: Li RongQing <roy.qing.li@...il.com>
---
drivers/staging/csr/monitor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/csr/monitor.c b/drivers/staging/csr/monitor.c
index c8e20e4..e11f6cb 100644
--- a/drivers/staging/csr/monitor.c
+++ b/drivers/staging/csr/monitor.c
@@ -188,7 +188,7 @@ netrx_radiotap(unifi_priv_t *priv,
skb->dev = dev;
- skb->mac_header = skb->data;
+ skb_reset_mac_header(skb);
skb->pkt_type = PACKET_OTHERHOST;
skb->protocol = __constant_htons(ETH_P_80211_RAW);
memset(skb->cb, 0, sizeof(skb->cb));
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists