linux/drivers/net/ethernet/mscc
Vladimir Oltean 2e554a7a5d net: dsa: propagate switchdev vlan_filtering prepare phase to drivers
A driver may refuse to enable VLAN filtering for any reason beyond what
the DSA framework cares about, such as:
- having tc-flower rules that rely on the switch being VLAN-aware
- the particular switch does not support VLAN, even if the driver does
  (the DSA framework just checks for the presence of the .port_vlan_add
  and .port_vlan_del pointers)
- simply not supporting this configuration to be toggled at runtime

Currently, when a driver rejects a configuration it cannot support, it
does this from the commit phase, which triggers various warnings in
switchdev.

So propagate the prepare phase to drivers, to give them the ability to
refuse invalid configurations cleanly and avoid the warnings.

Since we need to modify all function prototypes and check for the
prepare phase from within the drivers, take that opportunity and move
the existing driver restrictions within the prepare phase where that is
possible and easy.

Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Woojung Huh <woojung.huh@microchip.com>
Cc: Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
Cc: Sean Wang <sean.wang@mediatek.com>
Cc: Landen Chao <Landen.Chao@mediatek.com>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Vivien Didelot <vivien.didelot@gmail.com>
Cc: Jonathan McDowell <noodles@earth.li>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-10-05 05:56:48 -07:00
..
Kconfig net: mscc: ocelot: rethink Kconfig dependencies again 2020-07-16 12:46:00 -07:00
Makefile net: mscc: ocelot: rename ocelot_ace.{c, h} to ocelot_vcap.{c,h} 2020-06-20 17:25:23 -07:00
ocelot_flower.c net: mscc: ocelot: offload redirect action to VCAP IS2 2020-10-02 15:40:30 -07:00
ocelot_io.c net: mscc: ocelot: introduce a new ocelot_target_{read,write} API 2020-09-29 18:26:12 -07:00
ocelot_net.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
ocelot_police.c net: mscc: ocelot: move net_device related functions to ocelot_net.c 2020-06-20 17:25:23 -07:00
ocelot_police.h net: mscc: ocelot: unexpose ocelot_vcap_policer_{add,del} 2020-06-20 17:25:23 -07:00
ocelot_ptp.c net: mscc: ocelot: make ocelot_init_timestamp take a const struct ptp_clock_info 2020-09-18 17:52:40 -07:00
ocelot_qs.h
ocelot_rew.h
ocelot_vcap.c net: mscc: ocelot: relax ocelot_exclusive_mac_etype_filter_rules() 2020-10-02 15:40:30 -07:00
ocelot_vcap.h net: mscc: ocelot: offload egress VLAN rewriting to VCAP ES0 2020-10-02 15:40:30 -07:00
ocelot_vsc7514.c net: mscc: ocelot: introduce conversion helpers between port and netdev 2020-10-02 15:40:30 -07:00
ocelot.c net: dsa: propagate switchdev vlan_filtering prepare phase to drivers 2020-10-05 05:56:48 -07:00
ocelot.h net: mscc: ocelot: introduce conversion helpers between port and netdev 2020-10-02 15:40:30 -07:00