diff options
author | David Bauer <mail@david-bauer.net> | 2020-09-06 01:24:00 +0200 |
---|---|---|
committer | David Bauer <mail@david-bauer.net> | 2020-09-11 17:37:11 +0200 |
commit | 2e6c236abd0bebe82bf9020941f34344acb3ae1f (patch) | |
tree | c6ec1ca63af8e5b92e2608eb6c749829b82bf565 /target/linux/ipq40xx/files-5.4/drivers/net/ethernet/qualcomm/essedma | |
parent | e289f183476b486e6f9f9590013a5b98de54c762 (diff) | |
download | upstream-2e6c236abd0bebe82bf9020941f34344acb3ae1f.tar.gz upstream-2e6c236abd0bebe82bf9020941f34344acb3ae1f.tar.bz2 upstream-2e6c236abd0bebe82bf9020941f34344acb3ae1f.zip |
ipq40xx: essedma: enable VLAN tag offload for single-port
Enable the VLAN tag offloading mechanism for RGMII single-port devices.
This allows those devices to use 802.1Q VLANs on the ethernet port.
Previously, RX frames were double tagged, as the RX TAG removal flag was
not enabled and an additional 802.1Q header was inserted elsewhere in
the code.
On the TX side, tagging was completely not present for single-port
devices. Enable tagging if an 802.1Q frame should be transmitted and
disable the default tagging mechanism for single-port devices.
Tested on Aruba AP-303
Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target/linux/ipq40xx/files-5.4/drivers/net/ethernet/qualcomm/essedma')
-rw-r--r-- | target/linux/ipq40xx/files-5.4/drivers/net/ethernet/qualcomm/essedma/edma.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/target/linux/ipq40xx/files-5.4/drivers/net/ethernet/qualcomm/essedma/edma.c b/target/linux/ipq40xx/files-5.4/drivers/net/ethernet/qualcomm/essedma/edma.c index 5561cc23ea..5f2630ae50 100644 --- a/target/linux/ipq40xx/files-5.4/drivers/net/ethernet/qualcomm/essedma/edma.c +++ b/target/linux/ipq40xx/files-5.4/drivers/net/ethernet/qualcomm/essedma/edma.c @@ -164,10 +164,8 @@ static void edma_configure_rx(struct edma_common_info *edma_cinfo) /* Set Rx FIFO threshold to start to DMA data to host */ rxq_ctrl_data = EDMA_FIFO_THRESH_128_BYTE; - if (!edma_cinfo->is_single_phy) { /* Set RX remove vlan bit */ rxq_ctrl_data |= EDMA_RXQ_CTRL_RMV_VLAN; - } edma_write_reg(EDMA_REG_RXQ_CTRL, rxq_ctrl_data); } @@ -1411,12 +1409,10 @@ netdev_tx_t edma_xmit(struct sk_buff *skb, } /* Check and mark VLAN tag offload */ - if (!adapter->edma_cinfo->is_single_phy) { - if (unlikely(skb_vlan_tag_present(skb))) - flags_transmit |= EDMA_VLAN_TX_TAG_INSERT_FLAG; - else if (adapter->default_vlan_tag) - flags_transmit |= EDMA_VLAN_TX_TAG_INSERT_DEFAULT_FLAG; - } + if (unlikely(skb_vlan_tag_present(skb))) + flags_transmit |= EDMA_VLAN_TX_TAG_INSERT_FLAG; + else if (!adapter->edma_cinfo->is_single_phy && adapter->default_vlan_tag) + flags_transmit |= EDMA_VLAN_TX_TAG_INSERT_DEFAULT_FLAG; /* Check and mark checksum offload */ if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) |