162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * IPWireless 3G PCMCIA Network Driver 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Original code 662306a36Sopenharmony_ci * by Stephen Blackheath <stephen@blacksapphire.com>, 762306a36Sopenharmony_ci * Ben Martel <benm@symmetric.co.nz> 862306a36Sopenharmony_ci * 962306a36Sopenharmony_ci * Copyrighted as follows: 1062306a36Sopenharmony_ci * Copyright (C) 2004 by Symmetric Systems Ltd (NZ) 1162306a36Sopenharmony_ci * 1262306a36Sopenharmony_ci * Various driver changes and rewrites, port to new kernels 1362306a36Sopenharmony_ci * Copyright (C) 2006-2007 Jiri Kosina 1462306a36Sopenharmony_ci * 1562306a36Sopenharmony_ci * Misc code cleanups and updates 1662306a36Sopenharmony_ci * Copyright (C) 2007 David Sterba 1762306a36Sopenharmony_ci */ 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci#ifndef _IPWIRELESS_CS_SETUP_PROTOCOL_H_ 2062306a36Sopenharmony_ci#define _IPWIRELESS_CS_SETUP_PROTOCOL_H_ 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci/* Version of the setup protocol and transport protocols */ 2362306a36Sopenharmony_ci#define TL_SETUP_VERSION 1 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci#define TL_SETUP_VERSION_QRY_TMO 1000 2662306a36Sopenharmony_ci#define TL_SETUP_MAX_VERSION_QRY 30 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci/* Message numbers 0-9 are obsoleted and must not be reused! */ 2962306a36Sopenharmony_ci#define TL_SETUP_SIGNO_GET_VERSION_QRY 10 3062306a36Sopenharmony_ci#define TL_SETUP_SIGNO_GET_VERSION_RSP 11 3162306a36Sopenharmony_ci#define TL_SETUP_SIGNO_CONFIG_MSG 12 3262306a36Sopenharmony_ci#define TL_SETUP_SIGNO_CONFIG_DONE_MSG 13 3362306a36Sopenharmony_ci#define TL_SETUP_SIGNO_OPEN_MSG 14 3462306a36Sopenharmony_ci#define TL_SETUP_SIGNO_CLOSE_MSG 15 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci#define TL_SETUP_SIGNO_INFO_MSG 20 3762306a36Sopenharmony_ci#define TL_SETUP_SIGNO_INFO_MSG_ACK 21 3862306a36Sopenharmony_ci 3962306a36Sopenharmony_ci#define TL_SETUP_SIGNO_REBOOT_MSG 22 4062306a36Sopenharmony_ci#define TL_SETUP_SIGNO_REBOOT_MSG_ACK 23 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci/* Synchronous start-messages */ 4362306a36Sopenharmony_cistruct tl_setup_get_version_qry { 4462306a36Sopenharmony_ci unsigned char sig_no; /* TL_SETUP_SIGNO_GET_VERSION_QRY */ 4562306a36Sopenharmony_ci} __attribute__ ((__packed__)); 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_cistruct tl_setup_get_version_rsp { 4862306a36Sopenharmony_ci unsigned char sig_no; /* TL_SETUP_SIGNO_GET_VERSION_RSP */ 4962306a36Sopenharmony_ci unsigned char version; /* TL_SETUP_VERSION */ 5062306a36Sopenharmony_ci} __attribute__ ((__packed__)); 5162306a36Sopenharmony_ci 5262306a36Sopenharmony_cistruct tl_setup_config_msg { 5362306a36Sopenharmony_ci unsigned char sig_no; /* TL_SETUP_SIGNO_CONFIG_MSG */ 5462306a36Sopenharmony_ci unsigned char port_no; 5562306a36Sopenharmony_ci unsigned char prio_data; 5662306a36Sopenharmony_ci unsigned char prio_ctrl; 5762306a36Sopenharmony_ci} __attribute__ ((__packed__)); 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_cistruct tl_setup_config_done_msg { 6062306a36Sopenharmony_ci unsigned char sig_no; /* TL_SETUP_SIGNO_CONFIG_DONE_MSG */ 6162306a36Sopenharmony_ci} __attribute__ ((__packed__)); 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ci/* Asynchronous messages */ 6462306a36Sopenharmony_cistruct tl_setup_open_msg { 6562306a36Sopenharmony_ci unsigned char sig_no; /* TL_SETUP_SIGNO_OPEN_MSG */ 6662306a36Sopenharmony_ci unsigned char port_no; 6762306a36Sopenharmony_ci} __attribute__ ((__packed__)); 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_cistruct tl_setup_close_msg { 7062306a36Sopenharmony_ci unsigned char sig_no; /* TL_SETUP_SIGNO_CLOSE_MSG */ 7162306a36Sopenharmony_ci unsigned char port_no; 7262306a36Sopenharmony_ci} __attribute__ ((__packed__)); 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci/* Driver type - for use in tl_setup_info_msg.driver_type */ 7562306a36Sopenharmony_ci#define COMM_DRIVER 0 7662306a36Sopenharmony_ci#define NDISWAN_DRIVER 1 7762306a36Sopenharmony_ci#define NDISWAN_DRIVER_MAJOR_VERSION 2 7862306a36Sopenharmony_ci#define NDISWAN_DRIVER_MINOR_VERSION 0 7962306a36Sopenharmony_ci 8062306a36Sopenharmony_ci/* 8162306a36Sopenharmony_ci * It should not matter when this message comes over as we just store the 8262306a36Sopenharmony_ci * results and send the ACK. 8362306a36Sopenharmony_ci */ 8462306a36Sopenharmony_cistruct tl_setup_info_msg { 8562306a36Sopenharmony_ci unsigned char sig_no; /* TL_SETUP_SIGNO_INFO_MSG */ 8662306a36Sopenharmony_ci unsigned char driver_type; 8762306a36Sopenharmony_ci unsigned char major_version; 8862306a36Sopenharmony_ci unsigned char minor_version; 8962306a36Sopenharmony_ci} __attribute__ ((__packed__)); 9062306a36Sopenharmony_ci 9162306a36Sopenharmony_cistruct tl_setup_info_msgAck { 9262306a36Sopenharmony_ci unsigned char sig_no; /* TL_SETUP_SIGNO_INFO_MSG_ACK */ 9362306a36Sopenharmony_ci} __attribute__ ((__packed__)); 9462306a36Sopenharmony_ci 9562306a36Sopenharmony_cistruct TlSetupRebootMsgAck { 9662306a36Sopenharmony_ci unsigned char sig_no; /* TL_SETUP_SIGNO_REBOOT_MSG_ACK */ 9762306a36Sopenharmony_ci} __attribute__ ((__packed__)); 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_ci/* Define a union of all the msgs that the driver can receive from the card.*/ 10062306a36Sopenharmony_ciunion ipw_setup_rx_msg { 10162306a36Sopenharmony_ci unsigned char sig_no; 10262306a36Sopenharmony_ci struct tl_setup_get_version_rsp version_rsp_msg; 10362306a36Sopenharmony_ci struct tl_setup_open_msg open_msg; 10462306a36Sopenharmony_ci struct tl_setup_close_msg close_msg; 10562306a36Sopenharmony_ci struct tl_setup_info_msg InfoMsg; 10662306a36Sopenharmony_ci struct tl_setup_info_msgAck info_msg_ack; 10762306a36Sopenharmony_ci} __attribute__ ((__packed__)); 10862306a36Sopenharmony_ci 10962306a36Sopenharmony_ci#endif /* _IPWIRELESS_CS_SETUP_PROTOCOL_H_ */ 110