1 /******************************************************************************
4 Lantiq Deutschland GmbH
6 For licensing information, see the file 'LICENSE' in the root folder of
9 ******************************************************************************/
10 /****************************************************************************
11 ****************************************************************************
13 ** COMPONENT: Frame definitions
15 ** MODULE: $File: //bwp/enet/demo153_sw/develop/src/common/mhi_frame.h $
17 ** VERSION: $Revision: #3 $
19 ** DATED: $Date: 2004/02/24 $
21 ** AUTHOR: S Sondergaard
23 ** DESCRIPTION: 802.11 Frame types
25 ** LAST MODIFIED BY: $Author: jh3 $
28 ****************************************************************************
36 ****************************************************************************/
39 #ifndef __MHI_FRAME_INCLUDED
40 #define __MHI_FRAME_INCLUDED
42 #include "mtlkbfield.h"
43 #include "mhi_mib_id.h"
48 /***************************************************************************/
49 /*** Type definitions ***/
50 /***************************************************************************/
52 typedef struct _MHI_FM_CF_PARAMETER_SET
54 uint8 u8CFPcount
; /* how many DTIMs (inc current frame) before next CFP start */
55 uint8 u8CFPperiod
; /* DTIMs between start of CFPs */
56 uint16 u16CFPmaxDuration
; /* Max duration of CFP in Kus */
57 uint16 u16CFPDurationRemaining
; /* Remaining time in CFP in Kus */
59 } __MTLK_PACKED MHI_FM_CF_PARAMETER_SET
;
61 typedef struct _MHI_FM_DS_PARAMETER_SET
63 uint8 u8CurrentChannel
;
65 } __MTLK_PACKED MHI_FM_DS_PARAMETER_SET
;
68 typedef struct _MHI_FM_IBSS_PARAMETER_SET
70 uint16 u16ATIMwindowSize
; /* The ATIM window size in kmicroseconds */
72 } __MTLK_PACKED MHI_FM_IBSS_PARAMETER_SET
;
76 * WME AC parameter field
78 typedef struct _MHI_FM_WME_PARAMETERS
83 } __MTLK_PACKED MHI_FM_WME_PARAMETERS
;
85 typedef struct _MHI_FM_WME_PARAMETER_SET
87 FM_WME_OUI_AND_VER sWMEhdr
;
88 MHI_FM_WME_PARAMETERS sWMEparams
[MAX_USER_PRIORITIES
];
89 } __MTLK_PACKED MHI_FM_WME_PARAMETER_SET
;
92 typedef struct _HT_INFORMATION_ELEMENT
94 uint16 PrimaryChannel
:8;
95 uint16 SecondaryChOffset
:2;
96 uint16 STAChanWidth
:1;
98 uint16 PSMP_Access
:1;
99 uint16 ServiceIntervalGran
:3;
101 uint16 OperatingMode
:2;
102 uint16 NonGfStaPresent
:1;
103 uint16 TransmitBurstLimit
:1; // refer to "9.13.3.4 Transmit burst limit" in 11n standard
104 uint16 OBSS_Non_HT_STAsPresent
:1; // Indicates if the use of protection for non-HT STAs by overlapping BSSs is determined to be desirable.
105 uint16 Reserved11bit
:11;
107 uint16 Reserved6bit
:6;
108 uint16 DualBeacon
:1; // refer to "secondary beacon" in "11.1.2.1 Beacon generation in infrastructure networks"
109 uint16 DualCTS_Protection
:1;
111 uint16 SecondaryBeacon
:1;
112 uint16 L_SIG_TXOP_ProtecFullSupp
:1;
113 uint16 PCO_Active
:1;
115 uint16 Reserved4bit
:4;
117 uint16 BasicMSC_Set
[8];
118 } __MTLK_PACKED HT_INFORMATION_ELEMENT
;
121 * Metalink Vendor Specific Action Frame definition
124 #define ACTION_FRAME_CATEGORY_VENDOR_SPECIFIC 127
125 /* Metalink OUI (3-byte value).
126 * See http://standards.ieee.org/regauth/oui/oui.txt
127 * for more information.
129 #define MTLK_OUI_0 0x00
130 #define MTLK_OUI_1 0x09
131 #define MTLK_OUI_2 0x86
133 /* To use with the mtlkbfield.h:
134 * get from uint32 var: MTLK_U_BITS_GET(var, OUI_VALUE);
135 * set to uint32 var: MTLK_U_BITS_SET(var, OUI_VALUE, MTLK_VSAF_OUI);
137 #define OUI_VALUE MTLK_BFIELD_INFO(0, 24)
140 * MTLK Vendor Specific Action Frame format:
142 * |============================|
143 * | MTLK VSAF Format Version |
144 * |----------------------------|
145 * | Payload Size | MTLK VSAF Header
146 * |----------------------------|
147 * | Number of Items in Payload |
148 * |============================|
149 * | Item1 Data Size |
150 * |----------------------------|
152 * |----------------------------| MTLK VSAF Item1
156 * |============================|
158 * |============================|
159 * | ItemN Data Size |
160 * |----------------------------|
162 * |----------------------------| MTLK VSAF ItemN
166 * |============================|
168 typedef struct _MTLK_VS_ACTION_FRAME_PAYLOAD_HEADER
171 uint32 u32DataSize
; /* data size (not including this header) */
173 } __MTLK_PACKED MTLK_VS_ACTION_FRAME_PAYLOAD_HEADER
;
176 #define CURRENT_VSAF_FMT_VERSION 1
178 typedef struct _MTLK_VS_ACTION_FRAME_ITEM_HEADER
182 } __MTLK_PACKED MTLK_VS_ACTION_FRAME_ITEM_HEADER
;
184 #define MTLK_VSAF_ITEM_ID_SP 0x00000001 /* Sounding packet */
185 #define MTLK_VSAF_ITEM_ID_SPR 0x00000002 /* Sounding packet response */
188 * VSAF SPR Item Structure:
190 * |============================|
191 * | VSAF SPR Header |
192 * |============================|-- u32SPDataOffset
194 * | Original SP Data Payload | - Data of Header.u32SPDataSize bytes long
196 * |============================|-- u32MetricsOffset
198 * | Metrics | - Data of Header.u32MetricsSize bytes long
200 * |============================|
203 #define SPR_DATA_VERSION_1 1 //Full R_Metric and Scaling Factor data
204 #define SPR_DATA_VERSION_2 2 //Effective SNR data
206 /*******************************************************************************************
207 * MTLK RF Management common
208 *******************************************************************************************/
209 #define LBF_RFM_FIELD_MAT_SHIFT 4
211 #define RA_STATS_NULL_VALUE 0xff
213 #define MTLK_RF_MGMT_TYPE_OFF 0x00
214 #define MTLK_RF_MGMT_TYPE_MTLK_ASEL 0x01
215 #define MTLK_RF_MGMT_TYPE_MTLK_LBF 0x02
216 #define MTLK_RF_MGMT_TYPE_LBF 0x03 //Only LBF
217 #define MTLK_RF_MGMT_TYPE_QBF_LBF 0x04 //LBF & QBF
218 #define MTLK_RF_MGMT_TYPE_ONLY_QBF 0x05 //Only QBF
219 #define MTLK_RF_MGMT_TYPE_AIRGAIN_ASEL 0x06
221 #define MTLK_HW_TYPE_G2 0x00
222 #define MTLK_HW_TYPE_G3 0x01
223 #define MTLK_HW_TYPE_G35 0x02
225 /*******************************************************************************************
227 *******************************************************************************************/
228 /* The antenna set currently consists of the bit pairs:
229 * BITS 0/1 - 1st TX/RX antenna
230 * BITS 2/3 - RX only antenna
231 * BITS 4/5 - 2nd TX/RX antenna
232 * where for each antenna we can select only 2 options 01 or 10 (00 and 11 are
235 * RX only antenna is irrelevnt here, since MAC uses the specific
236 * Antenna Set we choose for the frame transmissions only. However, we
237 * set it to a valid value (10) constantly.
239 #define MTLK_ASEL_G2_AVAILABLE_ASETS { 0x19 /* 011001 */, 0x1a /* 011010 */, 0x2a /* 101010 */, 0x29 /* 101001 */ }
241 /*******************************************************************************************
243 *******************************************************************************************/
244 /* For rank1 we can specify the following values (antenna1, antenna2):
249 * Since we have only 4 bits, we compress these values in the following manner:
250 * - antenna1 value (values: 0,1) is passed thru the BIT3
251 * - antenna2 value (values: 0,3,4) is passed thru the BIT0-BIT2
252 * Thus, the table above could be translated to the following values:
258 * Also, there is a special case: default CDD value (0xF).
260 * For rank2 we use just index [0...3].
263 #define MTLK_LBF_G3_RANK1_AVAILABLE_VALUES { 0x0, 0x1, 0x2, 0x3, 0x4 }
264 #define MTLK_LBF_G3_RANK2_AVAILABLE_VALUES { 0x0, 0x1, 0x2, 0x3 }
266 #define LBFRank1Val MTLK_BFIELD_INFO(0, 4) /* 4 bits starting BIT0 in u8RFMgmtData field */
267 #define LBFRank2Val MTLK_BFIELD_INFO(4, 4) /* 4 bits starting BIT4 in u8RFMgmtData field */
269 typedef struct _MTLK_VSAF_SPR_ITEM_HDR
271 uint16 u16Version
; // Structure version - SPR_DATA_VERSION
272 uint8 u8SPIsCB
; // IsCB of received SP packet
273 uint8 u8SPMcs
; // MCS of received SP packet
274 uint8 u8Reserved
[4]; // Reserved
275 uint16 u16SPDataOffset
; // Original SP Data offset calculated from the end of header
276 uint16 u16SPDataSize
; // Original SP Data size
277 uint16 u16MetricsOffset
; // Metrics Data offset calculated from the end of header
278 uint16 u16MetricsSize
; // Metrics Data size
279 } __MTLK_PACKED MTLK_VSAF_SPR_ITEM_HDR
;
283 #define MTLK_PACK_OFF
284 #include "mtlkpack.h"
286 #endif /* !__MHI_FRAME_INCLUDED */