|
From: Chris F. <chr...@ge...> - 2012-11-16 14:52:49
|
From: Chris Friesen <chr...@ge...>
In igbvf_receive_skb() the VLAN tag is big-endian while the mask is
cpu-endian. We need to convert both to common endianness before
applying the mask.
Signed-off-by: Chris Friesen <chr...@ge...>
Reported-by: Mark Huang <mar...@ge...>
---
diff --git a/src/netdev.c b/src/netdev.c
index a18f000..260a598 100644
--- a/src/netdev.c
+++ b/src/netdev.c
@@ -127,9 +127,9 @@ static void igbvf_receive_skb(struct igbvf_adapter *adapter,
if (status & E1000_RXD_STAT_VP) {
if ((adapter->flags & IGBVF_FLAG_RX_LB_VLAN_BSWAP) &&
(status & E1000_RXDEXT_STATERR_LB))
- vid = be16_to_cpu(vlan & E1000_RXD_SPC_VLAN_MASK);
+ vid = be16_to_cpu(vlan) & E1000_RXD_SPC_VLAN_MASK;
else
- vid = le16_to_cpu(vlan & E1000_RXD_SPC_VLAN_MASK);
+ vid = le16_to_cpu(vlan) & E1000_RXD_SPC_VLAN_MASK;
}
/*
* On some adapters, trunk VLANs are incorrectly indicated in the
|