]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: move net_device related functions to ocelot_net.c
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sat, 20 Jun 2020 15:43:44 +0000 (18:43 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Jun 2020 00:25:23 +0000 (17:25 -0700)
commit01252f30e8ab70850de2f701e76011860cec045b
tree79721b9dcd50c6bd53c3771189d4d1cf1efafe49
parent554d5657d4e8f87e1b720ab93e3b75917940964a
net: mscc: ocelot: move net_device related functions to ocelot_net.c

The ocelot hardware library shouldn't contain too much net_device
specific code, since it is shared with DSA which abstracts that
structure away. So much as much of this code as possible into the
mscc_ocelot driver and outside of the common library.

We're making an exception for MDB and LAG code. That is not yet exported
to DSA, but when it will, most of the code that's already in ocelot.c
will remain there. So, there's no point in moving code to ocelot_net.c
just to move it back later.

We could have moved all net_device code to ocelot_vsc7514.c directly,
but let's operate under the assumption that if a new switchdev ocelot
driver gets added, it'll define its SoC-specific stuff in a new
ocelot_vsc*.c file and it'll reuse the rest of the code.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/Makefile
drivers/net/ethernet/mscc/ocelot.c
drivers/net/ethernet/mscc/ocelot.h
drivers/net/ethernet/mscc/ocelot_ace.c
drivers/net/ethernet/mscc/ocelot_flower.c
drivers/net/ethernet/mscc/ocelot_net.c [new file with mode: 0644]
drivers/net/ethernet/mscc/ocelot_police.c
drivers/net/ethernet/mscc/ocelot_police.h
drivers/net/ethernet/mscc/ocelot_tc.c [deleted file]
drivers/net/ethernet/mscc/ocelot_tc.h [deleted file]