Lines Matching refs:net_dev

44 static int efx_ef100_rep_open(struct net_device *net_dev)  in efx_ef100_rep_open()  argument
46 struct efx_rep *efv = netdev_priv(net_dev); in efx_ef100_rep_open()
48 netif_napi_add(net_dev, &efv->napi, efx_ef100_rep_poll); in efx_ef100_rep_open()
53 static int efx_ef100_rep_close(struct net_device *net_dev) in efx_ef100_rep_close() argument
55 struct efx_rep *efv = netdev_priv(net_dev); in efx_ef100_rep_close()
75 netif_tx_lock(efx->net_dev); in efx_ef100_rep_xmit()
77 netif_tx_unlock(efx->net_dev); in efx_ef100_rep_xmit()
112 static int efx_ef100_rep_setup_tc(struct net_device *net_dev, in efx_ef100_rep_setup_tc() argument
115 struct efx_rep *efv = netdev_priv(net_dev); in efx_ef100_rep_setup_tc()
119 return efx_tc_flower(efx, net_dev, type_data, efv); in efx_ef100_rep_setup_tc()
121 return efx_tc_setup_block(net_dev, efx, type_data, efv); in efx_ef100_rep_setup_tc()
155 static u32 efx_ef100_rep_ethtool_get_msglevel(struct net_device *net_dev) in efx_ef100_rep_ethtool_get_msglevel() argument
157 struct efx_rep *efv = netdev_priv(net_dev); in efx_ef100_rep_ethtool_get_msglevel()
162 static void efx_ef100_rep_ethtool_set_msglevel(struct net_device *net_dev, in efx_ef100_rep_ethtool_set_msglevel() argument
165 struct efx_rep *efv = netdev_priv(net_dev); in efx_ef100_rep_ethtool_set_msglevel()
170 static void efx_ef100_rep_ethtool_get_ringparam(struct net_device *net_dev, in efx_ef100_rep_ethtool_get_ringparam() argument
175 struct efx_rep *efv = netdev_priv(net_dev); in efx_ef100_rep_ethtool_get_ringparam()
181 static int efx_ef100_rep_ethtool_set_ringparam(struct net_device *net_dev, in efx_ef100_rep_ethtool_set_ringparam() argument
186 struct efx_rep *efv = netdev_priv(net_dev); in efx_ef100_rep_ethtool_set_ringparam()
206 struct net_device *net_dev; in efx_ef100_rep_create_netdev() local
210 net_dev = alloc_etherdev_mq(sizeof(*efv), 1); in efx_ef100_rep_create_netdev()
211 if (!net_dev) in efx_ef100_rep_create_netdev()
214 efv = netdev_priv(net_dev); in efx_ef100_rep_create_netdev()
218 efv->net_dev = net_dev; in efx_ef100_rep_create_netdev()
223 if (netif_running(efx->net_dev) && efx->state == STATE_NET_UP) { in efx_ef100_rep_create_netdev()
224 netif_device_attach(net_dev); in efx_ef100_rep_create_netdev()
225 netif_carrier_on(net_dev); in efx_ef100_rep_create_netdev()
227 netif_carrier_off(net_dev); in efx_ef100_rep_create_netdev()
228 netif_tx_stop_all_queues(net_dev); in efx_ef100_rep_create_netdev()
232 net_dev->netdev_ops = &efx_ef100_rep_netdev_ops; in efx_ef100_rep_create_netdev()
233 net_dev->ethtool_ops = &efx_ef100_rep_ethtool_ops; in efx_ef100_rep_create_netdev()
234 net_dev->min_mtu = EFX_MIN_MTU; in efx_ef100_rep_create_netdev()
235 net_dev->max_mtu = EFX_MAX_MTU; in efx_ef100_rep_create_netdev()
236 net_dev->features |= NETIF_F_LLTX; in efx_ef100_rep_create_netdev()
237 net_dev->hw_features |= NETIF_F_LLTX; in efx_ef100_rep_create_netdev()
240 free_netdev(net_dev); in efx_ef100_rep_create_netdev()
278 free_netdev(efv->net_dev); in efx_ef100_rep_destroy_netdev()
302 rc = register_netdev(efv->net_dev); in efx_ef100_vfrep_create()
310 efv->net_dev->name); in efx_ef100_vfrep_create()
324 rep_dev = efv->net_dev; in efx_ef100_vfrep_destroy()
444 netif_dbg(efv->parent, rx_err, efv->net_dev, in efx_ef100_rep_rx_packet()
450 skb = netdev_alloc_skb(efv->net_dev, rx_buf->len); in efx_ef100_rep_rx_packet()
454 netif_dbg(efv->parent, rx_err, efv->net_dev, in efx_ef100_rep_rx_packet()
465 skb->protocol = eth_type_trans(skb, efv->net_dev); in efx_ef100_rep_rx_packet()