Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #ifndef _RAYCTL_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) #define _RAYCTL_H_
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) typedef unsigned char UCHAR;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) /****** IEEE 802.11 constants ************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) #define ADDRLEN           6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) /* Frame control 1 bit fields */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) #define PROTOCOL_VER      0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) #define DATA_TYPE         0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) #define ASSOC_REQ_TYPE    0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) #define ASSOC_RESP_TYPE   0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) #define REASSOC_REQ_TYPE  0x20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) #define REASSOC_RESP_TYPE 0x30
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) #define NULL_MSG_TYPE     0x48
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) #define BEACON_TYPE       0x80
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) #define DISASSOC_TYPE     0xA0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #define PSPOLL_TYPE       0xA4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) #define AUTHENTIC_TYPE    0xB0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) #define DEAUTHENTIC_TYPE  0xC0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) /* Frame control 2 bit fields */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) #define FC2_TO_DS         0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) #define FC2_FROM_DS       0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) #define FC2_MORE_FRAG     0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) #define FC2_RETRY         0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) #define FC2_PSM           0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) #define FC2_MORE_DATA     0x20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) #define FC2_WEP           0x40
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) #define FC2_ORDER         0x80
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) /*****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) /* 802.11 element ID's and lengths */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) #define C_BP_CAPABILITY_ESS             0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) #define C_BP_CAPABILITY_IBSS            0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) #define C_BP_CAPABILITY_CF_POLLABLE     0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) #define C_BP_CAPABILITY_CF_POLL_REQUEST 0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) #define C_BP_CAPABILITY_PRIVACY         0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) #define C_ESSID_ELEMENT_ID               0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) #define C_ESSID_ELEMENT_MAX_LENGTH       32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) #define C_SUPPORTED_RATES_ELEMENT_ID     1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) #define C_SUPPORTED_RATES_ELEMENT_LENGTH 2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) #define C_FH_PARAM_SET_ELEMENT_ID        2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) #define C_FH_PARAM_SET_ELEMENT_LNGTH     5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) #define C_CF_PARAM_SET_ELEMENT_ID        4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) #define C_CF_PARAM_SET_ELEMENT_LNGTH     6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) #define C_TIM_ELEMENT_ID                 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) #define C_TIM_BITMAP_LENGTH            251
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) #define C_TIM_BMCAST_BIT              0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) #define C_IBSS_ELEMENT_ID                6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) #define C_IBSS_ELEMENT_LENGTH            2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) #define C_JAPAN_CALL_SIGN_ELEMENT_ID    51
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) #define C_JAPAN_CALL_SIGN_ELEMENT_LNGTH 12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) #define C_DISASSOC_REASON_CODE_LEN       2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) #define C_DISASSOC_REASON_CODE_DEFAULT   8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) #define C_CRC_LEN                        4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) #define C_NUM_SUPPORTED_RATES            8 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) /****** IEEE 802.11 mac header for type data packets *************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) struct mac_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68)   UCHAR frame_ctl_1;                          
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69)   UCHAR frame_ctl_2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70)   UCHAR duration_lsb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71)   UCHAR duration_msb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)   UCHAR addr_1[ADDRLEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73)   UCHAR addr_2[ADDRLEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74)   UCHAR addr_3[ADDRLEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)   UCHAR seq_frag_num[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) /*  UCHAR addr_4[ADDRLEN]; *//* only present for AP to AP (TO DS and FROM DS */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) /****** IEEE 802.11 frame element structures *********************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) struct essid_element
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81)   UCHAR id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82)   UCHAR length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83)   UCHAR text[C_ESSID_ELEMENT_MAX_LENGTH];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) struct rates_element
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87)   UCHAR id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88)   UCHAR length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89)   UCHAR value[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) struct freq_hop_element
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93)   UCHAR id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94)   UCHAR length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95)   UCHAR dwell_time[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96)   UCHAR hop_set;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97)   UCHAR hop_pattern;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98)   UCHAR hop_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) struct tim_element
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)   UCHAR id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)   UCHAR length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)   UCHAR dtim_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)   UCHAR dtim_period;    
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)   UCHAR bitmap_control;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)   UCHAR tim[C_TIM_BITMAP_LENGTH];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) struct ibss_element
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)   UCHAR id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)   UCHAR length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113)   UCHAR atim_window[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) struct japan_call_sign_element
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117)   UCHAR id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)   UCHAR length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119)   UCHAR call_sign[12];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) /****** Beacon message structures ********************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) /* .elements is a large lump of max size because elements are variable size  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) struct infra_beacon
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125)     UCHAR timestamp[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)     UCHAR beacon_intvl[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)     UCHAR capability[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)     UCHAR elements[sizeof(struct essid_element) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)                   + sizeof(struct rates_element)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)                   + sizeof(struct freq_hop_element) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)                   + sizeof(struct japan_call_sign_element)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)                   + sizeof(struct tim_element)];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) struct adhoc_beacon
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136)     UCHAR timestamp[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)     UCHAR beacon_intvl[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)     UCHAR capability[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)     UCHAR elements[sizeof(struct essid_element) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)                   + sizeof(struct rates_element)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)                   + sizeof(struct freq_hop_element) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)                   + sizeof(struct japan_call_sign_element)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)                   + sizeof(struct ibss_element)];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) /*****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) /*****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) /* #define C_MAC_HDR_2_WEP 0x40 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) /* TX/RX CCS constants */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) #define TX_HEADER_LENGTH 0x1C
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) #define RX_MAC_HEADER_LENGTH 0x18
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) #define TX_AUTHENTICATE_LENGTH (TX_HEADER_LENGTH + 6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) #define TX_AUTHENTICATE_LENGTH_MSB (TX_AUTHENTICATE_LENGTH >> 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) #define TX_AUTHENTICATE_LENGTH_LSB (TX_AUTHENTICATE_LENGTH & 0xff)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) #define TX_DEAUTHENTICATE_LENGTH (TX_HEADER_LENGTH + 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) #define TX_DEAUTHENTICATE_LENGTH_MSB (TX_AUTHENTICATE_LENGTH >> 8)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) #define TX_DEAUTHENTICATE_LENGTH_LSB (TX_AUTHENTICATE_LENGTH & 0xff)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) #define FCS_LEN           4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) #define ADHOC                 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) #define INFRA                 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) #define TYPE_STA              0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) #define TYPE_AP               1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) #define PASSIVE_SCAN          1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) #define ACTIVE_SCAN           1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) #define PSM_CAM               0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) /* Country codes */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) #define USA                   1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) #define EUROPE                2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) #define JAPAN                 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) #define KOREA                 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) #define SPAIN                 5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) #define FRANCE                6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) #define ISRAEL                7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) #define AUSTRALIA             8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) #define JAPAN_TEST            9
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) /* Hop pattern lengths */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) #define USA_HOP_MOD          79 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) #define EUROPE_HOP_MOD       79 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) #define JAPAN_HOP_MOD        23
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) #define KOREA_HOP_MOD        23
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) #define SPAIN_HOP_MOD        27
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) #define FRANCE_HOP_MOD       35
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) #define ISRAEL_HOP_MOD       35
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) #define AUSTRALIA_HOP_MOD    47
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) #define JAPAN_TEST_HOP_MOD   23
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) #define ESSID_SIZE           32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) /**********************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) /* CIS Register Constants */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) #define CIS_OFFSET             0x0f00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) /* Configuration Option Register (0x0F00) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) #define COR_OFFSET             0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) #define COR_SOFT_RESET         0x80
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) #define COR_LEVEL_IRQ          0x40
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) #define COR_CONFIG_NUM         0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) #define COR_DEFAULT            (COR_LEVEL_IRQ | COR_CONFIG_NUM)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) /* Card Configuration and Status Register (0x0F01) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) #define CCSR_OFFSET            0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) #define CCSR_HOST_INTR_PENDING 0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) #define CCSR_POWER_DOWN        0x04
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) /* HCS Interrupt Register (0x0F05) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) #define HCS_INTR_OFFSET        0x05
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) /* #define HCS_INTR_OFFSET        0x0A */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) #define HCS_INTR_CLEAR         0x00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) /* ECF Interrupt Register (0x0F06) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) #define ECF_INTR_OFFSET        0x06
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) /* #define ECF_INTR_OFFSET        0x0C */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) #define ECF_INTR_SET           0x01
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) /* Authorization Register 0 (0x0F08) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) #define AUTH_0_ON              0x57
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) /* Authorization Register 1 (0x0F09) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) #define AUTH_1_ON              0x82
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) /* Program Mode Register (0x0F0A) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) #define PC2PM                  0x02
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) #define PC2CAL                 0x10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) #define PC2MLSE                0x20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) /* PC Test Mode Register (0x0F0B) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) #define PC_TEST_MODE           0x08
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) /* Frequency Control Word (0x0F10) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) /* Range 0x02 - 0xA6 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) /* Test Mode Control 1-4 (0x0F14 - 0x0F17) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) /**********************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) /* Shared RAM Area */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) #define SCB_BASE               0x0000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) #define STATUS_BASE            0x0100
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) #define HOST_TO_ECF_BASE       0x0200
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) #define ECF_TO_HOST_BASE       0x0300
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) #define CCS_BASE               0x0400
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) #define RCS_BASE               0x0800
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) #define INFRA_TIM_BASE         0x0C00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) #define SSID_LIST_BASE         0x0D00
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) #define TX_BUF_BASE            0x1000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) #define RX_BUF_BASE            0x8000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) #define NUMBER_OF_CCS    64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) #define NUMBER_OF_RCS    64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) /*#define NUMBER_OF_TX_CCS 14 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) #define NUMBER_OF_TX_CCS 14
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) #define TX_BUF_SIZE      (2048 - sizeof(struct tx_msg))
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) #define RX_BUFF_END      0x3FFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) /* Values for buffer_status */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) #define CCS_BUFFER_FREE       0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) #define CCS_BUFFER_BUSY       1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) #define CCS_COMMAND_COMPLETE  2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) #define CCS_COMMAND_FAILED    3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) /* Values for cmd */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) #define CCS_DOWNLOAD_STARTUP_PARAMS    1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) #define CCS_UPDATE_PARAMS              2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) #define CCS_REPORT_PARAMS              3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) #define CCS_UPDATE_MULTICAST_LIST      4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) #define CCS_UPDATE_POWER_SAVINGS_MODE  5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) #define CCS_START_NETWORK              6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) #define CCS_JOIN_NETWORK               7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) #define CCS_START_ASSOCIATION          8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273) #define CCS_TX_REQUEST                 9
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274) #define CCS_TEST_MEMORY              0xa
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275) #define CCS_SHUTDOWN                 0xb
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276) #define CCS_DUMP_MEMORY              0xc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277) #define CCS_START_TIMER              0xe
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) #define CCS_LAST_CMD                 CCS_START_TIMER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280) /* Values for link field */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281) #define CCS_END_LIST                 0xff
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283) /* values for buffer_status field */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284) #define RCS_BUFFER_FREE       0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) #define RCS_BUFFER_BUSY       1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286) #define RCS_COMPLETE          2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287) #define RCS_FAILED            3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288) #define RCS_BUFFER_RELEASE    0xFF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290) /* values for interrupt_id field */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291) #define PROCESS_RX_PACKET           0x80 /* */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292) #define REJOIN_NET_COMPLETE         0x81 /* RCS ID: Rejoin Net Complete */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) #define ROAMING_INITIATED           0x82 /* RCS ID: Roaming Initiated   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294) #define JAPAN_CALL_SIGN_RXD         0x83 /* RCS ID: New Japan Call Sign */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296) /*****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297) /* Memory types for dump memory command */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298) #define C_MEM_PROG  0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299) #define C_MEM_XDATA 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300) #define C_MEM_SFR   2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301) #define C_MEM_IDATA 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303) /*** Return values for hw_xmit **********/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) #define XMIT_OK        (0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305) #define XMIT_MSG_BAD   (-1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306) #define XMIT_NO_CCS    (-2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307) #define XMIT_NO_INTR   (-3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) #define XMIT_NEED_AUTH (-4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) /*** Values for card status */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311) #define CARD_INSERTED       (0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313) #define CARD_AWAITING_PARAM (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314) #define CARD_INIT_ERROR     (11)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316) #define CARD_DL_PARAM       (2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317) #define CARD_DL_PARAM_ERROR (12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319) #define CARD_DOING_ACQ      (3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321) #define CARD_ACQ_COMPLETE   (4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322) #define CARD_ACQ_FAILED     (14)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) #define CARD_AUTH_COMPLETE  (5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325) #define CARD_AUTH_REFUSED   (15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327) #define CARD_ASSOC_COMPLETE (6)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328) #define CARD_ASSOC_FAILED   (16)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) /*** Values for authentication_state ***********************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331) #define UNAUTHENTICATED     (0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) #define AWAITING_RESPONSE   (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333) #define AUTHENTICATED       (2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334) #define NEED_TO_AUTH        (3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336) /*** Values for authentication type ************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337) #define OPEN_AUTH_REQUEST   (1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338) #define OPEN_AUTH_RESPONSE  (2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339) #define BROADCAST_DEAUTH    (0xc0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340) /*** Values for timer functions ****************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341) #define TODO_NOTHING              (0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) #define TODO_VERIFY_DL_START      (-1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 343) #define TODO_START_NET            (-2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 344) #define TODO_JOIN_NET             (-3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 345) #define TODO_AUTHENTICATE_TIMEOUT (-4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 346) #define TODO_SEND_CCS             (-5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 347) /***********************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 348) /* Parameter passing structure for update/report parameter CCS's */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 349) struct object_id {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 350)     void          *object_addr;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 351)     unsigned char object_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 352) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 353) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 354) #define OBJID_network_type            0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 355) #define OBJID_acting_as_ap_status     1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 356) #define OBJID_current_ess_id          2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 357) #define OBJID_scanning_mode           3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 358) #define OBJID_power_mgt_state         4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 359) #define OBJID_mac_address             5
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 360) #define OBJID_frag_threshold          6
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 361) #define OBJID_hop_time                7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 362) #define OBJID_beacon_period           8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 363) #define OBJID_dtim_period             9
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 364) #define OBJID_retry_max              10
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 365) #define OBJID_ack_timeout            11
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 366) #define OBJID_sifs                   12
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 367) #define OBJID_difs                   13
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 368) #define OBJID_pifs                   14
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 369) #define OBJID_rts_threshold          15
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 370) #define OBJID_scan_dwell_time        16
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 371) #define OBJID_max_scan_dwell_time    17
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 372) #define OBJID_assoc_resp_timeout     18
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 373) #define OBJID_adhoc_scan_cycle_max   19
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 374) #define OBJID_infra_scan_cycle_max   20
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 375) #define OBJID_infra_super_cycle_max  21
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 376) #define OBJID_promiscuous_mode       22
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 377) #define OBJID_unique_word            23
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 378) #define OBJID_slot_time              24
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 379) #define OBJID_roaming_low_snr        25
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 380) #define OBJID_low_snr_count_thresh   26
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 381) #define OBJID_infra_missed_bcn       27
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 382) #define OBJID_adhoc_missed_bcn       28
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 383) #define OBJID_curr_country_code      29
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 384) #define OBJID_hop_pattern            30
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 385) #define OBJID_reserved               31
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 386) #define OBJID_cw_max_msb             32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 387) #define OBJID_cw_min_msb             33
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 388) #define OBJID_noise_filter_gain      34
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 389) #define OBJID_noise_limit_offset     35
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 390) #define OBJID_det_rssi_thresh_offset 36
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 391) #define OBJID_med_busy_thresh_offset 37
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 392) #define OBJID_det_sync_thresh        38
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 393) #define OBJID_test_mode              39
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 394) #define OBJID_test_min_chan_num      40
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 395) #define OBJID_test_max_chan_num      41
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 396) #define OBJID_allow_bcast_ID_prbrsp  42
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 397) #define OBJID_privacy_must_start     43
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 398) #define OBJID_privacy_can_join       44
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 399) #define OBJID_basic_rate_set         45
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 400) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 401) /**** Configuration/Status/Control Area ***************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 402) /*    System Control Block (SCB) Area
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 403)  *    Located at Shared RAM offset 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 404)  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 405) struct scb {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 406)     UCHAR ccs_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 407)     UCHAR rcs_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 408) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 409) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 410) /****** Status area at Shared RAM offset 0x0100 ******************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 411) struct status {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 412)     UCHAR mrx_overflow_for_host;         /* 0=ECF may write, 1=host may write*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 413)     UCHAR mrx_checksum_error_for_host;   /* 0=ECF may write, 1=host may write*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 414)     UCHAR rx_hec_error_for_host;         /* 0=ECF may write, 1=host may write*/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 415)     UCHAR reserved1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 416)     short mrx_overflow;                  /* ECF increments on rx overflow    */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 417)     short mrx_checksum_error;            /* ECF increments on rx CRC error   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 418)     short rx_hec_error;                  /* ECF incs on mac header CRC error */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 419)     UCHAR rxnoise;                       /* Average RSL measurement          */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 420) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 421) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 422) /****** Host-to-ECF Data Area at Shared RAM offset 0x200 *********************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 423) struct host_to_ecf_area {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 424)     
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 425) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 426) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 427) /****** ECF-to-Host Data Area at Shared RAM offset 0x0300 ********************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 428) struct startup_res_518 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 429)     UCHAR startup_word;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 430)     UCHAR station_addr[ADDRLEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 431)     UCHAR calc_prog_chksum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 432)     UCHAR calc_cis_chksum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 433)     UCHAR ecf_spare[7];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 434)     UCHAR japan_call_sign[12];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 435) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 436) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 437) struct startup_res_6 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 438)     UCHAR startup_word;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 439)     UCHAR station_addr[ADDRLEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 440)     UCHAR reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 441)     UCHAR supp_rates[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 442)     UCHAR japan_call_sign[12];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 443)     UCHAR calc_prog_chksum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 444)     UCHAR calc_cis_chksum;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 445)     UCHAR firmware_version[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 446)     UCHAR asic_version;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 447)     UCHAR tib_length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 448) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 449) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 450) struct start_join_net_params {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 451)     UCHAR net_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 452)     UCHAR ssid[ESSID_SIZE];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 453)     UCHAR reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 454)     UCHAR privacy_can_join;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 455) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 456) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 457) /****** Command Control Structure area at Shared ram offset 0x0400 ***********/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 458) /* Structures for command specific parameters (ccs.var) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 459) struct update_param_cmd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 460)     UCHAR object_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 461)     UCHAR number_objects;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 462)     UCHAR failure_cause;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 463) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 464) struct report_param_cmd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 465)     UCHAR object_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 466)     UCHAR number_objects;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 467)     UCHAR failure_cause;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 468)     UCHAR length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 469) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 470) struct start_network_cmd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 471)     UCHAR update_param;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 472)     UCHAR bssid[ADDRLEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 473)     UCHAR net_initiated;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 474)     UCHAR net_default_tx_rate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 475)     UCHAR encryption;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 476) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 477) struct join_network_cmd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 478)     UCHAR update_param;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 479)     UCHAR bssid[ADDRLEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 480)     UCHAR net_initiated;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 481)     UCHAR net_default_tx_rate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 482)     UCHAR encryption;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 483) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 484) struct tx_requested_cmd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 485)  
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 486)     UCHAR tx_data_ptr[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 487)     UCHAR tx_data_length[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 488)     UCHAR host_reserved[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 489)     UCHAR reserved[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 490)     UCHAR tx_rate;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 491)     UCHAR pow_sav_mode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 492)     UCHAR retries;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 493)     UCHAR antenna;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 494) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 495) struct tx_requested_cmd_4 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 496)  
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 497)     UCHAR tx_data_ptr[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 498)     UCHAR tx_data_length[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 499)     UCHAR dest_addr[ADDRLEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 500)     UCHAR pow_sav_mode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 501)     UCHAR retries;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 502)     UCHAR station_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 503) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 504) struct memory_dump_cmd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 505)     UCHAR memory_type;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 506)     UCHAR memory_ptr[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 507)     UCHAR length;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 508) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 509) struct update_association_cmd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 510)     UCHAR status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 511)     UCHAR aid[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 512) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 513) struct start_timer_cmd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 514)     UCHAR duration[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 515) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 516) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 517) struct ccs {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 518)     UCHAR buffer_status;                 /* 0 = buffer free, 1 = buffer busy */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 519)                                          /* 2 = command complete, 3 = failed */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 520)     UCHAR cmd;                           /* command to ECF                   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 521)     UCHAR link;                          /* link to next CCS, FF=end of list */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 522)     /* command specific parameters      */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 523)     union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 524)         char reserved[13];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 525)         struct update_param_cmd update_param;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 526)         struct report_param_cmd report_param;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 527)         UCHAR nummulticast;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 528)         UCHAR mode;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 529)         struct start_network_cmd start_network;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 530)         struct join_network_cmd join_network;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 531)         struct tx_requested_cmd tx_request;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 532)         struct memory_dump_cmd memory_dump;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 533)         struct update_association_cmd update_assoc;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 534)         struct start_timer_cmd start_timer;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 535)     } var;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 536) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 537) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 538) /*****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 539) /* Transmit buffer structures */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 540) struct tib_structure {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 541)     UCHAR ccs_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 542)     UCHAR psm;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 543)     UCHAR pass_fail;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 544)     UCHAR retry_count;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 545)     UCHAR max_retries;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 546)     UCHAR frags_remaining;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 547)     UCHAR no_rb;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 548)     UCHAR rts_reqd;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 549)     UCHAR csma_tx_cntrl_2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 550)     UCHAR sifs_tx_cntrl_2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 551)     UCHAR tx_dma_addr_1[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 552)     UCHAR tx_dma_addr_2[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 553)     UCHAR var_dur_2mhz[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 554)     UCHAR var_dur_1mhz[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 555)     UCHAR max_dur_2mhz[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 556)     UCHAR max_dur_1mhz[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 557)     UCHAR hdr_len;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 558)     UCHAR max_frag_len[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 559)     UCHAR var_len[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 560)     UCHAR phy_hdr_4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 561)     UCHAR mac_hdr_1;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 562)     UCHAR mac_hdr_2;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 563)     UCHAR sid[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 564) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 565) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 566) struct phy_header {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 567)     UCHAR sfd[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 568)     UCHAR hdr_3;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 569)     UCHAR hdr_4;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 570) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 571) struct ray_rx_msg {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 572)     struct mac_header mac;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 573) 	UCHAR	var[];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 574) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 575) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 576) struct tx_msg {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 577)     struct tib_structure tib;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 578)     struct phy_header phy;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 579)     struct mac_header mac;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 580)     UCHAR  var[1];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 581) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 582) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 583) /****** ECF Receive Control Structure (RCS) Area at Shared RAM offset 0x0800  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 584) /* Structures for command specific parameters (rcs.var) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 585) struct rx_packet_cmd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 586)     UCHAR rx_data_ptr[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 587)     UCHAR rx_data_length[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 588)     UCHAR rx_sig_lev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 589)     UCHAR next_frag_rcs_index;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 590)     UCHAR totalpacketlength[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 591) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 592) struct rejoin_net_cmplt_cmd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 593)     UCHAR reserved;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 594)     UCHAR bssid[ADDRLEN];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 595) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 596) struct japan_call_sign_rxd {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 597)     UCHAR rxd_call_sign[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 598)     UCHAR reserved[5];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 599) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 600) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 601) struct rcs {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 602)     UCHAR buffer_status;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 603)     UCHAR interrupt_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 604)     UCHAR link_field;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 605)     /* command specific parameters      */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 606)     union {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 607)         UCHAR reserved[13]; 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 608)         struct rx_packet_cmd rx_packet;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 609)         struct rejoin_net_cmplt_cmd rejoin_net_complete;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 610)         struct japan_call_sign_rxd japan_call_sign;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 611)     } var;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 612) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 613) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 614) /****** Startup parameter structures for both versions of firmware ***********/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 615) struct b4_startup_params {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 616)     UCHAR a_network_type;                /* C_ADHOC, C_INFRA                 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 617)     UCHAR a_acting_as_ap_status;         /* C_TYPE_STA, C_TYPE_AP            */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 618)     UCHAR a_current_ess_id[ESSID_SIZE];  /* Null terminated unless 32 long   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 619)     UCHAR a_scanning_mode;               /* passive 0, active 1              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 620)     UCHAR a_power_mgt_state;             /* CAM 0,                           */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 621)     UCHAR a_mac_addr[ADDRLEN];           /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 622)     UCHAR a_frag_threshold[2];           /* 512                              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 623)     UCHAR a_hop_time[2];                 /* 16k * 2**n, n=0-4 in Kus         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 624)     UCHAR a_beacon_period[2];            /* n * a_hop_time  in Kus           */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 625)     UCHAR a_dtim_period;                 /* in beacons                       */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 626)     UCHAR a_retry_max;                   /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 627)     UCHAR a_ack_timeout;                 /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 628)     UCHAR a_sifs;                        /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 629)     UCHAR a_difs;                        /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 630)     UCHAR a_pifs;                        /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 631)     UCHAR a_rts_threshold[2];            /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 632)     UCHAR a_scan_dwell_time[2];          /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 633)     UCHAR a_max_scan_dwell_time[2];      /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 634)     UCHAR a_assoc_resp_timeout_thresh;   /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 635)     UCHAR a_adhoc_scan_cycle_max;        /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 636)     UCHAR a_infra_scan_cycle_max;        /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 637)     UCHAR a_infra_super_scan_cycle_max;  /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 638)     UCHAR a_promiscuous_mode;            /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 639)     UCHAR a_unique_word[2];              /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 640)     UCHAR a_slot_time;                   /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 641)     UCHAR a_roaming_low_snr_thresh;      /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 642)     UCHAR a_low_snr_count_thresh;        /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 643)     UCHAR a_infra_missed_bcn_thresh;     /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 644)     UCHAR a_adhoc_missed_bcn_thresh;     /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 645)     UCHAR a_curr_country_code;           /* C_USA                            */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 646)     UCHAR a_hop_pattern;                 /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 647)     UCHAR a_hop_pattern_length;          /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 648) /* b4 - b5 differences start here */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 649)     UCHAR a_cw_max;                      /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 650)     UCHAR a_cw_min;                      /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 651)     UCHAR a_noise_filter_gain;           /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 652)     UCHAR a_noise_limit_offset;          /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 653)     UCHAR a_det_rssi_thresh_offset;      /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 654)     UCHAR a_med_busy_thresh_offset;      /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 655)     UCHAR a_det_sync_thresh;             /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 656)     UCHAR a_test_mode;                   /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 657)     UCHAR a_test_min_chan_num;           /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 658)     UCHAR a_test_max_chan_num;           /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 659)     UCHAR a_rx_tx_delay;                 /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 660)     UCHAR a_current_bss_id[ADDRLEN];     /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 661)     UCHAR a_hop_set;                     /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 662) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 663) struct b5_startup_params {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 664)     UCHAR a_network_type;                /* C_ADHOC, C_INFRA                 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 665)     UCHAR a_acting_as_ap_status;         /* C_TYPE_STA, C_TYPE_AP            */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 666)     UCHAR a_current_ess_id[ESSID_SIZE];  /* Null terminated unless 32 long   */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 667)     UCHAR a_scanning_mode;               /* passive 0, active 1              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 668)     UCHAR a_power_mgt_state;             /* CAM 0,                           */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 669)     UCHAR a_mac_addr[ADDRLEN];           /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 670)     UCHAR a_frag_threshold[2];           /* 512                              */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 671)     UCHAR a_hop_time[2];                 /* 16k * 2**n, n=0-4 in Kus         */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 672)     UCHAR a_beacon_period[2];            /* n * a_hop_time  in Kus           */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 673)     UCHAR a_dtim_period;                 /* in beacons                       */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 674)     UCHAR a_retry_max;                   /* 4                                */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 675)     UCHAR a_ack_timeout;                 /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 676)     UCHAR a_sifs;                        /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 677)     UCHAR a_difs;                        /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 678)     UCHAR a_pifs;                        /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 679)     UCHAR a_rts_threshold[2];            /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 680)     UCHAR a_scan_dwell_time[2];          /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 681)     UCHAR a_max_scan_dwell_time[2];      /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 682)     UCHAR a_assoc_resp_timeout_thresh;   /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 683)     UCHAR a_adhoc_scan_cycle_max;        /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 684)     UCHAR a_infra_scan_cycle_max;        /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 685)     UCHAR a_infra_super_scan_cycle_max;  /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 686)     UCHAR a_promiscuous_mode;            /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 687)     UCHAR a_unique_word[2];              /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 688)     UCHAR a_slot_time;                   /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 689)     UCHAR a_roaming_low_snr_thresh;      /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 690)     UCHAR a_low_snr_count_thresh;        /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 691)     UCHAR a_infra_missed_bcn_thresh;     /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 692)     UCHAR a_adhoc_missed_bcn_thresh;     /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 693)     UCHAR a_curr_country_code;           /* C_USA                            */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 694)     UCHAR a_hop_pattern;                 /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 695)     UCHAR a_hop_pattern_length;          /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 696) /* b4 - b5 differences start here */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 697)     UCHAR a_cw_max[2];                   /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 698)     UCHAR a_cw_min[2];                   /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 699)     UCHAR a_noise_filter_gain;           /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 700)     UCHAR a_noise_limit_offset;          /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 701)     UCHAR a_det_rssi_thresh_offset;      /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 702)     UCHAR a_med_busy_thresh_offset;      /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 703)     UCHAR a_det_sync_thresh;             /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 704)     UCHAR a_test_mode;                   /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 705)     UCHAR a_test_min_chan_num;           /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 706)     UCHAR a_test_max_chan_num;           /*                                  */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 707)     UCHAR a_allow_bcast_SSID_probe_rsp;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 708)     UCHAR a_privacy_must_start;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 709)     UCHAR a_privacy_can_join;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 710)     UCHAR a_basic_rate_set[8];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 711) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 712) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 713) /*****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 714) #define RAY_IOCG_PARMS (SIOCDEVPRIVATE)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 715) #define RAY_IOCS_PARMS (SIOCDEVPRIVATE + 1)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 716) #define RAY_DO_CMD     (SIOCDEVPRIVATE + 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 717) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 718) /****** ethernet <-> 802.11 translation **************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 719) typedef struct snaphdr_t
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 720) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 721)   UCHAR   dsap;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 722)   UCHAR   ssap;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 723)   UCHAR   ctrl;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 724)   UCHAR   org[3];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 725)   UCHAR   ethertype[2];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 726) } snaphdr_t;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 727) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 728) #define BRIDGE_ENCAP  0xf80000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 729) #define RFC1042_ENCAP 0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 730) #define SNAP_ID       0x0003aaaa
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 731) #define RAY_IPX_TYPE  0x8137
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 732) #define APPLEARP_TYPE 0x80f3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 733) /*****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 734) #endif /* _RAYCTL_H_ */