mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
amd-xgbe: VLAN Rx tag stripping fix
When receiving a VLAN packet check to be sure that VLAN RX CTAG stripping is enabled before indicating that the tag has been stripped in the packet information data structure. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
6e5eed042f
commit
c52e9c6385
1 changed files with 3 additions and 1 deletions
|
@ -1113,6 +1113,7 @@ static int xgbe_dev_read(struct xgbe_channel *channel)
|
||||||
struct xgbe_ring_data *rdata;
|
struct xgbe_ring_data *rdata;
|
||||||
struct xgbe_ring_desc *rdesc;
|
struct xgbe_ring_desc *rdesc;
|
||||||
struct xgbe_packet_data *packet = &ring->packet_data;
|
struct xgbe_packet_data *packet = &ring->packet_data;
|
||||||
|
struct net_device *netdev = channel->pdata->netdev;
|
||||||
unsigned int err, etlt;
|
unsigned int err, etlt;
|
||||||
|
|
||||||
DBGPR("-->xgbe_dev_read: cur = %d\n", ring->cur);
|
DBGPR("-->xgbe_dev_read: cur = %d\n", ring->cur);
|
||||||
|
@ -1153,7 +1154,8 @@ static int xgbe_dev_read(struct xgbe_channel *channel)
|
||||||
DBGPR(" err=%u, etlt=%#x\n", err, etlt);
|
DBGPR(" err=%u, etlt=%#x\n", err, etlt);
|
||||||
|
|
||||||
if (!err || (err && !etlt)) {
|
if (!err || (err && !etlt)) {
|
||||||
if (etlt == 0x09) {
|
if ((etlt == 0x09) &&
|
||||||
|
(netdev->features & NETIF_F_HW_VLAN_CTAG_RX)) {
|
||||||
XGMAC_SET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES,
|
XGMAC_SET_BITS(packet->attributes, RX_PACKET_ATTRIBUTES,
|
||||||
VLAN_CTAG, 1);
|
VLAN_CTAG, 1);
|
||||||
packet->vlan_ctag = XGMAC_GET_BITS_LE(rdesc->desc0,
|
packet->vlan_ctag = XGMAC_GET_BITS_LE(rdesc->desc0,
|
||||||
|
|
Loading…
Add table
Reference in a new issue