Lines Matching refs:peer

34 	struct net_device __rcu	*peer;  member
40 struct net_device *peer; in vxcan_xmit() local
49 peer = rcu_dereference(priv->peer); in vxcan_xmit()
50 if (unlikely(!peer)) { in vxcan_xmit()
69 skb->dev = peer; in vxcan_xmit()
76 peerstats = &peer->stats; in vxcan_xmit()
90 struct net_device *peer = rtnl_dereference(priv->peer); in vxcan_open() local
92 if (!peer) in vxcan_open()
95 if (peer->flags & IFF_UP) { in vxcan_open()
97 netif_carrier_on(peer); in vxcan_open()
105 struct net_device *peer = rtnl_dereference(priv->peer); in vxcan_close() local
108 if (peer) in vxcan_close()
109 netif_carrier_off(peer); in vxcan_close()
117 struct net_device *peer; in vxcan_get_iflink() local
121 peer = rcu_dereference(priv->peer); in vxcan_get_iflink()
122 iflink = peer ? READ_ONCE(peer->ifindex) : 0; in vxcan_get_iflink()
180 struct net_device *peer; in vxcan_newlink() local
214 peer = rtnl_create_link(peer_net, ifname, name_assign_type, in vxcan_newlink()
216 if (IS_ERR(peer)) { in vxcan_newlink()
218 return PTR_ERR(peer); in vxcan_newlink()
222 peer->ifindex = ifmp->ifi_index; in vxcan_newlink()
224 err = register_netdevice(peer); in vxcan_newlink()
228 free_netdev(peer); in vxcan_newlink()
232 netif_carrier_off(peer); in vxcan_newlink()
234 err = rtnl_configure_link(peer, ifmp, 0, NULL); in vxcan_newlink()
252 rcu_assign_pointer(priv->peer, peer); in vxcan_newlink()
254 priv = netdev_priv(peer); in vxcan_newlink()
255 rcu_assign_pointer(priv->peer, dev); in vxcan_newlink()
260 unregister_netdevice(peer); in vxcan_newlink()
267 struct net_device *peer; in vxcan_dellink() local
270 peer = rtnl_dereference(priv->peer); in vxcan_dellink()
276 RCU_INIT_POINTER(priv->peer, NULL); in vxcan_dellink()
279 if (peer) { in vxcan_dellink()
280 priv = netdev_priv(peer); in vxcan_dellink()
281 RCU_INIT_POINTER(priv->peer, NULL); in vxcan_dellink()
282 unregister_netdevice_queue(peer, head); in vxcan_dellink()
293 struct net_device *peer = rtnl_dereference(priv->peer); in vxcan_get_link_net() local
295 return peer ? dev_net(peer) : dev_net(dev); in vxcan_get_link_net()