Lines Matching refs:net_device_ctx

197 	struct net_device_context *net_device_ctx = netdev_priv(net);  in netvsc_close()  local
199 = rtnl_dereference(net_device_ctx->vf_netdev); in netvsc_close()
200 struct netvsc_device *nvdev = rtnl_dereference(net_device_ctx->nvdev); in netvsc_close()
473 struct net_device_context *net_device_ctx = netdev_priv(net); in netvsc_xmit() local
487 vf_netdev = rcu_dereference_bh(net_device_ctx->vf_netdev); in netvsc_xmit()
490 net_device_ctx->data_path_is_vf) in netvsc_xmit()
502 ++net_device_ctx->eth_stats.tx_scattered; in netvsc_xmit()
509 ++net_device_ctx->eth_stats.tx_too_big; in netvsc_xmit()
568 ++net_device_ctx->eth_stats.vlan_error; in netvsc_xmit()
619 if (net_checksum_info(skb) & net_device_ctx->tx_checksum_mask) { in netvsc_xmit()
665 ++net_device_ctx->eth_stats.tx_busy; in netvsc_xmit()
670 ++net_device_ctx->eth_stats.tx_no_space; in netvsc_xmit()
679 ++net_device_ctx->eth_stats.tx_no_memory; in netvsc_xmit()
874 struct net_device_context *net_device_ctx = netdev_priv(net); in netvsc_recv_callback() local
902 ++net_device_ctx->eth_stats.rx_no_memory; in netvsc_recv_callback()
945 struct net_device_context *net_device_ctx = netdev_priv(net); in netvsc_get_channels() local
946 struct netvsc_device *nvdev = rtnl_dereference(net_device_ctx->nvdev); in netvsc_get_channels()
1111 struct net_device_context *net_device_ctx = netdev_priv(net); in netvsc_set_channels() local
1112 struct netvsc_device *nvdev = rtnl_dereference(net_device_ctx->nvdev); in netvsc_set_channels()
2141 struct net_device_context *net_device_ctx; in get_netvsc_byref() local
2148 net_device_ctx = netdev_priv(dev); in get_netvsc_byref()
2149 if (!rtnl_dereference(net_device_ctx->nvdev)) in get_netvsc_byref()
2335 struct net_device_context *net_device_ctx; in netvsc_register_vf() local
2348 net_device_ctx = netdev_priv(ndev); in netvsc_register_vf()
2349 netvsc_dev = rtnl_dereference(net_device_ctx->nvdev); in netvsc_register_vf()
2350 if (!netvsc_dev || rtnl_dereference(net_device_ctx->vf_netdev)) in netvsc_register_vf()
2377 rcu_assign_pointer(net_device_ctx->vf_netdev, vf_netdev); in netvsc_register_vf()
2403 struct net_device_context *net_device_ctx; in netvsc_vf_changed() local
2416 net_device_ctx = netdev_priv(ndev); in netvsc_vf_changed()
2417 netvsc_dev = rtnl_dereference(net_device_ctx->nvdev); in netvsc_vf_changed()
2421 if (net_device_ctx->data_path_is_vf == vf_is_up) in netvsc_vf_changed()
2424 if (vf_is_up && !net_device_ctx->vf_alloc) { in netvsc_vf_changed()
2426 wait_for_completion(&net_device_ctx->vf_add); in netvsc_vf_changed()
2447 struct net_device_context *net_device_ctx; in netvsc_unregister_vf() local
2453 net_device_ctx = netdev_priv(ndev); in netvsc_unregister_vf()
2454 cancel_delayed_work_sync(&net_device_ctx->vf_takeover); in netvsc_unregister_vf()
2460 reinit_completion(&net_device_ctx->vf_add); in netvsc_unregister_vf()
2463 RCU_INIT_POINTER(net_device_ctx->vf_netdev, NULL); in netvsc_unregister_vf()
2475 struct net_device_context *net_device_ctx; in netvsc_probe() local
2489 net_device_ctx = netdev_priv(net); in netvsc_probe()
2490 net_device_ctx->device_ctx = dev; in netvsc_probe()
2491 net_device_ctx->msg_enable = netif_msg_init(debug, default_msg); in netvsc_probe()
2492 if (netif_msg_probe(net_device_ctx)) in netvsc_probe()
2494 net_device_ctx->msg_enable); in netvsc_probe()
2498 INIT_DELAYED_WORK(&net_device_ctx->dwork, netvsc_link_change); in netvsc_probe()
2500 init_completion(&net_device_ctx->vf_add); in netvsc_probe()
2501 spin_lock_init(&net_device_ctx->lock); in netvsc_probe()
2502 INIT_LIST_HEAD(&net_device_ctx->reconfig_events); in netvsc_probe()
2503 INIT_DELAYED_WORK(&net_device_ctx->vf_takeover, netvsc_vf_setup); in netvsc_probe()
2505 net_device_ctx->vf_stats in netvsc_probe()
2507 if (!net_device_ctx->vf_stats) in netvsc_probe()
2577 list_add(&net_device_ctx->list, &netvsc_dev_list); in netvsc_probe()
2589 free_percpu(net_device_ctx->vf_stats); in netvsc_probe()
2679 struct net_device_context *net_device_ctx; in netvsc_resume() local
2685 net_device_ctx = netdev_priv(net); in netvsc_resume()
2691 net_device_ctx->data_path_is_vf = false; in netvsc_resume()
2692 device_info = net_device_ctx->saved_netvsc_dev_info; in netvsc_resume()
2697 net_device_ctx->saved_netvsc_dev_info = NULL; in netvsc_resume()