0001
0002
0003
0004
0005
0006 #ifndef __LINUX_USB_USB_WWAN
0007 #define __LINUX_USB_USB_WWAN
0008
0009 extern void usb_wwan_dtr_rts(struct usb_serial_port *port, int on);
0010 extern int usb_wwan_open(struct tty_struct *tty, struct usb_serial_port *port);
0011 extern void usb_wwan_close(struct usb_serial_port *port);
0012 extern int usb_wwan_port_probe(struct usb_serial_port *port);
0013 extern void usb_wwan_port_remove(struct usb_serial_port *port);
0014 extern unsigned int usb_wwan_write_room(struct tty_struct *tty);
0015 extern int usb_wwan_tiocmget(struct tty_struct *tty);
0016 extern int usb_wwan_tiocmset(struct tty_struct *tty,
0017 unsigned int set, unsigned int clear);
0018 extern int usb_wwan_write(struct tty_struct *tty, struct usb_serial_port *port,
0019 const unsigned char *buf, int count);
0020 extern unsigned int usb_wwan_chars_in_buffer(struct tty_struct *tty);
0021 #ifdef CONFIG_PM
0022 extern int usb_wwan_suspend(struct usb_serial *serial, pm_message_t message);
0023 extern int usb_wwan_resume(struct usb_serial *serial);
0024 #endif
0025
0026
0027
0028 #define N_IN_URB 4
0029 #define N_OUT_URB 4
0030 #define IN_BUFLEN 4096
0031 #define OUT_BUFLEN 4096
0032
0033 struct usb_wwan_intf_private {
0034 spinlock_t susp_lock;
0035 unsigned int suspended:1;
0036 unsigned int use_send_setup:1;
0037 unsigned int use_zlp:1;
0038 int in_flight;
0039 unsigned int open_ports;
0040 void *private;
0041 };
0042
0043 struct usb_wwan_port_private {
0044
0045 struct urb *in_urbs[N_IN_URB];
0046 u8 *in_buffer[N_IN_URB];
0047
0048 struct urb *out_urbs[N_OUT_URB];
0049 u8 *out_buffer[N_OUT_URB];
0050 unsigned long out_busy;
0051 struct usb_anchor delayed;
0052
0053
0054 int rts_state;
0055 int dtr_state;
0056 int cts_state;
0057 int dsr_state;
0058 int dcd_state;
0059 int ri_state;
0060
0061 unsigned long tx_start_time[N_OUT_URB];
0062 };
0063
0064 #endif