]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: rtl8366: Check VLAN ID and not ports
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 1 Oct 2019 14:28:43 +0000 (16:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Oct 2019 16:09:23 +0000 (12:09 -0400)
commitf3cff3346b327d278a9c14e41b9e346917c82a36
tree8b76303b16a4d25a9dce0dbe9109dec37e3a4809
parent373178263ebbaccae57fbf1c606b6f25eae9b69c
net: dsa: rtl8366: Check VLAN ID and not ports

There has been some confusion between the port number and
the VLAN ID in this driver. What we need to check for
validity is the VLAN ID, nothing else.

The current confusion came from assigning a few default
VLANs for default routing and we need to rewrite that
properly.

Instead of checking if the port number is a valid VLAN
ID, check the actual VLAN IDs passed in to the callback
one by one as expected.

Fixes: 397676d73a0a ("net: dsa: realtek-smi: Add Realtek SMI driver")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/rtl8366.c