Lines Matching defs:net

59 #include <net/arp.h>
108 * Created when net interface is initialized.
188 struct net_device *net; /* network interface, if created */
1383 if (dlci->adaption < 3 && !dlci->net)
1426 if (dlci->net)
3836 static int gsm_mux_net_open(struct net_device *net)
3839 netif_start_queue(net);
3843 static int gsm_mux_net_close(struct net_device *net)
3845 netif_stop_queue(net);
3851 if (!dlci->net) {
3857 free_netdev(dlci->net);
3858 dlci->net = NULL;
3868 if (dlci->net) {
3869 unregister_netdev(dlci->net);
3885 struct net_device *net)
3887 struct gsm_mux_net *mux_net = netdev_priv(net);
3892 net->stats.tx_packets++;
3893 net->stats.tx_bytes += skb->len;
3896 netif_trans_update(net);
3902 static void gsm_mux_net_tx_timeout(struct net_device *net, unsigned int txqueue)
3905 dev_dbg(&net->dev, "Tx timed out.\n");
3908 net->stats.tx_errors++;
3914 struct net_device *net = dlci->net;
3916 struct gsm_mux_net *mux_net = netdev_priv(net);
3923 net->stats.rx_dropped++;
3930 skb->dev = net;
3937 net->stats.rx_packets++;
3938 net->stats.rx_bytes += size;
3943 static void gsm_mux_net_init(struct net_device *net)
3952 net->netdev_ops = &gsm_netdev_ops;
3955 net->watchdog_timeo = GSM_NET_TX_TIMEOUT;
3956 net->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST;
3957 net->type = ARPHRD_NONE;
3958 net->tx_queue_len = 10;
3968 if (!dlci->net)
3970 mux_net = netdev_priv(dlci->net);
3980 struct net_device *net;
4001 net = alloc_netdev(sizeof(struct gsm_mux_net), netname,
4003 if (!net) {
4007 net->mtu = dlci->mtu;
4008 net->min_mtu = MIN_MTU;
4009 net->max_mtu = dlci->mtu;
4010 mux_net = netdev_priv(net);
4013 strncpy(nc->if_name, net->name, IFNAMSIZ); /* return net name */
4020 dlci->net = net;
4023 retval = register_netdev(net);
4029 return net->ifindex; /* return network index */
4402 /* return net interface index or error code */