Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-btrfs-devel.git] / drivers / tty / ipwireless / setup_protocol.h
blob9d6bcc77c73ca4fc253411557fb413082e2822ef
1 /*
2 * IPWireless 3G PCMCIA Network Driver
4 * Original code
5 * by Stephen Blackheath <stephen@blacksapphire.com>,
6 * Ben Martel <benm@symmetric.co.nz>
8 * Copyrighted as follows:
9 * Copyright (C) 2004 by Symmetric Systems Ltd (NZ)
11 * Various driver changes and rewrites, port to new kernels
12 * Copyright (C) 2006-2007 Jiri Kosina
14 * Misc code cleanups and updates
15 * Copyright (C) 2007 David Sterba
18 #ifndef _IPWIRELESS_CS_SETUP_PROTOCOL_H_
19 #define _IPWIRELESS_CS_SETUP_PROTOCOL_H_
21 /* Version of the setup protocol and transport protocols */
22 #define TL_SETUP_VERSION 1
24 #define TL_SETUP_VERSION_QRY_TMO 1000
25 #define TL_SETUP_MAX_VERSION_QRY 30
27 /* Message numbers 0-9 are obsoleted and must not be reused! */
28 #define TL_SETUP_SIGNO_GET_VERSION_QRY 10
29 #define TL_SETUP_SIGNO_GET_VERSION_RSP 11
30 #define TL_SETUP_SIGNO_CONFIG_MSG 12
31 #define TL_SETUP_SIGNO_CONFIG_DONE_MSG 13
32 #define TL_SETUP_SIGNO_OPEN_MSG 14
33 #define TL_SETUP_SIGNO_CLOSE_MSG 15
35 #define TL_SETUP_SIGNO_INFO_MSG 20
36 #define TL_SETUP_SIGNO_INFO_MSG_ACK 21
38 #define TL_SETUP_SIGNO_REBOOT_MSG 22
39 #define TL_SETUP_SIGNO_REBOOT_MSG_ACK 23
41 /* Synchronous start-messages */
42 struct tl_setup_get_version_qry {
43 unsigned char sig_no; /* TL_SETUP_SIGNO_GET_VERSION_QRY */
44 } __attribute__ ((__packed__));
46 struct tl_setup_get_version_rsp {
47 unsigned char sig_no; /* TL_SETUP_SIGNO_GET_VERSION_RSP */
48 unsigned char version; /* TL_SETUP_VERSION */
49 } __attribute__ ((__packed__));
51 struct tl_setup_config_msg {
52 unsigned char sig_no; /* TL_SETUP_SIGNO_CONFIG_MSG */
53 unsigned char port_no;
54 unsigned char prio_data;
55 unsigned char prio_ctrl;
56 } __attribute__ ((__packed__));
58 struct tl_setup_config_done_msg {
59 unsigned char sig_no; /* TL_SETUP_SIGNO_CONFIG_DONE_MSG */
60 } __attribute__ ((__packed__));
62 /* Asyncronous messages */
63 struct tl_setup_open_msg {
64 unsigned char sig_no; /* TL_SETUP_SIGNO_OPEN_MSG */
65 unsigned char port_no;
66 } __attribute__ ((__packed__));
68 struct tl_setup_close_msg {
69 unsigned char sig_no; /* TL_SETUP_SIGNO_CLOSE_MSG */
70 unsigned char port_no;
71 } __attribute__ ((__packed__));
73 /* Driver type - for use in tl_setup_info_msg.driver_type */
74 #define COMM_DRIVER 0
75 #define NDISWAN_DRIVER 1
76 #define NDISWAN_DRIVER_MAJOR_VERSION 2
77 #define NDISWAN_DRIVER_MINOR_VERSION 0
80 * It should not matter when this message comes over as we just store the
81 * results and send the ACK.
83 struct tl_setup_info_msg {
84 unsigned char sig_no; /* TL_SETUP_SIGNO_INFO_MSG */
85 unsigned char driver_type;
86 unsigned char major_version;
87 unsigned char minor_version;
88 } __attribute__ ((__packed__));
90 struct tl_setup_info_msgAck {
91 unsigned char sig_no; /* TL_SETUP_SIGNO_INFO_MSG_ACK */
92 } __attribute__ ((__packed__));
94 struct TlSetupRebootMsgAck {
95 unsigned char sig_no; /* TL_SETUP_SIGNO_REBOOT_MSG_ACK */
96 } __attribute__ ((__packed__));
98 /* Define a union of all the msgs that the driver can receive from the card.*/
99 union ipw_setup_rx_msg {
100 unsigned char sig_no;
101 struct tl_setup_get_version_rsp version_rsp_msg;
102 struct tl_setup_open_msg open_msg;
103 struct tl_setup_close_msg close_msg;
104 struct tl_setup_info_msg InfoMsg;
105 struct tl_setup_info_msgAck info_msg_ack;
106 } __attribute__ ((__packed__));
108 #endif /* _IPWIRELESS_CS_SETUP_PROTOCOL_H_ */