Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 369872
b: refs/heads/master
c: d2cb6ce
h: refs/heads/master
v: v3
  • Loading branch information
Ajit Khaparde authored and David S. Miller committed Apr 24, 2013
1 parent 857aa0f commit 2ffdbfa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc0c3405abbb7d7115df824c0e41422396923c1f
refs/heads/master: d2cb6ce7306997c753976b65bf81495e1efe7074
8 changes: 8 additions & 0 deletions trunk/drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,7 @@ static netdev_tx_t be_xmit(struct sk_buff *skb,
u32 start = txq->head, eth_hdr_len;
bool dummy_wrb, stopped = false;
bool skip_hw_vlan = false;
struct vlan_ethhdr *veh = (struct vlan_ethhdr *)skb->data;

eth_hdr_len = ntohs(skb->protocol) == ETH_P_8021Q ?
VLAN_ETH_HLEN : ETH_HLEN;
Expand All @@ -846,6 +847,13 @@ static netdev_tx_t be_xmit(struct sk_buff *skb,
pskb_trim(skb, eth_hdr_len + ntohs(ip->tot_len));
}

/* If vlan tag is already inlined in the packet, skip HW VLAN
* tagging in UMC mode
*/
if ((adapter->function_mode & UMC_ENABLED) &&
veh->h_vlan_proto == htons(ETH_P_8021Q))
skip_hw_vlan = true;

/* HW has a bug wherein it will calculate CSUM for VLAN
* pkts even though it is disabled.
* Manually insert VLAN in pkt.
Expand Down

0 comments on commit 2ffdbfa

Please sign in to comment.