net: dsa: refactor the prechangeupper sanity checks into a dedicated function
authorVladimir Oltean <vladimir.oltean@nxp.com>
Sun, 27 Jun 2021 11:54:28 +0000 (14:54 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jun 2021 21:09:03 +0000 (14:09 -0700)
commit4ede74e73b5b540b2a20bb6d5ad4d69348ba51fc
tree112c5a414667488551819ec997affe82dafed038
parent7e8c18586daf7c1653c4b43a8119bc9662ed8fa6
net: dsa: refactor the prechangeupper sanity checks into a dedicated function

We need to add more logic to the DSA NETDEV_PRECHANGEUPPER event
handler, more exactly we need to request an unsync of switchdev objects.
In order to fit more code, refactor the existing logic into a helper.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c