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