#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/netdevice.h>
#include <linux/module.h>
#include <linux/ethtool.h>
#include <linux/usb.h>
#include <linux/timer.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
#include <linux/kmod.h>
#include <linux/rfkill.h>
#include <linux/ip.h>
#include <linux/uaccess.h>
#include <linux/usb/cdc.h>
#include <net/arp.h>
#include <asm/byteorder.h>
#include <linux/serial_core.h>
#include <linux/serial.h>
Go to the source code of this file.
|
#define | MOD_AUTHOR "Option Wireless" |
|
#define | MOD_DESCRIPTION "USB High Speed Option driver" |
|
#define | MOD_LICENSE "GPL" |
|
#define | HSO_MAX_NET_DEVICES 10 |
|
#define | HSO__MAX_MTU 2048 |
|
#define | DEFAULT_MTU 1500 |
|
#define | DEFAULT_MRU 1500 |
|
#define | CTRL_URB_RX_SIZE 1024 |
|
#define | CTRL_URB_TX_SIZE 64 |
|
#define | BULK_URB_RX_SIZE 4096 |
|
#define | BULK_URB_TX_SIZE 8192 |
|
#define | MUX_BULK_RX_BUF_SIZE HSO__MAX_MTU |
|
#define | MUX_BULK_TX_BUF_SIZE HSO__MAX_MTU |
|
#define | MUX_BULK_RX_BUF_COUNT 4 |
|
#define | USB_TYPE_OPTION_VENDOR 0x20 |
|
#define | HSO_NET_RUNNING 0 |
|
#define | HSO_NET_TX_TIMEOUT (HZ*10) |
|
#define | HSO_SERIAL_MAGIC 0x48534f31 |
|
#define | HSO_SERIAL_TTY_MINORS 256 |
|
#define | MAX_RX_URBS 2 |
|
#define | D__(lvl_, fmt, arg...) |
|
#define | D_(lvl, args...) |
|
#define | D1(args...) D_(0x01, ##args) |
|
#define | D2(args...) D_(0x02, ##args) |
|
#define | D3(args...) D_(0x04, ##args) |
|
#define | D4(args...) D_(0x08, ##args) |
|
#define | D5(args...) D_(0x10, ##args) |
|
#define | BM_REQUEST_TYPE (0xa1) |
|
#define | B_NOTIFICATION (0x20) |
|
#define | W_VALUE (0x0) |
|
#define | W_INDEX (0x2) |
|
#define | W_LENGTH (0x2) |
|
#define | B_OVERRUN (0x1<<6) |
|
#define | B_PARITY (0x1<<5) |
|
#define | B_FRAMING (0x1<<4) |
|
#define | B_RING_SIGNAL (0x1<<3) |
|
#define | B_BREAK (0x1<<2) |
|
#define | B_TX_CARRIER (0x1<<1) |
|
#define | B_RX_CARRIER (0x1<<0) |
|
#define | HSO_INTF_MASK 0xFF00 |
|
#define | HSO_INTF_MUX 0x0100 |
|
#define | HSO_INTF_BULK 0x0200 |
|
#define | HSO_PORT_MASK 0xFF |
|
#define | HSO_PORT_NO_PORT 0x0 |
|
#define | HSO_PORT_CONTROL 0x1 |
|
#define | HSO_PORT_APP 0x2 |
|
#define | HSO_PORT_GPS 0x3 |
|
#define | HSO_PORT_PCSC 0x4 |
|
#define | HSO_PORT_APP2 0x5 |
|
#define | HSO_PORT_GPS_CONTROL 0x6 |
|
#define | HSO_PORT_MSD 0x7 |
|
#define | HSO_PORT_VOICE 0x8 |
|
#define | HSO_PORT_DIAG2 0x9 |
|
#define | HSO_PORT_DIAG 0x10 |
|
#define | HSO_PORT_MODEM 0x11 |
|
#define | HSO_PORT_NETWORK 0x12 |
|
#define | HSO_INFO_MASK 0xFF000000 |
|
#define | HSO_INFO_CRC_BUG 0x01000000 |
|
#define | DUMP(buf_, len_) |
|
#define | DUMP1(buf_, len_) |
|
#define | default_port_device(vendor, product) |
|
#define | icon321_port_device(vendor, product) |
|
|
| MODULE_DEVICE_TABLE (usb, hso_ids) |
|
| module_init (hso_init) |
|
| module_exit (hso_exit) |
|
| MODULE_AUTHOR (MOD_AUTHOR) |
|
| MODULE_DESCRIPTION (MOD_DESCRIPTION) |
|
| MODULE_LICENSE (MOD_LICENSE) |
|
| MODULE_PARM_DESC (debug,"Level of debug [0x01 | 0x02 | 0x04 | 0x08 | 0x10]") |
|
| module_param (debug, int, S_IRUGO|S_IWUSR) |
|
| MODULE_PARM_DESC (tty_major,"Set the major tty number") |
|
| module_param (tty_major, int, S_IRUGO|S_IWUSR) |
|
| MODULE_PARM_DESC (disable_net,"Disable the network interface") |
|
| module_param (disable_net, int, S_IRUGO|S_IWUSR) |
|
#define B_FRAMING (0x1<<4) |
#define B_NOTIFICATION (0x20) |
#define B_OVERRUN (0x1<<6) |
#define B_PARITY (0x1<<5) |
#define B_RING_SIGNAL (0x1<<3) |
#define B_RX_CARRIER (0x1<<0) |
#define B_TX_CARRIER (0x1<<1) |
#define BM_REQUEST_TYPE (0xa1) |
#define BULK_URB_RX_SIZE 4096 |
Definition at line 88 of file hso.c.
#define BULK_URB_TX_SIZE 8192 |
Definition at line 89 of file hso.c.
#define CTRL_URB_RX_SIZE 1024 |
Definition at line 85 of file hso.c.
#define CTRL_URB_TX_SIZE 64 |
Definition at line 86 of file hso.c.
#define D1 |
( |
|
args... | ) |
D_(0x01, ##args) |
#define D2 |
( |
|
args... | ) |
D_(0x02, ##args) |
#define D3 |
( |
|
args... | ) |
D_(0x04, ##args) |
#define D4 |
( |
|
args... | ) |
D_(0x08, ##args) |
#define D5 |
( |
|
args... | ) |
D_(0x10, ##args) |
#define D_ |
( |
|
lvl, |
|
|
|
args... |
|
) |
| |
Value:
Definition at line 118 of file hso.c.
#define D__ |
( |
|
lvl_, |
|
|
|
fmt, |
|
|
|
arg... |
|
) |
| |
Value:do { \
printk(lvl_
"[%d:%s]: " fmt "\n", \
__LINE__, __func__, ##
arg); \
} while (0)
Definition at line 112 of file hso.c.
Definition at line 83 of file hso.c.
Definition at line 82 of file hso.c.
Value:
Definition at line 419 of file hso.c.
#define DUMP |
( |
|
buf_, |
|
|
|
len_ |
|
) |
| |
#define DUMP1 |
( |
|
buf_, |
|
|
|
len_ |
|
) |
| |
#define HSO__MAX_MTU 2048 |
Definition at line 81 of file hso.c.
#define HSO_INFO_CRC_BUG 0x01000000 |
#define HSO_INFO_MASK 0xFF000000 |
#define HSO_INTF_BULK 0x0200 |
#define HSO_INTF_MASK 0xFF00 |
#define HSO_INTF_MUX 0x0100 |
#define HSO_MAX_NET_DEVICES 10 |
Definition at line 80 of file hso.c.
#define HSO_NET_RUNNING 0 |
Definition at line 98 of file hso.c.
#define HSO_NET_TX_TIMEOUT (HZ*10) |
#define HSO_PORT_APP2 0x5 |
#define HSO_PORT_CONTROL 0x1 |
#define HSO_PORT_DIAG 0x10 |
#define HSO_PORT_DIAG2 0x9 |
#define HSO_PORT_GPS_CONTROL 0x6 |
#define HSO_PORT_MASK 0xFF |
#define HSO_PORT_MODEM 0x11 |
#define HSO_PORT_NETWORK 0x12 |
#define HSO_PORT_NO_PORT 0x0 |
#define HSO_PORT_PCSC 0x4 |
#define HSO_PORT_VOICE 0x8 |
#define HSO_SERIAL_MAGIC 0x48534f31 |
#define HSO_SERIAL_TTY_MINORS 256 |
Value:
Definition at line 423 of file hso.c.
#define MOD_AUTHOR "Option Wireless" |
Definition at line 76 of file hso.c.
#define MOD_DESCRIPTION "USB High Speed Option driver" |
Definition at line 77 of file hso.c.
#define MOD_LICENSE "GPL" |
Definition at line 78 of file hso.c.
#define MUX_BULK_RX_BUF_COUNT 4 |
Definition at line 93 of file hso.c.
Definition at line 91 of file hso.c.
Definition at line 92 of file hso.c.
#define USB_TYPE_OPTION_VENDOR 0x20 |
Definition at line 94 of file hso.c.
- Enumerator:
WAIT_IP |
|
WAIT_DATA |
|
WAIT_SYNC |
|
Definition at line 133 of file hso.c.
- Enumerator:
RX_IDLE |
|
RX_SENT |
|
RX_PENDING |
|
Definition at line 179 of file hso.c.
MODULE_DEVICE_TABLE |
( |
usb |
, |
|
|
hso_ids |
|
|
) |
| |
module_param |
( |
tty_major |
, |
|
|
int |
, |
|
|
S_IRUGO| |
S_IWUSR |
|
) |
| |
module_param |
( |
disable_net |
, |
|
|
int |
, |
|
|
S_IRUGO| |
S_IWUSR |
|
) |
| |
MODULE_PARM_DESC |
( |
debug |
, |
|
|
"Level of debug " |
[0x01|0x02|0x04|0x08|0x10] |
|
) |
| |
MODULE_PARM_DESC |
( |
disable_net |
, |
|
|
"Disable the network interface" |
|
|
) |
| |