Lines Matching refs:netdev
64 struct net_device *netdev; member
114 struct net_device *netdev = priv->netdev; in ftmac100_reset() local
137 netdev_err(netdev, "software reset failed\n"); in ftmac100_reset()
161 struct net_device *netdev = priv->netdev; in ftmac100_start_hw() local
176 ftmac100_set_mac(priv, netdev->dev_addr); in ftmac100_start_hw()
321 struct net_device *netdev = priv->netdev; in ftmac100_rx_packet_error() local
326 netdev_info(netdev, "rx err\n"); in ftmac100_rx_packet_error()
328 netdev->stats.rx_errors++; in ftmac100_rx_packet_error()
334 netdev_info(netdev, "rx crc err\n"); in ftmac100_rx_packet_error()
336 netdev->stats.rx_crc_errors++; in ftmac100_rx_packet_error()
342 netdev_info(netdev, "rx frame too long\n"); in ftmac100_rx_packet_error()
344 netdev->stats.rx_length_errors++; in ftmac100_rx_packet_error()
348 netdev_info(netdev, "rx runt\n"); in ftmac100_rx_packet_error()
350 netdev->stats.rx_length_errors++; in ftmac100_rx_packet_error()
354 netdev_info(netdev, "rx odd nibble\n"); in ftmac100_rx_packet_error()
356 netdev->stats.rx_length_errors++; in ftmac100_rx_packet_error()
365 struct net_device *netdev = priv->netdev; in ftmac100_rx_drop_packet() local
370 netdev_dbg(netdev, "drop packet %p\n", rxdes); in ftmac100_rx_drop_packet()
381 netdev->stats.rx_dropped++; in ftmac100_rx_drop_packet()
386 struct net_device *netdev = priv->netdev; in ftmac100_rx_packet() local
411 skb = netdev_alloc_skb_ip_align(netdev, 128); in ftmac100_rx_packet()
414 netdev_err(netdev, "rx skb alloc failed\n"); in ftmac100_rx_packet()
421 netdev->stats.multicast++; in ftmac100_rx_packet()
444 skb->protocol = eth_type_trans(skb, netdev); in ftmac100_rx_packet()
446 netdev->stats.rx_packets++; in ftmac100_rx_packet()
447 netdev->stats.rx_bytes += skb->len; in ftmac100_rx_packet()
574 struct net_device *netdev = priv->netdev; in ftmac100_tx_complete_packet() local
596 netdev->stats.tx_aborted_errors++; in ftmac100_tx_complete_packet()
598 netdev->stats.tx_packets++; in ftmac100_tx_complete_packet()
599 netdev->stats.tx_bytes += skb->len; in ftmac100_tx_complete_packet()
612 netif_wake_queue(netdev); in ftmac100_tx_complete_packet()
626 struct net_device *netdev = priv->netdev; in ftmac100_xmit() local
645 netif_stop_queue(netdev); in ftmac100_xmit()
661 struct net_device *netdev = priv->netdev; in ftmac100_alloc_rx_page() local
668 netdev_err(netdev, "failed to allocate rx page\n"); in ftmac100_alloc_rx_page()
675 netdev_err(netdev, "failed to map rx page\n"); in ftmac100_alloc_rx_page()
751 static int ftmac100_mdio_read(struct net_device *netdev, int phy_id, int reg) in ftmac100_mdio_read() argument
753 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_mdio_read()
772 netdev_err(netdev, "mdio read timed out\n"); in ftmac100_mdio_read()
776 static void ftmac100_mdio_write(struct net_device *netdev, int phy_id, int reg, in ftmac100_mdio_write() argument
779 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_mdio_write()
801 netdev_err(netdev, "mdio write timed out\n"); in ftmac100_mdio_write()
807 static void ftmac100_get_drvinfo(struct net_device *netdev, in ftmac100_get_drvinfo() argument
811 strlcpy(info->bus_info, dev_name(&netdev->dev), sizeof(info->bus_info)); in ftmac100_get_drvinfo()
814 static int ftmac100_get_link_ksettings(struct net_device *netdev, in ftmac100_get_link_ksettings() argument
817 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_get_link_ksettings()
824 static int ftmac100_set_link_ksettings(struct net_device *netdev, in ftmac100_set_link_ksettings() argument
827 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_set_link_ksettings()
831 static int ftmac100_nway_reset(struct net_device *netdev) in ftmac100_nway_reset() argument
833 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_nway_reset()
837 static u32 ftmac100_get_link(struct net_device *netdev) in ftmac100_get_link() argument
839 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_get_link()
856 struct net_device *netdev = dev_id; in ftmac100_interrupt() local
857 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_interrupt()
861 if (likely(netif_running(netdev))) in ftmac100_interrupt()
873 struct net_device *netdev = priv->netdev; in ftmac100_poll() local
913 netdev_info(netdev, "[ISR] = 0x%x: %s%s%s%s\n", status, in ftmac100_poll()
921 netdev->stats.rx_over_errors++; in ftmac100_poll()
926 netdev->stats.rx_fifo_errors++; in ftmac100_poll()
947 static int ftmac100_open(struct net_device *netdev) in ftmac100_open() argument
949 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_open()
954 netdev_err(netdev, "failed to allocate buffers\n"); in ftmac100_open()
958 err = request_irq(priv->irq, ftmac100_interrupt, 0, netdev->name, netdev); in ftmac100_open()
960 netdev_err(netdev, "failed to request irq %d\n", priv->irq); in ftmac100_open()
974 netif_start_queue(netdev); in ftmac100_open()
981 free_irq(priv->irq, netdev); in ftmac100_open()
988 static int ftmac100_stop(struct net_device *netdev) in ftmac100_stop() argument
990 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_stop()
993 netif_stop_queue(netdev); in ftmac100_stop()
996 free_irq(priv->irq, netdev); in ftmac100_stop()
1003 ftmac100_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev) in ftmac100_hard_start_xmit() argument
1005 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_hard_start_xmit()
1010 netdev_dbg(netdev, "tx packet too big\n"); in ftmac100_hard_start_xmit()
1012 netdev->stats.tx_dropped++; in ftmac100_hard_start_xmit()
1021 netdev_err(netdev, "map socket buffer failed\n"); in ftmac100_hard_start_xmit()
1023 netdev->stats.tx_dropped++; in ftmac100_hard_start_xmit()
1032 static int ftmac100_do_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) in ftmac100_do_ioctl() argument
1034 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_do_ioctl()
1056 struct net_device *netdev; in ftmac100_probe() local
1069 netdev = alloc_etherdev(sizeof(*priv)); in ftmac100_probe()
1070 if (!netdev) { in ftmac100_probe()
1075 SET_NETDEV_DEV(netdev, &pdev->dev); in ftmac100_probe()
1076 netdev->ethtool_ops = &ftmac100_ethtool_ops; in ftmac100_probe()
1077 netdev->netdev_ops = &ftmac100_netdev_ops; in ftmac100_probe()
1079 platform_set_drvdata(pdev, netdev); in ftmac100_probe()
1082 priv = netdev_priv(netdev); in ftmac100_probe()
1083 priv->netdev = netdev; in ftmac100_probe()
1089 netif_napi_add(netdev, &priv->napi, ftmac100_poll, 64); in ftmac100_probe()
1113 priv->mii.dev = netdev; in ftmac100_probe()
1118 err = register_netdev(netdev); in ftmac100_probe()
1124 netdev_info(netdev, "irq %d, mapped at %p\n", priv->irq, priv->base); in ftmac100_probe()
1126 if (!is_valid_ether_addr(netdev->dev_addr)) { in ftmac100_probe()
1127 eth_hw_addr_random(netdev); in ftmac100_probe()
1128 netdev_info(netdev, "generated random MAC address %pM\n", in ftmac100_probe()
1129 netdev->dev_addr); in ftmac100_probe()
1140 free_netdev(netdev); in ftmac100_probe()
1147 struct net_device *netdev; in ftmac100_remove() local
1150 netdev = platform_get_drvdata(pdev); in ftmac100_remove()
1151 priv = netdev_priv(netdev); in ftmac100_remove()
1153 unregister_netdev(netdev); in ftmac100_remove()
1159 free_netdev(netdev); in ftmac100_remove()