aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-03-13 17:33:12 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-03-13 17:33:12 +0000
commite3af7c82f880aea86ade6de05904523c699ba60b (patch)
tree30f4a1a533d12b07e17883426507a06d0bb1cce4 /target/linux/generic
parent6a57a1fbdb26ac24e940b19a801ecdaa64038e3d (diff)
downloadupstream-e3af7c82f880aea86ade6de05904523c699ba60b.tar.gz
upstream-e3af7c82f880aea86ade6de05904523c699ba60b.tar.bz2
upstream-e3af7c82f880aea86ade6de05904523c699ba60b.zip
generic: ar8216: merge multiple if statements in ar8216_hw_apply
SVN-Revision: 30928
Diffstat (limited to 'target/linux/generic')
-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 ffa561b36c..4b67cb6cbb 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],