/* size of the vlan table */
#define AR8X16_MAX_VLANS 128
to
/* size of the vlan table */
#define AR8X16_MAX_VLANS 4096
Despite indicating amount of VLANs limited 128, it now also limits -usage- of VLAN ID > 127. Swconfig shows pvid 0 whenever VLAN ID > 127 and no traffic is (un)tagged on the port.
Confirmed on Mikrotik RB450G (AR8216 switch), when changed to 4096 it works as expected:
root@OpenWrt:/etc/config# swconfig dev switch0 show
Global attributes:
enable_vlan: 1
ar8xxx_mib_poll_interval: 0
ar8xxx_mib_type: 0
enable_mirror_rx: 0
enable_mirror_tx: 0
mirror_monitor_port: 0
mirror_source_port: 0
arl_table: address resolution table
Port 0: MAC 4c:5e:0c:47:5c:94
Port 0:
mib: ???
pvid: 0
link: port:0 link:up speed:1000baseT full-duplex txflow rxflow
Port 1:
mib: ???
pvid: 188
link: port:1 link:down
Port 2:
mib: ???
pvid: 1
link: port:2 link:down
Port 3:
mib: ???
pvid: 1
link: port:3 link:down
Port 4:
mib: ???
pvid: 1
link: port:4 link:down
VLAN 1:
vid: 1
ports: 0t 2 3 4
VLAN 188:
vid: 188
ports: 0t 1
When I use your proposed config, it messes up VLAN configuration completely.
Here's output with your config:
Global attributes:
enable_vlan: 1
ar8xxx_mib_poll_interval: 0
ar8xxx_mib_type: 0
enable_mirror_rx: 0
enable_mirror_tx: 0
mirror_monitor_port: 0
mirror_source_port: 0
arl_table: address resolution table
Port 0: MAC 4c:5e:0c:47:5c:93
Port 0: MAC 4c:5e:0c:47:5c:94
Port 1: MAC 00:0e:c6:89:a8:71