Lines Matching refs:port
24 struct hsr_port *port; in hsr_handle_frame() local
32 port = hsr_port_get_rcu(skb->dev); in hsr_handle_frame()
33 if (!port) in hsr_handle_frame()
36 if (hsr_addr_is_self(port->hsr, eth_hdr(skb)->h_source)) { in hsr_handle_frame()
47 hsr_forward_skb(skb, port); in hsr_handle_frame()
103 static int hsr_portdev_setup(struct net_device *dev, struct hsr_port *port) in hsr_portdev_setup() argument
117 res = netdev_rx_handler_register(dev, hsr_handle_frame, port); in hsr_portdev_setup()
135 struct hsr_port *port, *master; in hsr_add_port() local
144 port = hsr_port_get_hsr(hsr, type); in hsr_add_port()
145 if (port != NULL) in hsr_add_port()
148 port = kzalloc(sizeof(*port), GFP_KERNEL); in hsr_add_port()
149 if (port == NULL) in hsr_add_port()
152 port->hsr = hsr; in hsr_add_port()
153 port->dev = dev; in hsr_add_port()
154 port->type = type; in hsr_add_port()
157 res = hsr_portdev_setup(dev, port); in hsr_add_port()
162 list_add_tail_rcu(&port->port_list, &hsr->ports); in hsr_add_port()
172 kfree(port); in hsr_add_port()
176 void hsr_del_port(struct hsr_port *port) in hsr_del_port() argument
181 hsr = port->hsr; in hsr_del_port()
183 list_del_rcu(&port->port_list); in hsr_del_port()
185 if (port != master) { in hsr_del_port()
190 netdev_rx_handler_unregister(port->dev); in hsr_del_port()
191 dev_set_promiscuity(port->dev, -1); in hsr_del_port()
200 if (port != master) in hsr_del_port()
201 dev_put(port->dev); in hsr_del_port()