mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
bridge: use rx_handler_data pointer to store net_bridge_port pointer
Register net_bridge_port pointer as rx_handler data pointer. As br_port is removed from struct net_device, another netdev priv_flag is added to indicate the device serves as a bridge port. Also rcuized pointers are now correctly dereferenced in br_fdb.c and in netfilter parts. Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
a35e2c1b6d
commit
f350a0a873
20 changed files with 71 additions and 50 deletions
|
|
@ -1107,7 +1107,7 @@ static int nl80211_valid_4addr(struct cfg80211_registered_device *rdev,
|
|||
enum nl80211_iftype iftype)
|
||||
{
|
||||
if (!use_4addr) {
|
||||
if (netdev && netdev->br_port)
|
||||
if (netdev && (netdev->priv_flags & IFF_BRIDGE_PORT))
|
||||
return -EBUSY;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -770,8 +770,8 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev,
|
|||
return -EOPNOTSUPP;
|
||||
|
||||
/* if it's part of a bridge, reject changing type to station/ibss */
|
||||
if (dev->br_port && (ntype == NL80211_IFTYPE_ADHOC ||
|
||||
ntype == NL80211_IFTYPE_STATION))
|
||||
if ((dev->priv_flags & IFF_BRIDGE_PORT) &&
|
||||
(ntype == NL80211_IFTYPE_ADHOC || ntype == NL80211_IFTYPE_STATION))
|
||||
return -EBUSY;
|
||||
|
||||
if (ntype != otype) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue