2 * Definitions for USB serial mobile broadband cards
5 #ifndef __LINUX_USB_USB_WWAN
6 #define __LINUX_USB_USB_WWAN
8 extern void usb_wwan_dtr_rts(struct usb_serial_port
*port
, int on
);
9 extern int usb_wwan_open(struct tty_struct
*tty
, struct usb_serial_port
*port
);
10 extern void usb_wwan_close(struct usb_serial_port
*port
);
11 extern int usb_wwan_startup(struct usb_serial
*serial
);
12 extern void usb_wwan_disconnect(struct usb_serial
*serial
);
13 extern void usb_wwan_release(struct usb_serial
*serial
);
14 extern int usb_wwan_write_room(struct tty_struct
*tty
);
15 extern void usb_wwan_set_termios(struct tty_struct
*tty
,
16 struct usb_serial_port
*port
,
17 struct ktermios
*old
);
18 extern int usb_wwan_tiocmget(struct tty_struct
*tty
);
19 extern int usb_wwan_tiocmset(struct tty_struct
*tty
,
20 unsigned int set
, unsigned int clear
);
21 extern int usb_wwan_ioctl(struct tty_struct
*tty
,
22 unsigned int cmd
, unsigned long arg
);
23 extern int usb_wwan_send_setup(struct usb_serial_port
*port
);
24 extern int usb_wwan_write(struct tty_struct
*tty
, struct usb_serial_port
*port
,
25 const unsigned char *buf
, int count
);
26 extern int usb_wwan_chars_in_buffer(struct tty_struct
*tty
);
28 extern int usb_wwan_suspend(struct usb_serial
*serial
, pm_message_t message
);
29 extern int usb_wwan_resume(struct usb_serial
*serial
);
32 /* per port private data */
36 #define IN_BUFLEN 4096
37 #define OUT_BUFLEN 4096
39 struct usb_wwan_intf_private
{
41 unsigned int suspended
:1;
43 int (*send_setup
) (struct usb_serial_port
*port
);
47 struct usb_wwan_port_private
{
48 /* Input endpoints and buffer for this port */
49 struct urb
*in_urbs
[N_IN_URB
];
50 u8
*in_buffer
[N_IN_URB
];
51 /* Output endpoints and buffer for this port */
52 struct urb
*out_urbs
[N_OUT_URB
];
53 u8
*out_buffer
[N_OUT_URB
];
54 unsigned long out_busy
; /* Bit vector of URBs in use */
56 struct usb_anchor delayed
;
58 /* Settings for the port */
59 int rts_state
; /* Handshaking pins (outputs) */
61 int cts_state
; /* Handshaking pins (inputs) */
66 unsigned long tx_start_time
[N_OUT_URB
];
69 #endif /* __LINUX_USB_USB_WWAN */