]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: don't handle netdev events for other netdevs
authorClaudiu Manoil <claudiu.manoil@nxp.com>
Tue, 5 Nov 2019 21:50:13 +0000 (23:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Nov 2019 23:16:17 +0000 (15:16 -0800)
commit7f95f022c69829bd23c399cbe36fa7c7fa91271f
treefc2da2557c91299c94a6df456d53a787fc3c889e
parent724aec46ea8b3121167a1143db6ca199bf11cc75
net: mscc: ocelot: don't handle netdev events for other netdevs

The check that the event is actually for this device should be moved
from the "port" handler to the net device handler.

Otherwise the port handler will deny bonding configuration for other
net devices in the same system (like enetc in the LS1028A) that don't
have the lag_upper_info->tx_type restriction that ocelot has.

Fixes: 6bd31a0e5ed9 ("net: mscc: ocelot: add bonding support")
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c