Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
setup_protocol.h
Go to the documentation of this file.
1 /*
2  * IPWireless 3G PCMCIA Network Driver
3  *
4  * Original code
5  * by Stephen Blackheath <[email protected]>,
6  * Ben Martel <[email protected]>
7  *
8  * Copyrighted as follows:
9  * Copyright (C) 2004 by Symmetric Systems Ltd (NZ)
10  *
11  * Various driver changes and rewrites, port to new kernels
12  * Copyright (C) 2006-2007 Jiri Kosina
13  *
14  * Misc code cleanups and updates
15  * Copyright (C) 2007 David Sterba
16  */
17 
18 #ifndef _IPWIRELESS_CS_SETUP_PROTOCOL_H_
19 #define _IPWIRELESS_CS_SETUP_PROTOCOL_H_
20 
21 /* Version of the setup protocol and transport protocols */
22 #define TL_SETUP_VERSION 1
23 
24 #define TL_SETUP_VERSION_QRY_TMO 1000
25 #define TL_SETUP_MAX_VERSION_QRY 30
26 
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
34 
35 #define TL_SETUP_SIGNO_INFO_MSG 20
36 #define TL_SETUP_SIGNO_INFO_MSG_ACK 21
37 
38 #define TL_SETUP_SIGNO_REBOOT_MSG 22
39 #define TL_SETUP_SIGNO_REBOOT_MSG_ACK 23
40 
41 /* Synchronous start-messages */
43  unsigned char sig_no; /* TL_SETUP_SIGNO_GET_VERSION_QRY */
44 } __attribute__ ((__packed__));
45 
47  unsigned char sig_no; /* TL_SETUP_SIGNO_GET_VERSION_RSP */
48  unsigned char version; /* TL_SETUP_VERSION */
49 } __attribute__ ((__packed__));
50 
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__));
57 
59  unsigned char sig_no; /* TL_SETUP_SIGNO_CONFIG_DONE_MSG */
60 } __attribute__ ((__packed__));
61 
62 /* Asyncronous messages */
64  unsigned char sig_no; /* TL_SETUP_SIGNO_OPEN_MSG */
65  unsigned char port_no;
66 } __attribute__ ((__packed__));
67 
69  unsigned char sig_no; /* TL_SETUP_SIGNO_CLOSE_MSG */
70  unsigned char port_no;
71 } __attribute__ ((__packed__));
72 
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
78 
79 /*
80  * It should not matter when this message comes over as we just store the
81  * results and send the ACK.
82  */
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__));
89 
91  unsigned char sig_no; /* TL_SETUP_SIGNO_INFO_MSG_ACK */
92 } __attribute__ ((__packed__));
93 
95  unsigned char sig_no; /* TL_SETUP_SIGNO_REBOOT_MSG_ACK */
96 } __attribute__ ((__packed__));
97 
98 /* Define a union of all the msgs that the driver can receive from the card.*/
100  unsigned char sig_no;
106 } __attribute__ ((__packed__));
107 
108 #endif /* _IPWIRELESS_CS_SETUP_PROTOCOL_H_ */