]> git.baikalelectronics.ru Git - kernel.git/commit
net: mscc: ocelot: break apart ocelot_vlan_port_apply
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sat, 9 Nov 2019 13:02:47 +0000 (15:02 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Nov 2019 20:59:09 +0000 (12:59 -0800)
commit305ea5355ad1e2d7b845fe9a18437bfcb380add1
tree9bae1247766f332c40e42cbb66f4ed94186c7040
parent3c28dee5c5c51d789c6912b3f9a6dabd53369c32
net: mscc: ocelot: break apart ocelot_vlan_port_apply

This patch transforms the ocelot_vlan_port_apply function ("apply
what?") into 3 standalone functions:

- ocelot_port_vlan_filtering
- ocelot_port_set_native_vlan
- ocelot_port_set_pvid

These functions have a prototype that is better aligned to the DSA API.

The function also had some static initialization (TPID, drop frames with
multicast source MAC) which was not being changed from any place, so
that was just moved to ocelot_probe_port (one of the 6 callers of
ocelot_vlan_port_apply).

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mscc/ocelot.c