mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 14:23:38 +00:00
70 lines
2.4 KiB
Diff
70 lines
2.4 KiB
Diff
From: Christian Lamparter <chunkeey@googlemail.com>
|
|
Subject: [PATCH] net: essedma: disable default vlan tagging
|
|
Date: Tue, 21 Mar 13:59:02 CET 2017 +0100
|
|
|
|
The essedma driver has its own unique take on VLAN management
|
|
and its configuration. In the original SDK, each VLAN is
|
|
assigned one virtual ethernet netdev.
|
|
|
|
However, this is non-standard. So, this patch does away
|
|
with the default_vlan_tag property the driver is using
|
|
and therefore forces the user to use the kernel's vlan
|
|
feature.
|
|
|
|
This patch also removes the "qcom,poll_required = <1>;" from
|
|
the essedma node.
|
|
|
|
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
|
|
---
|
|
--- a/drivers/net/ethernet/qualcomm/essedma/edma.c
|
|
+++ b/drivers/net/ethernet/qualcomm/essedma/edma.c
|
|
@@ -715,13 +715,11 @@ static void edma_rx_complete(struct edma
|
|
edma_receive_checksum(rd, skb);
|
|
|
|
/* Process VLAN HW acceleration indication provided by HW */
|
|
- if (unlikely(adapter->default_vlan_tag != rd->rrd4)) {
|
|
- vlan = rd->rrd4;
|
|
- if (likely(rd->rrd7 & EDMA_RRD_CVLAN))
|
|
- __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan);
|
|
- else if (rd->rrd1 & EDMA_RRD_SVLAN)
|
|
- __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021AD), vlan);
|
|
- }
|
|
+ vlan = rd->rrd4;
|
|
+ if (likely(rd->rrd7 & EDMA_RRD_CVLAN))
|
|
+ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), vlan);
|
|
+ else if (rd->rrd1 & EDMA_RRD_SVLAN)
|
|
+ __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021AD), vlan);
|
|
|
|
/* Update rx statistics */
|
|
adapter->stats.rx_packets++;
|
|
@@ -1390,8 +1388,6 @@ netdev_tx_t edma_xmit(struct sk_buff *sk
|
|
/* Check and mark VLAN tag offload */
|
|
if (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;
|
|
|
|
/* Check and mark checksum offload */
|
|
if (likely(skb->ip_summed == CHECKSUM_PARTIAL))
|
|
--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
|
|
+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
|
|
@@ -404,8 +404,7 @@
|
|
qcom,page-mode = <0>;
|
|
qcom,rx_head_buf_size = <1540>;
|
|
qcom,mdio_supported;
|
|
- qcom,poll_required = <1>;
|
|
- qcom,num_gmac = <2>;
|
|
+ qcom,num_gmac = <1>;
|
|
interrupts = <0 65 IRQ_TYPE_EDGE_RISING
|
|
0 66 IRQ_TYPE_EDGE_RISING
|
|
0 67 IRQ_TYPE_EDGE_RISING
|
|
@@ -443,7 +442,7 @@
|
|
|
|
gmac0: gmac0 {
|
|
local-mac-address = [00 00 00 00 00 00];
|
|
- vlan_tag = <1 0x1f>;
|
|
+ vlan_tag = <1 0x3f>;
|
|
};
|
|
|
|
gmac1: gmac1 {
|