Lines Matching refs:ndev

144 static void gfar_process_frame(struct net_device *ndev, struct sk_buff *skb);
171 static void gfar_init_bds(struct net_device *ndev) in gfar_init_bds() argument
173 struct gfar_private *priv = netdev_priv(ndev); in gfar_init_bds()
222 static int gfar_alloc_skb_resources(struct net_device *ndev) in gfar_alloc_skb_resources() argument
227 struct gfar_private *priv = netdev_priv(ndev); in gfar_alloc_skb_resources()
254 tx_queue->dev = ndev; in gfar_alloc_skb_resources()
265 rx_queue->ndev = ndev; in gfar_alloc_skb_resources()
294 gfar_init_bds(ndev); in gfar_alloc_skb_resources()
341 if (priv->ndev->features & (NETIF_F_RXCSUM | NETIF_F_HW_VLAN_CTAG_RX)) in gfar_rx_offload_en()
363 if (priv->ndev->flags & IFF_PROMISC) in gfar_mac_rx_config()
366 if (priv->ndev->features & NETIF_F_RXCSUM) in gfar_mac_rx_config()
381 if (priv->ndev->features & NETIF_F_HW_VLAN_CTAG_RX) in gfar_mac_rx_config()
400 if (priv->ndev->features & NETIF_F_IP_CSUM) in gfar_mac_tx_config()
411 if (priv->ndev->features & NETIF_F_HW_VLAN_CTAG_TX) in gfar_mac_tx_config()
547 priv->tx_queue[i]->dev = priv->ndev; in gfar_alloc_tx_queues()
564 priv->rx_queue[i]->ndev = priv->ndev; in gfar_alloc_rx_queues()
604 free_netdev(priv->ndev); in free_gfar_dev()
810 priv->ndev = dev; in gfar_of_init()
1201 gfar_clear_exact_match(priv->ndev); in gfar_mac_reset()
1207 gfar_set_mac_address(priv->ndev); in gfar_mac_reset()
1209 gfar_set_multi(priv->ndev); in gfar_mac_reset()
1326 priv->ndev = dev; in gfar_probe()
1482 unregister_netdev(priv->ndev); in gfar_remove()
1529 struct net_device *ndev = priv->ndev; in gfar_filer_config_wol() local
1532 u32 dest_mac_addr = (ndev->dev_addr[0] << 16) | in gfar_filer_config_wol()
1533 (ndev->dev_addr[1] << 8) | in gfar_filer_config_wol()
1534 ndev->dev_addr[2]; in gfar_filer_config_wol()
1541 dest_mac_addr = (ndev->dev_addr[3] << 16) | in gfar_filer_config_wol()
1542 (ndev->dev_addr[4] << 8) | in gfar_filer_config_wol()
1543 ndev->dev_addr[5]; in gfar_filer_config_wol()
1605 struct net_device *ndev = priv->ndev; in gfar_suspend() local
1610 if (!netif_running(ndev)) in gfar_suspend()
1614 netif_tx_lock(ndev); in gfar_suspend()
1615 netif_device_detach(ndev); in gfar_suspend()
1616 netif_tx_unlock(ndev); in gfar_suspend()
1648 struct net_device *ndev = priv->ndev; in gfar_resume() local
1653 if (!netif_running(ndev)) in gfar_resume()
1673 netif_device_attach(ndev); in gfar_resume()
1682 struct net_device *ndev = priv->ndev; in gfar_restore() local
1684 if (!netif_running(ndev)) { in gfar_restore()
1685 netif_device_attach(ndev); in gfar_restore()
1690 gfar_init_bds(ndev); in gfar_restore()
1705 netif_device_attach(ndev); in gfar_restore()
2080 priv->ndev->trans_start = jiffies; /* prevent tx timeout */ in gfar_start()
2093 struct net_device *dev = priv->ndev; in register_grp_irqs()
2183 int startup_gfar(struct net_device *ndev) in startup_gfar() argument
2185 struct gfar_private *priv = netdev_priv(ndev); in startup_gfar()
2190 err = gfar_alloc_skb_resources(ndev); in startup_gfar()
2212 netif_tx_wake_all_queues(ndev); in startup_gfar()
2622 void reset_gfar(struct net_device *ndev) in reset_gfar() argument
2624 struct gfar_private *priv = netdev_priv(ndev); in reset_gfar()
2629 stop_gfar(ndev); in reset_gfar()
2630 startup_gfar(ndev); in reset_gfar()
2644 reset_gfar(priv->ndev); in gfar_reset_task()
2753 netif_wake_subqueue(priv->ndev, tqi); in gfar_clean_tx_ring()
2787 struct gfar_private *priv = netdev_priv(rx_queue->ndev); in gfar_rx_alloc_err()
2790 netdev_err(rx_queue->ndev, "Can't alloc RX buffers\n"); in gfar_rx_alloc_err()
2833 static void count_errors(u32 lstatus, struct net_device *ndev) in count_errors() argument
2835 struct gfar_private *priv = netdev_priv(ndev); in count_errors()
2836 struct net_device_stats *stats = &ndev->stats; in count_errors()
3025 static void gfar_process_frame(struct net_device *ndev, struct sk_buff *skb) in gfar_process_frame() argument
3027 struct gfar_private *priv = netdev_priv(ndev); in gfar_process_frame()
3051 if (ndev->features & NETIF_F_RXCSUM) in gfar_process_frame()
3055 skb->protocol = eth_type_trans(skb, ndev); in gfar_process_frame()
3061 if (ndev->features & NETIF_F_HW_VLAN_CTAG_RX && in gfar_process_frame()
3073 struct net_device *ndev = rx_queue->ndev; in gfar_clean_rx_ring() local
3074 struct gfar_private *priv = netdev_priv(ndev); in gfar_clean_rx_ring()
3118 count_errors(lstatus, ndev); in gfar_clean_rx_ring()
3133 gfar_process_frame(ndev, skb); in gfar_clean_rx_ring()
3562 struct net_device *dev = priv->ndev; in gfar_error()
3712 netif_warn(priv, link, priv->ndev, in gfar_update_link_state()