• Vladimir Oltean's avatar
    net: mscc: ocelot: move net_device related functions to ocelot_net.c · 9c90eea3
    Vladimir Oltean authored
    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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    9c90eea3
ocelot_police.c 5.35 KB