Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / drivers / staging / gdm72xx / gdm_usb.h
CommitLineData
247e9cff
SA
1/*
2 * Copyright (c) 2012 GCT Semiconductor, Inc. All rights reserved.
3 *
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.
7 *
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.
12 */
13
14#ifndef __GDM_USB_H__
15#define __GDM_USB_H__
16
17#include <linux/types.h>
18#include <linux/usb.h>
19#include <linux/list.h>
20
0d660025
ML
21#define B_DIFF_DL_DRV (1 << 4)
22#define B_DOWNLOAD (1 << 5)
247e9cff
SA
23#define MAX_NR_SDU_BUF 64
24
25struct usb_tx {
26 struct list_head list;
27#if defined(CONFIG_WIMAX_GDM72XX_USB_PM) || defined(CONFIG_WIMAX_GDM72XX_K_MODE)
28 struct list_head p_list;
29#endif
30 struct tx_cxt *tx_cxt;
31
0d660025 32 struct urb *urb;
247e9cff
SA
33 u8 *buf;
34
35 void (*callback)(void *cb_data);
36 void *cb_data;
37};
38
39struct tx_cxt {
40 struct list_head free_list;
41 struct list_head sdu_list;
42 struct list_head hci_list;
43#if defined(CONFIG_WIMAX_GDM72XX_USB_PM) || defined(CONFIG_WIMAX_GDM72XX_K_MODE)
44 struct list_head pending_list;
45#endif
46
0d660025 47 spinlock_t lock;
247e9cff
SA
48};
49
50struct usb_rx {
51 struct list_head list;
52 struct rx_cxt *rx_cxt;
53
0d660025 54 struct urb *urb;
247e9cff
SA
55 u8 *buf;
56
57 void (*callback)(void *cb_data, void *data, int len);
58 void *cb_data;
59};
60
61struct rx_cxt {
62 struct list_head free_list;
63 struct list_head used_list;
0d660025 64 spinlock_t lock;
247e9cff
SA
65};
66
67struct usbwm_dev {
68 struct usb_device *usbdev;
69#ifdef CONFIG_WIMAX_GDM72XX_USB_PM
70 struct work_struct pm_ws;
71
72 struct usb_interface *intf;
73#endif
74#ifdef CONFIG_WIMAX_GDM72XX_K_MODE
75 int bw_switch;
76 struct list_head list;
77#endif
78
0d660025
ML
79 struct tx_cxt tx;
80 struct rx_cxt rx;
247e9cff
SA
81
82 int padding;
83};
84
85#endif /* __GDM_USB_H__ */
This page took 0.077031 seconds and 5 git commands to generate.