ipw.c (32078f915d1acab356080b144aa89fe3487f3979) | ipw.c (68e24113457e437b1576670f2419b77ed0531e9e) |
---|---|
1/* 2 * IPWireless 3G UMTS TDD Modem driver (USB connected) 3 * 4 * Copyright (C) 2004 Roelf Diedericks <roelfd@inet.co.za> 5 * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 118 unchanged lines hidden (view full) --- 127 * When data is being sent we see 0x30 in the lower byte; this must 128 * contain DSR and CTS ... 129 */ 130#define IPW_DSR ((1<<4) | (1<<5)) 131#define IPW_CTS ((1<<5) | (1<<4)) 132 133#define IPW_WANTS_TO_SEND 0x30 134 | 1/* 2 * IPWireless 3G UMTS TDD Modem driver (USB connected) 3 * 4 * Copyright (C) 2004 Roelf Diedericks <roelfd@inet.co.za> 5 * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 118 unchanged lines hidden (view full) --- 127 * When data is being sent we see 0x30 in the lower byte; this must 128 * contain DSR and CTS ... 129 */ 130#define IPW_DSR ((1<<4) | (1<<5)) 131#define IPW_CTS ((1<<5) | (1<<4)) 132 133#define IPW_WANTS_TO_SEND 0x30 134 |
135static const struct usb_device_id usb_ipw_ids[] = { | 135static const struct usb_device_id id_table[] = { |
136 { USB_DEVICE(IPW_VID, IPW_PID) }, 137 { }, 138}; | 136 { USB_DEVICE(IPW_VID, IPW_PID) }, 137 { }, 138}; |
139MODULE_DEVICE_TABLE(usb, id_table); |
|
139 | 140 |
140MODULE_DEVICE_TABLE(usb, usb_ipw_ids); 141 142static struct usb_driver usb_ipw_driver = { 143 .name = "ipwtty", 144 .id_table = usb_ipw_ids, 145}; 146 | |
147static bool debug; 148 149static int ipw_open(struct tty_struct *tty, struct usb_serial_port *port) 150{ 151 struct usb_device *dev = port->serial->dev; 152 u8 buf_flow_static[16] = IPW_BYTES_FLOWINIT; 153 u8 *buf_flow_init; 154 int result; --- 153 unchanged lines hidden (view full) --- 308} 309 310static struct usb_serial_driver ipw_device = { 311 .driver = { 312 .owner = THIS_MODULE, 313 .name = "ipw", 314 }, 315 .description = "IPWireless converter", | 141static bool debug; 142 143static int ipw_open(struct tty_struct *tty, struct usb_serial_port *port) 144{ 145 struct usb_device *dev = port->serial->dev; 146 u8 buf_flow_static[16] = IPW_BYTES_FLOWINIT; 147 u8 *buf_flow_init; 148 int result; --- 153 unchanged lines hidden (view full) --- 302} 303 304static struct usb_serial_driver ipw_device = { 305 .driver = { 306 .owner = THIS_MODULE, 307 .name = "ipw", 308 }, 309 .description = "IPWireless converter", |
316 .id_table = usb_ipw_ids, | 310 .id_table = id_table, |
317 .num_ports = 1, 318 .disconnect = usb_wwan_disconnect, 319 .open = ipw_open, 320 .close = ipw_close, 321 .probe = ipw_probe, 322 .attach = usb_wwan_startup, 323 .release = ipw_release, 324 .dtr_rts = ipw_dtr_rts, 325 .write = usb_wwan_write, 326}; 327 328static struct usb_serial_driver * const serial_drivers[] = { 329 &ipw_device, NULL 330}; 331 | 311 .num_ports = 1, 312 .disconnect = usb_wwan_disconnect, 313 .open = ipw_open, 314 .close = ipw_close, 315 .probe = ipw_probe, 316 .attach = usb_wwan_startup, 317 .release = ipw_release, 318 .dtr_rts = ipw_dtr_rts, 319 .write = usb_wwan_write, 320}; 321 322static struct usb_serial_driver * const serial_drivers[] = { 323 &ipw_device, NULL 324}; 325 |
332module_usb_serial_driver(usb_ipw_driver, serial_drivers); | 326module_usb_serial_driver(serial_drivers, id_table); |
333 334/* Module information */ 335MODULE_AUTHOR(DRIVER_AUTHOR); 336MODULE_DESCRIPTION(DRIVER_DESC); 337MODULE_LICENSE("GPL"); 338 339module_param(debug, bool, S_IRUGO | S_IWUSR); 340MODULE_PARM_DESC(debug, "Debug enabled or not"); | 327 328/* Module information */ 329MODULE_AUTHOR(DRIVER_AUTHOR); 330MODULE_DESCRIPTION(DRIVER_DESC); 331MODULE_LICENSE("GPL"); 332 333module_param(debug, bool, S_IRUGO | S_IWUSR); 334MODULE_PARM_DESC(debug, "Debug enabled or not"); |