-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ipq40xx: essedma: disable default vlan tagging
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. Unfortunately, this change will cause the essedma driver to leak LAN<->WAN during LEDE bootup. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
- Loading branch information
Showing
4 changed files
with
89 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
target/linux/ipq806x/patches-4.9/712-net-essedma-disable-default-vlan.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
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 | ||
@@ -386,8 +386,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 | ||
@@ -425,7 +424,7 @@ | ||
|
||
gmac0: gmac0 { | ||
local-mac-address = [00 00 00 00 00 00]; | ||
- vlan_tag = <1 0x1f>; | ||
+ vlan_tag = <1 0x3f>; | ||
}; | ||
|
||
gmac1: gmac1 { |