2 *************************************************************************
4 * 5F., No.36, Taiyuan St., Jhubei City,
8 * (c) Copyright 2002-2007, Ralink Technology, Inc.
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
15 * This program is distributed in the hope that it will be useful, *
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 * GNU General Public License for more details. *
20 * You should have received a copy of the GNU General Public License *
21 * along with this program; if not, write to the *
22 * Free Software Foundation, Inc., *
23 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
25 *************************************************************************
34 -------- ---------- ----------------------------------------------
35 Name Date Modification logs
36 Paul Lin 04-06-15 Initial
42 // Measurement Type definition
43 #define MSRN_TYPE_UNUSED 0
44 #define MSRN_TYPE_CHANNEL_LOAD_REQ 1
45 #define MSRN_TYPE_NOISE_HIST_REQ 2
46 #define MSRN_TYPE_BEACON_REQ 3
47 #define MSRN_TYPE_FRAME_REQ 4
49 // Scan Mode in Beacon Request
50 #define MSRN_SCAN_MODE_PASSIVE 0
51 #define MSRN_SCAN_MODE_ACTIVE 1
52 #define MSRN_SCAN_MODE_BEACON_TABLE 2
54 // PHY type definition for Aironet beacon report, CCX 2 table 36-9
63 #define RPI_0 0 // Power <= -87
64 #define RPI_1 1 // -87 < Power <= -82
65 #define RPI_2 2 // -82 < Power <= -77
66 #define RPI_3 3 // -77 < Power <= -72
67 #define RPI_4 4 // -72 < Power <= -67
68 #define RPI_5 5 // -67 < Power <= -62
69 #define RPI_6 6 // -62 < Power <= -57
70 #define RPI_7 7 // -57 < Power
72 // Cisco Aironet IAPP definetions
73 #define AIRONET_IAPP_TYPE 0x32
74 #define AIRONET_IAPP_SUBTYPE_REQUEST 0x01
75 #define AIRONET_IAPP_SUBTYPE_REPORT 0x81
77 // Measurement Request detail format
78 typedef struct _MEASUREMENT_REQUEST {
80 UCHAR ScanMode; // Use only in beacon request, other requests did not use this field
82 } MEASUREMENT_REQUEST, *PMEASUREMENT_REQUEST;
84 // Beacon Measurement Report
85 // All these field might change to UCHAR, because we didn't do anything to these report.
86 // We copy all these beacons and report to CCX 2 AP.
87 typedef struct _BEACON_REPORT {
91 UCHAR PhyType; // Definiation is listed above table 36-9
96 USHORT BeaconInterval;
97 USHORT CapabilityInfo;
98 } BEACON_REPORT, *PBEACON_REPORT;
100 // Frame Measurement Report (Optional)
101 typedef struct _FRAME_REPORT {
109 } FRAME_REPORT, *PFRAME_REPORT;
112 // Channel Load Report
113 typedef struct _CHANNEL_LOAD_REPORT {
118 } CHANNEL_LOAD_REPORT, *PCHANNEL_LOAD_REPORT;
121 // Nosie Histogram Report
122 typedef struct _NOISE_HIST_REPORT {
127 } NOISE_HIST_REPORT, *PNOISE_HIST_REPORT;
129 // Radio Management Capability element
130 typedef struct _RADIO_MANAGEMENT_CAPABILITY {
131 UCHAR Eid; // TODO: Why the Eid is 1 byte, not normal 2 bytes???
133 UCHAR AironetOui[3]; // AIronet OUI (00 40 96)
134 UCHAR Type; // Type / Version
135 USHORT Status; // swap16 required
136 } RADIO_MANAGEMENT_CAPABILITY, *PRADIO_MANAGEMENT_CAPABILITY;
138 // Measurement Mode Bit definition
139 typedef struct _MEASUREMENT_MODE {
145 } MEASUREMENT_MODE, *PMEASUREMENT_MODE;
147 // Measurement Request element, This is little endian mode
148 typedef struct _MEASUREMENT_REQUEST_ELEMENT {
150 USHORT Length; // swap16 required
151 USHORT Token; // non-zero unique token
152 UCHAR Mode; // Measurement Mode
153 UCHAR Type; // Measurement type
154 } MEASUREMENT_REQUEST_ELEMENT, *PMEASUREMENT_REQUEST_ELEMENT;
156 // Measurement Report element, This is little endian mode
157 typedef struct _MEASUREMENT_REPORT_ELEMENT {
159 USHORT Length; // swap16 required
160 USHORT Token; // non-zero unique token
161 UCHAR Mode; // Measurement Mode
162 UCHAR Type; // Measurement type
163 } MEASUREMENT_REPORT_ELEMENT, *PMEASUREMENT_REPORT_ELEMENT;
165 // Cisco Aironet IAPP Frame Header, Network byte order used
166 typedef struct _AIRONET_IAPP_HEADER {
167 UCHAR CiscoSnapHeader[8]; // 8 bytes Cisco snap header
168 USHORT Length; // IAPP ID & length, remember to swap16 in LE system
169 UCHAR Type; // IAPP type
170 UCHAR SubType; // IAPP subtype
171 UCHAR DA[6]; // Destination MAC address
172 UCHAR SA[6]; // Source MAC address
173 USHORT Token; // Dialog token, no need to swap16 since it is for yoken usage only
174 } AIRONET_IAPP_HEADER, *PAIRONET_IAPP_HEADER;
176 // Radio Measurement Request frame
177 typedef struct _AIRONET_RM_REQUEST_FRAME {
178 AIRONET_IAPP_HEADER IAPP; // Common header
179 UCHAR Delay; // Activation Delay
180 UCHAR Offset; // Measurement offset
181 } AIRONET_RM_REQUEST_FRAME, *PAIRONET_RM_REQUEST_FRAME;
183 // Radio Measurement Report frame
184 typedef struct _AIRONET_RM_REPORT_FRAME {
185 AIRONET_IAPP_HEADER IAPP; // Common header
186 } AIRONET_RM_REPORT_FRAME, *PAIRONET_RM_REPORT_FRAME;
188 // Saved element request actions which will saved in StaCfg.
189 typedef struct _RM_REQUEST_ACTION {
190 MEASUREMENT_REQUEST_ELEMENT ReqElem; // Saved request element
191 MEASUREMENT_REQUEST Measurement; // Saved measurement within the request element
192 } RM_REQUEST_ACTION, *PRM_REQUEST_ACTION;
194 // CCX administration control
195 typedef union _CCX_CONTROL {
197 UINT32 Enable:1; // Enable CCX2
198 UINT32 LeapEnable:1; // Enable LEAP at CCX2
199 UINT32 RMEnable:1; // Radio Measurement Enable
200 UINT32 DCRMEnable:1; // Non serving channel Radio Measurement enable
201 UINT32 QOSEnable:1; // Enable QOS for CCX 2.0 support
202 UINT32 FastRoamEnable:1; // Enable fast roaming
203 UINT32 Rsvd:2; // Not used
204 UINT32 dBmToRoam:8; // the condition to roam when receiving Rssi less than this value. It's negative value.
205 UINT32 TuLimit:16; // Limit for different channel scan
208 } CCX_CONTROL, *PCCX_CONTROL;
210 #endif // __AIRONET_H__