OSDN Git Service

net: dsa: qca8k: fix mdb add/del case with 0 VID
authorChristian Marangi <ansuelsmth@gmail.com>
Mon, 24 Jul 2023 03:25:31 +0000 (05:25 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Jul 2023 07:50:10 +0000 (08:50 +0100)
commitdfd739f182b00b02bd7470ed94d112684cc04fa2
tree8490a91d39fca318521e34491d3d703e1f457790
parentae70dcb9d9ecaf7d9836d3e1b5bef654d7ef5680
net: dsa: qca8k: fix mdb add/del case with 0 VID

The qca8k switch doesn't support using 0 as VID and require a default
VID to be always set. MDB add/del function doesn't currently handle
this and are currently setting the default VID.

Fix this by correctly handling this corner case and internally use the
default VID for VID 0 case.

Fixes: ba8f870dfa63 ("net: dsa: qca8k: add support for mdb_add/del")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca/qca8k-common.c