18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * IPWireless 3G PCMCIA Network Driver
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * Original code
68c2ecf20Sopenharmony_ci *   by Stephen Blackheath <stephen@blacksapphire.com>,
78c2ecf20Sopenharmony_ci *      Ben Martel <benm@symmetric.co.nz>
88c2ecf20Sopenharmony_ci *
98c2ecf20Sopenharmony_ci * Copyrighted as follows:
108c2ecf20Sopenharmony_ci *   Copyright (C) 2004 by Symmetric Systems Ltd (NZ)
118c2ecf20Sopenharmony_ci *
128c2ecf20Sopenharmony_ci * Various driver changes and rewrites, port to new kernels
138c2ecf20Sopenharmony_ci *   Copyright (C) 2006-2007 Jiri Kosina
148c2ecf20Sopenharmony_ci *
158c2ecf20Sopenharmony_ci * Misc code cleanups and updates
168c2ecf20Sopenharmony_ci *   Copyright (C) 2007 David Sterba
178c2ecf20Sopenharmony_ci */
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci#ifndef _IPWIRELESS_CS_SETUP_PROTOCOL_H_
208c2ecf20Sopenharmony_ci#define _IPWIRELESS_CS_SETUP_PROTOCOL_H_
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci/* Version of the setup protocol and transport protocols */
238c2ecf20Sopenharmony_ci#define TL_SETUP_VERSION		1
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci#define TL_SETUP_VERSION_QRY_TMO	1000
268c2ecf20Sopenharmony_ci#define TL_SETUP_MAX_VERSION_QRY	30
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci/* Message numbers 0-9 are obsoleted and must not be reused! */
298c2ecf20Sopenharmony_ci#define TL_SETUP_SIGNO_GET_VERSION_QRY	10
308c2ecf20Sopenharmony_ci#define TL_SETUP_SIGNO_GET_VERSION_RSP	11
318c2ecf20Sopenharmony_ci#define TL_SETUP_SIGNO_CONFIG_MSG	12
328c2ecf20Sopenharmony_ci#define TL_SETUP_SIGNO_CONFIG_DONE_MSG	13
338c2ecf20Sopenharmony_ci#define TL_SETUP_SIGNO_OPEN_MSG		14
348c2ecf20Sopenharmony_ci#define TL_SETUP_SIGNO_CLOSE_MSG	15
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci#define TL_SETUP_SIGNO_INFO_MSG     20
378c2ecf20Sopenharmony_ci#define TL_SETUP_SIGNO_INFO_MSG_ACK 21
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci#define TL_SETUP_SIGNO_REBOOT_MSG      22
408c2ecf20Sopenharmony_ci#define TL_SETUP_SIGNO_REBOOT_MSG_ACK  23
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci/* Synchronous start-messages */
438c2ecf20Sopenharmony_cistruct tl_setup_get_version_qry {
448c2ecf20Sopenharmony_ci	unsigned char sig_no;		/* TL_SETUP_SIGNO_GET_VERSION_QRY */
458c2ecf20Sopenharmony_ci} __attribute__ ((__packed__));
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_cistruct tl_setup_get_version_rsp {
488c2ecf20Sopenharmony_ci	unsigned char sig_no;		/* TL_SETUP_SIGNO_GET_VERSION_RSP */
498c2ecf20Sopenharmony_ci	unsigned char version;		/* TL_SETUP_VERSION */
508c2ecf20Sopenharmony_ci} __attribute__ ((__packed__));
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_cistruct tl_setup_config_msg {
538c2ecf20Sopenharmony_ci	unsigned char sig_no;		/* TL_SETUP_SIGNO_CONFIG_MSG */
548c2ecf20Sopenharmony_ci	unsigned char port_no;
558c2ecf20Sopenharmony_ci	unsigned char prio_data;
568c2ecf20Sopenharmony_ci	unsigned char prio_ctrl;
578c2ecf20Sopenharmony_ci} __attribute__ ((__packed__));
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_cistruct tl_setup_config_done_msg {
608c2ecf20Sopenharmony_ci	unsigned char sig_no;		/* TL_SETUP_SIGNO_CONFIG_DONE_MSG */
618c2ecf20Sopenharmony_ci} __attribute__ ((__packed__));
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_ci/* Asynchronous messages */
648c2ecf20Sopenharmony_cistruct tl_setup_open_msg {
658c2ecf20Sopenharmony_ci	unsigned char sig_no;		/* TL_SETUP_SIGNO_OPEN_MSG */
668c2ecf20Sopenharmony_ci	unsigned char port_no;
678c2ecf20Sopenharmony_ci} __attribute__ ((__packed__));
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_cistruct tl_setup_close_msg {
708c2ecf20Sopenharmony_ci	unsigned char sig_no;		/* TL_SETUP_SIGNO_CLOSE_MSG */
718c2ecf20Sopenharmony_ci	unsigned char port_no;
728c2ecf20Sopenharmony_ci} __attribute__ ((__packed__));
738c2ecf20Sopenharmony_ci
748c2ecf20Sopenharmony_ci/* Driver type  - for use in tl_setup_info_msg.driver_type */
758c2ecf20Sopenharmony_ci#define COMM_DRIVER     0
768c2ecf20Sopenharmony_ci#define NDISWAN_DRIVER  1
778c2ecf20Sopenharmony_ci#define NDISWAN_DRIVER_MAJOR_VERSION  2
788c2ecf20Sopenharmony_ci#define NDISWAN_DRIVER_MINOR_VERSION  0
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci/*
818c2ecf20Sopenharmony_ci * It should not matter when this message comes over as we just store the
828c2ecf20Sopenharmony_ci * results and send the ACK.
838c2ecf20Sopenharmony_ci */
848c2ecf20Sopenharmony_cistruct tl_setup_info_msg {
858c2ecf20Sopenharmony_ci	unsigned char sig_no;		/* TL_SETUP_SIGNO_INFO_MSG */
868c2ecf20Sopenharmony_ci	unsigned char driver_type;
878c2ecf20Sopenharmony_ci	unsigned char major_version;
888c2ecf20Sopenharmony_ci	unsigned char minor_version;
898c2ecf20Sopenharmony_ci} __attribute__ ((__packed__));
908c2ecf20Sopenharmony_ci
918c2ecf20Sopenharmony_cistruct tl_setup_info_msgAck {
928c2ecf20Sopenharmony_ci	unsigned char sig_no;		/* TL_SETUP_SIGNO_INFO_MSG_ACK */
938c2ecf20Sopenharmony_ci} __attribute__ ((__packed__));
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_cistruct TlSetupRebootMsgAck {
968c2ecf20Sopenharmony_ci	unsigned char sig_no;		/* TL_SETUP_SIGNO_REBOOT_MSG_ACK */
978c2ecf20Sopenharmony_ci} __attribute__ ((__packed__));
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_ci/* Define a union of all the msgs that the driver can receive from the card.*/
1008c2ecf20Sopenharmony_ciunion ipw_setup_rx_msg {
1018c2ecf20Sopenharmony_ci	unsigned char sig_no;
1028c2ecf20Sopenharmony_ci	struct tl_setup_get_version_rsp version_rsp_msg;
1038c2ecf20Sopenharmony_ci	struct tl_setup_open_msg open_msg;
1048c2ecf20Sopenharmony_ci	struct tl_setup_close_msg close_msg;
1058c2ecf20Sopenharmony_ci	struct tl_setup_info_msg InfoMsg;
1068c2ecf20Sopenharmony_ci	struct tl_setup_info_msgAck info_msg_ack;
1078c2ecf20Sopenharmony_ci} __attribute__ ((__packed__));
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ci#endif				/* _IPWIRELESS_CS_SETUP_PROTOCOL_H_ */
110