]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mt7530: correct ds->num_ports
authorDENG Qingfang <dqfext@gmail.com>
Sat, 16 Oct 2021 06:24:14 +0000 (14:24 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 18 Oct 2021 12:22:21 +0000 (13:22 +0100)
commitda19b333123b1610e37a1764a66f86339e13a8c0
treefe85de461d6a2864a2ad68b7f5130a5a32cfad6a
parentc61615536d1e16580be7ae91ad64e48b46486cfa
net: dsa: mt7530: correct ds->num_ports

Setting ds->num_ports to DSA_MAX_PORTS made DSA core allocate unnecessary
dsa_port's and call mt7530_port_disable for non-existent ports.

Set it to MT7530_NUM_PORTS to fix that, and dsa_is_user_port check in
port_enable/disable is no longer required.

Cc: stable@vger.kernel.org
Signed-off-by: DENG Qingfang <dqfext@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mt7530.c