projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
14ae335
)
net: hns: add skb_reset_mac_header() after skb being alloc
author
Kejian Yan
<
[email protected]
>
Tue, 21 Jun 2016 03:56:23 +0000
(11:56 +0800)
committer
David S. Miller
<
[email protected]
>
Tue, 21 Jun 2016 08:51:54 +0000
(
04:51
-0400)
HNS receives a packet without doing anything, but it should call
skb_reset_mac_header() to initialize the header before using
eth_hdr().
Fixes: 0d6b425a3773c3445b0f51b2f333821beaacb619
Signed-off-by: Kejian Yan <
[email protected]
>
Signed-off-by: Yisen Zhuang <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/ethernet/hisilicon/hns/hns_enet.c
patch
|
blob
|
history
diff --git
a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index ad742a6f587952f0d44826070561ed9d83c39832..15200e4cd45644bdc53e78a748a98e80333266d4 100644
(file)
--- a/
drivers/net/ethernet/hisilicon/hns/hns_enet.c
+++ b/
drivers/net/ethernet/hisilicon/hns/hns_enet.c
@@
-600,6
+600,7
@@
static int hns_nic_poll_rx_skb(struct hns_nic_ring_data *ring_data,
ring->stats.sw_err_cnt++;
return -ENOMEM;
}
+ skb_reset_mac_header(skb);
prefetchw(skb->data);
length = le16_to_cpu(desc->rx.pkt_len);