1
2
3
4
5
6#ifndef __LINUX_USB_USB_WWAN
7#define __LINUX_USB_USB_WWAN
8
9extern void usb_wwan_dtr_rts(struct usb_serial_port *port, int on);
10extern int usb_wwan_open(struct tty_struct *tty, struct usb_serial_port *port);
11extern void usb_wwan_close(struct usb_serial_port *port);
12extern int usb_wwan_port_probe(struct usb_serial_port *port);
13extern int usb_wwan_port_remove(struct usb_serial_port *port);
14extern int usb_wwan_write_room(struct tty_struct *tty);
15extern int usb_wwan_tiocmget(struct tty_struct *tty);
16extern int usb_wwan_tiocmset(struct tty_struct *tty,
17 unsigned int set, unsigned int clear);
18extern int usb_wwan_get_serial_info(struct tty_struct *tty,
19 struct serial_struct *ss);
20extern int usb_wwan_set_serial_info(struct tty_struct *tty,
21 struct serial_struct *ss);
22extern int usb_wwan_write(struct tty_struct *tty, struct usb_serial_port *port,
23 const unsigned char *buf, int count);
24extern int usb_wwan_chars_in_buffer(struct tty_struct *tty);
25#ifdef CONFIG_PM
26extern int usb_wwan_suspend(struct usb_serial *serial, pm_message_t message);
27extern int usb_wwan_resume(struct usb_serial *serial);
28#endif
29
30
31
32#define N_IN_URB 4
33#define N_OUT_URB 4
34#define IN_BUFLEN 4096
35#define OUT_BUFLEN 4096
36
37struct usb_wwan_intf_private {
38 spinlock_t susp_lock;
39 unsigned int suspended:1;
40 unsigned int use_send_setup:1;
41 int in_flight;
42 unsigned int open_ports;
43 void *private;
44};
45
46struct usb_wwan_port_private {
47
48 struct urb *in_urbs[N_IN_URB];
49 u8 *in_buffer[N_IN_URB];
50
51 struct urb *out_urbs[N_OUT_URB];
52 u8 *out_buffer[N_OUT_URB];
53 unsigned long out_busy;
54 struct usb_anchor delayed;
55
56
57 int rts_state;
58 int dtr_state;
59 int cts_state;
60 int dsr_state;
61 int dcd_state;
62 int ri_state;
63
64 unsigned long tx_start_time[N_OUT_URB];
65};
66
67#endif
68