VLAN does not work with niu driver
Subsystems (2)
PATCH 1/1 VLAN does not work with niu driver
From 0bb77e878758bd72051577bcc568e2b95c87c203 Mon Sep 17 00:00:00 2001
From: Joyce Yu <[email protected]>
Date: Mon, 12 Oct 2009 11:03:54 -0700
Subject: [PATCH] VLAN does not work with niu driver
Signed-off-by Joyce Yu <[email protected]>
---drivers/net/niu.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
drivers/net/niu.c +10 -1
@@ -3480,6 +3480,7 @@ static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np,unsigned int index = rp->rcr_index;struct sk_buff *skb;int len, num_rcr; +struct vlan_ethhdr *veth; skb =netdev_alloc_skb (np->dev,RX_SKB_ALLOC_SIZE );if (unlikely (!skb))
@@ -3545,7 +3546,15 @@ 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 )); + + veth = (struct vlan_ethhdr *)skb->data; +if (veth->h_vlan_proto !=__constant_htons (ETH_P_8021Q )) { + skb->tail -=4 ; + skb->data_len +=4 ; +skb_shinfo (skb)->frags[0 ].page_offset -=4 ; +skb_shinfo (skb)->frags[0 ].size +=4 ; + } rp->rx_packets++; rp->rx_bytes += skb->len;
--
1.6.4
David Miller
maintainerFrom: Joyce Yu <[email protected]>
Date: Mon, 12 Oct 2009 22:41:36 -0700
Review static int niu_process_rx_pkt(struct napi_struct · line 3480
Quoted 3 lines
+++
b/drivers/net/niu.c(quoted diff) +0
-0@@ -3480,6 +3480,7 @@ static int niu_process_rx_pkt(struct napi_struct *napi, struct niu *np,
Your email client is still breaking up long lines.
Take your time and fix your setup correctly. Read 'linux/Documentation/email-clients.txt' for tips.