]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: export dsa_slave_dev_check
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 7 Jan 2021 01:24:01 +0000 (03:24 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 Jan 2021 23:42:07 +0000 (15:42 -0800)
commitb3f47f951505745e64688a601b209c4f2f58616c
treef2ab6844b4e4e92a0ff13140de09bd733dce26c2
parent27c763e964b07ca1f47d854761fac3a80cb25d94
net: dsa: export dsa_slave_dev_check

Using the NETDEV_CHANGEUPPER notifications, drivers can be aware when
they are enslaved to e.g. a bridge by calling netif_is_bridge_master().

Export this helper from DSA to get the equivalent functionality of
determining whether the upper interface of a CHANGEUPPER notifier is a
DSA switch interface or not.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/dsa.h
net/dsa/dsa_priv.h
net/dsa/slave.c