diff options
author | Jiri Pirko <jpirko@redhat.com> | 2010-06-15 02:50:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-15 14:48:58 -0400 |
commit | f350a0a87374418635689471606454abc7beaa3a (patch) | |
tree | c8210542a9848f6b5953b58d2ba1dbfb11715f14 /net/wireless | |
parent | a35e2c1b6d90544b3c688783869817628e5f9607 (diff) |
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 <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 2 | ||||
-rw-r--r-- | net/wireless/util.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 90ab3c8519be..3a7b8a2f2d5a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -1107,7 +1107,7 @@ static int nl80211_valid_4addr(struct cfg80211_registered_device *rdev, | |||
1107 | enum nl80211_iftype iftype) | 1107 | enum nl80211_iftype iftype) |
1108 | { | 1108 | { |
1109 | if (!use_4addr) { | 1109 | if (!use_4addr) { |
1110 | if (netdev && netdev->br_port) | 1110 | if (netdev && (netdev->priv_flags & IFF_BRIDGE_PORT)) |
1111 | return -EBUSY; | 1111 | return -EBUSY; |
1112 | return 0; | 1112 | return 0; |
1113 | } | 1113 | } |
diff --git a/net/wireless/util.c b/net/wireless/util.c index 3416373a9c0c..0c8a1e8b7690 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -770,8 +770,8 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev, | |||
770 | return -EOPNOTSUPP; | 770 | return -EOPNOTSUPP; |
771 | 771 | ||
772 | /* if it's part of a bridge, reject changing type to station/ibss */ | 772 | /* if it's part of a bridge, reject changing type to station/ibss */ |
773 | if (dev->br_port && (ntype == NL80211_IFTYPE_ADHOC || | 773 | if ((dev->priv_flags & IFF_BRIDGE_PORT) && |
774 | ntype == NL80211_IFTYPE_STATION)) | 774 | (ntype == NL80211_IFTYPE_ADHOC || ntype == NL80211_IFTYPE_STATION)) |
775 | return -EBUSY; | 775 | return -EBUSY; |
776 | 776 | ||
777 | if (ntype != otype) { | 777 | if (ntype != otype) { |