netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] taging: csr: fix the skb mac header reset
@ 2013-06-07  7:19 roy.qing.li
  2013-06-12  7:22 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: roy.qing.li @ 2013-06-07  7:19 UTC (permalink / raw)
  To: netdev

From: Li RongQing <roy.qing.li@gmail.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@gmail.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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] taging: csr: fix the skb mac header reset
  2013-06-07  7:19 [PATCH net] taging: csr: fix the skb mac header reset roy.qing.li
@ 2013-06-12  7:22 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-06-12  7:22 UTC (permalink / raw)
  To: roy.qing.li; +Cc: netdev

From: roy.qing.li@gmail.com
Date: Fri,  7 Jun 2013 15:19:27 +0800

> From: Li RongQing <roy.qing.li@gmail.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@gmail.com>

Staging driver changes need to go through Greg KH.

Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-12  7:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-07  7:19 [PATCH net] taging: csr: fix the skb mac header reset roy.qing.li
2013-06-12  7:22 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).