#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/tty_flip.h>
#include <linux/module.h>
#include <linux/spinlock.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
#include <linux/uaccess.h>
#include "usb-wwan.h"
Go to the source code of this file.
|
#define | DRIVER_VERSION "v0.4" |
|
#define | DRIVER_AUTHOR "Roelf Diedericks" |
|
#define | DRIVER_DESC "IPWireless tty driver" |
|
#define | IPW_TTY_MAJOR 240 /* real device node major id, experimental range */ |
|
#define | IPW_TTY_MINORS 256 /* we support 256 devices, dunno why, it'd be insane :) */ |
|
#define | USB_IPW_MAGIC 0x6d02 /* magic number for ipw struct */ |
|
#define | EVENT_BUFFER_SIZE 0xFF |
|
#define | CHAR2INT16(c1, c0) (((u32)((c1) & 0xff) << 8) + (u32)((c0) & 0xff)) |
|
#define | IPW_VID 0x0bc3 |
|
#define | IPW_PID 0x0001 |
|
#define | ipw_dtb_7 0x700 |
|
#define | ipw_dtb_8 0x810 /* ok so the define is misleading, I know, but forces 8,n,1 */ |
|
#define | IPW_SIO_RXCTL 0x00 /* control bulk rx channel transmissions, value=1/0 (on/off) */ |
|
#define | IPW_SIO_SET_BAUD 0x01 /* set baud, value=requested ipw_sio_bxxxx */ |
|
#define | IPW_SIO_SET_LINE 0x03 /* set databits, parity. value=ipw_dtb_x */ |
|
#define | IPW_SIO_SET_PIN 0x03 /* set/clear dtr/rts value=ipw_pin_xxx */ |
|
#define | IPW_SIO_POLL 0x08 /* get serial port status byte, call with value=0 */ |
|
#define | IPW_SIO_INIT 0x11 /* initializes ? value=0 (appears as first thing todo on open) */ |
|
#define | IPW_SIO_PURGE 0x12 /* purge all transmissions?, call with value=numchar_to_purge */ |
|
#define | IPW_SIO_HANDFLOW 0x13 /* set xon/xoff limits value=0, and a buffer of 0x10 bytes */ |
|
#define | IPW_SIO_SETCHARS 0x13 /* set the flowcontrol special chars, value=0, buf=6 bytes, */ |
|
#define | IPW_PIN_SETDTR 0x101 |
|
#define | IPW_PIN_SETRTS 0x202 |
|
#define | IPW_PIN_CLRDTR 0x100 |
|
#define | IPW_PIN_CLRRTS 0x200 /* unconfirmed */ |
|
#define | IPW_RXBULK_ON 1 |
|
#define | IPW_RXBULK_OFF 0 |
|
#define | IPW_BYTES_FLOWINIT |
|
#define | IPW_DSR ((1<<4) | (1<<5)) |
|
#define | IPW_CTS ((1<<5) | (1<<4)) |
|
#define | IPW_WANTS_TO_SEND 0x30 |
|
|
enum | {
ipw_sio_b256000 = 0x000e,
ipw_sio_b128000 = 0x001d,
ipw_sio_b115200 = 0x0020,
ipw_sio_b57600 = 0x0040,
ipw_sio_b56000 = 0x0042,
ipw_sio_b38400 = 0x0060,
ipw_sio_b19200 = 0x00c0,
ipw_sio_b14400 = 0x0100,
ipw_sio_b9600 = 0x0180,
ipw_sio_b4800 = 0x0300,
ipw_sio_b2400 = 0x0600,
ipw_sio_b1200 = 0x0c00,
ipw_sio_b600 = 0x1800
} |
|
#define CHAR2INT16 |
( |
|
c1, |
|
|
|
c0 |
|
) |
| (((u32)((c1) & 0xff) << 8) + (u32)((c0) & 0xff)) |
Definition at line 67 of file ipw.c.
#define DRIVER_AUTHOR "Roelf Diedericks" |
Definition at line 56 of file ipw.c.
#define DRIVER_DESC "IPWireless tty driver" |
Definition at line 57 of file ipw.c.
#define DRIVER_VERSION "v0.4" |
Definition at line 55 of file ipw.c.
#define EVENT_BUFFER_SIZE 0xFF |
Definition at line 66 of file ipw.c.
#define IPW_BYTES_FLOWINIT |
Value:{ 0x01, 0, 0, 0, 0x40, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0 }
Definition at line 121 of file ipw.c.
#define IPW_CTS ((1<<5) | (1<<4)) |
#define IPW_DSR ((1<<4) | (1<<5)) |
Definition at line 94 of file ipw.c.
#define ipw_dtb_8 0x810 /* ok so the define is misleading, I know, but forces 8,n,1 */ |
Definition at line 95 of file ipw.c.
Definition at line 71 of file ipw.c.
#define IPW_PIN_CLRDTR 0x100 |
#define IPW_PIN_CLRRTS 0x200 /* unconfirmed */ |
#define IPW_PIN_SETDTR 0x101 |
#define IPW_PIN_SETRTS 0x202 |
#define IPW_SIO_HANDFLOW 0x13 /* set xon/xoff limits value=0, and a buffer of 0x10 bytes */ |
#define IPW_SIO_INIT 0x11 /* initializes ? value=0 (appears as first thing todo on open) */ |
#define IPW_SIO_POLL 0x08 /* get serial port status byte, call with value=0 */ |
#define IPW_SIO_PURGE 0x12 /* purge all transmissions?, call with value=numchar_to_purge */ |
#define IPW_SIO_RXCTL 0x00 /* control bulk rx channel transmissions, value=1/0 (on/off) */ |
Definition at line 99 of file ipw.c.
#define IPW_SIO_SET_BAUD 0x01 /* set baud, value=requested ipw_sio_bxxxx */ |
#define IPW_SIO_SET_LINE 0x03 /* set databits, parity. value=ipw_dtb_x */ |
#define IPW_SIO_SET_PIN 0x03 /* set/clear dtr/rts value=ipw_pin_xxx */ |
#define IPW_SIO_SETCHARS 0x13 /* set the flowcontrol special chars, value=0, buf=6 bytes, */ |
Definition at line 59 of file ipw.c.
#define IPW_TTY_MINORS 256 /* we support 256 devices, dunno why, it'd be insane :) */ |
Definition at line 60 of file ipw.c.
Definition at line 70 of file ipw.c.
#define IPW_WANTS_TO_SEND 0x30 |
#define USB_IPW_MAGIC 0x6d02 /* magic number for ipw struct */ |
Definition at line 62 of file ipw.c.
- Enumerator:
ipw_sio_b256000 |
|
ipw_sio_b128000 |
|
ipw_sio_b115200 |
|
ipw_sio_b57600 |
|
ipw_sio_b56000 |
|
ipw_sio_b38400 |
|
ipw_sio_b19200 |
|
ipw_sio_b14400 |
|
ipw_sio_b9600 |
|
ipw_sio_b4800 |
|
ipw_sio_b2400 |
|
ipw_sio_b1200 |
|
ipw_sio_b600 |
|
Definition at line 77 of file ipw.c.
MODULE_DEVICE_TABLE |
( |
usb |
, |
|
|
id_table |
|
|
) |
| |
module_usb_serial_driver |
( |
serial_drivers |
, |
|
|
id_table |
|
|
) |
| |