> > > Interesting find, thanks! Can the port still send *untagged* packets as > well, if > you configure untagged membership? When I wrote the driver, I think I > explicitly > chose not to set this bit, and it was unneeded for my M chip. Perhaps it > means > "ALWAYS send tagged packets", but I would need to check that, it's just a > hunch. > I don't have the time right now. >
Yes, you are right? ALWAYS. It seems that if you set this bit, it cannot send "untagged" packets for that particular port even though you configure untagged membership. I try to tag and untag port 0 but for both IP, however, in both situations, it sends tagged packets. > > > The only problem nows is the port 1 is activated after port 0 is plugged > > with cable. Any idea how to solve this? > > Could you elaborate a bit? I don't quite understand what you mean with > 'activated'. DO you see some message in a log or in the output of some > command? > UBNT RS has two ports connected to eth1, port 0 and port 1. If you connect your Ethernet cable to port 0 without first connecting Ethernet cable to port 1, it won't work. You will see a lot of messages "Trying 100/FULL, Trying 10/HALF, Trying 10/HALF". Once you connect port 1 with Ethernet cable, you will only see the message "eth1: link up (100Mbps/Full duplex)" and the port 0 will function properly. P.S: int i should be changed to int j --- ./target/linux/generic-2.6/files/drivers/net/phy/adm6996.c 2011-03-29 16:24:22.869595814 +0800 +++ ./build_dir/linux-ar71xx/linux-2.6.32.27/drivers/net/phy/adm6996.c 2011-04-04 18:32:14.188937710 +0800 @@ -416,6 +418,15 @@ adm6996_apply_vlan_filters(struct adm699 w16(priv->phydev, ADM_VLAN_FILT_L(i), reg); reg = ADM_VLAN_FILT_VALID | ADM_VLAN_FILT_VID(vid); w16(priv->phydev, ADM_VLAN_FILT_H(i), reg); + + for (j = 0; j < ADM_PHY_PORTS; j++) { + if(tagged & (1<<j)){ + reg = r16(priv->phydev, adm_portcfg[j]); + reg |= ADM_PORTCFG_OT; + w16(priv->phydev, adm_portcfg[j], reg); + } + } } }
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel