Lines Matching defs:net_dev

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