2 * Copyright (c) 2012 GCT Semiconductor, Inc. All rights reserved.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
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.
17 #include <linux/types.h>
18 #include <linux/usb.h>
19 #include <linux/list.h>
20 #include <linux/time.h>
22 #include "gdm_endian.h"
23 #include "hci_packet.h"
27 #define AUTO_SUSPEND_TIMER 5000 /* ms */
29 #define RX_BUF_SIZE (1024*32)
30 #define TX_BUF_SIZE (1024*32)
31 #define SDU_BUF_SIZE 2048
32 #define MAX_SDU_SIZE (1024*30)
33 #define MAX_PACKET_IN_MULTI_SDU 256
35 #define VID_GCT 0x1076
36 #define PID_GDM7240 0x8000
37 #define PID_GDM7243 0x9000
39 #define NETWORK_INTERFACE 1
40 #define USB_SC_SCSI 0x06
41 #define USB_PR_BULK 0x50
43 #define MAX_NUM_SDU_BUF 64
46 struct list_head list;
50 void (*callback)(void *cb_data);
57 struct list_head list;
60 void (*callback)(void *cb_data);
65 struct list_head to_host_list;
66 struct list_head free_list;
67 struct list_head rx_submit_list;
71 int (*callback)(void *cb_data, void *data, int len, int context);
77 struct list_head sdu_list;
78 struct list_head hci_list;
79 struct list_head free_list;
85 struct list_head to_host_list;
86 struct list_head rx_submit_list;
87 struct list_head free_list;
89 spinlock_t to_host_lock;
91 spinlock_t submit_lock;
95 struct usb_device *usbdev;
96 struct gdm_endian gdm_ed;
99 struct delayed_work work_tx;
100 struct delayed_work work_rx;
103 struct usb_interface *intf;
104 int (*rx_cb)(void *cb_data, void *data, int len, int context);
109 #endif /* _GDM_USB_H_ */