Lines Matching refs:net_dev

42 static int efx_ef100_rep_open(struct net_device *net_dev)  in efx_ef100_rep_open()  argument
44 struct efx_rep *efv = netdev_priv(net_dev); in efx_ef100_rep_open()
46 netif_napi_add(net_dev, &efv->napi, efx_ef100_rep_poll); in efx_ef100_rep_open()
51 static int efx_ef100_rep_close(struct net_device *net_dev) in efx_ef100_rep_close() argument
53 struct efx_rep *efv = netdev_priv(net_dev); in efx_ef100_rep_close()
73 netif_tx_lock(efx->net_dev); in efx_ef100_rep_xmit()
75 netif_tx_unlock(efx->net_dev); in efx_ef100_rep_xmit()
110 static int efx_ef100_rep_setup_tc(struct net_device *net_dev, in efx_ef100_rep_setup_tc() argument
113 struct efx_rep *efv = netdev_priv(net_dev); in efx_ef100_rep_setup_tc()
117 return efx_tc_flower(efx, net_dev, type_data, efv); in efx_ef100_rep_setup_tc()
119 return efx_tc_setup_block(net_dev, efx, type_data, efv); in efx_ef100_rep_setup_tc()
153 static u32 efx_ef100_rep_ethtool_get_msglevel(struct net_device *net_dev) in efx_ef100_rep_ethtool_get_msglevel() argument
155 struct efx_rep *efv = netdev_priv(net_dev); in efx_ef100_rep_ethtool_get_msglevel()
160 static void efx_ef100_rep_ethtool_set_msglevel(struct net_device *net_dev, in efx_ef100_rep_ethtool_set_msglevel() argument
163 struct efx_rep *efv = netdev_priv(net_dev); in efx_ef100_rep_ethtool_set_msglevel()
168 static void efx_ef100_rep_ethtool_get_ringparam(struct net_device *net_dev, in efx_ef100_rep_ethtool_get_ringparam() argument
173 struct efx_rep *efv = netdev_priv(net_dev); in efx_ef100_rep_ethtool_get_ringparam()
179 static int efx_ef100_rep_ethtool_set_ringparam(struct net_device *net_dev, in efx_ef100_rep_ethtool_set_ringparam() argument
184 struct efx_rep *efv = netdev_priv(net_dev); in efx_ef100_rep_ethtool_set_ringparam()
204 struct net_device *net_dev; in efx_ef100_rep_create_netdev() local
208 net_dev = alloc_etherdev_mq(sizeof(*efv), 1); in efx_ef100_rep_create_netdev()
209 if (!net_dev) in efx_ef100_rep_create_netdev()
212 efv = netdev_priv(net_dev); in efx_ef100_rep_create_netdev()
216 efv->net_dev = net_dev; in efx_ef100_rep_create_netdev()
221 if (netif_running(efx->net_dev) && efx->state == STATE_NET_UP) { in efx_ef100_rep_create_netdev()
222 netif_device_attach(net_dev); in efx_ef100_rep_create_netdev()
223 netif_carrier_on(net_dev); in efx_ef100_rep_create_netdev()
225 netif_carrier_off(net_dev); in efx_ef100_rep_create_netdev()
226 netif_tx_stop_all_queues(net_dev); in efx_ef100_rep_create_netdev()
230 net_dev->netdev_ops = &efx_ef100_rep_netdev_ops; in efx_ef100_rep_create_netdev()
231 net_dev->ethtool_ops = &efx_ef100_rep_ethtool_ops; in efx_ef100_rep_create_netdev()
232 net_dev->min_mtu = EFX_MIN_MTU; in efx_ef100_rep_create_netdev()
233 net_dev->max_mtu = EFX_MAX_MTU; in efx_ef100_rep_create_netdev()
234 net_dev->features |= NETIF_F_LLTX; in efx_ef100_rep_create_netdev()
235 net_dev->hw_features |= NETIF_F_LLTX; in efx_ef100_rep_create_netdev()
238 free_netdev(net_dev); in efx_ef100_rep_create_netdev()
279 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()
323 rep_dev = efv->net_dev; in efx_ef100_vfrep_destroy()
395 netif_dbg(efv->parent, rx_err, efv->net_dev, in efx_ef100_rep_rx_packet()
401 skb = netdev_alloc_skb(efv->net_dev, rx_buf->len); in efx_ef100_rep_rx_packet()
405 netif_dbg(efv->parent, rx_err, efv->net_dev, in efx_ef100_rep_rx_packet()
416 skb->protocol = eth_type_trans(skb, efv->net_dev); in efx_ef100_rep_rx_packet()