net: dsa: microchip: ksz8795: use port_cnt instead of TOTOAL_PORT_NUM
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Tue, 1 Dec 2020 20:45:05 +0000 (21:45 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Dec 2020 01:16:29 +0000 (17:16 -0800)
commit241ed719bc9884758f8953550f2ed22715b24339
treefc9edc0fd7576ce41d0c35f7cf53fff856fcd62b
parentc9f4633b93ea5a138626fb9ca8fa43e923caad4a
net: dsa: microchip: ksz8795: use port_cnt instead of TOTOAL_PORT_NUM

To get the driver working with other chips using different port counts
the dyn_mac_table should be flushed depending on the amount of available
ports. This patch remove the extra define TOTOAL_PORT_NUM and is
making use of the dynamic port_cnt variable instead.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz8795.c
drivers/net/dsa/microchip/ksz8795_reg.h