From: juhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date: Wed, 20 Jan 2010 07:06:10 +0000 (+0000)
Subject: rtl8366_smi: fix port->flags calculation in rtl8366_get_ports
X-Git-Url: https://git.rohieb.name/openwrt.git/commitdiff_plain/77450dabca4497bbfb5e353de5d566813a551ee5

rtl8366_smi: fix port->flags calculation in rtl8366_get_ports


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19237 3c298f89-4303-0410-b956-a3cf2f4a3e73
---

diff --git a/target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c b/target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c
index b9158d6e3..a79de4e6b 100644
--- a/target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c
+++ b/target/linux/ar71xx/files/drivers/net/phy/rtl8366_smi.c
@@ -1498,7 +1498,8 @@ static int rtl8366_get_ports(struct switch_dev *dev,
 			continue;
 
 		port->id = i;
-		port->flags = vlanmc.untag ? 0 : BIT(SWITCH_PORT_FLAG_TAGGED);
+		port->flags = (vlanmc.untag & BIT(i)) ?
+					0 : BIT(SWITCH_PORT_FLAG_TAGGED);
 		val->len++;
 		port++;
 	}