ipq40xx: essedma: disable default vlan tagging

original idea by chunkeey

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: Chen Minqiang <ptpt52@gmail.com>
This commit is contained in:
Chen Minqiang 2018-03-15 05:46:42 +08:00 committed by AmadeusGhost
parent d500eda5e2
commit 31f8780b0e
10 changed files with 5 additions and 113 deletions

View File

@ -175,22 +175,6 @@
status = "okay";
};
&gmac0 {
qcom,phy_mdio_addr = <4>;
qcom,poll_required = <1>;
qcom,forced_speed = <1000>;
qcom,forced_duplex = <1>;
vlan_tag = <2 0x20>;
};
&gmac1 {
qcom,phy_mdio_addr = <3>;
qcom,poll_required = <1>;
qcom,forced_speed = <1000>;
qcom,forced_duplex = <1>;
vlan_tag = <1 0x10>;
};
&usb2_hs_phy {
status = "okay";
};

View File

@ -266,22 +266,6 @@
#gpio-cells = <2>;
};
&gmac0 {
qcom,forced_duplex = <1>;
qcom,forced_speed = <1000>;
qcom,phy_mdio_addr = <3>;
qcom,poll_required = <1>;
vlan_tag = <1 0x10>;
};
&gmac1 {
qcom,forced_duplex = <1>;
qcom,forced_speed = <1000>;
qcom,phy_mdio_addr = <4>;
qcom,poll_required = <1>;
vlan_tag = <2 0x20>;
};
&tlmm {
i2c0_pins: i2c0_pinmux {
mux_i2c {

View File

@ -227,14 +227,6 @@
status = "okay";
};
&gmac0 {
vlan_tag = <2 0x20>;
};
&gmac1 {
vlan_tag = <1 0x10>;
};
&wifi0 {
status = "okay";
qcom,ath10k-calibration-variant = "EnGenius-EAP1300";

View File

@ -222,14 +222,6 @@
status = "okay";
};
&gmac0 {
vlan_tag = <1 0x10>;
};
&gmac1 {
vlan_tag = <2 0x20>;
};
&usb2_hs_phy {
status = "okay";
};

View File

@ -230,20 +230,6 @@
status = "okay";
};
&gmac0 {
qcom,poll_required = <1>;
qcom,poll_required_dynamic = <1>;
qcom,phy_mdio_addr = <3>;
vlan_tag = <1 0x10>;
};
&gmac1 {
qcom,poll_required = <1>;
qcom,poll_required_dynamic = <1>;
qcom,phy_mdio_addr = <4>;
vlan_tag = <2 0x20>;
};
&wifi0 {
status = "okay";

View File

@ -185,14 +185,6 @@
status = "okay";
};
&gmac0 {
qcom,phy_mdio_addr = <3>;
qcom,poll_required = <1>;
qcom,forced_speed = <1000>;
qcom,forced_duplex = <1>;
vlan_tag = <1 0x10>;
};
&usb2_hs_phy {
status = "okay";
};

View File

@ -181,10 +181,6 @@
status = "okay";
};
&gmac0 {
vlan_tag = <1 0x10>;
};
&nand {
pinctrl-0 = <&nand_pins>;
pinctrl-names = "default";

View File

@ -362,22 +362,6 @@
};
};
&gmac0 {
qcom,phy_mdio_addr = <4>;
qcom,poll_required = <1>;
qcom,forced_speed = <1000>;
qcom,forced_duplex = <1>;
vlan_tag = <2 0x20>;
};
&gmac1 {
qcom,phy_mdio_addr = <3>;
qcom,poll_required = <1>;
qcom,forced_speed = <1000>;
qcom,forced_duplex = <1>;
vlan_tag = <1 0x10>;
};
&wifi0 {
status = "okay";
};

View File

@ -260,22 +260,6 @@
status = "okay";
};
&gmac0 {
qcom,phy_mdio_addr = <4>;
qcom,poll_required = <1>;
qcom,forced_speed = <1000>;
qcom,forced_duplex = <1>;
vlan_tag = <2 0x20>;
};
&gmac1 {
qcom,phy_mdio_addr = <3>;
qcom,poll_required = <1>;
qcom,forced_speed = <1000>;
qcom,forced_duplex = <1>;
vlan_tag = <1 0x10>;
};
&usb3_ss_phy {
status = "okay";
};

View File

@ -729,13 +729,11 @@ static u16 edma_rx_complete(struct edma_common_info *edma_cinfo,
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++;