1 /* structs.h - shared structures
2 * Copyright (c) 2010, Code Aurora Forum. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 and
6 * only version 2 as published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 #ifndef QCUSBNET_STRUCTS_H
20 #define QCUSBNET_STRUCTS_H
22 #include <linux/etherdevice.h>
23 #include <linux/ethtool.h>
24 #include <linux/mii.h>
25 #include <linux/usb.h>
26 #include <linux/version.h>
27 #include <linux/cdev.h>
28 #include <linux/kthread.h>
30 #include <linux/usb/usbnet.h>
32 #include <linux/fdtable.h>
34 #define DBG(fmt, arg...) \
37 printk(KERN_INFO "QCUSBNet2k::%s " fmt, __func__, ##arg); \
40 #define ERR(fmt, arg...)\
41 printk(KERN_ERR "QCUSBNet2k::%s " fmt, __func__, ##arg)
46 struct list_head node;
50 #define DEFAULT_READ_URB_LENGTH 0x1000
53 struct task_struct *thread;
54 struct completion work;
55 struct list_head urbs;
58 spinlock_t active_lock;
59 struct usb_interface *iface;
64 struct class *devclass;
67 struct urbsetup *readsetup;
71 struct list_head clients;
72 spinlock_t clients_lock;
77 DOWN_NO_NDIS_CONNECTION = 0,
78 DOWN_CDC_CONNECTION_SPEED = 1,
79 DOWN_DRIVER_SUSPENDED = 2,
80 DOWN_NET_IFACE_STOPPED = 3,
84 struct usbnet *usbnet;
85 struct usb_interface *iface;
86 int (*open)(struct net_device *);
87 int (*stop)(struct net_device *);
95 #endif /* !QCUSBNET_STRUCTS_H */