Lines Matching refs:netdev

64 static void opa_vnic_get_stats64(struct net_device *netdev,  in opa_vnic_get_stats64()  argument
67 struct opa_vnic_adapter *adapter = opa_vnic_priv(netdev); in opa_vnic_get_stats64()
72 adapter->rn_ops->ndo_get_stats64(netdev, &vstats.netstats); in opa_vnic_get_stats64()
79 struct net_device *netdev) in opa_netdev_start_xmit() argument
81 struct opa_vnic_adapter *adapter = opa_vnic_priv(netdev); in opa_netdev_start_xmit()
93 return adapter->rn_ops->ndo_start_xmit(skb, netdev); in opa_netdev_start_xmit()
96 static u16 opa_vnic_select_queue(struct net_device *netdev, struct sk_buff *skb, in opa_vnic_select_queue() argument
99 struct opa_vnic_adapter *adapter = opa_vnic_priv(netdev); in opa_vnic_select_queue()
107 rc = adapter->rn_ops->ndo_select_queue(netdev, skb, sb_dev); in opa_vnic_select_queue()
127 netif_dormant_off(adapter->netdev); in opa_vnic_update_state()
129 netif_dormant_on(adapter->netdev); in opa_vnic_update_state()
137 struct rdma_netdev *rn = netdev_priv(adapter->netdev); in opa_vnic_process_vema_config()
139 struct net_device *netdev = adapter->netdev; in opa_vnic_process_vema_config() local
151 eth_commit_mac_addr_change(netdev, &saddr); in opa_vnic_process_vema_config()
157 rn->set_id(netdev, info->vesw.vesw_id); in opa_vnic_process_vema_config()
161 netdev->max_mtu = max_t(unsigned int, info->vesw.eth_mtu, in opa_vnic_process_vema_config()
162 netdev->min_mtu); in opa_vnic_process_vema_config()
163 if (netdev->mtu > netdev->max_mtu) in opa_vnic_process_vema_config()
164 dev_set_mtu(netdev, netdev->max_mtu); in opa_vnic_process_vema_config()
186 opa_vnic_update_state(adapter, !!(netdev->flags & IFF_UP)); in opa_vnic_process_vema_config()
202 static int opa_vnic_set_mac_addr(struct net_device *netdev, void *addr) in opa_vnic_set_mac_addr() argument
204 struct opa_vnic_adapter *adapter = opa_vnic_priv(netdev); in opa_vnic_set_mac_addr()
208 if (!memcmp(netdev->dev_addr, sa->sa_data, ETH_ALEN)) in opa_vnic_set_mac_addr()
212 rc = eth_mac_addr(netdev, addr); in opa_vnic_set_mac_addr()
228 static void opa_vnic_mac_send_event(struct net_device *netdev, u8 event) in opa_vnic_mac_send_event() argument
230 struct opa_vnic_adapter *adapter = opa_vnic_priv(netdev); in opa_vnic_mac_send_event()
238 hw_list = &netdev->uc; in opa_vnic_mac_send_event()
243 hw_list = &netdev->mc; in opa_vnic_mac_send_event()
263 static void opa_vnic_set_rx_mode(struct net_device *netdev) in opa_vnic_set_rx_mode() argument
265 opa_vnic_mac_send_event(netdev, in opa_vnic_set_rx_mode()
268 opa_vnic_mac_send_event(netdev, in opa_vnic_set_rx_mode()
273 static int opa_netdev_open(struct net_device *netdev) in opa_netdev_open() argument
275 struct opa_vnic_adapter *adapter = opa_vnic_priv(netdev); in opa_netdev_open()
278 rc = adapter->rn_ops->ndo_open(adapter->netdev); in opa_netdev_open()
292 static int opa_netdev_close(struct net_device *netdev) in opa_netdev_close() argument
294 struct opa_vnic_adapter *adapter = opa_vnic_priv(netdev); in opa_netdev_close()
297 rc = adapter->rn_ops->ndo_stop(adapter->netdev); in opa_netdev_close()
326 struct net_device *netdev; in opa_vnic_add_netdev() local
330 netdev = ibdev->ops.alloc_rdma_netdev(ibdev, port_num, in opa_vnic_add_netdev()
334 if (!netdev) in opa_vnic_add_netdev()
336 else if (IS_ERR(netdev)) in opa_vnic_add_netdev()
337 return ERR_CAST(netdev); in opa_vnic_add_netdev()
339 rn = netdev_priv(netdev); in opa_vnic_add_netdev()
349 adapter->netdev = netdev; in opa_vnic_add_netdev()
353 adapter->rn_ops = netdev->netdev_ops; in opa_vnic_add_netdev()
355 netdev->netdev_ops = &opa_netdev_ops; in opa_vnic_add_netdev()
356 netdev->priv_flags |= IFF_LIVE_ADDR_CHANGE; in opa_vnic_add_netdev()
357 netdev->hard_header_len += OPA_VNIC_SKB_HEADROOM; in opa_vnic_add_netdev()
362 SET_NETDEV_DEV(netdev, ibdev->dev.parent); in opa_vnic_add_netdev()
364 opa_vnic_set_ethtool_ops(netdev); in opa_vnic_add_netdev()
368 rc = register_netdev(netdev); in opa_vnic_add_netdev()
372 netif_carrier_off(netdev); in opa_vnic_add_netdev()
373 netif_dormant_on(netdev); in opa_vnic_add_netdev()
382 rn->free_rdma_netdev(netdev); in opa_vnic_add_netdev()
390 struct net_device *netdev = adapter->netdev; in opa_vnic_rem_netdev() local
391 struct rdma_netdev *rn = netdev_priv(netdev); in opa_vnic_rem_netdev()
394 unregister_netdev(netdev); in opa_vnic_rem_netdev()
399 rn->free_rdma_netdev(netdev); in opa_vnic_rem_netdev()