net: mscc: ocelot: refactor ocelot_port_inject_frame out of ocelot_port_xmit
The felix DSA driver will inject some frames through register MMIO, same as ocelot switchdev currently does. So we need to be able to reuse the common code. Also create some shim definitions, since the DSA tagger can be compiled without support for the switch driver. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit 137ffbc4) Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> [Xulin: Original patch taken from https://github.com/vladimiroltean/linux/commits/felix-dsa-tag-vlan-stable ] Signed-off-by: Xulin Sun <xulin.sun@windriver.com>
Please register or sign in to comment