Lines Matching refs:net
65 struct net_device *net; in read_bulk_callback() local
84 net = ether_dev->net; in read_bulk_callback()
85 if ( !netif_device_present(net) ) { in read_bulk_callback()
108 dbg( "%s: RX status %d", net->name, urb->status ); in read_bulk_callback()
125 skb->dev = net; in read_bulk_callback()
133 skb->protocol = eth_type_trans(skb, net); in read_bulk_callback()
171 if ( !netif_device_present(ether_dev->net) ) { in write_bulk_callback()
179 dbg("%s: TX status %d", ether_dev->net->name, urb->status); in write_bulk_callback()
184 ether_dev->net->trans_start = jiffies; in write_bulk_callback()
185 netif_wake_queue( ether_dev->net ); in write_bulk_callback()
193 struct net_device *net;
212 struct net_device *net; in intr_callback() local
218 net = ether_dev->net; in intr_callback()
224 dbg("%s intr status %d", net->name, urb->status); in intr_callback()
230 dbg ("%s unknown event type %x", net->name, in intr_callback()
234 dbg ("%s network %s", net->name, in intr_callback()
237 netif_carrier_on (net); in intr_callback()
239 netif_carrier_off (net); in intr_callback()
242 dbg ("%s speed change", net->name); in intr_callback()
247 err ("%s illegal notification %02x", net->name, in intr_callback()
295 static void CDCEther_tx_timeout( struct net_device *net ) in CDCEther_tx_timeout() argument
297 ether_dev_t *ether_dev = net->priv; in CDCEther_tx_timeout()
306 warn("%s: Tx timed out.", net->name); in CDCEther_tx_timeout()
316 static int CDCEther_start_xmit( struct sk_buff *skb, struct net_device *net ) in CDCEther_start_xmit() argument
318 ether_dev_t *ether_dev = net->priv; in CDCEther_start_xmit()
323 netif_stop_queue( net ); in CDCEther_start_xmit()
348 netif_start_queue( net ); in CDCEther_start_xmit()
355 net->trans_start = jiffies; in CDCEther_start_xmit()
368 static struct net_device_stats *CDCEther_netdev_stats( struct net_device *net ) in CDCEther_netdev_stats() argument
371 return &((ether_dev_t *)net->priv)->stats; in CDCEther_netdev_stats()
374 static int CDCEther_open(struct net_device *net) in CDCEther_open() argument
376 ether_dev_t *ether_dev = (ether_dev_t *)net->priv; in CDCEther_open()
416 netif_start_queue( net ); in CDCEther_open()
425 static int CDCEther_close( struct net_device *net ) in CDCEther_close() argument
427 ether_dev_t *ether_dev = net->priv; in CDCEther_close()
433 netif_stop_queue( net ); in CDCEther_close()
487 static int CDCEther_ioctl( struct net_device *net, struct ifreq *rq, int cmd ) in CDCEther_ioctl() argument
491 return netdev_ethtool_ioctl(net, (void *) rq->ifr_data); in CDCEther_ioctl()
526 static void CDCEther_set_multicast( struct net_device *net ) in CDCEther_set_multicast() argument
528 ether_dev_t *ether_dev = net->priv; in CDCEther_set_multicast()
534 netif_stop_queue(net); in CDCEther_set_multicast()
537 if (net->flags & IFF_PROMISC) { in CDCEther_set_multicast()
539 dbg( "%s: Promiscuous mode enabled", net->name); in CDCEther_set_multicast()
545 } else if (net->mc_count > ether_dev->wNumberMCFilters) { in CDCEther_set_multicast()
547 dbg("%s: too many MC filters for hardware, using allmulti", net->name); in CDCEther_set_multicast()
552 } else if (net->flags & IFF_ALLMULTI) { in CDCEther_set_multicast()
554 dbg("%s: using allmulti", net->name); in CDCEther_set_multicast()
562 dbg("%s: set multicast filters", net->name); in CDCEther_set_multicast()
567 buff = kmalloc(6 * net->mc_count, GFP_ATOMIC); in CDCEther_set_multicast()
568 for (i = 0, mclist = net->mc_list; in CDCEther_set_multicast()
569 mclist && i < net->mc_count; in CDCEther_set_multicast()
578 cpu_to_le16(net->mc_count), /* value */ in CDCEther_set_multicast()
581 (6* net->mc_count), /* size */ in CDCEther_set_multicast()
590 netif_wake_queue(net); in CDCEther_set_multicast()
1175 memcpy( ether_dev->net->dev_addr, mac_addr, sizeof(mac_addr) ); in set_ethernet_addr()
1225 mac_addr = ether_dev->net->dev_addr; in log_device_info()
1228 info( "%s: %s %s %s", ether_dev->net->name, manu, prod, sern); in log_device_info()
1230 ether_dev->net->name, in log_device_info()
1251 struct net_device *net; in CDCEther_probe() local
1325 net = init_etherdev( NULL, 0 ); in CDCEther_probe()
1326 if ( !net ) { in CDCEther_probe()
1336 net->priv = ether_dev; in CDCEther_probe()
1337 SET_MODULE_OWNER(net); in CDCEther_probe()
1338 net->open = CDCEther_open; in CDCEther_probe()
1339 net->stop = CDCEther_close; in CDCEther_probe()
1340 net->watchdog_timeo = CDC_ETHER_TX_TIMEOUT; in CDCEther_probe()
1341 net->tx_timeout = CDCEther_tx_timeout; // TX timeout function in CDCEther_probe()
1342 net->do_ioctl = CDCEther_ioctl; in CDCEther_probe()
1343 net->hard_start_xmit = CDCEther_start_xmit; in CDCEther_probe()
1344 net->set_multicast_list = CDCEther_set_multicast; in CDCEther_probe()
1345 net->get_stats = CDCEther_netdev_stats; in CDCEther_probe()
1346 net->mtu = ether_dev->wMaxSegmentSize - 14; in CDCEther_probe()
1350 ether_dev->net = net; in CDCEther_probe()
1397 unregister_netdev( ether_dev->net ); in CDCEther_disconnect()
1400 ether_dev->net = NULL; in CDCEther_disconnect()