summaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-03-13 17:33:12 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-03-13 17:33:12 +0000
commitab881f8a9d0933f1064532287a4797f6070d6f39 (patch)
tree47fdeb89a4b21b6dac25e153afd7dd1966770ef6 /target
parent1faec31054a9d372dbfc36c408e644b6e6b5fe41 (diff)
generic: ar8216: merge multiple if statements in ar8216_hw_apply
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30928 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c
index ffa561b36..4b67cb6cb 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -621,24 +621,18 @@ ar8216_hw_apply(struct switch_dev *dev)
int egress, ingress;
int pvid;
- if (priv->vlan)
- pvid = priv->vlan_id[priv->pvid[i]];
- else
- pvid = i;
-
if (priv->vlan) {
+ pvid = priv->vlan_id[priv->pvid[i]];
if (priv->vlan_tagged & (1 << i))
egress = AR8216_OUT_ADD_VLAN;
else
egress = AR8216_OUT_STRIP_VLAN;
+ ingress = AR8216_IN_SECURE;
} else {
+ pvid = i;
egress = AR8216_OUT_KEEP;
- }
-
- if (priv->vlan)
- ingress = AR8216_IN_SECURE;
- else
ingress = AR8216_IN_PORT_ONLY;
+ }
if (priv->chip == AR8236)
ar8236_setup_port(priv, i, egress, ingress, portmask[i],