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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:24:15 +0000 (10:24 +0200)
commitaedec6019d7ce7e8dfbd1559aa82ce7b0ea22336
treee8bbbe348aaf173de8d11759d7ac2cab4018719a
parent828f9526f0611c589c404826d9d96fe4d7e8ebfe
net: dsa: qca8k: fix mdb add/del case with 0 VID

commit dfd739f182b00b02bd7470ed94d112684cc04fa2 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/dsa/qca/qca8k-common.c