From: roy.qing.li@gmail.com
To: netdev@vger.kernel.org
Subject: [PATCH net] taging: csr: fix the skb mac header reset
Date: Fri, 7 Jun 2013 15:19:27 +0800 [thread overview]
Message-ID: <1370589567-24043-1-git-send-email-roy.qing.li@gmail.com> (raw)
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
next reply other threads:[~2013-06-07 7:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-07 7:19 roy.qing.li [this message]
2013-06-12 7:22 ` [PATCH net] taging: csr: fix the skb mac header reset David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1370589567-24043-1-git-send-email-roy.qing.li@gmail.com \
--to=roy.qing.li@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).