br_private.h (e5a55a898720096f43bc24938f8875c0a1b34cd7) | br_private.h (2469ffd723f76ac2d3ce3d4f31ee31ee0a06cd38) |
---|---|
1/* 2 * Linux ethernet bridge 3 * 4 * Authors: 5 * Lennert Buytenhek <buytenh@gnu.org> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 144 unchanged lines hidden (view full) --- 153 struct netpoll *np; 154#endif 155}; 156 157#define br_port_exists(dev) (dev->priv_flags & IFF_BRIDGE_PORT) 158 159static inline struct net_bridge_port *br_port_get_rcu(const struct net_device *dev) 160{ | 1/* 2 * Linux ethernet bridge 3 * 4 * Authors: 5 * Lennert Buytenhek <buytenh@gnu.org> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 144 unchanged lines hidden (view full) --- 153 struct netpoll *np; 154#endif 155}; 156 157#define br_port_exists(dev) (dev->priv_flags & IFF_BRIDGE_PORT) 158 159static inline struct net_bridge_port *br_port_get_rcu(const struct net_device *dev) 160{ |
161 struct net_bridge_port *port = rcu_dereference(dev->rx_handler_data); | 161 struct net_bridge_port *port = 162 rcu_dereference_rtnl(dev->rx_handler_data); 163 |
162 return br_port_exists(dev) ? port : NULL; 163} 164 165static inline struct net_bridge_port *br_port_get_rtnl(struct net_device *dev) 166{ 167 return br_port_exists(dev) ? 168 rtnl_dereference(dev->rx_handler_data) : NULL; 169} --- 409 unchanged lines hidden --- | 164 return br_port_exists(dev) ? port : NULL; 165} 166 167static inline struct net_bridge_port *br_port_get_rtnl(struct net_device *dev) 168{ 169 return br_port_exists(dev) ? 170 rtnl_dereference(dev->rx_handler_data) : NULL; 171} --- 409 unchanged lines hidden --- |