From: Vladimir Oltean <vladimir.olt...@nxp.com> Date: Sat, 3 Oct 2020 01:06:46 +0300
> 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. ... > Signed-off-by: Vladimir Oltean <vladimir.olt...@nxp.com> Applied, thanks.