Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 845de8af authored by Joyce Yu's avatar Joyce Yu Committed by David S. Miller
Browse files

niu: VLAN_ETH_HLEN should be used to make sure that the whole MAC header was...


niu: VLAN_ETH_HLEN should be used to make sure that the whole MAC header was copied to the head buffer in the Vlan packets case

Signed-off-by: default avatarJoyce Yu <joyce.yu@sun.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b6a71bfa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3545,7 +3545,7 @@ static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np,
	rp->rcr_index = index;

	skb_reserve(skb, NET_IP_ALIGN);
	__pskb_pull_tail(skb, min(len, NIU_RXPULL_MAX));
	__pskb_pull_tail(skb, min(len, VLAN_ETH_HLEN));

	rp->rx_packets++;
	rp->rx_bytes += skb->len;