atl1: fix vlan tag regression
Commit 401c0aabec
introduced a regression
in the atl1 driver by storing the VLAN tag in the wrong TX descriptor
field.
This patch causes the VLAN tag to be stored in its proper location.
Tested-by: Ramon Casellas <ramon.casellas@cttc.es>
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Cc: stable@kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This commit is contained in:
@@ -2310,7 +2310,8 @@ static void atl1_tx_queue(struct atl1_adapter *adapter, u16 count,
|
|||||||
if (tpd != ptpd)
|
if (tpd != ptpd)
|
||||||
memcpy(tpd, ptpd, sizeof(struct tx_packet_desc));
|
memcpy(tpd, ptpd, sizeof(struct tx_packet_desc));
|
||||||
tpd->buffer_addr = cpu_to_le64(buffer_info->dma);
|
tpd->buffer_addr = cpu_to_le64(buffer_info->dma);
|
||||||
tpd->word2 = (cpu_to_le16(buffer_info->length) &
|
tpd->word2 &= ~(TPD_BUFLEN_MASK << TPD_BUFLEN_SHIFT);
|
||||||
|
tpd->word2 |= (cpu_to_le16(buffer_info->length) &
|
||||||
TPD_BUFLEN_MASK) << TPD_BUFLEN_SHIFT;
|
TPD_BUFLEN_MASK) << TPD_BUFLEN_SHIFT;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -2409,8 +2410,8 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
|
|||||||
vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
|
vlan_tag = (vlan_tag << 4) | (vlan_tag >> 13) |
|
||||||
((vlan_tag >> 9) & 0x8);
|
((vlan_tag >> 9) & 0x8);
|
||||||
ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;
|
ptpd->word3 |= 1 << TPD_INS_VL_TAG_SHIFT;
|
||||||
ptpd->word3 |= (vlan_tag & TPD_VL_TAGGED_MASK) <<
|
ptpd->word2 |= (vlan_tag & TPD_VLANTAG_MASK) <<
|
||||||
TPD_VL_TAGGED_SHIFT;
|
TPD_VLANTAG_SHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
tso = atl1_tso(adapter, skb, ptpd);
|
tso = atl1_tso(adapter, skb, ptpd);
|
||||||
|
@@ -504,7 +504,7 @@ struct rx_free_desc {
|
|||||||
#define TPD_PKTNT_MASK 0x0001
|
#define TPD_PKTNT_MASK 0x0001
|
||||||
#define TPD_PKTINT_SHIFT 15
|
#define TPD_PKTINT_SHIFT 15
|
||||||
#define TPD_VLANTAG_MASK 0xFFFF
|
#define TPD_VLANTAG_MASK 0xFFFF
|
||||||
#define TPD_VLAN_SHIFT 16
|
#define TPD_VLANTAG_SHIFT 16
|
||||||
|
|
||||||
/* tpd word 3 bits 0:13 */
|
/* tpd word 3 bits 0:13 */
|
||||||
#define TPD_EOP_MASK 0x0001
|
#define TPD_EOP_MASK 0x0001
|
||||||
|
Reference in New Issue
Block a user