Lines Matching refs:netdev

66 	struct net_device *netdev;  member
116 struct net_device *netdev = priv->netdev; in ftmac100_reset() local
139 netdev_err(netdev, "software reset failed\n"); in ftmac100_reset()
157 netdev_for_each_mc_addr(ha, priv->netdev) { in ftmac100_setup_mc_ht()
169 struct net_device *netdev = priv->netdev; in ftmac100_set_rx_bits() local
176 if (netdev->flags & IFF_PROMISC) in ftmac100_set_rx_bits()
178 if (netdev->flags & IFF_ALLMULTI) in ftmac100_set_rx_bits()
180 else if (netdev_mc_count(netdev)) { in ftmac100_set_rx_bits()
197 struct net_device *netdev = priv->netdev; in ftmac100_start_hw() local
213 ftmac100_set_mac(priv, netdev->dev_addr); in ftmac100_start_hw()
216 if (netdev->mtu > ETH_DATA_LEN) in ftmac100_start_hw()
359 struct net_device *netdev = priv->netdev; in ftmac100_rx_packet_error() local
364 netdev_info(netdev, "rx err\n"); in ftmac100_rx_packet_error()
366 netdev->stats.rx_errors++; in ftmac100_rx_packet_error()
372 netdev_info(netdev, "rx crc err\n"); in ftmac100_rx_packet_error()
374 netdev->stats.rx_crc_errors++; in ftmac100_rx_packet_error()
380 netdev_info(netdev, "rx runt\n"); in ftmac100_rx_packet_error()
382 netdev->stats.rx_length_errors++; in ftmac100_rx_packet_error()
386 netdev_info(netdev, "rx odd nibble\n"); in ftmac100_rx_packet_error()
388 netdev->stats.rx_length_errors++; in ftmac100_rx_packet_error()
402 struct net_device *netdev = priv->netdev; in ftmac100_rx_drop_packet() local
407 netdev_dbg(netdev, "drop packet %p\n", rxdes); in ftmac100_rx_drop_packet()
418 netdev->stats.rx_dropped++; in ftmac100_rx_drop_packet()
423 struct net_device *netdev = priv->netdev; in ftmac100_rx_packet() local
443 netdev->stats.rx_length_errors++; in ftmac100_rx_packet()
449 skb = netdev_alloc_skb_ip_align(netdev, 128); in ftmac100_rx_packet()
452 netdev_err(netdev, "rx skb alloc failed\n"); in ftmac100_rx_packet()
459 netdev->stats.multicast++; in ftmac100_rx_packet()
482 skb->protocol = eth_type_trans(skb, netdev); in ftmac100_rx_packet()
484 netdev->stats.rx_packets++; in ftmac100_rx_packet()
485 netdev->stats.rx_bytes += skb->len; in ftmac100_rx_packet()
612 struct net_device *netdev = priv->netdev; in ftmac100_tx_complete_packet() local
634 netdev->stats.tx_aborted_errors++; in ftmac100_tx_complete_packet()
636 netdev->stats.tx_packets++; in ftmac100_tx_complete_packet()
637 netdev->stats.tx_bytes += skb->len; in ftmac100_tx_complete_packet()
650 netif_wake_queue(netdev); in ftmac100_tx_complete_packet()
664 struct net_device *netdev = priv->netdev; in ftmac100_xmit() local
683 netif_stop_queue(netdev); in ftmac100_xmit()
699 struct net_device *netdev = priv->netdev; in ftmac100_alloc_rx_page() local
706 netdev_err(netdev, "failed to allocate rx page\n"); in ftmac100_alloc_rx_page()
713 netdev_err(netdev, "failed to map rx page\n"); in ftmac100_alloc_rx_page()
789 static int ftmac100_mdio_read(struct net_device *netdev, int phy_id, int reg) in ftmac100_mdio_read() argument
791 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_mdio_read()
810 netdev_err(netdev, "mdio read timed out\n"); in ftmac100_mdio_read()
814 static void ftmac100_mdio_write(struct net_device *netdev, int phy_id, int reg, in ftmac100_mdio_write() argument
817 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_mdio_write()
839 netdev_err(netdev, "mdio write timed out\n"); in ftmac100_mdio_write()
845 static void ftmac100_get_drvinfo(struct net_device *netdev, in ftmac100_get_drvinfo() argument
849 strscpy(info->bus_info, dev_name(&netdev->dev), sizeof(info->bus_info)); in ftmac100_get_drvinfo()
852 static int ftmac100_get_link_ksettings(struct net_device *netdev, in ftmac100_get_link_ksettings() argument
855 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_get_link_ksettings()
862 static int ftmac100_set_link_ksettings(struct net_device *netdev, in ftmac100_set_link_ksettings() argument
865 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_set_link_ksettings()
869 static int ftmac100_nway_reset(struct net_device *netdev) in ftmac100_nway_reset() argument
871 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_nway_reset()
875 static u32 ftmac100_get_link(struct net_device *netdev) in ftmac100_get_link() argument
877 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_get_link()
894 struct net_device *netdev = dev_id; in ftmac100_interrupt() local
895 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_interrupt()
899 if (likely(netif_running(netdev))) in ftmac100_interrupt()
911 struct net_device *netdev = priv->netdev; in ftmac100_poll() local
951 netdev_info(netdev, "[ISR] = 0x%x: %s%s%s%s\n", status, in ftmac100_poll()
959 netdev->stats.rx_over_errors++; in ftmac100_poll()
964 netdev->stats.rx_fifo_errors++; in ftmac100_poll()
985 static int ftmac100_open(struct net_device *netdev) in ftmac100_open() argument
987 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_open()
992 netdev_err(netdev, "failed to allocate buffers\n"); in ftmac100_open()
996 err = request_irq(priv->irq, ftmac100_interrupt, 0, netdev->name, netdev); in ftmac100_open()
998 netdev_err(netdev, "failed to request irq %d\n", priv->irq); in ftmac100_open()
1012 netif_start_queue(netdev); in ftmac100_open()
1019 free_irq(priv->irq, netdev); in ftmac100_open()
1026 static int ftmac100_stop(struct net_device *netdev) in ftmac100_stop() argument
1028 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_stop()
1031 netif_stop_queue(netdev); in ftmac100_stop()
1034 free_irq(priv->irq, netdev); in ftmac100_stop()
1041 ftmac100_hard_start_xmit(struct sk_buff *skb, struct net_device *netdev) in ftmac100_hard_start_xmit() argument
1043 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_hard_start_xmit()
1048 netdev_dbg(netdev, "tx packet too big\n"); in ftmac100_hard_start_xmit()
1050 netdev->stats.tx_dropped++; in ftmac100_hard_start_xmit()
1059 netdev_err(netdev, "map socket buffer failed\n"); in ftmac100_hard_start_xmit()
1061 netdev->stats.tx_dropped++; in ftmac100_hard_start_xmit()
1070 static int ftmac100_do_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd) in ftmac100_do_ioctl() argument
1072 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_do_ioctl()
1078 static int ftmac100_change_mtu(struct net_device *netdev, int mtu) in ftmac100_change_mtu() argument
1080 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_change_mtu()
1095 netdev->mtu = mtu; in ftmac100_change_mtu()
1100 static void ftmac100_set_rx_mode(struct net_device *netdev) in ftmac100_set_rx_mode() argument
1102 struct ftmac100 *priv = netdev_priv(netdev); in ftmac100_set_rx_mode()
1127 struct net_device *netdev; in ftmac100_probe() local
1140 netdev = alloc_etherdev(sizeof(*priv)); in ftmac100_probe()
1141 if (!netdev) { in ftmac100_probe()
1146 SET_NETDEV_DEV(netdev, &pdev->dev); in ftmac100_probe()
1147 netdev->ethtool_ops = &ftmac100_ethtool_ops; in ftmac100_probe()
1148 netdev->netdev_ops = &ftmac100_netdev_ops; in ftmac100_probe()
1149 netdev->max_mtu = MAX_PKT_SIZE - VLAN_ETH_HLEN; in ftmac100_probe()
1151 err = platform_get_ethdev_address(&pdev->dev, netdev); in ftmac100_probe()
1155 platform_set_drvdata(pdev, netdev); in ftmac100_probe()
1158 priv = netdev_priv(netdev); in ftmac100_probe()
1159 priv->netdev = netdev; in ftmac100_probe()
1165 netif_napi_add(netdev, &priv->napi, ftmac100_poll); in ftmac100_probe()
1189 priv->mii.dev = netdev; in ftmac100_probe()
1194 err = register_netdev(netdev); in ftmac100_probe()
1200 netdev_info(netdev, "irq %d, mapped at %p\n", priv->irq, priv->base); in ftmac100_probe()
1202 if (!is_valid_ether_addr(netdev->dev_addr)) { in ftmac100_probe()
1203 eth_hw_addr_random(netdev); in ftmac100_probe()
1204 netdev_info(netdev, "generated random MAC address %pM\n", in ftmac100_probe()
1205 netdev->dev_addr); in ftmac100_probe()
1217 free_netdev(netdev); in ftmac100_probe()
1224 struct net_device *netdev; in ftmac100_remove() local
1227 netdev = platform_get_drvdata(pdev); in ftmac100_remove()
1228 priv = netdev_priv(netdev); in ftmac100_remove()
1230 unregister_netdev(netdev); in ftmac100_remove()
1236 free_netdev(netdev); in ftmac100_remove()