1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (c) 2012 GCT Semiconductor, Inc. All rights reserved. */
7 #include <linux/types.h>
9 #include <linux/list.h>
10 #include <linux/time.h>
12 #include "gdm_endian.h"
13 #include "hci_packet.h"
17 #define AUTO_SUSPEND_TIMER 5000 /* ms */
19 #define RX_BUF_SIZE (1024 * 32)
20 #define TX_BUF_SIZE (1024 * 32)
21 #define SDU_BUF_SIZE 2048
22 #define MAX_SDU_SIZE (1024 * 30)
23 #define MAX_PACKET_IN_MULTI_SDU 256
25 #define VID_GCT 0x1076
26 #define PID_GDM7240 0x8000
27 #define PID_GDM7243 0x9000
29 #define NETWORK_INTERFACE 1
30 #define USB_SC_SCSI 0x06
31 #define USB_PR_BULK 0x50
33 #define MAX_NUM_SDU_BUF 64
36 struct list_head list;
40 void (*callback)(void *cb_data);
47 struct list_head list;
50 void (*callback)(void *cb_data);
55 struct list_head to_host_list;
56 struct list_head free_list;
57 struct list_head rx_submit_list;
61 int (*callback)(void *cb_data, void *data, int len, int context);
67 struct list_head sdu_list;
68 struct list_head hci_list;
69 struct list_head free_list;
75 struct list_head to_host_list;
76 struct list_head rx_submit_list;
77 struct list_head free_list;
79 spinlock_t to_host_lock;
81 spinlock_t submit_lock;
85 struct usb_device *usbdev;
88 struct delayed_work work_tx;
89 struct delayed_work work_rx;
93 struct usb_interface *intf;
94 int (*rx_cb)(void *cb_data, void *data, int len, int context);
99 #endif /* _GDM_USB_H_ */