• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/net/

Lines Matching refs:ndev

468 	struct net_device *ndev;
563 struct device *emac_dev = &priv->ndev->dev;
664 * @ndev: The DaVinci EMAC network adapter
670 static void emac_get_drvinfo(struct net_device *ndev,
679 * @ndev: The DaVinci EMAC network adapter
685 static int emac_get_settings(struct net_device *ndev,
688 struct emac_priv *priv = netdev_priv(ndev);
698 * @ndev: The DaVinci EMAC network adapter
704 static int emac_set_settings(struct net_device *ndev, struct ethtool_cmd *ecmd)
706 struct emac_priv *priv = netdev_priv(ndev);
716 * @ndev : The DaVinci EMAC network adapter
722 static int emac_get_coalesce(struct net_device *ndev,
725 struct emac_priv *priv = netdev_priv(ndev);
734 * @ndev : The DaVinci EMAC network adapter
740 static int emac_set_coalesce(struct net_device *ndev,
743 struct emac_priv *priv = netdev_priv(ndev);
839 struct net_device *ndev = priv->ndev;
878 if (!netif_carrier_ok(ndev))
879 netif_carrier_on(ndev);
881 if (netif_running(ndev) && netif_queue_stopped(ndev))
882 netif_wake_queue(ndev);
885 if (netif_carrier_ok(ndev))
886 netif_carrier_off(ndev);
887 if (!netif_queue_stopped(ndev))
888 netif_stop_queue(ndev);
928 struct device *emac_dev = &priv->ndev->dev;
1013 struct device *emac_dev = &priv->ndev->dev;
1052 * @ndev: The DaVinci EMAC network adapter
1057 static void emac_dev_mcast_set(struct net_device *ndev)
1060 struct emac_priv *priv = netdev_priv(ndev);
1063 if (ndev->flags & IFF_PROMISC) {
1068 if ((ndev->flags & IFF_ALLMULTI) ||
1069 netdev_mc_count(ndev) > EMAC_DEF_MAX_MULTICAST_ADDRESSES) {
1073 if (!netdev_mc_empty(ndev)) {
1079 netdev_for_each_mc_addr(ha, ndev) {
1174 struct net_device *ndev = (struct net_device *)dev_id;
1175 struct emac_priv *priv = netdev_priv(ndev);
1178 if (likely(netif_running(priv->ndev))) {
1212 struct device *emac_dev = &priv->ndev->dev;
1302 struct net_device *ndev = priv->ndev;
1305 if (unlikely(num_tokens && netif_queue_stopped(ndev)))
1306 netif_start_queue(ndev);
1311 ndev->stats.tx_packets++;
1312 ndev->stats.tx_bytes += skb->len;
1328 struct device *emac_dev = &priv->ndev->dev;
1403 struct device *emac_dev = &priv->ndev->dev;
1510 curr_bd->buff_ptr = dma_map_single(&priv->ndev->dev, buf_list->data_ptr,
1557 * @ndev: The DaVinci EMAC network adapter
1564 static int emac_dev_xmit(struct sk_buff *skb, struct net_device *ndev)
1566 struct device *emac_dev = &ndev->dev;
1570 struct emac_priv *priv = netdev_priv(ndev);
1597 netif_stop_queue(priv->ndev);
1599 ndev->stats.tx_dropped++;
1608 * @ndev: The DaVinci EMAC network adapter
1616 static void emac_dev_tx_timeout(struct net_device *ndev)
1618 struct emac_priv *priv = netdev_priv(ndev);
1619 struct device *emac_dev = &ndev->dev;
1624 ndev->stats.tx_errors++;
1649 struct net_device *ndev = priv->ndev;
1650 struct device *emac_dev = &ndev->dev;
1661 p_skb->dev = ndev;
1680 struct device *emac_dev = &priv->ndev->dev;
1761 struct device *emac_dev = &priv->ndev->dev;
1817 dma_unmap_single(&priv->ndev->dev,
1922 struct device *emac_dev = &priv->ndev->dev;
1941 * @ndev: The DaVinci EMAC network adapter
1948 static int emac_dev_setmac_addr(struct net_device *ndev, void *addr)
1950 struct emac_priv *priv = netdev_priv(ndev);
1952 struct device *emac_dev = &priv->ndev->dev;
1959 memcpy(priv->mac_addr, sa->sa_data, ndev->addr_len);
1960 memcpy(ndev->dev_addr, sa->sa_data, ndev->addr_len);
1964 if (netif_running(ndev)) {
1965 memcpy(rxch->mac_addr, sa->sa_data, ndev->addr_len);
1997 curr_bd->buff_ptr = dma_map_single(&priv->ndev->dev, buffer,
2049 struct net_device *ndev = priv->ndev;
2053 p_skb->protocol = eth_type_trans(p_skb, priv->ndev);
2055 ndev->stats.rx_bytes += net_pkt_list->pkt_length;
2056 ndev->stats.rx_packets++;
2116 dma_unmap_single(&priv->ndev->dev, curr_bd->buff_ptr,
2253 * @ndev: The DaVinci EMAC network adapter
2268 struct net_device *ndev = priv->ndev;
2269 struct device *emac_dev = &ndev->dev;
2302 netif_stop_queue(ndev);
2336 * @ndev: The DaVinci EMAC network adapter
2341 void emac_poll_controller(struct net_device *ndev)
2343 struct emac_priv *priv = netdev_priv(ndev);
2346 emac_irq(ndev->irq, ndev);
2424 static void emac_adjust_link(struct net_device *ndev)
2426 struct emac_priv *priv = netdev_priv(ndev);
2468 * @ndev: The DaVinci EMAC network adapter
2476 static int emac_devioctl(struct net_device *ndev, struct ifreq *ifrq, int cmd)
2478 dev_warn(&ndev->dev, "DaVinci EMAC: ioctl not supported\n");
2480 if (!(netif_running(ndev)))
2490 * @ndev: The DaVinci EMAC network adapter
2498 static int emac_dev_open(struct net_device *ndev)
2500 struct device *emac_dev = &ndev->dev;
2507 struct emac_priv *priv = netdev_priv(ndev);
2509 netif_carrier_off(ndev);
2511 ndev->dev_addr[cnt] = priv->mac_addr[cnt];
2546 ndev->name, ndev))
2560 emac_set_coalesce(ndev, &coal);
2575 printk(KERN_ERR "%s: no PHY found\n", ndev->name);
2579 priv->phydev = phy_connect(ndev, dev_name(&priv->phydev->dev),
2584 ndev->name);
2593 "(mii_bus:phy_addr=%s, id=%x)\n", ndev->name,
2604 if (!netif_running(ndev)) /* debug only - to avoid compiler warning */
2608 dev_notice(emac_dev, "DaVinci EMAC: Opened %s\n", ndev->name);
2621 free_irq(m, ndev);
2630 * @ndev: The DaVinci EMAC network adapter
2637 static int emac_dev_stop(struct net_device *ndev)
2642 struct emac_priv *priv = netdev_priv(ndev);
2643 struct device *emac_dev = &ndev->dev;
2646 netif_stop_queue(ndev);
2649 netif_carrier_off(ndev);
2663 free_irq(irq_num, priv->ndev);
2668 dev_notice(emac_dev, "DaVinci EMAC: %s stopped\n", ndev->name);
2675 * @ndev: The DaVinci EMAC network adapter
2681 static struct net_device_stats *emac_dev_getnetstats(struct net_device *ndev)
2683 struct emac_priv *priv = netdev_priv(ndev);
2696 ndev->stats.multicast += emac_read(EMAC_RXMCASTFRAMES);
2699 ndev->stats.collisions += (emac_read(EMAC_TXCOLLISION) +
2706 ndev->stats.rx_length_errors += (emac_read(EMAC_RXOVERSIZED) +
2713 ndev->stats.rx_over_errors += (emac_read(EMAC_RXSOFOVERRUNS) +
2718 ndev->stats.rx_fifo_errors += emac_read(EMAC_RXDMAOVERRUNS);
2721 ndev->stats.tx_carrier_errors +=
2725 ndev->stats.tx_fifo_errors = emac_read(EMAC_TXUNDERRUN);
2728 return &ndev->stats;
2757 struct net_device *ndev;
2772 ndev = alloc_etherdev(sizeof(struct emac_priv));
2773 if (!ndev) {
2779 platform_set_drvdata(pdev, ndev);
2780 priv = netdev_priv(ndev);
2782 priv->ndev = ndev;
2806 emac_dev = &ndev->dev;
2817 if (!request_mem_region(res->start, size, ndev->name)) {
2831 ndev->base_addr = (unsigned long)priv->remap_addr;
2849 ndev->irq = res->start;
2858 ndev->netdev_ops = &emac_netdev_ops;
2859 SET_ETHTOOL_OPS(ndev, &ethtool_ops);
2860 netif_napi_add(ndev, &priv->napi, emac_poll, EMAC_POLL_WEIGHT);
2865 SET_NETDEV_DEV(ndev, &pdev->dev);
2866 rc = register_netdev(ndev);
2903 (void *)priv->emac_base_phys, ndev->irq);
2920 free_netdev(ndev);
2934 struct net_device *ndev = platform_get_drvdata(pdev);
2935 struct emac_priv *priv = netdev_priv(ndev);
2937 dev_notice(&ndev->dev, "DaVinci EMAC: davinci_emac_remove()\n");
2946 unregister_netdev(ndev);
2948 free_netdev(ndev);
2959 struct net_device *ndev = platform_get_drvdata(pdev);
2961 if (netif_running(ndev))
2962 emac_dev_stop(ndev);
2972 struct net_device *ndev = platform_get_drvdata(pdev);
2976 if (netif_running(ndev))
2977 emac_dev_open(ndev);