Lines Matching refs:ndev

172 static int gfar_init_bds(struct net_device *ndev)  in gfar_init_bds()  argument
174 struct gfar_private *priv = netdev_priv(ndev); in gfar_init_bds()
220 skb = gfar_new_skb(ndev, &bufaddr); in gfar_init_bds()
222 netdev_err(ndev, "Can't allocate RX buffers\n"); in gfar_init_bds()
239 static int gfar_alloc_skb_resources(struct net_device *ndev) in gfar_alloc_skb_resources() argument
244 struct gfar_private *priv = netdev_priv(ndev); in gfar_alloc_skb_resources()
271 tx_queue->dev = ndev; in gfar_alloc_skb_resources()
282 rx_queue->dev = ndev; in gfar_alloc_skb_resources()
314 if (gfar_init_bds(ndev)) in gfar_alloc_skb_resources()
359 int frame_size = priv->ndev->mtu + ETH_HLEN + ETH_FCS_LEN; in gfar_rx_buff_size_config()
364 if (priv->ndev->features & (NETIF_F_RXCSUM | NETIF_F_HW_VLAN_CTAG_RX)) in gfar_rx_buff_size_config()
396 if (priv->ndev->flags & IFF_PROMISC) in gfar_mac_rx_config()
399 if (priv->ndev->features & NETIF_F_RXCSUM) in gfar_mac_rx_config()
414 if (priv->ndev->features & NETIF_F_HW_VLAN_CTAG_RX) in gfar_mac_rx_config()
433 if (priv->ndev->features & NETIF_F_IP_CSUM) in gfar_mac_tx_config()
444 if (priv->ndev->features & NETIF_F_HW_VLAN_CTAG_TX) in gfar_mac_tx_config()
587 priv->tx_queue[i]->dev = priv->ndev; in gfar_alloc_tx_queues()
605 priv->rx_queue[i]->dev = priv->ndev; in gfar_alloc_rx_queues()
645 free_netdev(priv->ndev); in free_gfar_dev()
851 priv->ndev = dev; in gfar_of_init()
1240 gfar_clear_exact_match(priv->ndev); in gfar_mac_reset()
1246 gfar_set_mac_address(priv->ndev); in gfar_mac_reset()
1248 gfar_set_multi(priv->ndev); in gfar_mac_reset()
1365 priv->ndev = dev; in gfar_probe()
1516 unregister_netdev(priv->ndev); in gfar_remove()
1530 struct net_device *ndev = priv->ndev; in gfar_suspend() local
1539 netif_device_detach(ndev); in gfar_suspend()
1541 if (netif_running(ndev)) { in gfar_suspend()
1582 struct net_device *ndev = priv->ndev; in gfar_resume() local
1590 if (!netif_running(ndev)) { in gfar_resume()
1591 netif_device_attach(ndev); in gfar_resume()
1613 netif_device_attach(ndev); in gfar_resume()
1623 struct net_device *ndev = priv->ndev; in gfar_restore() local
1625 if (!netif_running(ndev)) { in gfar_restore()
1626 netif_device_attach(ndev); in gfar_restore()
1631 if (gfar_init_bds(ndev)) { in gfar_restore()
1649 netif_device_attach(ndev); in gfar_restore()
2014 priv->ndev->trans_start = jiffies; /* prevent tx timeout */ in gfar_start()
2027 struct net_device *dev = priv->ndev; in register_grp_irqs()
2112 int startup_gfar(struct net_device *ndev) in startup_gfar() argument
2114 struct gfar_private *priv = netdev_priv(ndev); in startup_gfar()
2119 err = gfar_alloc_skb_resources(ndev); in startup_gfar()
2136 netif_tx_wake_all_queues(ndev); in startup_gfar()
2558 void reset_gfar(struct net_device *ndev) in reset_gfar() argument
2560 struct gfar_private *priv = netdev_priv(ndev); in reset_gfar()
2565 stop_gfar(ndev); in reset_gfar()
2566 startup_gfar(ndev); in reset_gfar()
2580 reset_gfar(priv->ndev); in gfar_reset_task()
2698 netif_wake_subqueue(priv->ndev, tqi); in gfar_clean_tx_ring()
3386 struct net_device *dev = priv->ndev; in gfar_error()
3548 netif_warn(priv, link, priv->ndev, in gfar_update_link_state()