WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
mac_frame.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2020-2020. All rights reserved.
3 * Description: Source file defined by the corresponding frame structure and operation interface (cannot be called by
4 * the HAL module).
5 * Create: 2020-7-9
6 */
7
8#ifndef __MAC_FRAME_H__
9#define __MAC_FRAME_H__
10
11/*****************************************************************************
12 其他头文件包含
13*****************************************************************************/
14#include "wlan_types_common.h"
15#include "oal_ext_if.h"
16#include "oam_ext_if.h"
17#include "oal_netbuf.h"
18#include "oal_net.h"
19#include "mac_frame_common.h"
21
22#ifdef __cplusplus
23#if __cplusplus
24extern "C" {
25#endif
26#endif
27
28/*****************************************************************************
29 2 宏定义
30*****************************************************************************/
31#define HTC_INVALID_VALUE 0x3
32/* he mu edca param */
33#define MAC_HE_SRG_PD_MIN (-82)
34#define MAC_HE_SRG_PD_MAX (-62)
35#define MAC_HE_SRG_BSS_COLOR_BITMAP_LEN 8
36#define MAC_HE_SRG_PARTIAL_BSSID_BITMAP_LEN 8
37
38#define MAC_IEEE80211_FCTL_FTYPE 0x000c /* 帧类型掩码 */
39#define MAC_IEEE80211_FCTL_STYPE 0x00f0 /* 帧子类型掩码 */
40
41#define MAC_IEEE80211_FC0_SUBTYPE_SHIFT 4
42
43#define MAC_IEEE80211_FTYPE_MGMT 0x0000 /* 管理帧 */
44#define MAC_IEEE80211_FTYPE_CTL 0x0004 /* 控制帧 */
45#define MAC_IEEE80211_FTYPE_DATA 0x0008 /* 数据帧 */
46
47#define MAC_SUBMSDU_LENGTH_OFFSET 12 /* submsdu的长度字段的偏移值 */
48#define MAC_SUBMSDU_DA_OFFSET 0 /* submsdu的目的地址的偏移值 */
49#define MAC_SUBMSDU_SA_OFFSET 6 /* submsdu的源地址的偏移值 */
50
51#define MAC_80211_CTL_HEADER_LEN 16 /* 控制帧帧头长度 */
52#define MAC_80211_4ADDR_FRAME_LEN 30
53#define MAC_80211_QOS_FRAME_LEN 26
54#define MAC_80211_QOS_HTC_FRAME_LEN 30
55#define MAC_80211_QOS_4ADDR_FRAME_LEN 32
56#define MAC_80211_QOS_HTC_4ADDR_FRAME_LEN 36
57
58/* 信息元素长度定义 */
59#define MAC_IE_EXT_HDR_LEN 3 /* 信息元素头部 1字节EID + 1字节长度 + 1字节EXT_EID */
60#define MAC_NEIGHBOR_REPORT_IE_LEN 13 /* NEIGHBOR_REPORT长度 */
61
62#define MAC_SSID_OFFSET 12
63#define MAC_LISTEN_INT_LEN 2
64#define MAC_MIN_XRATE_LEN 1
65#define MAC_MIN_RATES_LEN 1
66#define MAC_MAX_SUPRATES 8 /* WLAN_EID_RATES最大支持8个速率 */
67#define MAC_DSPARMS_LEN 1 /* ds parameter set 长度 */
68#define MAC_DEFAULT_TIM_LEN 4
69#define MAC_MIN_RSN_LEN 12
70#define MAC_MAX_RSN_LEN 64
71#define MAC_MIN_WPA_LEN 12
72#define MAC_TIM_LEN_EXCEPT_PVB 3 /* DTIM Period、DTIM Count与BitMap Control三个字段的长度 */
73#define MAC_CONTRY_CODE_LEN 3 /* 国家码长度为3 */
74#define MAC_MIN_COUNTRY_LEN 6
75#define MAC_MAX_COUNTRY_LEN 254
76#define MAC_PWR_CONSTRAINT_LEN 1 /* 功率限制ie长度为1 */
77#define MAC_QUIET_IE_LEN 6 /* quiet信息元素长度 */
78#define MAC_TPCREP_IE_LEN 2
79#define MAC_ERP_IE_LEN 1
80#define MAC_OBSS_SCAN_IE_LEN 14
81#define MAC_MIN_XCAPS_LEN 1
82
83#define MAC_XCAPS_EX_FTM_LEN 9 /* 初始值为5,由于11ac Operating Mode Notification特性标志为bit62长度修改为8,ftm特性需要长度为9 */
84#define MAC_XCAPS_EX_LEN 8 /* 初始值为5,由于11ac Operating Mode Notification特性标志为bit62长度修改为8,ftm特性需要长度为9 */
85#define MAC_WMM_PARAM_LEN 24 /* WMM parameters ie */
86#define MAC_WMM_INFO_LEN 7 /* WMM info ie */
87#ifdef _PRE_WLAN_FEATURE_WMMAC
88#define MAC_WMMAC_INFO_LEN 61 /* WMMAC info ie */
89#define MAC_WMMAC_TSPEC_LEN 55 /* TSPEC元素长度 */
90#endif
91#define MAC_QOS_INFO_LEN 1
92
93#define MAC_BSS_LOAD_IE_LEN 5
94#define MAC_COUNTRY_REG_FIELD_LEN 3
95#define MAC_LIS_INTERVAL_IE_LEN 2 /* listen interval信息元素长度 */
96#define MAC_AID_LEN 2
97#define MAC_PWR_CAP_LEN 2
98#define MAC_AUTH_ALG_LEN 2
99#define MAC_AUTH_TRANS_SEQ_NUM_LEN 2 /* transaction seq num信息元素长度 */
100#define MAC_STATUS_CODE_LEN 2
101#define MAC_VHT_CAP_IE_LEN 12
102#define MAC_VHT_INFO_IE_LEN 5
103#define MAC_VHT_CAP_INFO_FIELD_LEN 4
104#define MAC_TIMEOUT_INTERVAL_INFO_LEN 5
105#define MAC_VHT_CAP_RX_MCS_MAP_FIELD_LEN 2 /* vht cap ie rx_mcs_map field length */
106#define MAC_VHT_CAP_RX_HIGHEST_DATA_FIELD_LEN 2 /* vht cap ie rx_highest_data field length */
107#define MAC_VHT_CAP_TX_MCS_MAP_FIELD_LEN 2 /* vht cap ie tx_mcs_map field length */
108#define MAC_VHT_OPERN_LEN 5 /* vht opern ie length */
109#define MAC_VHT_OPERN_INFO_FIELD_LEN 3 /* vht opern ie infomation field length */
110#define MAC_2040_COEX_LEN 1 /* 20/40 BSS Coexistence element */
111#define MAC_2040_INTOLCHREPORT_LEN_MIN 1 /* 20/40 BSS Intolerant Channel Report element */
112#define MAC_CHANSWITCHANN_LEN 3 /* Channel Switch Announcement element */
113#define MAC_SA_QUERY_LEN 4 /* SA Query element len */
114#define MAC_RSN_VERSION_LEN 2 /* wpa/RSN version len */
115#define MAC_RSN_CIPHER_COUNT_LEN 2 /* RSN IE Cipher count len */
116#define MAC_11N_TXBF_CAP_OFFSET 23
117#define MAC_HT_NOTIFY_CHANNEL_WIDTH_LEN 3
118#define MAC_RRM_ENABLE_CAP_IE_LEN 5
119#define MAC_WFA_TPC_RPT_LEN 7
120#define MAC_CHANSWITCHANN_IE_LEN 3
121#define MAC_EXT_CHANSWITCHANN_IE_LEN 4
122#define MAC_SEC_CH_OFFSET_IE_LEN 1
123#define MAC_WIDE_BW_CH_SWITCH_IE_LEN 3
124#define MAC_FTMP_LEN 9
125#define MAC_MEASUREMENT_REQUEST_IE_OFFSET 5
126#define MAC_RM_MEASUREMENT_REQUEST_IE_OFFSET 5
127#define MAC_ACTION_CATEGORY_AND_CODE_LEN 2
128
129#ifdef _PRE_WLAN_FEATURE_OPMODE_NOTIFY
130#define MAC_OPMODE_NOTIFY_LEN 1 /* Operating Mode Notification element len */
131#endif
132#define MAC_MOBILITY_DOMAIN_LEN 5
133
134#define MAC_P2P_ATTRIBUTE_HDR_LEN 3 /* P2P_ATTRIBUTE信息元素头部 1字节ATTRIBUTE + 2字节长度 */
135#define MAC_P2P_LISTEN_CHN_ATTR_LEN 5 /* LISTEN CHANNEL ATTRIBUTE长度 */
136#define MAC_P2P_MIN_IE_LEN 4 /* P2P IE的最小长度 */
137
138#define MAC_MIN_WPS_IE_LEN 5
139#define MAC_WPS_ATTRIBUTE_HDR_LEN 4 /* WPS_ATTRIBUTE信息元素头部 2字节ATTRIBUTE TYPE + 2字节长度 */
140#define MAC_WPS_ATTRIBUTE_REQUEST_TYPE 0x103a /* ATTRIBUTE_REQUEST_TYPE 0x103a */
141#define WPS_IE_HDR_LEN 6
142#define MAC_WPS_REQUEST_TYPE_ATTR_LEN 1 /* ATTRIBUTE_REQUEST_TYPE长度 */
143
144/* Quiet 信息 */
145#define MAC_QUIET_PERIOD 0
146#define MAC_QUIET_COUNT MAC_QUIET_PERIOD
147#define MAC_QUIET_DURATION 0x0000
148#define MAC_QUIET_OFFSET 0x0000
149
150/* RSN信息元素相关定义 */
151#define MAC_RSN_IE_VERSION 1
152#define MAC_RSN_CAP_LEN 2
153#define MAC_PMKID_LEN 16
154
155/* WPA 信息元素相关定义 */
156#define MAC_WPA_IE_VERSION 1
157#define WLAN_AKM_SUITE_WAPI_CERT 0x000FAC12
158
159/* OUI相关定义 */
160#define MAC_OUI_LEN 3
161#define MAC_OUITYPE_LEN 1
162
163#define MAC_OUITYPE_WPA 1
164#define MAC_OUITYPE_WMM 2
165#define MAC_OUITYPE_WPS 4
166#define MAC_OUITYPE_WFA 8
167#define MAC_OUITYPE_P2P 9
168
169#define MAC_WMM_OUI_BYTE_ONE 0x00
170#define MAC_WMM_OUI_BYTE_TWO 0x50
171#define MAC_WMM_OUI_BYTE_THREE 0xF2
172#define MAC_WMM_UAPSD_ALL (BIT0 | BIT1 | BIT2 | BIT3)
173#define MAC_OUISUBTYPE_WFA 0x00
174#define MAC_OUISUBTYPE_WMM_INFO 0
175#define MAC_OUISUBTYPE_WMM_PARAM 1
176#define MAC_OUISUBTYPE_WMM_PARAM_OFFSET 6 /* wmm 字段中EDCA_INFO位置,表示是否携带EDCA参数 偏移6 */
177#define MAC_WMM_QOS_INFO_POS 8 /* wmm 字段中qos info位置,偏移8 */
178#define MAC_OUI_WMM_VERSION 1
179#ifdef _PRE_WLAN_FEATURE_WMMAC
180#define MAC_OUISUBTYPE_WMMAC_TSPEC 2 /* WMMAC TSPEC OUI subtype */
181#endif
182#define MAC_HT_CAP_LEN 26 /* HT能力信息长度为26 */
183#define MAC_HT_CAPINFO_LEN 2 /* HT Capabilities Info域长度为2 */
184#define MAC_HT_AMPDU_PARAMS_LEN 1 /* A-MPDU parameters域长度为1 */
185#define MAC_HT_SUP_MCS_SET_LEN 16 /* Supported MCS Set域长度为16 */
186#define MAC_HT_EXT_CAP_LEN 2 /* Extended cap.域长度为2 */
187#define MAC_HT_EXT_CAP_OPMODE_LEN 8 /* 宣称支持OPMODE的字段是extended cap的第8个字节 */
188#define MAC_HT_TXBF_CAP_LEN 4 /* Transmit Beamforming Cap.域长度为4 */
189#define MAC_HT_ASEL_LEN 1 /* ASEL Cap.域长度为1 */
190#define MAC_HT_OPERN_LEN 22 /* HT Operation信息长度为22 */
191#define MAC_HT_BASIC_MCS_SET_LEN 16 /* HT info中的basic mcs set信息的长度 */
192#define MAC_HT_CTL_LEN 4 /* HT CONTROL字段的长度 */
193#define MAC_QOS_CTL_LEN 2 /* QOS CONTROL字段的长度 */
194
195#define MAC_HE_MAC_CAP_LEN 6
196#define MAC_HE_PHY_CAP_LEN 11
197#define MAC_HE_OPE_PARAM_LEN 3
198#define MAC_HE_OPE_BASIC_MCS_NSS_LEN 2
199#define MAC_HE_VHT_OPERATION_INFO_LEN 3
200#define MAC_HE_MU_EDCA_PARAMETER_SET_LEN 14
201#define MAC_HE_MCS_NSS_MIN_LEN 2
202#define MAC_HE_CAP_MIN_LEN 20
203#define MAC_HE_OPERAION_MIN_LEN 7
204#define MAC_HE_OPERAION_WITH_VHT_LEN 10
205/* EID Extertion(1) + Resource Request Buffer Threshold Exponent(1) = 2 */
206#define MAC_HE_NFR_PARAM_PAYLOAD_LEN 2
207/* EID(1) + Length(1) + EID Extertion(1) = 3 */
208#define MAC_HE_NFR_PARAM_HEADER_LEN 3
209/* NFR Parameter 默认值256 = 2^8 */
210#define MAC_HE_NFR_PARAM_DEFAULT_VAL 8
211#define MAC_HE_BSS_COLOR_CHANGE_ANNOUNCEMENT_LEN 3
212
213#define MAC_TAG_PARAM_OFFSET (MAC_80211_FRAME_LEN + MAC_TIME_STAMP_LEN + MAC_BEACON_INTERVAL_LEN + MAC_CAP_INFO_LEN)
214
215#define MAC_DEVICE_BEACON_OFFSET (MAC_TIME_STAMP_LEN + MAC_BEACON_INTERVAL_LEN + MAC_CAP_INFO_LEN)
216
217#define MAC_MAX_BSS_INFO_TRANS 5
218
219/* EDCA参数相关的宏 */
220#define MAC_WMM_QOS_PARAM_AIFSN_MASK 0x0F
221#define MAC_WMM_QOS_PARAM_ACI_BIT_OFFSET 5
222#define MAC_WMM_QOS_PARAM_ACI_MASK 0x03
223#define MAC_WMM_QOS_PARAM_ECWMIN_MASK 0x0F
224#define MAC_WMM_QOS_PARAM_ECWMAX_MASK 0xF0
225#define MAC_WMM_QOS_PARAM_ECWMAX_BIT_OFFSET 4
226#define MAC_WMM_QOS_PARAM_TXOPLIMIT_MASK 0x00FF
227#define MAC_WMM_QOS_PARAM_BIT_NUMS_OF_ONE_BYTE 8
228#define MAC_WMM_QOS_PARAM_TXOPLIMIT_SAVE_TO_TRANS_TIMES 5
229
230/* 关闭WMM后,所有帧进入此宏定义的队列 */
231#define MAC_WMM_SWITCH_TID 6
232
233/* chartiot信令包通过tcp端口号无法正确识别,chariot软件重启则端口号改变.识别逻辑无效 */
234#define MAC_CHARIOT_NETIF_PORT 10115
235#define MAC_WFD_RTSP_PORT 7236
236
237/* Wavetest仪器识别 */
238#define mac_is_wavetest_sta(bssid) \
239 ((0x0 == ((bssid)[0])) && ((0x1 == ((bssid)[1])) || (0x2 == ((bssid)[1]))) && (0x1 == ((bssid)[2])))
240/* 申请多个OUI */
241#define MAC_WLAN_OUI_PUBLIC 0x00E0fC
242#define MAC_WLAN_OUI_TYPE_CASCADE 0xA0
243#define MAC_WLAN_OUI_TYPE_4ADDR 0x40 /* 4地址IE的OUI TYPE字段 */
244#ifdef _PRE_OS_VERSION_LITEOS /* HMAC和DMAC OS定义风格不一致 */
245#if (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION)
246#define MAC_WLAN_OUI_RSN0 0x00 /* RSNA OUI 定义 0x000FAC */
247#define MAC_WLAN_OUI_RSN1 0x0F
248#define MAC_WLAN_OUI_RSN2 0xAC
249#define MAC_WLAN_OUI_MICRO0 0x00 /* WPA/WMM OUI 定义 0x0050F2 */
250#define MAC_WLAN_OUI_MICRO1 0x50
251#define MAC_WLAN_OUI_MICRO2 0xF2
252#define MAC_WLAN_OUI_P2P0 0x50 /* P2P OUI 定义 0x506F9A */
253#define MAC_WLAN_OUI_P2P1 0x6F
254#define MAC_WLAN_OUI_P2P2 0x9A
255#define MAC_OUITYPE_ANY 0xFD
256#define MAC_ACTION_OUI_POS 1
257#define MAC_ACTION_VENDOR_TYPE_POS 4
258#define MAC_ACTION_VENDOR_SUBTYPE_POS 5
259#define MAC_ACTION_VENDOR_SPECIFIC_IE_POS 6
260#endif
261#endif
262#define MAC_EXT_VENDER_IE 0xAC853D /* 打桩HW IE */
263
264#define MAC_MBO_VENDOR_IE 0x506F9A /* WFA specific OUI */
265#define MAC_MBO_IE_OUI_TYPE 0x16 /* Identifying the type and version of the MBO-OCE IE */
266#define MAC_MBO_ATTRIBUTE_HDR_LEN 2 /* Attribute ID + Attribute Length */
267#define MBO_IE_HEADER 6 /* type + length + oui + oui type */
268#define MAC_MBO_OUI_LENGTH 3
269#define MAC_MBO_ASSOC_DIS_ATTR_LEN 3
270
271#define MAC_OSAL_1024QAM_IE 0xbd /* 1024QAM IE */
272
273#define MAC_IPV6_UDP_SRC_PORT 546
274#define MAC_IPV6_UDP_DES_PORT 547
275
276/* Type4Bytes len4Bytes mac16Bytes mac26Bytes timestamp23Bytes RSSIInfo8Bytes SNR2Bytes */
277#define MAC_REPORT_RSSIINFO_LEN 8
278#define MAC_REPORT_SNR_LEN 2
279#define MAC_REPORT_RSSIINFO_SNR_LEN 10
280#define MAC_CSI_LOCATION_INFO_LEN 57
281#define MAC_FTM_LOCATION_INFO_LEN 52
282#define MAC_CSI_REPORT_HEADER_LEN 53
283#define MAC_FTM_REPORT_HEADER_LEN 51
284#define MAC_CSI_MAX_REPORT_LEN 1400
285
286/* ARP types, 1: ARP request, 2:ARP response, 3:RARP request, 4:RARP response */
287#define MAC_ARP_REQUEST 0x0001
288#define MAC_ARP_RESPONSE 0x0002
289#define MAC_RARP_REQUEST 0x0003
290#define MAC_RARP_RESPONSE 0x0004
291
292/* Neighbor Discovery */
293#define MAC_ND_RSOL 133 /* Router Solicitation */
294#define MAC_ND_RADVT 134 /* Router Advertisement */
295#define MAC_ND_NSOL 135 /* Neighbor Solicitation */
296#define MAC_ND_NADVT 136 /* Neighbor Advertisement */
297#define MAC_ND_RMES 137 /* Redirect Message */
298
299/* DHCPV6 Message type */
300#define MAC_DHCPV6_SOLICIT 1
301#define MAC_DHCPV6_ADVERTISE 2
302#define MAC_DHCPV6_REQUEST 3
303#define MAC_DHCPV6_CONFIRM 4
304#define MAC_DHCPV6_RENEW 5
305#define MAC_DHCPV6_REBIND 6
306#define MAC_DHCPV6_REPLY 7
307#define MAC_DHCPV6_RELEASE 8
308#define MAC_DHCPV6_DECLINE 9
309#define MAC_DHCPV6_RECONFIGURE 10
310#define MAC_DHCPV6_INFORM_REQ 11
311#define MAC_DHCPV6_RELAY_FORW 12
312#define MAC_DHCPV6_RELAY_REPLY 13
313#define MAC_DHCPV6_LEASEQUERY 14
314#define MAC_DHCPV6_LQ_REPLY 15
315
316#define mac_is_golden_ap(bssid) ((0x0 == (bssid)[0]) && (0x13 == (bssid)[1]) && (0xE9 == (bssid)[2]))
317#define mac_is_belkin_ap(bssid) ((0x14 == (bssid)[0]) && (0x91 == (bssid)[1]) && (0x82 == (bssid)[2]))
318#define mac_is_netgear_wndr_ap(bssid) \
319 ((0x08 == (bssid)[0]) && (0xbd == (bssid)[1]) && (0x43 == (bssid)[2]))
320#define mac_is_trendnet_ap(bssid) \
321 ((0xd8 == (bssid)[0]) && (0xeb == (bssid)[1]) && (0x97 == (bssid)[2]))
322#define mac_is_dlink_ap(bssid) \
323 ((0xcc == (bssid)[0]) && (0xb2 == (bssid)[1]) && (0x55 == (bssid)[2]))
324#define mac_is_haier_ap(bssid) \
325 ((0x08 == (bssid)[0]) && (0x10 == (bssid)[1]) && (0x79 == (bssid)[2]))
326#define MAC_WLAN_CHIP_OUI_ATHEROSC 0x00037f
327#define MAC_WLAN_CHIP_OUI_TYPE_ATHEROSC 0x1
328#define MAC_WLAN_CHIP_OUI_RALINK 0x000c43
329#define MAC_WLAN_CHIP_OUI_TYPE_RALINK 0x3
330#define MAC_WLAN_CHIP_OUI_TYPE_RALINK1 0x7
331
332/* p2p相关 */
333/* GO negotiation */
334#define P2P_PAF_GON_REQ 0
335#define P2P_PAF_GON_RSP 1
336#define P2P_PAF_GON_CONF 2
337/* Provision discovery */
338#define P2P_PAF_PD_REQ 7
339/* P2P IE */
340#define P2P_OUI_LEN 4
341#define P2P_IE_HDR_LEN 6
342#define P2P_ELEMENT_ID_SIZE 1
343#define P2P_ATTR_ID_SIZE 1
344#define P2P_ATTR_HDR_LEN 3
345#define WFA_OUI_BYTE1 0x50
346#define WFA_OUI_BYTE2 0x6F
347#define WFA_OUI_BYTE3 0x9A
348#define WFA_P2P_V1_0 0x09
349
350#define MAC_VHT_CHANGE (BIT1)
351#define MAC_HT_CHANGE (BIT2)
352#define MAC_BW_CHANGE (BIT3)
353#define MAC_HE_CHANGE (BIT4)
354#define MAC_HE_BSS_COLOR_CHANGE (BIT7)
355#define MAC_HE_PARTIAL_BSS_COLOR_CHANGE (BIT8)
356#define MAC_HE_BSS_COLOR_DISALLOW (BIT9)
357#define MAC_BW_DIFF_AP_USER (BIT5)
358#define MAC_BW_OPMODE_CHANGE (BIT6)
359#define MAC_RTS_TXOP_THRED_CHANGE (BIT10)
360#define MAC_NO_CHANGE (0)
361
362#define MAC_FRAME_REQ_TYPE 1
363#define MAC_TSC_REQ_BIN0_RANGE 10
364#define MAC_TSC_TID_MASK(_tid) (((_tid)<<4)&0xF)
365#define MAC_RADIO_MEAS_START_TIME_LEN 8
366
367#ifdef _PRE_WLAN_FEATURE_MULTI_NETBUF_AMSDU
368#define MAC_AMSDU_SKB_LEN_DOWN_LIMIT 1000 /* 超过此长度帧可以AMSDU聚合 */
369#define MAC_AMSDU_SKB_LEN_UP_LIMIT 1544
370
371#endif
372
373#ifdef _PRE_WLAN_FEATURE_WUR_TX
374#define MAC_WUR_CAP_SUPPORT_BANDS_LEN 1
375#define MAC_WUR_CAP_INFORMATION_LEN 2
376#define MAC_WUR_OPER_PARAM_LEN 10
377#endif
378
379#define MAC_PRIV_HIEX_IE 0x81
380#define MAC_PRIV_CAP_IE 0x20
381
382/*****************************************************************************
383 3 枚举定义
384*****************************************************************************/
385/* HMAC模块接收流程处理MSDU状态 */
395
396/* HT Category下的Action值的枚举 */
410/* Timeout_Interval ie中的类型枚举 */
419
420/* SA QUERY Category下的Action值的枚举 */
434
435/* Protected HE Category下的Action值的枚举 */
443
444/* WNM Category下的Action值的枚举 */
478
479/* 校准模式的枚举 */
487
488/* Spectrum Management Category下的Action枚举值 */
489typedef enum {
490 MAC_SPEC_CH_SWITCH_ANNOUNCE = 4 /* Channel Switch Announcement */
493
494#ifdef _PRE_WLAN_FEATURE_WMMAC
495/* TS建立的状态枚举 */
496typedef enum {
497 MAC_TS_NONE = 0, /* TS不需要建立 */
498 MAC_TS_INIT, /* TS需要建立,未建立 */
499 MAC_TS_INPROGRESS, /* TS建立过程中 */
500 MAC_TS_SUCCESS, /* TS建立成功 */
501
502 MAC_TS_BUTT
503} mac_ts_conn_status_enum;
504typedef osal_u8 mac_ts_conn_status_enum_uint8;
505#endif
506
507/* Capability Information field bit assignments */
508typedef enum {
509 MAC_CAP_ESS = 0x01, /* ESS capability */
510 MAC_CAP_IBSS = 0x02, /* IBSS mode */
511 MAC_CAP_POLLABLE = 0x04, /* CF Pollable */
512 MAC_CAP_POLL_REQ = 0x08, /* Request to be polled */
513 MAC_CAP_PRIVACY = 0x10, /* WEP encryption supported */
514 MAC_CAP_SHORT_PREAMBLE = 0x20, /* Short Preamble is supported */
515 MAC_CAP_SHORT_SLOT = 0x400, /* Short Slot is supported */
516 MAC_CAP_PBCC = 0x40, /* PBCC */
517 MAC_CAP_CHANNEL_AGILITY = 0x80, /* Channel Agility */
518 MAC_CAP_SPECTRUM_MGMT = 0x100, /* Spectrum Management */
519 MAC_CAP_RADIO_MEAS = 0x1000, /* Radio Measurement */
520 MAC_CAP_DSSS_OFDM = 0x2000 /* DSSS-OFDM */
523
528
536
537typedef enum {
538 MAC_SMPS_STATIC_MODE = 0, /* 静态SMPS */
539 MAC_SMPS_DYNAMIC_MODE = 1, /* 动态SMPS */
540 MAC_SMPS_MIMO_MODE = 3, /* disable SMPS */
541
545
546typedef enum {
547 MAC_SCN = 0, /* 不存在次信道 */
548 MAC_SCA = 1, /* 次信道在主信道之上(Secondary Channel Above) */
549 MAC_SCB = 3, /* 次信道在主信道之下(Secondary Channel Below) */
550
554
555/* P2P相关 */
577
587
597
604
619
620/* Radio Measurement下的Action枚举值 */
630
642
643#define MAC_WLAN_OUI_WFA 0x506f9a
644#define MAC_WLAN_OUI_TYPE_WFA_P2P 9
645#define MAC_WLAN_OUI_MICROSOFT 0x0050f2
646#define MAC_WLAN_OUI_TYPE_MICROSOFT_WPA 1
647#define MAC_WLAN_OUI_TYPE_MICROSOFT_WMM 2
648#define MAC_WLAN_OUI_TYPE_MICROSOFT_WPS 4
649
650#define MAC_WLAN_OUI_VENDOR_VHT_HEADER 5
651#define MAC_WLAN_OUI_BROADCOM_EPIGRAM 0x00904c /* Broadcom (Epigram) */
652#define MAC_WLAN_OUI_VENDOR_VHT_TYPE 0x04
653#define MAC_WLAN_OUI_VENDOR_VHT_SUBTYPE 0x08
654#define MAC_WLAN_OUI_VENDOR_VHT_SUBTYPE2 0x00
655#define MAC_WLAN_OUI_VENDOR_VHT_SUBTYPE3 0x07
656
657#define MAC_WLAN_OUI_VENDOR_HT_CAPAB_OUI_TYPE 0x33 /* 00-90-4c:0x33 */
658
659/* eapol key 结构宏定义 */
660
661/*****************************************************************************
662 全局变量声明
663*****************************************************************************/
664/* WMM OUI定义 */
665extern const osal_u8 g_wmm_oui_etc[MAC_OUI_LEN];
666
667/* P2P OUI 定义 */
668extern const osal_u8 g_p2p_oui_etc[MAC_OUI_LEN];
669
670/* 窄带 OUI 定义 */
672
673/*****************************************************************************
674 STRUCT定义
675*****************************************************************************/
676/* 此文件中结构体与协议一致,要求1字节对齐,统一加OAL_DECLARE_PACKED */
677#pragma pack(push, 1)
678/* 四地址帧结构体 */
691
692/* qos四地址帧结构 */
717
718/* qos htc 四地址帧结构 */
724
725/* Ref. 802.11-2012.pdf, 8.4.1.4 Capability information field, 中文注释参考白皮书 */
727 osal_u16 ess : 1, /* 由BSS中的AP设置为1 */
728 ibss : 1, /* 由一个IBSS中的站点设置为1,ap总是设置其为0 */
729 cf_pollable : 1, /* 标识CF-POLL能力 */
730 cf_poll_request : 1, /* 标识CF-POLL能力 */
731 privacy : 1, /* 1=需要加密, 0=不需要加密 */
732 short_preamble : 1, /* 802.11b短前导码 */
733 pbcc : 1, /* 802.11g */
734 channel_agility : 1, /* 802.11b */
735 spectrum_mgmt : 1, /* 频谱管理: 0=不支持, 1=支持 */
736 qos : 1, /* QOS: 0=非QOS站点, 1=QOS站点 */
737 short_slot_time : 1, /* 短时隙: 0=不支持, 1=支持 */
738 apsd : 1, /* 自动节能: 0=不支持, 1=支持 */
739 radio_measurement : 1, /* Radio检测: 0=不支持, 1=支持 */
740 dsss_ofdm : 1, /* 802.11g */
741 delayed_block_ack : 1, /* 延迟块确认: 0=不支持, 1=支持 */
742 immediate_block_ack : 1; /* 立即块确认: 0=不支持, 1=支持 */
743};
745
746/* Ref. 802.11-2012.pdf, 8.4.2.58.2 HT Capabilities Info field */
748 osal_u16 ldpc_coding_cap : 1, /* LDPC 编码 capability */
749 supported_channel_width : 1, /* STA 支持的带宽 */
750 sm_power_save : 2, /* SM 省电模式 */
751 ht_green_field : 1, /* 绿野模式 */
752 short_gi_20mhz : 1, /* 20M下短保护间隔 */
753 short_gi_40mhz : 1, /* 40M下短保护间隔 */
754 tx_stbc : 1, /* Indicates support for the transmission of PPDUs using STBC */
755 rx_stbc : 2, /* 支持 Rx STBC */
756 ht_delayed_block_ack : 1, /* Indicates support for HT-delayed Block Ack opera-tion. */
757 max_amsdu_length : 1, /* Indicates maximum A-MSDU length. */
758 dsss_cck_mode_40mhz : 1, /* 40M下 DSSS/CCK 模式 */
760 forty_mhz_intolerant : 1, /* 接收此信息的AP是否需要禁止40MHz传输 */
761 lsig_txop_protection : 1; /* 支持 L-SIG TXOP 保护 */
762};
764#pragma pack(pop)
765
789
790#pragma pack(push, 1)
791#ifdef _PRE_WLAN_FEATURE_11AX
792struct mac_frame_he_trig {
793 /* byte 0 */
794 osal_u16 trig_type : 4;
795 osal_u16 ppdu_len : 12;
796
797 osal_u32 cascade : 1; /* 当前skb是否为amsdu的首个skb */
798 osal_u32 cs_required : 1;
799 osal_u32 bandwith : 2;
800 osal_u32 ltf_gi : 2;
801 osal_u32 mu_mimo_ltf_mode : 1;
802 osal_u32 num_of_ltfs : 3;
803 osal_u32 stbc : 1;
804 osal_u32 ldpc_extra_symbol : 1;
805 osal_u32 ap_tx_pwr : 6;
806 osal_u32 pe_fec_pading : 2;
807 osal_u32 pe_disambiguity : 1;
808
809 osal_u32 spatial_reuse : 16;
810 osal_u32 dopler : 1;
811 osal_u32 he_siga : 9;
812 osal_u32 bit_resv : 1;
813};
814typedef struct mac_frame_he_trig mac_frame_he_trig_stru;
815
816struct mac_frame_trig_depend_user_info {
817 osal_u8 mu_spacing_factor : 2;
818 osal_u8 multi_tid_aggr_limit : 3;
819 osal_u8 bit_resv : 1;
820 osal_u8 perfer_ac : 2;
821};
822typedef struct mac_frame_trig_depend_user_info mac_frame_trig_depend_user_info_stru;
823
824struct mac_frame_he_trig_user_info {
825 /* byte 0 */
826 osal_u32 user_aid : 12;
827 osal_u32 ru_location : 8;
828 osal_u32 coding_type : 1;
829 osal_u32 mcs : 4;
830 osal_u32 dcm : 1;
831 osal_u32 starting_spatial_stream : 3;
832 osal_u32 nss : 3;
833
834 osal_u8 target_rssi : 7;
835 osal_u8 bit_resv : 1;
836
837 mac_frame_trig_depend_user_info_stru user_info;
838};
839typedef struct mac_frame_he_trig_user_info mac_frame_he_trig_user_info_stru;
840#endif /* #ifdef _PRE_WLAN_FEATURE_11AX */
841
852
853#ifdef _PRE_WLAN_FEATURE_11AX
854/* HE CAP:PPE Thresholds */
855struct mac_frame_ppe_thresholds_pre_field {
856 osal_u16 nss : 3,
857 ru_index0_mask : 1,
858 ru_index1_mask : 1,
859 ru_index2_mask : 1,
860 ru_index3_mask : 1,
861 ppet16_nss1_ru0 : 3,
862 ppet8_nss1_ru0 : 3,
863 ppet16_nss1_ru1 : 3;
864
865 osal_u32 ppet8_nss1_ru1 : 3,
866 ppet16_nss1_ru2 : 3,
867 ppet8_nss1_ru2 : 3,
868 ppet16_nss2_ru0 : 3,
869 ppet8_nss2_ru0 : 3,
870 ppet16_nss2_ru1 : 3,
871 ppet8_nss2_ru1 : 3,
872 ppet16_nss2_ru2 : 3,
873 ppet8_nss2_ru2 : 3,
874 bit_rsv : 5;
875};
876typedef struct mac_frame_ppe_thresholds_pre_field mac_frame_ppe_thresholds_pre_field_stru;
877
878struct mac_frame_he_mcs_nss {
879 osal_u8 mcs : 4,
880 nss : 3,
881 last_mcs_nss : 1;
882};
883typedef struct mac_frame_he_mcs_nss mac_frame_he_mcs_nss_stru;
884
885/* he mu edca param */
886struct mac_frame_he_mu_qos_info {
887 osal_u8 edca_update_count : 4,
888 q_ack : 1,
889 queue_request : 1,
890 txop_request : 1,
891 more_data_ack : 1;
892};
893typedef struct mac_frame_he_mu_qos_info mac_frame_he_mu_qos_info_stru;
894
895struct mac_frame_he_mu_ac_parameter {
896 osal_u8 aifsn : 4,
897 acm : 1,
898 ac_index : 2,
899 reserv : 1;
900 osal_u8 ecw_min : 4,
901 ecw_max : 4;
902 osal_u8 mu_edca_timer; /* 单位 8TU */
903};
904typedef struct mac_frame_he_mu_ac_parameter mac_frame_he_mu_ac_parameter_stru;
905
906struct mac_frame_he_mu_edca_parameter_ie {
907 mac_frame_he_mu_qos_info_stru qos_info;
908 mac_frame_he_mu_ac_parameter_stru mu_ac_parameter[WLAN_WME_AC_BUTT];
909};
910typedef struct mac_frame_he_mu_edca_parameter_ie mac_frame_he_mu_edca_parameter_ie_stru;
911#endif /* #ifdef _PRE_WLAN_FEATURE_11AX */
912
922
932
939
940#ifdef _PRE_WLAN_FEATURE_11AX
941/* OCW Range字段一定存在 字节数为1 */
942struct mac_frame_ocw_range {
943 osal_u8 eocw_min : 3,
944 eocw_max : 3,
945 reserved : 2;
946};
947typedef struct mac_frame_ocw_range mac_frame_ocw_range_stru;
948
949/* UORA Parameter Set element: 固定长度部分 */
950struct mac_frame_uora_parameter_set_ie {
951 mac_frame_ocw_range_stru ocw_range;
952};
953typedef struct mac_frame_uora_parameter_set_ie mac_frame_uora_parameter_set_ie_stru;
954
955/* Ess Information字段一定存在 字节数为1 */
956struct mac_frame_he_ess_report {
957 osal_u8 planned_ess : 1,
958 edge_of_ess : 1,
959 recommended_bss_transition_rssi_threshold_within_ess : 6;
960};
961typedef struct mac_frame_he_ess_report mac_frame_he_ess_report_stru;
962
963/* ESS Report Element: 固定长度部分 */
964struct mac_ess_report_ie {
965 mac_frame_he_ess_report_stru ess_information;
966};
967typedef struct mac_ess_report_ie mac_ess_report_ie_stru;
968
969/* NDP Feedback Report Parameter Set Element: 固定长度部分 */
970struct mac_ndp_feedback_report_parameter_set_ie {
971 osal_u8 resource_request_buffer_threshold_exponent;
972};
973typedef struct mac_ndp_feedback_report_parameter_set_ie mac_ndp_feedback_report_parameter_set_ie_stru;
974
975/* HE BSS Load Element: 固定长度部分 */
976struct mac_he_bss_load_ie {
977 osal_u16 he_sta_count;
978 osal_u8 utilization;
979 osal_u8 frequency_underutilization;
980 osal_u8 spatial_stream_underutilization;
981};
982typedef struct mac_he_bss_load_ie mac_he_bss_load_ie_stru;
983
984/* Capabilities Information字段一定存在 字节数为2 */
985struct mac_frame_capabilities_information {
986 osal_u8 minimum_mpdu_start_spacing : 3,
987 maximum_a_mpdu_length_exponent : 3,
988 maximum_mpdu_length : 2;
989 osal_u8 reserved_1 : 1,
990 sm_power_save : 2,
991 rd_responder : 1,
992 rx_antenna_pattern_consistency : 1,
993 tx_antenna_pattern_consistency : 1,
994 reserved_2 : 2;
995};
996typedef struct mac_frame_capabilities_information mac_frame_capabilities_information_stru;
997
998/* HE 6GHz Band Capabilities Element: 固定长度部分 */
999struct mac_he_6ghz_band_capabilities_ie {
1000 mac_frame_capabilities_information_stru capabilities_information;
1001};
1002typedef struct mac_he_6ghz_band_capabilities_ie mac_he_6ghz_band_capabilities_ie_stru;
1003
1004/* Multiple BSSID Configuration element 固定长度部分 */
1005struct mac_frame_multiple_bssid_configuration {
1006 osal_u8 bssid_count;
1007 osal_u8 profile_periodicity;
1008};
1009typedef struct mac_frame_multiple_bssid_configuration mac_frame_multiple_bssid_configuration_stru;
1010#endif /* end _PRE_WLAN_FEATURE_11AX */
1011
1013 osal_u8 txbf_11n : 1, /* 11n txbf 能力 */
1016};
1018
1027
1028/* 厂家自定义IE 数据结构,摘自linux 内核 */
1036
1050
1051typedef struct mac_priv_cap {
1052 osal_u32 bit_11ax_support : 1; // 是否支持11AX,此bit位的位置不能改变
1053 osal_u32 bit_dcm_support : 1; // 是否支持dcm,此bit位的位置不能改变
1054 osal_u32 bit_p2p_csa_support : 1; // 是否支持p2p_csa,此bit位的位置不能改变
1055 osal_u32 bit_p2p_scenes : 1; // 是否支持p2p_scenes,此bit位的位置不能改变
1056 osal_u32 bit_1024qam_cap : 1; // 是否支持1024QAM
1057 osal_u32 bit_4096qam_cap : 1; // 是否支持4096QAM
1058 osal_u32 bit_sgi_400ns_cap : 1; // 是否支持SGI_400NS
1059 osal_u32 bit_vht_3nss_80m_mcs6 : 1; // 是否支持VHT_3NSS_80M_MCS6
1060 osal_u32 bit_he_ltf : 1; // 是否支持HE LTF
1061 osal_u32 bit_sub_wf_cap : 1; // 是否支持子带注水
1062 osal_u32 bit_vht_3nss_160m_mcs9 : 1; // 是否支持VHT_3NSS_160M_MCS9
1063 osal_u32 bit_ersru_he_ltf_num : 4; // 动态窄带2.0,STA响应TB帧发送HE LTF最大个数
1064 osal_u32 bit_11b_plus_cap : 3; // 是否支持11b+速率
1067
1073
1079
1080/* 建立BA会话时,BA参数域结构定义 */
1082 osal_u16 amsdusupported : 1, /* B0 amsdu supported */
1083 bapolicy : 1, /* B1 block ack policy */
1084 tid : 4, /* B2-5 TID */
1085 buffersize : 10; /* B6-15 buffer size */
1086};
1088
1089/* BA会话过程中的序列号参数域定义 */
1091 osal_u16 fragnum : 4, /* B0-3 fragment number */
1092 startseqnum : 12; /* B4-15 starting sequence number */
1093};
1095
1096/* Quiet信息元素结构体 */
1104
1105/* erp 信息元素结构体 */
1113
1114/* rsn信息元素 rsn能力字段结构体 */
1131
1132/* obss扫描ie obss扫描参数结构体 */
1143
1144#ifdef _PRE_WLAN_FEATURE_WUR_TX
1145struct mac_wur_param_control_field {
1146 osal_u8 wur_duty_cycle_start_time_present : 1,
1147 wur_group_id_list_present : 1,
1148 proposed_wur_param_present : 1,
1149 rsvd : 5;
1150};
1151typedef struct mac_wur_param_control_field mac_wur_param_control_field_stru;
1152
1153struct mac_wur_param_ap_field {
1154 osal_u16 wur_id : 12, wur_channel_offset : 3, rsvd : 1;
1155 osal_u64 wur_duty_cycle_start_time;
1156 /* WUR Group ID List */
1157};
1158typedef struct mac_wur_param_ap_field mac_wur_param_ap_field_stru;
1159
1160struct mac_proposed_wur_param_field {
1161 osal_u8 recommend_wur_wakeup_frame_rate : 2,
1162 recommend_wur_channel_offset : 3,
1163 requested_keep_alive_wur_farme : 1,
1164 rsvd : 2;
1165};
1166typedef struct mac_proposed_wur_param_field mac_proposed_wur_param_field_stru;
1167
1168struct mac_wur_param_sta_field {
1169 osal_u32 wur_duty_cycle_serive_period;
1170 osal_u16 duty_cycle_period;
1171 mac_proposed_wur_param_field_stru proposed_wur_param_field;
1172};
1173typedef struct mac_wur_param_sta_field mac_wur_param_sta_field_stru;
1174
1175/* 新增结构体,用以表示WUR Mode Element */
1176struct mac_wur_mode_ie {
1177 osal_u8 element_id;
1178 osal_u8 len;
1179 osal_u8 element_id_ext;
1180 osal_u8 action_type;
1181 osal_u8 wur_mode_rsp_status;
1182 mac_wur_param_control_field_stru wur_param_control_field;
1183};
1184typedef struct mac_wur_mode_ie mac_wur_mode_ie_stru;
1185
1186/* WUR Mode Setup帧信息 */
1187struct mac_wur_mode_setup_frame {
1188 osal_u8 category;
1189 osal_u8 wur_action;
1190 osal_u8 dialog_token;
1191 mac_wur_mode_ie_stru wur_mode_element;
1192};
1193typedef struct mac_wur_mode_setup_frame mac_wur_mode_setup_frame_stru;
1194
1195/* WUR Mode Teardown帧信息 */
1196struct mac_wur_mode_teardown_frame {
1197 osal_u8 category;
1198 osal_u8 wur_action;
1199};
1200typedef struct mac_wur_mode_teardown_frame mac_wur_mode_teardown_frame_stru;
1201#endif
1202
1203/* qos info字段结构体定义 */
1210#pragma pack(pop)
1211
1212/* wmm信息元素 ac参数结构体 */
1222
1223#pragma pack(push, 1)
1224/* BSS load信息元素结构体 */
1226 osal_u16 sta_count; /* 关联的sta个数 */
1227 osal_u8 chan_utilization; /* 信道利用率 */
1229};
1231
1232/* country信息元素 管制域字段 */
1234 osal_u8 first_channel; /* 第一个信道号 */
1235 osal_u8 channel_num; /* 信道个数 */
1236 osal_u16 max_tx_pwr; /* 最大传输功率,dBm */
1237};
1239
1240/* ht capabilities信息元素支持的ampdu parameters字段结构体定义 */
1247
1248/* ht cap信息元素 支持的mcs集字段 结构体定义 */
1260#pragma pack(pop)
1261
1262/* vht信息元素,支持的mcs集字段 */
1271
1272#pragma pack(push, 1)
1273/* ht capabilities信息元素支持的extended cap.字段结构体定义 */
1284#pragma pack(pop)
1285
1286/* ht cap信息元素的Transmit Beamforming Capabilities字段结构体定义 */
1309
1310#pragma pack(push, 1)
1311/* ht cap信息元素的Asel(antenna selection) Capabilities字段结构体定义 */
1323
1324/* ht opern元素, ref 802.11-2012 8.4.2.59 */
1350
1351/* vht opern结构体 */
1353 osal_u8 channel_width : 2, /* 当前最大允许带宽能力 */
1354 bit_resv : 2, /* Dynamic Extended NSS BW,VHT下set 0 */
1355 rx_nss : 3, /* 当前最大允许空间流能力 */
1356 rx_nss_type : 1; /* 是否为TXBF下的rx nss能力,1-是,0-不是 */
1357};
1359
1360/* vht opern结构体 */
1368
1369#if defined(_PRE_WLAN_FEATURE_FTM)
1370typedef struct mac_quiet_frm {
1371 osal_u8 eid;
1372 osal_u8 len;
1373 osal_u8 quiet_count;
1374 osal_u8 quiet_period;
1375 osal_u16 quiet_duration;
1376 osal_u16 quiet_offset;
1377} mac_quiet_frm_stru;
1378
1379typedef struct mac_pwr_constraint_frm {
1380 osal_u8 eid;
1381 osal_u8 len;
1382 osal_u8 local_pwr_constraint;
1383} mac_pwr_constraint_frm_stru;
1384
1385/* Frame request */
1386typedef struct mac_frm_req {
1387 osal_u8 optclass;
1388 osal_u8 channum; /* 请求测量的信道号 */
1389 osal_u16 random_ivl;
1390 osal_u16 duration;
1391 osal_u8 frm_req_type;
1392 osal_u8 auc_mac_addr[WLAN_MAC_ADDR_LEN];
1393 osal_u8 subelm[1]; /* varialbe len sub element fileds */
1394} mac_frm_req_stru;
1395
1396/* Frame Report */
1397typedef struct mac_frm_cnt_rpt {
1398 osal_u8 tx_addr[WLAN_MAC_ADDR_LEN];
1400 osal_u8 phy_type;
1401 osal_u8 avrg_rcpi;
1402 osal_u8 last_rsni;
1403 osal_u8 last_rcpi;
1404 osal_u8 ant_id;
1405 osal_u16 frm_cnt;
1406} mac_frm_cnt_rpt_stru;
1407
1408typedef struct mac_frm_rpt {
1409 osal_u8 optclass;
1410 osal_u8 channum;
1411 osal_u8 act_meas_start_time[MAC_RADIO_MEAS_START_TIME_LEN];
1412 osal_u16 duration;
1413 osal_u8 subelm[1]; /* varialbe len sub element fileds */
1414} mac_frm_rpt_stru;
1415
1416/* Statistic Report basic */
1417typedef struct mac_stats_rpt_basic {
1418 osal_u16 duration;
1419 osal_u8 group_id;
1420 osal_u8 group[1];
1421} mac_stats_rpt_basic_stru;
1422
1423/* Statistic Report Group0, dot11Counters Group */
1424typedef struct mac_stats_cnt_rpt {
1425 osal_u32 tx_frag_cnt;
1426 osal_u32 multi_tx_cnt;
1427 osal_u32 fail_cnt;
1428 osal_u32 rx_frag_cnt;
1429 osal_u32 multi_rx_cnt;
1430 osal_u32 fcs_err_cnt;
1431 osal_u32 tx_cnt;
1432} mac_stats_cnt_rpt_stru;
1433
1434/* Statistic Report Group1, dot11MACStatistics Group */
1435typedef struct mac_stats_mac_rpt {
1436 osal_u32 retry_cnt;
1437 osal_u32 multi_retry_cnt;
1438 osal_u32 dup_cnt;
1439 osal_u32 rts_succ_cnt;
1440 osal_u32 trs_fail_cnt;
1441 osal_u32 ack_fail_cnt;
1442} mac_stats_mac_rpt_stru;
1443
1444/* Statistic Report Group2~9 */
1445typedef struct mac_stats_up_cnt_rpt {
1446 osal_u32 tx_frag_cnt;
1447 osal_u32 fail_cnt;
1448 osal_u32 retry_cnt;
1449 osal_u32 multi_retry_cnt;
1450 osal_u32 dup_cnt;
1451 osal_u32 rts_succ_cnt;
1452 osal_u32 trs_fail_cnt;
1453 osal_u32 ack_fail_cnt;
1454 osal_u32 rx_frag_cnt;
1455 osal_u32 tx_cnt;
1456 osal_u32 discard_cnt;
1457 osal_u32 rx_cnt;
1458 osal_u32 rx_retry_cnt;
1459} mac_stats_up_cnt_rpt_stru;
1460
1461/* TSC Report */
1462typedef struct mac_tsc_rpt {
1463 osal_u8 act_meas_start_time[MAC_RADIO_MEAS_START_TIME_LEN];
1464 osal_u16 duration;
1465 osal_u8 peer_sta_addr[WLAN_MAC_ADDR_LEN];
1466 osal_u8 tid;
1467 osal_u8 rpt_reason;
1468
1469 osal_u32 tx_frag_cnt;
1470 osal_u32 fail_cnt;
1471 osal_u32 retry_cnt;
1472 osal_u32 multi_retry_cnt;
1473} mac_tsc_rpt_stru;
1474
1475/* Statistic Report Group11 */
1476typedef struct mac_stats_access_delay_rpt {
1477 osal_u32 avrg_access_delay;
1478 osal_u32 aul_avrg_access_delay[4];
1479 osal_u32 sta_cnt;
1480 osal_u32 channel_utilz;
1481} mac_stats_access_delay_rpt_stru;
1482
1483typedef struct mac_ftm_range_req_ie {
1484 osal_u16 randomization_interval;
1485 osal_u8 minimum_ap_count;
1486 osal_u8 ftm_range_subelements[1];
1487} mac_ftm_range_req_ie_stru;
1488
1489/* Fine Timing Measurement Parameters */
1490struct mac_ftm_parameters_ie {
1491 osal_u8 eid; /* IEEE80211_ELEMID_MEASRPT */
1492 osal_u8 len;
1493 osal_u8 status_indication : 2,
1494 value : 5,
1495 reserved0 : 1;
1496 osal_u8 number_of_bursts_exponent : 4,
1497 burst_duration : 4;
1498 osal_u8 min_delta_ftm;
1499 osal_u16 partial_tsf_timer;
1500 osal_u8 partial_tsf_timer_no_preference : 1,
1501 asap_capable : 1,
1502 asap : 1,
1503 ftms_per_burst : 5;
1504 osal_u8 reserved : 2,
1505 format_and_bandwidth : 6;
1506 osal_u16 burst_period;
1507};
1508typedef struct mac_ftm_parameters_ie mac_ftm_parameters_ie_stru;
1509#endif
1510#pragma pack(pop)
1511
1512/* ACTION帧的参数格式,注:不同的action帧下对应的参数不同 */
1513typedef struct {
1514 osal_u8 category; /* ACTION的类别 */
1515 osal_u8 action; /* 不同ACTION类别下的分类 */
1516 osal_u8 resv[2];
1523
1524#pragma pack(push, 1)
1538
1539#ifdef _PRE_WLAN_FEATURE_WMMAC
1540struct mac_wmm_tspec {
1541 mac_ts_info_stru ts_info;
1542 osal_u16 norminal_msdu_size;
1543 osal_u16 max_msdu_size;
1544 osal_u32 min_srv_interval;
1545 osal_u32 max_srv_interval;
1546 osal_u32 inactivity_interval;
1547 osal_u32 suspension_interval;
1548 osal_u32 srv_start_time;
1549 osal_u32 min_data_rate;
1550 osal_u32 mean_data_rate;
1551 osal_u32 peak_data_rate;
1552 osal_u32 max_burst_size;
1553 osal_u32 delay_bound;
1554 osal_u32 min_phy_rate;
1555 osal_u16 surplus_bw;
1556 osal_u16 medium_time;
1557};
1558typedef struct mac_wmm_tspec mac_wmm_tspec_stru;
1559#endif
1560#pragma pack(pop)
1561
1562/* SMPS节能控制action帧体 */
1569
1570/* operating mode notify控制action帧体 */
1577
1578#if defined(_PRE_OS_VERSION_LITEOS) && defined(_PRE_OS_VERSION) \
1579 && (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION)
1580typedef struct _mac_action_data_stru {
1581 td_u32 freq;
1582 td_u32 wait;
1585 td_u8 bssid[WLAN_MAC_ADDR_LEN];
1586 td_u8 resv[2]; /* 2 byte保留字段 */
1587 td_u8 *data;
1588 td_u32 data_len;
1589 td_u32 no_cck;
1590} mac_action_data_stru;
1591#endif
1592
1593#pragma pack(push, 1)
1604
1605/* Beacon Report SubElement: Reported Frame Body Fgrament ID */
1609 osal_u8 bit_beacon_report_id; /* beacon report编号 */
1610 osal_u8 bit_fragment_id_number : 7; /* beacon report分段编号 */
1611 osal_u8 bit_more_frame_body_fragments : 1; /* 当前beacon report后续是否还有更多分段,[1:有|0:没有] */
1612};
1614
1615/* Beacon Report SubElement: Last Beacon Report Indication */
1619 osal_u8 last_beacon_report_indication; /* 是否是最后一个beacon report,[1:是|0:不是] */
1620};
1622#pragma pack(pop)
1623
1633
1635
1647
1655
1656#ifdef _PRE_WLAN_FEATURE_WUR_TX
1657/* Supported Bands域信息 */
1658typedef struct {
1659 osal_u8 support_2g : 1, support_5g : 1, rsvd : 6;
1660} mac_wur_cap_supported_bands_stru;
1661
1662/* WUR Capabilities Information域信息 */
1663typedef struct {
1664 osal_u8 transition_delay;
1665 osal_u8 vl_wur_frame_support : 1, wur_group_ids_support : 2, rsvd1 : 1,
1666 wur_basic_ppdu_hdr_support_20mhz : 1, wur_fdma_support : 1,
1667 wur_short_wakeup_frame_support : 1, rsvd2 : 1;
1668} mac_wur_cap_information_stru;
1669
1670/* WUR Operation Parameters域信息 */
1671typedef struct {
1672 osal_u32 min_wakeup_duration : 8, duty_cycle_period_units : 16, wur_operating_class : 8;
1673 osal_u32 wur_channel : 8, wur_beacon_period : 16, offset_of_twbtt_l : 8;
1674 osal_u8 offset_of_twbtt_h; /* 为了对齐拆分 */
1675 osal_u8 counter : 4, common_pn : 1, rsvd : 3;
1676 osal_u8 auc_resv[2]; /* 预留2字节对齐 */
1677} mac_wur_oper_param_stru;
1678#endif
1679
1680/*****************************************************************************
1681 OTHERS定义
1682*****************************************************************************/
1683
1684/*****************************************************************************
1685 函 数 名 : mac_hdr_set_from_ds
1686 功能描述 : This function sets the 'from ds' bit in the MAC header of the input frame
1687 to the given value stored in the LSB bit.
1688 The bit position of the 'from ds' in the 'frame control field' of the MAC
1689 header is represented by the bit pattern 0x00000010.
1690
1691*****************************************************************************/
1692static INLINE__ osal_void mac_hdr_set_from_ds(osal_u8 *header, osal_u8 from_ds)
1693{
1694 ((mac_header_frame_control_stru *)(header))->from_ds = from_ds;
1695}
1696
1697/*****************************************************************************
1698 函 数 名 : mac_hdr_set_to_ds
1699 功能描述 : This function sets the 'to ds' bit in the MAC header of the input frame
1700 to the given value stored in the LSB bit.
1701 The bit position of the 'to ds' in the 'frame control field' of the MAC
1702 header is represented by the bit pattern 0x00000001
1703
1704*****************************************************************************/
1705static INLINE__ osal_void mac_hdr_set_to_ds(osal_u8 *header, osal_u8 to_ds)
1706{
1707 ((mac_header_frame_control_stru *)(header))->to_ds = to_ds;
1708}
1709
1710/*****************************************************************************
1711 函 数 名 : mac_get_tid_value_4addr
1712 功能描述 : 四地址获取帧头中的tid
1713
1714*****************************************************************************/
1715static INLINE__ osal_u8 mac_get_tid_value_4addr(const osal_u8 *header)
1716{
1717 return (header[MAC_QOS_CTRL_FIELD_OFFSET_4ADDR] & 0x07); /* B0 - B2 */
1718}
1719
1720/*****************************************************************************
1721 函 数 名 : mac_get_seq_num
1722 功能描述 : 获取接受侦的seqence number
1723
1724*****************************************************************************/
1725static INLINE__ osal_u16 mac_get_seq_num(osal_u8 *header)
1726{
1727 osal_u16 seq_num = 0;
1728
1729 seq_num = header[23];
1730 seq_num <<= 4;
1731 seq_num |= (header[22] >> 4);
1732
1733 return seq_num;
1734}
1735
1736/*****************************************************************************
1737 函 数 名 : mac_get_bar_start_seq_num
1738 功能描述 : 获取BAR帧中的start seq num值
1739
1740*****************************************************************************/
1741static INLINE__ osal_u16 mac_get_bar_start_seq_num(const osal_u8 *payload)
1742{
1743 return ((payload[2] & 0xF0) >> 4) | (payload[3] << 4);
1744}
1745
1746/*****************************************************************************
1747 函 数 名 : mac_get_ack_policy_4addr
1748 功能描述 : 4地址获取qos帧确认策略
1749
1750*****************************************************************************/
1751static INLINE__ osal_u8 mac_get_ack_policy_4addr(const osal_u8 *header)
1752{
1753 return ((header[MAC_QOS_CTRL_FIELD_OFFSET_4ADDR] & 0x60) >> 5); /* B5 - B6 */
1754}
1755
1756/*****************************************************************************
1757 函 数 名 : mac_get_ack_policy
1758 功能描述 : 4地址获取qos帧确认策略
1759
1760*****************************************************************************/
1761static INLINE__ osal_u8 mac_get_ack_policy(const osal_u8 *header, oal_bool_enum_uint8 is_4addr)
1762{
1763 if (is_4addr) {
1764 return ((header[MAC_QOS_CTRL_FIELD_OFFSET_4ADDR] & 0x60) >> 5); /* B5 - B6 */
1765 } else {
1766 return ((header[MAC_QOS_CTRL_FIELD_OFFSET] & 0x60) >> 5); /* B5 - B6 */
1767 }
1768}
1769
1770/*****************************************************************************
1771 函 数 名 : mac_rx_get_da
1772 功能描述 : 获取收到的帧的目的地址
1773 参考协议 <802.11权威指南> 81页
1774
1775*****************************************************************************/
1776static INLINE__ osal_void mac_rx_get_da(mac_ieee80211_frame_stru *mac_header, osal_u8 **da)
1777{
1778 /* IBSS、from AP */
1779 if (mac_header->frame_control.to_ds == 0) {
1780 *da = mac_header->address1;
1781 }
1782 /* WDS、to AP */
1783 else {
1784 *da = mac_header->address3;
1785 }
1786}
1787
1788/*****************************************************************************
1789 函 数 名 : mac_rx_get_sa
1790 功能描述 : 获取收到的帧的源地址
1791 参考协议 <802.11权威指南> 81页
1792
1793*****************************************************************************/
1794static INLINE__ osal_void mac_rx_get_sa(mac_ieee80211_frame_stru *mac_header, osal_u8 **sa)
1795{
1796 /* IBSS、to AP */
1797 if (mac_header->frame_control.from_ds == 0) {
1798 *sa = mac_header->address2;
1799 }
1800 /* from AP */
1801 else if ((mac_header->frame_control.from_ds == 1) && (mac_header->frame_control.to_ds == 0)) {
1802 *sa = mac_header->address3;
1803 }
1804 /* WDS */
1805 else {
1806 *sa = ((mac_ieee80211_frame_addr4_stru *)mac_header)->address4;
1807 }
1808}
1809
1810/*****************************************************************************
1811 函 数 名 : mac_get_transmitter_addr
1812 功能描述 : 获取收到的帧的发送端地址
1813 参考协议 <802.11权威指南> 81页
1814
1815*****************************************************************************/
1816static INLINE__ osal_void mac_get_transmit_addr(mac_ieee80211_frame_stru *mac_header, osal_u8 **bssid)
1817{
1818 /* 对于IBSS, STA, AP, WDS 场景下,获取发送端地址 */
1819 *bssid = mac_header->address2;
1820}
1821
1822/*****************************************************************************
1823 函 数 名 : mac_get_submsdu_len
1824 功能描述 : 获取netbuf中submsdu的长度
1825
1826*****************************************************************************/
1827static INLINE__ osal_void mac_get_submsdu_len(const osal_u8 *submsdu_hdr, osal_u16 *submsdu_len)
1828{
1829 *submsdu_len = *(submsdu_hdr + MAC_SUBMSDU_LENGTH_OFFSET);
1830 *submsdu_len = (osal_u16)((*submsdu_len << 8) + *(submsdu_hdr + MAC_SUBMSDU_LENGTH_OFFSET + 1));
1831}
1832
1833#if defined(_PRE_LITTLE_CPU_ENDIAN) && defined(_PRE_CPU_ENDIAN) && (_PRE_LITTLE_CPU_ENDIAN == _PRE_CPU_ENDIAN)
1834#define MAC_IP_HDR_LEN_MASK 0x0F
1835#else
1836#define MAC_IP_HDR_LEN_MASK 0xF0
1837#endif
1838/*****************************************************************************
1839 函 数 名 : mac_ip_hdr_len
1840 功能描述 : 获取ip头长度
1841*****************************************************************************/
1842static inline osal_u32 mac_ip_hdr_len(const mac_ip_header_stru *ip_hdr)
1843{
1844 return (ip_hdr->version_ihl & MAC_IP_HDR_LEN_MASK) << 2; /* 左移2bit:值对应4字节 */
1845}
1846
1847/*****************************************************************************
1848 函 数 名 : mac_get_submsdu_pad_len
1849 功能描述 : 获取submsdu需要填充的字节数
1850
1851*****************************************************************************/
1852static INLINE__ osal_void mac_get_submsdu_pad_len(osal_u16 msdu_len, osal_u8 *submsdu_pad_len)
1853{
1854 *submsdu_pad_len = msdu_len & 0x3;
1855
1856 if (*submsdu_pad_len != 0) {
1857 *submsdu_pad_len = (MAC_BYTE_ALIGN_VALUE - *submsdu_pad_len);
1858 }
1859}
1860
1861/*****************************************************************************
1862 函 数 名 : mac_is_grp_addr
1863 功能描述 : 判断该帧是否是组播帧
1864
1865*****************************************************************************/
1866static INLINE__ oal_bool_enum_uint8 mac_is_grp_addr(const osal_u8 *addr)
1867{
1868 if ((addr[0] & 1) != 0) {
1869 return OSAL_TRUE;
1870 }
1871
1872 return OSAL_FALSE;
1873}
1874
1875/*****************************************************************************
1876 函 数 名 : mac_ieeee80211_is_action
1877 功能描述 :
1878
1879*****************************************************************************/
1880static INLINE__ oal_bool_enum_uint8 mac_ieeee80211_is_action(const osal_u8 *header)
1881{
1882 return (header[0] & (MAC_IEEE80211_FCTL_FTYPE | MAC_IEEE80211_FCTL_STYPE)) == (WLAN_ACTION << 4);
1883}
1884
1885/*****************************************************************************
1886 函 数 名 : mac_get_frame_protected_flag
1887 功能描述 : 获取报文的帧保护位
1888
1889*****************************************************************************/
1890static INLINE__ oal_bool_enum_uint8 mac_get_frame_protected_flag(const osal_u8 *mac_header)
1891{
1892 return (((mac_header[1] & 0x40) != 0) ? OSAL_TRUE : OSAL_FALSE);
1893}
1894
1895/*****************************************************************************
1896 函 数 名 : mac_get_cap_info
1897 功能描述 : 从asoc rsp帧中获取capability fied
1898
1899*****************************************************************************/
1900static INLINE__ osal_u16 mac_get_cap_info(osal_u8 *mac_frame_body)
1901{
1902 osal_u16 cap_info = 0;
1903
1904 cap_info = mac_frame_body[0]; /* mac_frame_body[0]中存放cap_info的低8位 */
1905 cap_info |= (mac_frame_body[1] << 8); /* mac_frame_body[1]中存放cap_info的低8位 */
1906
1907 return cap_info;
1908}
1909
1910/*****************************************************************************
1911 功能描述 : 设置LLC SNAP, TX流程上调用
1912*****************************************************************************/
1913static INLINE__ osal_void mac_set_snap(oal_netbuf_stru *buf, osal_u16 ether_type)
1914{
1915 mac_llc_snap_stru *llc;
1916 osal_u16 use_btep1;
1917 osal_u16 use_btep2;
1918
1919 /* LLC */
1920 llc = (mac_llc_snap_stru *)(oal_netbuf_data(buf) + ETHER_HDR_LEN - SNAP_LLC_FRAME_LEN);
1921 llc->llc_dsap = SNAP_LLC_LSAP;
1922 llc->llc_ssap = SNAP_LLC_LSAP;
1923 llc->control = LLC_UI;
1924
1925 use_btep1 = oal_byteorder_host_to_net_uint16(ETHER_TYPE_AARP);
1926 use_btep2 = oal_byteorder_host_to_net_uint16(ETHER_TYPE_IPX);
1927
1928 if (osal_unlikely((use_btep1 == ether_type) || (use_btep2 == ether_type))) {
1929 llc->org_code[0] = SNAP_BTEP_ORGCODE_0; /* 0x0 */
1930 llc->org_code[1] = SNAP_BTEP_ORGCODE_1; /* 0x0 */
1931 llc->org_code[2] = SNAP_BTEP_ORGCODE_2; /* 0xf8 */
1932 } else {
1933 llc->org_code[0] = SNAP_RFC1042_ORGCODE_0; /* 0x0 */
1934 llc->org_code[1] = SNAP_RFC1042_ORGCODE_1; /* 0x0 */
1935 llc->org_code[2] = SNAP_RFC1042_ORGCODE_2; /* 0x0 */
1936 }
1937
1938 llc->ether_type = ether_type;
1939
1940 oal_netbuf_pull(buf, (ETHER_HDR_LEN - SNAP_LLC_FRAME_LEN));
1941}
1942
1943/*****************************************************************************
1944 功能描述 : 获取认证状态字段
1945
1946*****************************************************************************/
1947static INLINE__ osal_u16 mac_get_auth_alg(osal_u8 *mac_hdr)
1948{
1949 osal_u16 auth_alg = 0;
1950
1951 auth_alg = mac_hdr[MAC_80211_FRAME_LEN + 1];
1952 auth_alg = (osal_u16)((auth_alg << 8) | mac_hdr[MAC_80211_FRAME_LEN + 0]);
1953
1954 return auth_alg;
1955}
1956
1957/*****************************************************************************
1958 函 数 名 : mac_get_auth_status
1959 功能描述 : 获取认证状态字段
1960
1961*****************************************************************************/
1962static INLINE__ osal_u16 mac_get_auth_status(osal_u8 *mac_hdr)
1963{
1964 osal_u16 auth_status = 0;
1965
1966 auth_status = mac_hdr[MAC_80211_FRAME_LEN + 5];
1967 auth_status = (osal_u16)((auth_status << 8) | mac_hdr[MAC_80211_FRAME_LEN + 4]);
1968
1969 return auth_status;
1970}
1971
1972/*****************************************************************************
1973 函 数 名 : mac_get_ft_status
1974 功能描述 : 获取FT response的status字段
1975 输入参数 : osal_u8 *mac_hdr
1976 输出参数 : 无
1977 返 回 值 : OAL_STATIC OAL_INLINE osal_u16
1978*****************************************************************************/
1980{
1981 osal_u16 auth_status = 0;
1982
1983 auth_status = mac_hdr[MAC_80211_FRAME_LEN + 15]; /* 偏移15字节 */
1984 auth_status = (osal_u16)((auth_status << 8) | /* 左移8位 */
1985 mac_hdr[MAC_80211_FRAME_LEN + 14]); /* 偏移14字节 */
1986
1987 return auth_status;
1988}
1989
1990/*****************************************************************************
1991 功能描述 : 获取认证帧序列号
1992
1993*****************************************************************************/
1994static INLINE__ osal_u16 mac_get_auth_seq_num(osal_u8 *mac_hdr, osal_u16 payload_len)
1995{
1996 osal_u16 auth_seq = 0;
1997 /* auth帧payload长度必须大于等于4 */
1998 if (payload_len < 4) {
1999 return auth_seq;
2000 }
2001
2002 auth_seq = mac_hdr[MAC_80211_FRAME_LEN + 3]; /* offset 3 */
2003 auth_seq = (osal_u16)((auth_seq << 8) | mac_hdr[MAC_80211_FRAME_LEN + 2]); /* offset 8 2 */
2004
2005 return auth_seq;
2006}
2007
2008/*****************************************************************************
2009 函 数 名 : mac_set_wep
2010 功能描述 : 设置protected frame subfield
2011
2012*****************************************************************************/
2013static INLINE__ osal_void mac_set_wep(osal_u8 *hdr, osal_u8 wep)
2014{
2015 hdr[1] &= 0xBF;
2016 hdr[1] |= (osal_u8)(wep << 6);
2017}
2018
2019/*****************************************************************************
2020 函 数 名 : mac_set_protectedframe
2021 功能描述 : 设置帧控制字段的受保护字段
2022
2023*****************************************************************************/
2024static INLINE__ osal_void mac_set_protectedframe(osal_u8 *mac_hdr)
2025{
2026 mac_hdr[1] |= 0x40;
2027}
2028/*****************************************************************************
2029 函 数 名 : mac_get_protectedframe
2030 功能描述 : 获取帧头中保护位信息
2031
2032*****************************************************************************/
2033static INLINE__ oal_bool_enum_uint8 mac_is_protectedframe(osal_u8 *mac_hdr)
2034{
2035 mac_ieee80211_frame_stru *mac_header = OSAL_NULL;
2036 mac_header = (mac_ieee80211_frame_stru *)mac_hdr;
2037
2039}
2040
2041/*****************************************************************************
2042 函 数 名 : mac_get_auth_algo_num
2043 功能描述 : 获取认证帧的认证算法
2044
2045*****************************************************************************/
2046static INLINE__ osal_u16 mac_get_auth_algo_num(oal_netbuf_stru *netbuf)
2047{
2048 osal_u16 auth_algo = 0;
2049 osal_u8 *mac_payload = oal_netbuf_data(netbuf) + MAC_80211_FRAME_LEN;
2050
2051 auth_algo = mac_payload[1];
2052 auth_algo = (osal_u16)((auth_algo << 8) | mac_payload[0]);
2053
2054 return auth_algo;
2055}
2056
2057/*****************************************************************************
2058 函 数 名 : mac_get_auth_ch_text
2059 功能描述 : 获取认证帧中的challenge txt
2060
2061*****************************************************************************/
2062static INLINE__ osal_u8 *mac_get_auth_ch_text(osal_u8 *mac_hdr)
2063{
2064 return &(mac_hdr[MAC_80211_FRAME_LEN + 6]);
2065}
2066
2067/*****************************************************************************
2068 函 数 名 : mac_is_4addr
2069 功能描述 : 是否为4地址
2070
2071*****************************************************************************/
2072static INLINE__ oal_bool_enum_uint8 mac_is_4addr(osal_u8 *mac_hdr)
2073{
2074 osal_u8 is_tods;
2075 osal_u8 is_from_ds;
2076 oal_bool_enum_uint8 is_4addr;
2077
2078 is_tods = mac_hdr_get_to_ds(mac_hdr);
2079 is_from_ds = mac_hdr_get_from_ds(mac_hdr);
2080
2081 is_4addr = (is_tods != OSAL_FALSE) && (is_from_ds != OSAL_FALSE);
2082
2083 return is_4addr;
2084}
2085
2086/*****************************************************************************
2087 函 数 名 : mac_get_address2
2088 功能描述 : 拷贝地址2
2089*****************************************************************************/
2090static INLINE__ osal_void mac_get_address2(osal_u8 *mac_hdr, osal_u8 *addr)
2091{
2092 /* 10:addr2相对802.11帧头的偏移量 */
2094}
2095
2096/*****************************************************************************
2097 函 数 名 : mac_get_address3
2098 功能描述 : 拷贝地址3
2099*****************************************************************************/
2100static INLINE__ osal_void mac_get_address3(osal_u8 *mac_hdr, osal_u8 *addr)
2101{
2102 /* 16:addr3相对802.11帧头的偏移量 */
2104}
2105
2106/*****************************************************************************
2107 函 数 名 : mac_get_qos_ctrl
2108 功能描述 : 获取mac头中的qos ctrl字段
2109*****************************************************************************/
2110static INLINE__ osal_void mac_get_qos_ctrl(osal_u8 *mac_hdr, osal_u8 *qos_ctrl)
2111{
2112 if (mac_is_4addr(mac_hdr) != OSAL_TRUE) {
2114 return;
2115 }
2116
2118 return;
2119}
2120
2121/*****************************************************************************
2122 函 数 名 : mac_get_asoc_status
2123 功能描述 : 获取关联帧中的状态信息
2124
2125*****************************************************************************/
2126static INLINE__ mac_status_code_enum_uint16 mac_get_asoc_status(const osal_u8 *mac_payload)
2127{
2128 mac_status_code_enum_uint16 asoc_status;
2129
2130 asoc_status = (mac_payload[3] << 8) | mac_payload[2];
2131
2132 return asoc_status;
2133}
2134
2135/*****************************************************************************
2136 函 数 名 : mac_get_asoc_status
2137 功能描述 : 获取关联帧中的关联ID
2138
2139*****************************************************************************/
2140static INLINE__ osal_u16 mac_get_asoc_id(const osal_u8 *mac_payload)
2141{
2142 osal_u16 asoc_id;
2143
2144 asoc_id = mac_payload[4] | (mac_payload[5] << 8);
2145 asoc_id &= 0x3FFF; /* 取低14位 */
2146
2147 return asoc_id;
2148}
2149
2150/*****************************************************************************
2151 函 数 名 : wlan_get_bssid
2152 功能描述 : 根据"from ds"bit,从帧中提取bssid(mac地址)
2153
2154*****************************************************************************/
2155static INLINE__ osal_void mac_get_bssid(osal_u8 *mac_hdr, osal_u8 *bssid, ssize_t bssid_len)
2156{
2157 if (bssid_len > WLAN_MAC_ADDR_LEN) {
2158 return;
2159 }
2160 if (mac_hdr_get_from_ds(mac_hdr) == 1) {
2161 mac_get_address2(mac_hdr, bssid);
2162 } else if (mac_hdr_get_to_ds(mac_hdr) == 1) {
2163 mac_get_address1(mac_hdr, bssid);
2164 } else {
2165 mac_get_address3(mac_hdr, bssid);
2166 }
2167}
2168
2169/*****************************************************************************
2170 函 数 名 : mac_frame_is_eapol
2171 功能描述 : 判断LLC 帧类型是否为EAPOL 类型帧
2172
2173*****************************************************************************/
2174static INLINE__ oal_bool_enum mac_frame_is_eapol(mac_llc_snap_stru *mac_llc_snap)
2175{
2176 return (oal_bool_enum)((oal_byteorder_host_to_net_uint16(mac_llc_snap->ether_type) ==
2178}
2179
2180/*****************************************************************************
2181 函 数 名 : mac_frame_rom_set_ptr_val
2182 功能描述 : 统一设置指针指向内存区域的值为val
2183*****************************************************************************/
2184static INLINE__ osal_void mac_frame_rom_set_ptr_val(dft_80211_frame_ctx *frame_ctx, osal_u8 val)
2185{
2186 frame_ctx->frame_cb_switch = val;
2187 frame_ctx->frame_dscr_switch = val;
2188 frame_ctx->frame_content_switch = val;
2189}
2190
2191/*****************************************************************************
2192 功能描述 : 判断一个帧是否是ftm frame
2193*****************************************************************************/
2194static INLINE__ oal_bool_enum_uint8 mac_is_ftm_frame(oal_netbuf_stru *pst_netbuf)
2195{
2196 osal_u8 *mac_header = oal_netbuf_header(pst_netbuf);
2197 osal_u8 *mac_payload = oal_netbuf_data(pst_netbuf);
2198
2199 /* Management frame */
2200 if (mac_get_frame_type_and_subtype(mac_header) == (WLAN_FC0_SUBTYPE_ACTION | WLAN_FC0_TYPE_MGT)) {
2201 if ((mac_payload[0] == MAC_ACTION_CATEGORY_PUBLIC) && (mac_payload[1] == MAC_PUB_FTM)) {
2202 return OAL_TRUE;
2203 }
2204 }
2205
2206 return OAL_FALSE;
2207}
2208
2209/*****************************************************************************
2210 功能描述 : 判断一个帧是否是ftm req frame
2211*****************************************************************************/
2212static INLINE__ oal_bool_enum_uint8 mac_is_ftm_req_frame(oal_netbuf_stru *pst_netbuf)
2213{
2214 osal_u8 *mac_header = oal_netbuf_header(pst_netbuf);
2215 osal_u8 *mac_payload = oal_netbuf_data(pst_netbuf);
2216
2217 /* Management frame */
2218 if (mac_get_frame_type_and_subtype(mac_header) == (WLAN_FC0_SUBTYPE_ACTION | WLAN_FC0_TYPE_MGT)) {
2219 if ((mac_payload[0] == MAC_ACTION_CATEGORY_PUBLIC) && (mac_payload[1] == MAC_PUB_FTM_REQ)) {
2220 return OAL_TRUE;
2221 }
2222 }
2223
2224 return OAL_FALSE;
2225}
2226
2227/*****************************************************************************
2228 功能描述 : 判断一个帧是否是ftm关联帧
2229*****************************************************************************/
2230static INLINE__ oal_bool_enum_uint8 mac_is_ftm_related_frame(oal_netbuf_stru *pst_netbuf)
2231{
2232 osal_u8 *mac_header = oal_netbuf_header(pst_netbuf);
2233 osal_u8 *mac_payload = oal_netbuf_data(pst_netbuf);
2234
2235 /* Management frame */
2236 if (mac_get_frame_type_and_subtype(mac_header) == (WLAN_FC0_SUBTYPE_ACTION | WLAN_FC0_TYPE_MGT)) {
2237 if ((mac_payload[0] == MAC_ACTION_CATEGORY_PUBLIC) && (mac_payload[1] == MAC_PUB_FTM)) {
2238 return OAL_TRUE;
2239 }
2240 if ((mac_payload[0] == MAC_ACTION_CATEGORY_PUBLIC) && (mac_payload[1] == MAC_PUB_FTM_REQ)) {
2241 return OAL_TRUE;
2242 }
2243 }
2244 return OAL_FALSE;
2245}
2246
2247/*****************************************************************************
2248 函数声明
2249*****************************************************************************/
2250oal_bool_enum_uint8 mac_is_ftm_req_frame(oal_netbuf_stru *pst_netbuf);
2251oal_bool_enum_uint8 mac_is_ftm_req_frame(oal_netbuf_stru *pst_netbuf);
2252oal_bool_enum_uint8 mac_is_ftm_related_frame(oal_netbuf_stru *pst_netbuf);
2253#ifdef _PRE_WLAN_FEATURE_P2P
2254osal_u8 *hmac_find_p2p_attribute_etc(osal_u8 eid, osal_u8 *ies, osal_s32 l_len);
2255#endif
2263#ifdef _PRE_WLAN_FEATURE_1024QAM
2264osal_void hmac_set_1024qam_vendor_ie(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len);
2265#endif
2266
2268
2270 osal_u32 timeout);
2276 osal_u8 *ie_len);
2277osal_u8 *hmac_get_ssid_etc(osal_u8 *beacon_body, osal_s32 frame_body_len, osal_u8 *ssid_len);
2278osal_u8 *mac_get_ext_ie_body(osal_u8 *beacon_body, osal_s32 frame_body_len,
2279 osal_u8 *ext_ie_body_len, osal_u8 ext_eid);
2282osal_u8 hmac_get_dtim_cnt_etc(osal_u8 *frame_body, osal_u16 frame_body_len);
2287#ifdef _PRE_WLAN_FEATURE_WMMAC
2288extern osal_u16 mac_set_wmmac_ie_sta_etc(osal_void *vap, osal_u8 *buffer, mac_wmm_tspec_stru *addts_args);
2289#endif /* _PRE_WLAN_FEATURE_WMMAC */
2291#ifdef _PRE_WLAN_FEATURE_WPA3
2292osal_void hmac_set_rsnx_ie(const osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len);
2293#endif
2303#ifdef _PRE_WLAN_FEATURE_11AX
2304osal_void hmac_set_he_capabilities_ie(osal_void *vap, osal_u8 *buf, osal_u8 *ie_len);
2305osal_void hmac_set_he_operation_ie(osal_void *vap, osal_u8 *buf, osal_u8 *ie_len);
2306#endif
2307osal_u8 *hmac_find_ie_ext_ie(osal_u8 eid, osal_u8 ext_eid, osal_u8 *ie_addr, osal_s32 frame_len);
2308
2310
2312
2313#ifdef _PRE_WLAN_FEATURE_OPMODE_NOTIFY
2314osal_void hmac_set_opmode_field_etc(osal_void *vap, osal_u8 *buffer, wlan_nss_enum_uint8 nss);
2315osal_void hmac_set_opmode_notify_ie_etc(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len);
2316#endif
2317#ifdef _PRE_WLAN_FEATURE_PMF
2318wlan_pmf_cap_status_uint8 hmac_get_pmf_cap_etc(osal_u8 *ie, osal_u32 ie_len);
2319#endif
2321 osal_u8 coext_info, osal_u32 chan_report);
2322
2323#ifdef _PRE_WLAN_FEATURE_VIRTUAL_MULTI_STA
2324osal_void mac_set_vender_4addr_ie(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len);
2325#endif
2326
2329
2330#ifdef _PRE_WLAN_FEATURE_WUR_TX
2331osal_void mac_set_wur_supported_bands_field(osal_void *vap, osal_u8 *buffer);
2332osal_void mac_set_wur_cap_information_field(osal_void *vap, osal_u8 *buffer);
2333osal_void mac_set_wur_capabilities_ie(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len);
2334osal_void mac_set_wur_oper_parameters_field(osal_void *vap, osal_u8 *buffer);
2335osal_void mac_set_wur_operation_ie(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len);
2336#endif
2337
2339#ifdef _PRE_WLAN_FEATURE_11D
2340osal_void mac_set_country_ie_etc(const osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len);
2341#endif
2344 const mac_quiet_info *quiet_info, osal_u8 *ie_len);
2345
2350
2354
2355#ifdef __cplusplus
2356#if __cplusplus
2357}
2358#endif
2359#endif
2360
2361#endif /* end of mac_frame.h */
#define osal_unlikely(x)
Definition dmac_misc_type.h:12
#define OAL_INLINE
Definition driver_soc_common.h:47
INT32 ssize_t
Definition los_typedef.h:77
#define WLAN_MAC_ADDR_LEN
Definition mac_addr.c:28
mac_ft_action_type_enum
Definition mac_frame.h:426
@ MAC_FT_ACTION_CONFIRM
Definition mac_frame.h:429
@ MAC_FT_ACTION_BUTT
Definition mac_frame.h:431
@ MAC_FT_ACTION_ACK
Definition mac_frame.h:430
@ MAC_FT_ACTION_RESPONSE
Definition mac_frame.h:428
@ MAC_FT_ACTION_REQUEST
Definition mac_frame.h:427
osal_void mac_set_pwrconstraint_ie_etc(const osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
osal_u8 * hmac_get_wmm_ie_etc(osal_u8 *beacon_body, osal_u16 frame_len)
osal_void hmac_set_cap_info_ap_etc(osal_void *vap, osal_u8 *cap_info)
osal_void(* set_wpa_ie)(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
Definition mac_frame.h:1630
osal_void hmac_set_ssid_ie_etc(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len, osal_u16 frm_type)
const osal_u8 g_p2p_oui_etc[3]
osal_void mac_set_quiet_ie_etc(const osal_void *vap, osal_u8 *buffer, const mac_quiet_info *quiet_info, osal_u8 *ie_len)
p2p_gen_act_frm_off
Definition mac_frame.h:588
@ P2P_GEN_ACT_OUI_OFF2
Definition mac_frame.h:590
@ P2P_GEN_ACT_DIALOG_TOKEN_OFF
Definition mac_frame.h:594
@ P2P_GEN_ACT_OUI_SUBTYPE_OFF
Definition mac_frame.h:593
@ P2P_GEN_ACT_OUI_TYPE_OFF
Definition mac_frame.h:592
@ P2P_GEN_ACT_OUI_OFF3
Definition mac_frame.h:591
@ P2P_GEN_ACT_OUI_OFF1
Definition mac_frame.h:589
@ P2P_GEN_ACT_TAG_PARAM_OFF
Definition mac_frame.h:595
osal_void mac_set_dsss_params_etc(const osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len, osal_u8 chan_num)
attribute_id_t
Definition mac_frame.h:556
@ P2P_OPERATING_CHANNEL
Definition mac_frame.h:574
@ INVITATION_FLAGS
Definition mac_frame.h:575
@ P2P_MANAGEABILITY
Definition mac_frame.h:567
@ P2P_CHANNEL_LIST
Definition mac_frame.h:568
@ NOTICE_OF_ABSENCE
Definition mac_frame.h:569
@ P2P_DEVICE_ID
Definition mac_frame.h:560
@ P2P_INTERFACE
Definition mac_frame.h:573
@ P2P_STATUS
Definition mac_frame.h:557
@ P2P_GROUP_BSSID
Definition mac_frame.h:564
@ CONFIG_TIMEOUT
Definition mac_frame.h:562
@ GROUP_OWNER_INTENT
Definition mac_frame.h:561
@ P2P_MINOR_REASON_CODE
Definition mac_frame.h:558
@ INTENDED_P2P_IF_ADDR
Definition mac_frame.h:566
@ EXTENDED_LISTEN_TIMING
Definition mac_frame.h:565
@ LISTEN_CHANNEL
Definition mac_frame.h:563
@ P2P_DEVICE_INFO
Definition mac_frame.h:570
@ P2P_GROUP_INFO
Definition mac_frame.h:571
@ P2P_CAPABILITY
Definition mac_frame.h:559
@ P2P_GROUP_ID
Definition mac_frame.h:572
#define MAC_OUI_LEN
Definition mac_frame.h:160
osal_void hmac_set_ext_capabilities_ie_etc(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
osal_void mac_set_erp_ie_etc(const osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
mac_mimo_power_save_enum
Definition mac_frame.h:537
@ MAC_SMPS_DYNAMIC_MODE
Definition mac_frame.h:539
@ MAC_SMPS_MIMO_MODE
Definition mac_frame.h:540
@ MAC_SMPS_STATIC_MODE
Definition mac_frame.h:538
@ MAC_SMPS_MODE_BUTT
Definition mac_frame.h:542
osal_void(* set_nb_ie)(osal_u8 *buffer, osal_u8 *ie_len)
Definition mac_frame.h:1631
osal_u16 mac_capability_enum_uint16
Definition mac_frame.h:522
osal_void hmac_set_vht_capabilities_ie_etc(osal_void *vap, osal_u8 *buf, osal_u8 *ie_len)
mac_eid_extension_enum
Definition mac_frame.h:524
@ MAC_EID_EXT_FTMSI
Definition mac_frame.h:525
osal_void(* set_ht_opern_ie)(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
Definition mac_frame.h:1626
#define MAC_RADIO_MEAS_START_TIME_LEN
Definition mac_frame.h:365
osal_u8 mac_timeout_interval_type_enum_uint8
Definition mac_frame.h:418
#define MAC_QOS_CTL_LEN
Definition mac_frame.h:193
osal_u8 mac_p2p_attribute_enum_uint8
Definition mac_frame.h:535
p2p_status_code_t
Definition mac_frame.h:605
@ P2P_STAT_INFO_UNAVAIL
Definition mac_frame.h:607
@ P2P_STAT_SUCCESS
Definition mac_frame.h:606
@ P2P_STAT_UNABLE_ACCO_REQ
Definition mac_frame.h:611
@ P2P_STAT_INCOMP_PARAM
Definition mac_frame.h:608
@ P2P_STAT_UNKNW_P2P_GRP
Definition mac_frame.h:614
@ P2P_STAT_LMT_REACHED
Definition mac_frame.h:609
@ P2P_STAT_NO_COMMON_CHAN
Definition mac_frame.h:613
@ P2P_STAT_PREV_PROT_ERROR
Definition mac_frame.h:612
@ P2P_STAT_USER_REJECTED
Definition mac_frame.h:617
@ P2P_STAT_GO_INTENT_15
Definition mac_frame.h:615
@ P2P_STAT_INVAL_PARAM
Definition mac_frame.h:610
@ P2P_STAT_INCOMP_PROV_ERROR
Definition mac_frame.h:616
osal_u8 mac_txbf_clb_enum_uint8
Definition mac_frame.h:486
osal_void(* set_vht_opern_ie)(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
Definition mac_frame.h:1629
osal_void mac_add_wps_ie_etc(const osal_void *vap, osal_u8 *buffer, osal_u16 *ie_len, app_ie_type_uint8 type)
osal_u8 mac_wnm_action_type_enum_uint8
Definition mac_frame.h:477
struct mac_hiex_cap mac_hiex_cap_stru
osal_void hmac_set_listen_interval_ie_etc(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
osal_u8 mac_specmgmt_action_type_enum_uint8
Definition mac_frame.h:492
#define MAC_HT_BASIC_MCS_SET_LEN
Definition mac_frame.h:191
osal_void hmac_set_aid_ie_etc(osal_u8 *buffer, osal_u16 assoc_id)
osal_void(* set_vht_cap_ie)(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
Definition mac_frame.h:1628
osal_void mac_add_extend_app_ie_etc(const osal_void *vap, osal_u8 **buffer, app_ie_type_uint8 type)
osal_void hmac_set_wpa_ie_etc(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
#define MAC_IEEE80211_FCTL_FTYPE
Definition mac_frame.h:38
mac_sa_query_action_type_enum
Definition mac_frame.h:421
@ MAC_SA_QUERY_ACTION_REQUEST
Definition mac_frame.h:422
@ MAC_SA_QUERY_ACTION_RESPONSE
Definition mac_frame.h:423
#define MAC_IP_HDR_LEN_MASK
Definition mac_frame.h:1836
osal_u8 * hmac_find_vendor_ie_etc(osal_u32 oui, osal_u8 oui_type, osal_u8 *ies, osal_s32 len)
osal_u8 * hmac_find_ie_etc(osal_u8 eid, osal_u8 *ies, osal_s32 l_len)
osal_u8 mac_msdu_proc_status_enum_uint8
Definition mac_frame.h:394
oal_bool_enum_uint8 mac_frame_is_null_data(oal_netbuf_stru *net_buf)
mac_wnm_action_type_enum
Definition mac_frame.h:445
@ MAC_WNM_ACTION_FMS_RESPONSE
Definition mac_frame.h:456
@ MAC_WNM_ACTION_DIALGNOSTIC_REPORT
Definition mac_frame.h:449
@ MAC_WNM_ACTION_NOTIFICATION_REQUEST
Definition mac_frame.h:472
@ MAC_WNM_ACTION_COLLOCATED_INTER_REQUEST
Definition mac_frame.h:457
@ MAC_WNM_ACTION_BUTT
Definition mac_frame.h:475
@ MAC_WNM_ACTION_DIALGNOSTIC_REQUEST
Definition mac_frame.h:448
@ MAC_WNM_ACTION_TFS_NOTIFY
Definition mac_frame.h:461
@ MAC_WNM_ACTION_TIM_BROADCAST_REQUEST
Definition mac_frame.h:464
@ MAC_WNM_ACTION_COLLOCATEC_INTER_REPORT
Definition mac_frame.h:458
@ MAC_WNM_ACTION_TIMING_MEAS_REQUEST
Definition mac_frame.h:471
@ MAC_WNM_ACTION_LOCATION_CONF_REQUEST
Definition mac_frame.h:450
@ MAC_WNM_ACTION_CHANNEL_USAGE_RESPONSE
Definition mac_frame.h:468
@ MAC_WNM_ACTION_LOCATION_CONF_RESPONSE
Definition mac_frame.h:451
@ MAC_WNM_ACTION_CHANNEL_USAGE_REQUEST
Definition mac_frame.h:467
@ MAC_WNM_ACTION_SLEEP_MODE_REQUEST
Definition mac_frame.h:462
@ MAC_WNM_ACTION_DMS_RESPONSE
Definition mac_frame.h:470
@ MAC_WNM_ACTION_EVENT_REQUEST
Definition mac_frame.h:446
@ MAC_WNM_ACTION_SLEEP_MODE_RESPONSE
Definition mac_frame.h:463
@ MAC_WNM_ACTION_BSS_TRANSITION_MGMT_QUERY
Definition mac_frame.h:452
@ MAC_WNM_ACTION_QOS_TRAFFIC_CAP_UPDATE
Definition mac_frame.h:466
@ MAC_WNM_ACTION_NOTIFICATION_RESPONSE
Definition mac_frame.h:473
@ MAC_WNM_ACTION_FMS_REQUEST
Definition mac_frame.h:455
@ MAC_WNM_ACTION_BSS_TRANSITION_MGMT_REQUEST
Definition mac_frame.h:453
@ MAC_WNM_ACTION_TIM_BROADCAST_RESPONSE
Definition mac_frame.h:465
@ MAC_WNM_ACTION_TFS_REQUEST
Definition mac_frame.h:459
@ MAC_WNM_ACTION_DMS_REQUEST
Definition mac_frame.h:469
@ MAC_WNM_ACTION_BSS_TRANSITION_MGMT_RESPONSE
Definition mac_frame.h:454
@ MAC_WNM_ACTION_TFS_RESPONSE
Definition mac_frame.h:460
@ MAC_WNM_ACTION_EVENT_REPORT
Definition mac_frame.h:447
OAL_STATIC OAL_INLINE osal_u16 mac_get_ft_status(osal_u8 *mac_hdr)
Definition mac_frame.h:1979
osal_void mac_set_cap_info_sta_etc(osal_void *vap, osal_u8 *cap_info)
osal_u32 hmac_check_mac_privacy_etc(osal_u16 cap_info, osal_void *vap)
osal_u8 mac_eid_extension_enum_uint8
Definition mac_frame.h:527
const osal_u8 g_mac_vendor_oui[3]
osal_void hmac_set_ht_opern_ie_etc(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
osal_void mac_set_tpc_report_ie_etc(const osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
osal_u8 mac_ht_action_type_enum_uint8
Definition mac_frame.h:409
osal_void hmac_set_wmm_params_ie_etc(osal_void *vap, osal_u8 *buffer, oal_bool_enum_uint8 is_qos, osal_u8 *ie_len)
osal_void mac_set_bssload_ie(const osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
osal_void(* set_ht_cap_ie)(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
Definition mac_frame.h:1625
osal_void hmac_set_ht_capabilities_ie_etc(osal_void *vap, osal_u8 *buf, osal_u8 *ie_len)
osal_void hmac_add_app_ie_etc(osal_void *vap, osal_u8 *buffer, osal_u16 *ie_len, app_ie_type_uint8 type)
osal_u32(* hmac_set_he_capabilities_ie_resv)(const osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
Definition mac_frame.h:1634
osal_void hmac_set_supported_rates_ie_etc(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
osal_u8 mac_mimo_power_save_mode_enum_uint8
Definition mac_frame.h:544
osal_u8 mac_mbo_attr_id_enum_uint8
Definition mac_frame.h:641
mac_capability_enum
Definition mac_frame.h:508
@ MAC_CAP_ESS
Definition mac_frame.h:509
@ MAC_CAP_PBCC
Definition mac_frame.h:516
@ MAC_CAP_CHANNEL_AGILITY
Definition mac_frame.h:517
@ MAC_CAP_DSSS_OFDM
Definition mac_frame.h:520
@ MAC_CAP_PRIVACY
Definition mac_frame.h:513
@ MAC_CAP_RADIO_MEAS
Definition mac_frame.h:519
@ MAC_CAP_SHORT_PREAMBLE
Definition mac_frame.h:514
@ MAC_CAP_SHORT_SLOT
Definition mac_frame.h:515
@ MAC_CAP_SPECTRUM_MGMT
Definition mac_frame.h:518
@ MAC_CAP_POLLABLE
Definition mac_frame.h:511
@ MAC_CAP_POLL_REQ
Definition mac_frame.h:512
@ MAC_CAP_IBSS
Definition mac_frame.h:510
mac_mbo_attr_id_enum
Definition mac_frame.h:631
@ MBO_ATTR_ID_ASSOC_RETRY_DELAY
Definition mac_frame.h:639
@ MBO_ATTR_ID_AP_CAPA_IND
Definition mac_frame.h:632
@ MBO_ATTR_ID_TRANSITION_REJECT_REASON
Definition mac_frame.h:638
@ MBO_ATTR_ID_ASSOC_DISALLOW
Definition mac_frame.h:635
@ MBO_ATTR_ID_NON_PREF_CHAN_REPORT
Definition mac_frame.h:633
@ MBO_ATTR_ID_CELL_DATA_PREF
Definition mac_frame.h:636
@ MBO_ATTR_ID_TRANSITION_REASON
Definition mac_frame.h:637
@ MBO_ATTR_ID_CELL_DATA_CAPA
Definition mac_frame.h:634
mac_sec_ch_off_enum
Definition mac_frame.h:546
@ MAC_SCA
Definition mac_frame.h:548
@ MAC_SCN
Definition mac_frame.h:547
@ MAC_SEC_CH_BUTT
Definition mac_frame.h:551
@ MAC_SCB
Definition mac_frame.h:549
osal_u8 mac_protected_he_action_type_enum_uint8
Definition mac_frame.h:442
osal_void mac_set_timeout_interval_ie_etc(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len, osal_u32 type, osal_u32 timeout)
mac_rm_action_type_enum
Definition mac_frame.h:621
@ MAC_RM_ACTION_NEIGHBOR_REPORT_REQUEST
Definition mac_frame.h:626
@ MAC_RM_ACTION_RADIO_MEASUREMENT_REPORT
Definition mac_frame.h:623
@ MAC_RM_ACTION_LINK_MEASUREMENT_REQUEST
Definition mac_frame.h:624
@ MAC_RM_ACTION_LINK_MEASUREMENT_REPORT
Definition mac_frame.h:625
@ MAC_RM_ACTION_NEIGHBOR_REPORT_RESPONSE
Definition mac_frame.h:627
@ MAC_RM_ACTION_RADIO_MEASUREMENT_REQUEST
Definition mac_frame.h:622
mac_ht_action_type_enum
Definition mac_frame.h:397
@ MAC_HT_ACTION_COMPRESSED_BEAMFORMING
Definition mac_frame.h:404
@ MAC_HT_ACTION_SMPS
Definition mac_frame.h:399
@ MAC_HT_ACTION_SET_PCO_PHASE
Definition mac_frame.h:401
@ MAC_HT_ACTION_NON_COMPRESSED_BEAMFORMING
Definition mac_frame.h:403
@ MAC_HT_ACTION_BUTT
Definition mac_frame.h:407
@ MAC_HT_ACTION_PSMP
Definition mac_frame.h:400
@ MAC_HT_ACTION_ASEL_INDICES_FEEDBACK
Definition mac_frame.h:405
@ MAC_HT_ACTION_CSI
Definition mac_frame.h:402
@ MAC_HT_ACTION_NOTIFY_CHANNEL_WIDTH
Definition mac_frame.h:398
osal_u8 hmac_get_dtim_period_etc(osal_u8 *frame_body, osal_u16 frame_body_len)
osal_void hmac_set_obss_scan_params_etc(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
osal_u8 mac_rm_action_type_enum_uint8
Definition mac_frame.h:629
osal_void hmac_set_status_code_ie_etc(osal_u8 *buffer, mac_status_code_enum_uint16 status_code)
osal_u16 hmac_encap_2040_coext_mgmt_etc(osal_void *vap, oal_netbuf_stru *buffer, osal_u8 coext_info, osal_u32 chan_report)
osal_u8 * mac_get_ext_ie_body(osal_u8 *beacon_body, osal_s32 frame_body_len, osal_u8 *ext_ie_body_len, osal_u8 ext_eid)
mac_timeout_interval_type_enum
Definition mac_frame.h:411
@ MAC_TIE_ASSOCIATION_COMEBACK_TIME
Definition mac_frame.h:414
@ MAC_TIE_REASSOCIATION_DEADLINE_INTERVAL
Definition mac_frame.h:412
@ MAC_TIE_KEY_LIFETIME_INTERVAL
Definition mac_frame.h:413
@ MAC_TIE_BUTT
Definition mac_frame.h:416
osal_void mac_set_power_cap_ie_etc(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
osal_u8 hmac_get_dtim_cnt_etc(osal_u8 *frame_body, osal_u16 frame_body_len)
osal_void hmac_set_exsup_rates_ie_etc(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
osal_void(* set_vht_capinfo_field)(osal_void *vap, osal_u8 *buffer)
Definition mac_frame.h:1632
p2p_gen_action_frm_type
Definition mac_frame.h:598
@ P2P_NOA
Definition mac_frame.h:599
@ P2P_PRESENCE_RESP
Definition mac_frame.h:601
@ GO_DISC_REQ
Definition mac_frame.h:602
@ P2P_PRESENCE_REQ
Definition mac_frame.h:600
osal_u8 * hmac_get_ssid_etc(osal_u8 *beacon_body, osal_s32 frame_body_len, osal_u8 *ssid_len)
mac_specmgmt_action_type_enum
Definition mac_frame.h:489
@ MAC_SPEC_CH_SWITCH_ANNOUNCE
Definition mac_frame.h:490
oal_bool_enum_uint8 hmac_is_wmm_ie_etc(const osal_u8 *ie)
osal_void(* set_ext_cap_ie)(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
Definition mac_frame.h:1624
#define MAC_SUBMSDU_LENGTH_OFFSET
Definition mac_frame.h:47
#define MAC_IEEE80211_FCTL_STYPE
Definition mac_frame.h:39
osal_void hmac_set_rsn_ie_etc(osal_void *vap, osal_u8 *pmkid, osal_u8 *buffer, osal_u8 *ie_len)
mac_msdu_proc_status_enum
Definition mac_frame.h:386
@ MAC_PROC_LAST_MSDU
Definition mac_frame.h:388
@ MAC_PROC_BUTT
Definition mac_frame.h:392
@ MAC_PROC_LAST_MSDU_ODD
Definition mac_frame.h:390
@ MAC_PROC_MORE_MSDU
Definition mac_frame.h:389
@ MAC_PROC_ERROR
Definition mac_frame.h:387
osal_u8 mac_sec_ch_off_enum_uint8
Definition mac_frame.h:553
osal_void(* set_rsn_ie)(osal_void *vap, osal_u8 *pmkid, osal_u8 *buffer, osal_u8 *ie_len)
Definition mac_frame.h:1627
mac_txbf_clb_enum
Definition mac_frame.h:480
@ MAC_SUPPOTR_CLB
Definition mac_frame.h:483
@ MAC_CLB_BUTT
Definition mac_frame.h:484
@ MAC_RSP_CLB_ONLY
Definition mac_frame.h:482
@ MAC_NOT_SURPPORT_CLB
Definition mac_frame.h:481
osal_void mac_set_vendor_vht_ie(osal_void *hmac_vap, osal_u8 *buffer, osal_u8 *ie_len)
osal_void hmac_set_vht_opern_ie_etc(osal_void *vap, osal_u8 *buf, osal_u8 *ie_len)
osal_u8 mac_sa_query_action_type_enum_uint8
Definition mac_frame.h:425
osal_u8 * hmac_find_ie_ext_ie(osal_u8 eid, osal_u8 ext_eid, osal_u8 *ie_addr, osal_s32 frame_len)
osal_void mac_set_vendor_novht_ie(osal_void *hmac_vap, osal_u8 *buffer, osal_u8 *ie_len)
mac_p2p_attribute_enum
Definition mac_frame.h:529
@ MAC_P2P_ATTRIBUTE_GROUP_OI
Definition mac_frame.h:531
@ MAC_P2P_ATTRIBUTE_CFG_TIMEOUT
Definition mac_frame.h:532
@ MAC_P2P_ATTRIBUTE_LISTEN_CHAN
Definition mac_frame.h:533
@ MAC_P2P_ATTRIBUTE_CAP
Definition mac_frame.h:530
osal_void hmac_set_beacon_interval_field_etc(osal_void *vap, osal_u8 *buffer)
p2p_pub_act_frm_off
Definition mac_frame.h:578
@ P2P_PUB_ACT_DIALOG_TOKEN_OFF
Definition mac_frame.h:584
@ P2P_PUB_ACT_OUI_SUBTYPE_OFF
Definition mac_frame.h:583
@ P2P_PUB_ACT_TAG_PARAM_OFF
Definition mac_frame.h:585
@ P2P_PUB_ACT_OUI_OFF1
Definition mac_frame.h:579
@ P2P_PUB_ACT_OUI_OFF2
Definition mac_frame.h:580
@ P2P_PUB_ACT_OUI_OFF3
Definition mac_frame.h:581
@ P2P_PUB_ACT_OUI_TYPE_OFF
Definition mac_frame.h:582
osal_void hmac_set_supported_channel_ie_etc(osal_void *vap, osal_u8 *buf, osal_u8 *ie_len)
osal_u16 hmac_get_rsn_capability_etc(const osal_u8 *rsn_ie)
osal_u8 hmac_get_bss_type_etc(osal_u16 cap_info)
mac_protected_he_action_type
Definition mac_frame.h:436
@ MAC_PROTECTED_HE_ACTION_HE_BSS_COLOR_CHANGE_ANNOUNCEMENT
Definition mac_frame.h:437
@ MAC_PROTECTED_HE_ACTION_MU_EDCA_CONTROL
Definition mac_frame.h:438
@ MAC_PROTECTED_HE_ACTION_MAX
Definition mac_frame.h:440
osal_u8 mac_ft_action_type_enum_uint8
Definition mac_frame.h:433
const osal_u8 g_wmm_oui_etc[3]
osal_u16 hmac_get_beacon_period_etc(const osal_u8 *beacon_body)
struct mac_priv_cap mac_priv_cap_stru
osal_void hmac_set_wmm_ie_sta_etc(osal_void *vap, osal_u8 *buffer, osal_u8 *ie_len)
osal_u8 const * mac_frame_get_p2p_oui(osal_void)
#define MAC_80211_FRAME_LEN
Definition mac_frame_common_rom.h:27
#define MAC_QOS_CTRL_FIELD_OFFSET_4ADDR
Definition mac_frame_common_rom.h:41
osal_u16 mac_status_code_enum_uint16
Definition mac_frame_common_rom.h:216
#define MAC_QOS_CTRL_FIELD_OFFSET
Definition mac_frame_common_rom.h:40
@ MAC_PUB_FTM
Definition mac_frame_common_rom.h:112
@ MAC_PUB_FTM_REQ
Definition mac_frame_common_rom.h:111
@ MAC_ACTION_CATEGORY_PUBLIC
Definition mac_frame_common_rom.h:75
#define MAC_BYTE_ALIGN_VALUE
Definition mac_frame_rom.h:36
osal_u16 seq_num
Definition mac_frame_rom.h:7
osal_u32 group
Definition oal_net.h:3
osal_u8 type
Definition oal_net.h:0
osal_u32 ie_len
Definition oal_net.h:0
osal_u8 app_ie_type_uint8
Definition oal_net.h:308
osal_u16 reserved
Definition oal_net.h:4
#define ETHER_ONE_X_TYPE
Definition oal_net_rom.h:91
#define SNAP_LLC_FRAME_LEN
Definition oal_net_rom.h:53
#define SNAP_BTEP_ORGCODE_0
Definition oal_net_rom.h:58
#define SNAP_RFC1042_ORGCODE_2
Definition oal_net_rom.h:57
#define ETHER_TYPE_AARP
Definition oal_net_rom.h:83
#define ETHER_HDR_LEN
Definition oal_net_rom.h:69
#define LLC_UI
Definition oal_net_rom.h:52
#define SNAP_BTEP_ORGCODE_2
Definition oal_net_rom.h:60
#define SNAP_LLC_LSAP
Definition oal_net_rom.h:54
#define SNAP_BTEP_ORGCODE_1
Definition oal_net_rom.h:59
#define SNAP_RFC1042_ORGCODE_0
Definition oal_net_rom.h:55
#define ETHER_TYPE_IPX
Definition oal_net_rom.h:84
#define SNAP_RFC1042_ORGCODE_1
Definition oal_net_rom.h:56
osal_u8 oal_bool_enum_uint8
Definition oal_types_device_rom.h:45
oal_bool_enum
Definition oal_types_device_rom.h:40
@ OAL_FALSE
Definition oal_types_device_rom.h:41
@ OAL_TRUE
Definition oal_types_device_rom.h:42
#define INLINE__
Definition osal_list.h:25
int osal_s32
Definition osal_types.h:19
unsigned char osal_u8
Definition osal_types.h:11
#define OSAL_FALSE
Definition osal_types.h:56
unsigned long long osal_u64
Definition osal_types.h:14
#define OSAL_NULL
Definition osal_types.h:65
void osal_void
Definition osal_types.h:29
#define OSAL_TRUE
Definition osal_types.h:57
unsigned int osal_u32
Definition osal_types.h:13
unsigned short osal_u16
Definition osal_types.h:12
errno_t memcpy_s(void *dest, size_t destMax, const void *src, size_t count)
#define OAL_STATIC
Definition soc_wifi_service_api.c:30
Definition common_dft_rom.h:189
osal_u8 frame_content_switch
Definition common_dft_rom.h:190
osal_u8 frame_cb_switch
Definition common_dft_rom.h:191
osal_u8 frame_dscr_switch
Definition common_dft_rom.h:192
Definition mac_frame.h:842
osal_u8 length
Definition mac_frame.h:844
osal_u64 event_tsf
Definition mac_frame.h:848
osal_u8 event_type
Definition mac_frame.h:846
osal_u64 event_report
Definition mac_frame.h:849
osal_u8 event_token
Definition mac_frame.h:845
osal_u8 event_report_status
Definition mac_frame.h:847
osal_u8 eid
Definition mac_frame.h:843
Definition mac_frame.h:1012
osal_u8 reserve2[3]
Definition mac_frame.h:1015
osal_u8 txbf_11n
Definition mac_frame.h:1013
osal_u8 reserve1
Definition mac_frame.h:1014
Definition mac_frame.h:1019
mac_11ntxbf_info_stru txbf_11n_info
Definition mac_frame.h:1024
osal_u8 len
Definition mac_frame.h:1021
osal_u8 id
Definition mac_frame.h:1020
osal_u8 ouitype
Definition mac_frame.h:1023
osal_u8 oui[3]
Definition mac_frame.h:1022
Definition mac_frame.h:1513
osal_u32 arg1
Definition mac_frame.h:1517
osal_u8 * arg5
Definition mac_frame.h:1521
osal_u32 arg2
Definition mac_frame.h:1518
osal_u32 arg4
Definition mac_frame.h:1520
osal_u8 action
Definition mac_frame.h:1515
osal_u8 category
Definition mac_frame.h:1514
osal_u32 arg3
Definition mac_frame.h:1519
Definition mac_frame.h:1241
osal_u8 max_ampdu_len_exponent
Definition mac_frame.h:1242
osal_u8 min_mpdu_start_spacing
Definition mac_frame.h:1243
osal_u8 bit_resv
Definition mac_frame.h:1244
Definition mac_frame.h:1312
osal_u8 trans_sounding_ppdu
Definition mac_frame.h:1319
osal_u8 antenna_indices_fdbk_tx_asel
Definition mac_frame.h:1315
osal_u8 rx_asel
Definition mac_frame.h:1318
osal_u8 explicit_sci_fdbk_tx_asel
Definition mac_frame.h:1314
osal_u8 bit_resv
Definition mac_frame.h:1320
osal_u8 asel
Definition mac_frame.h:1313
osal_u8 explicit_csi_fdbk
Definition mac_frame.h:1316
osal_u8 antenna_indices_fdbk
Definition mac_frame.h:1317
Definition mac_frame.h:1594
osal_u8 attribute_id
Definition mac_frame.h:1599
osal_u32 reassoc_delay_time
Definition mac_frame.h:1601
osal_u8 attribute_len
Definition mac_frame.h:1600
osal_u8 oui_type
Definition mac_frame.h:1598
osal_u8 oui[3]
Definition mac_frame.h:1597
osal_u8 element_id
Definition mac_frame.h:1595
osal_u8 len
Definition mac_frame.h:1596
Definition mac_frame.h:1081
osal_u16 tid
Definition mac_frame.h:1084
osal_u16 buffersize
Definition mac_frame.h:1085
osal_u16 amsdusupported
Definition mac_frame.h:1082
osal_u16 bapolicy
Definition mac_frame.h:1083
Definition mac_frame.h:1090
osal_u16 startseqnum
Definition mac_frame.h:1092
osal_u16 fragnum
Definition mac_frame.h:1091
Definition mac_frame.h:1225
osal_u16 aac
Definition mac_frame.h:1228
osal_u8 chan_utilization
Definition mac_frame.h:1227
osal_u16 sta_count
Definition mac_frame.h:1226
Definition mac_frame.h:726
osal_u16 pbcc
Definition mac_frame.h:733
osal_u16 apsd
Definition mac_frame.h:738
osal_u16 cf_pollable
Definition mac_frame.h:729
osal_u16 short_slot_time
Definition mac_frame.h:737
osal_u16 ess
Definition mac_frame.h:727
osal_u16 delayed_block_ack
Definition mac_frame.h:741
osal_u16 cf_poll_request
Definition mac_frame.h:730
osal_u16 short_preamble
Definition mac_frame.h:732
osal_u16 dsss_ofdm
Definition mac_frame.h:740
osal_u16 ibss
Definition mac_frame.h:728
osal_u16 channel_agility
Definition mac_frame.h:734
osal_u16 qos
Definition mac_frame.h:736
osal_u16 spectrum_mgmt
Definition mac_frame.h:735
osal_u16 privacy
Definition mac_frame.h:731
osal_u16 immediate_block_ack
Definition mac_frame.h:742
osal_u16 radio_measurement
Definition mac_frame.h:739
Definition mac_frame.h:1233
osal_u8 channel_num
Definition mac_frame.h:1235
osal_u8 first_channel
Definition mac_frame.h:1234
osal_u16 max_tx_pwr
Definition mac_frame.h:1236
Definition mac_frame.h:1106
osal_u8 bit_resv
Definition mac_frame.h:1110
osal_u8 preamble_mode
Definition mac_frame.h:1109
osal_u8 use_protection
Definition mac_frame.h:1108
osal_u8 non_erp
Definition mac_frame.h:1107
Definition mac_frame.h:1274
osal_u16 resv2
Definition mac_frame.h:1281
osal_u16 resv1
Definition mac_frame.h:1277
osal_u16 rd_resp
Definition mac_frame.h:1280
osal_u16 pco_trans_time
Definition mac_frame.h:1276
osal_u16 htc_sup
Definition mac_frame.h:1279
osal_u16 pco
Definition mac_frame.h:1275
osal_u16 mcs_fdbk
Definition mac_frame.h:1278
osal_u8 new_bss_color
Definition mac_frame.h:935
osal_u8 color_switch_countdown
Definition mac_frame.h:934
osal_u8 reserved
Definition mac_frame.h:936
Definition mac_frame.h:1636
set_ext_cap_ie set_ext_cap_ie_cb
Definition mac_frame.h:1637
set_wpa_ie set_wpa_ie_cb
Definition mac_frame.h:1643
set_ht_opern_ie set_ht_opern_ie_cb
Definition mac_frame.h:1639
set_vht_capinfo_field set_vht_capinfo_field_cb
Definition mac_frame.h:1645
set_vht_opern_ie set_vht_opern_ie_cb
Definition mac_frame.h:1642
set_ht_cap_ie set_ht_cap_ie_cb
Definition mac_frame.h:1638
set_vht_cap_ie set_vht_cap_ie_cb
Definition mac_frame.h:1641
set_nb_ie set_nb_ie_cb
Definition mac_frame.h:1644
set_rsn_ie set_rsn_ie_cb
Definition mac_frame.h:1640
osal_u8 ac_srg_partial_bssid_bitmap[8]
Definition mac_frame.h:929
osal_u8 non_srg_boss_pd_offset_max
Definition mac_frame.h:925
osal_u8 srg_bss_color_bitmap_info[8]
Definition mac_frame.h:928
osal_u8 srg_obss_pd_offset_max
Definition mac_frame.h:927
osal_u8 srg_obss_pd_offset_min
Definition mac_frame.h:926
mac_frame_he_sr_control_stru sr_control
Definition mac_frame.h:924
Definition mac_frame.h:913
osal_u8 non_srg_obss_pd_sr_disallowed
Definition mac_frame.h:915
osal_u8 srg_information_present
Definition mac_frame.h:917
osal_u8 hesiga_spatial_reuse_value15_allowed
Definition mac_frame.h:918
osal_u8 non_srg_offset_present
Definition mac_frame.h:916
osal_u8 reserved
Definition mac_frame.h:919
osal_u8 srp_disallowed
Definition mac_frame.h:914
Definition mac_frame.h:747
osal_u16 supported_channel_width
Definition mac_frame.h:749
osal_u16 ldpc_coding_cap
Definition mac_frame.h:748
osal_u16 bit_resv
Definition mac_frame.h:759
osal_u16 short_gi_20mhz
Definition mac_frame.h:752
osal_u16 short_gi_40mhz
Definition mac_frame.h:753
osal_u16 sm_power_save
Definition mac_frame.h:750
osal_u16 rx_stbc
Definition mac_frame.h:755
osal_u16 tx_stbc
Definition mac_frame.h:754
osal_u16 max_amsdu_length
Definition mac_frame.h:757
osal_u16 dsss_cck_mode_40mhz
Definition mac_frame.h:758
osal_u16 ht_delayed_block_ack
Definition mac_frame.h:756
osal_u16 lsig_txop_protection
Definition mac_frame.h:761
osal_u16 forty_mhz_intolerant
Definition mac_frame.h:760
osal_u16 ht_green_field
Definition mac_frame.h:751
Definition mac_frame_common_rom.h:559
osal_u16 protected_frame
Definition mac_frame_common_rom.h:569
osal_u16 to_ds
Definition mac_frame_common_rom.h:563
osal_u16 from_ds
Definition mac_frame_common_rom.h:564
Definition mac_frame.h:1037
osal_u32 bit_himit_version
Definition mac_frame.h:1046
osal_u32 bit_himit_enable
Definition mac_frame.h:1040
osal_u32 bit_ersru_enable
Definition mac_frame.h:1047
osal_u32 bit_hiex_version
Definition mac_frame.h:1039
osal_u32 bit_chip_type
Definition mac_frame.h:1045
osal_u32 bit_he_himit_enable
Definition mac_frame.h:1043
osal_u32 bit_ht_himit_enable
Definition mac_frame.h:1041
osal_u32 bit_he_htc_himit_id
Definition mac_frame.h:1044
osal_u32 bit_hiex_cap
Definition mac_frame.h:1038
osal_u32 bit_vht_himit_enable
Definition mac_frame.h:1042
osal_u32 bit_resv
Definition mac_frame.h:1048
Definition mac_frame.h:1068
mac_hiex_cap_stru hiex_cap
Definition mac_frame.h:1070
mac_ieee80211_vendor_ie_stru vender
Definition mac_frame.h:1069
Definition mac_frame.h:1325
osal_u8 resv6
Definition mac_frame.h:1345
osal_u8 resv2
Definition mac_frame.h:1334
osal_u8 pco_phase
Definition mac_frame.h:1344
osal_u8 resv4
Definition mac_frame.h:1337
osal_u8 resv3
Definition mac_frame.h:1336
osal_u8 dual_cts_protection
Definition mac_frame.h:1340
osal_u8 secondary_beacon
Definition mac_frame.h:1341
osal_u8 dual_beacon
Definition mac_frame.h:1339
osal_u8 obss_nonht_sta_present
Definition mac_frame.h:1335
osal_u8 secondary_chan_offset
Definition mac_frame.h:1328
osal_u8 basic_mcs_set[16]
Definition mac_frame.h:1347
osal_u8 rifs_mode
Definition mac_frame.h:1330
osal_u8 lsig_txop_protection_full_support
Definition mac_frame.h:1342
osal_u8 ht_protection
Definition mac_frame.h:1332
osal_u8 resv1
Definition mac_frame.h:1331
osal_u8 nongf_sta_present
Definition mac_frame.h:1333
osal_u8 resv5
Definition mac_frame.h:1338
osal_u8 pco_active
Definition mac_frame.h:1343
osal_u8 sta_chan_width
Definition mac_frame.h:1329
osal_u8 primary_channel
Definition mac_frame.h:1326
Definition mac_frame.h:679
osal_u8 address1[WLAN_MAC_ADDR_LEN]
Definition mac_frame.h:683
osal_u8 address2[WLAN_MAC_ADDR_LEN]
Definition mac_frame.h:684
osal_u8 address4[WLAN_MAC_ADDR_LEN]
Definition mac_frame.h:688
osal_u16 frag_num
Definition mac_frame.h:686
mac_header_frame_control_stru frame_control
Definition mac_frame.h:680
osal_u8 address3[WLAN_MAC_ADDR_LEN]
Definition mac_frame.h:685
osal_u16 seq_num
Definition mac_frame.h:687
osal_u16 duration_flag
Definition mac_frame.h:682
osal_u16 duration_value
Definition mac_frame.h:681
Definition mac_frame_common_rom.h:575
osal_u8 address1[6]
Definition mac_frame_common_rom.h:579
osal_u8 address2[6]
Definition mac_frame_common_rom.h:580
mac_header_frame_control_stru frame_control
Definition mac_frame_common_rom.h:576
osal_u8 address3[6]
Definition mac_frame_common_rom.h:581
Definition mac_frame.h:693
osal_u8 qc_txop_limit
Definition mac_frame.h:708
osal_u8 address2[WLAN_MAC_ADDR_LEN]
Definition mac_frame.h:698
osal_u8 qc_ps_buf_state_resv
Definition mac_frame.h:710
osal_u16 frag_num
Definition mac_frame.h:700
osal_u8 address3[WLAN_MAC_ADDR_LEN]
Definition mac_frame.h:699
osal_u8 qc_amsdu
Definition mac_frame.h:706
osal_u16 seq_num
Definition mac_frame.h:701
osal_u8 qc_qosap_buf_load
Definition mac_frame.h:713
osal_u8 address1[WLAN_MAC_ADDR_LEN]
Definition mac_frame.h:697
union mac_ieee80211_qos_frame_addr4::@457 qos_control
osal_u8 address4[WLAN_MAC_ADDR_LEN]
Definition mac_frame.h:702
osal_u8 qc_eosp
Definition mac_frame.h:704
osal_u8 qc_queue_size
Definition mac_frame.h:709
osal_u8 qc_hi_priority_buf_ac
Definition mac_frame.h:712
osal_u8 qc_ps_buf_state_inducated
Definition mac_frame.h:711
mac_header_frame_control_stru frame_control
Definition mac_frame.h:694
osal_u8 qc_tid
Definition mac_frame.h:703
osal_u8 qc_ack_polocy
Definition mac_frame.h:705
osal_u16 duration_flag
Definition mac_frame.h:696
osal_u16 duration_value
Definition mac_frame.h:695
Definition mac_frame.h:719
mac_ieee80211_qos_frame_addr4_stru qos_frame_addr4
Definition mac_frame.h:720
osal_u32 htc
Definition mac_frame.h:721
Definition mac_frame.h:1029
osal_u8 oui_type
Definition mac_frame.h:1033
osal_u8 element_id
Definition mac_frame.h:1030
osal_u8 oui[3]
Definition mac_frame.h:1032
osal_u8 len
Definition mac_frame.h:1031
Definition mac_frame_common_rom.h:501
osal_u8 version_ihl
Definition mac_frame_common_rom.h:502
Definition mac_frame.h:1616
osal_u8 last_beacon_report_indication
Definition mac_frame.h:1619
osal_u8 len
Definition mac_frame.h:1618
osal_u8 sub_eid
Definition mac_frame.h:1617
Definition mac_frame_common_rom.h:463
osal_u8 control
Definition mac_frame_common_rom.h:466
osal_u8 org_code[3]
Definition mac_frame_common_rom.h:467
osal_u8 llc_ssap
Definition mac_frame_common_rom.h:465
osal_u8 llc_dsap
Definition mac_frame_common_rom.h:464
osal_u16 ether_type
Definition mac_frame_common_rom.h:468
Definition mac_frame.h:1133
osal_u16 scan_activity_thresh
Definition mac_frame.h:1140
osal_u16 scan_interval
Definition mac_frame.h:1136
osal_u16 active_total_per_chan
Definition mac_frame.h:1138
osal_u16 transition_delay_factor
Definition mac_frame.h:1139
osal_u16 passive_total_per_chan
Definition mac_frame.h:1137
osal_u16 active_dwell
Definition mac_frame.h:1135
osal_u16 passive_dwell
Definition mac_frame.h:1134
Definition mac_frame.h:1571
osal_u8 opmode_ctl
Definition mac_frame.h:1574
osal_u8 category
Definition mac_frame.h:1572
osal_u8 arg
Definition mac_frame.h:1575
osal_u8 action
Definition mac_frame.h:1573
Definition mac_frame.h:1352
osal_u8 rx_nss
Definition mac_frame.h:1355
osal_u8 bit_resv
Definition mac_frame.h:1354
osal_u8 channel_width
Definition mac_frame.h:1353
osal_u8 rx_nss_type
Definition mac_frame.h:1356
Definition mac_frame.h:1051
osal_u32 bit_p2p_csa_support
Definition mac_frame.h:1054
osal_u32 bit_ersru_he_ltf_num
Definition mac_frame.h:1063
osal_u32 bit_sgi_400ns_cap
Definition mac_frame.h:1058
osal_u32 bit_11b_plus_cap
Definition mac_frame.h:1064
osal_u32 bit_p2p_scenes
Definition mac_frame.h:1055
osal_u32 bit_vht_3nss_160m_mcs9
Definition mac_frame.h:1062
osal_u32 bit_1024qam_cap
Definition mac_frame.h:1056
osal_u32 bit_11ax_support
Definition mac_frame.h:1052
osal_u32 bit_sub_wf_cap
Definition mac_frame.h:1061
osal_u32 bit_he_ltf
Definition mac_frame.h:1060
osal_u32 bit_vht_3nss_80m_mcs6
Definition mac_frame.h:1059
osal_u32 bit_4096qam_cap
Definition mac_frame.h:1057
osal_u32 bit_dcm_support
Definition mac_frame.h:1053
osal_u32 bit_resv
Definition mac_frame.h:1065
Definition mac_frame.h:1074
mac_priv_cap_stru priv_cap
Definition mac_frame.h:1076
mac_ieee80211_vendor_ie_stru vender
Definition mac_frame.h:1075
Definition mac_frame.h:1204
osal_u8 params_count
Definition mac_frame.h:1205
osal_u8 bit_resv
Definition mac_frame.h:1206
osal_u8 uapsd
Definition mac_frame.h:1207
Definition mac_frame.h:1097
osal_u8 quiet_count
Definition mac_frame.h:1098
osal_u16 quiet_offset
Definition mac_frame.h:1101
osal_u16 quiet_duration
Definition mac_frame.h:1100
osal_u8 quiet_period
Definition mac_frame.h:1099
Definition mac_frame.h:1648
osal_u8 count
Definition mac_frame.h:1651
osal_u16 offset
Definition mac_frame.h:1650
osal_u8 period
Definition mac_frame.h:1652
osal_u16 duration
Definition mac_frame.h:1649
Definition mac_frame.h:1606
osal_u8 len
Definition mac_frame.h:1608
osal_u8 sub_eid
Definition mac_frame.h:1607
osal_u8 bit_fragment_id_number
Definition mac_frame.h:1610
osal_u8 bit_more_frame_body_fragments
Definition mac_frame.h:1611
osal_u8 bit_beacon_report_id
Definition mac_frame.h:1609
Definition mac_frame.h:1115
osal_u16 mfpr
Definition mac_frame.h:1120
osal_u16 spp_amsdu_capable
Definition mac_frame.h:1124
osal_u16 peer_key
Definition mac_frame.h:1123
osal_u16 spp_amsdu_required
Definition mac_frame.h:1125
osal_u16 ext_key_id
Definition mac_frame.h:1127
osal_u16 pre_auth
Definition mac_frame.h:1116
osal_u16 rsv0
Definition mac_frame.h:1122
osal_u16 pbac
Definition mac_frame.h:1126
osal_u16 mfpc
Definition mac_frame.h:1121
osal_u16 gtska_relay_counter
Definition mac_frame.h:1119
osal_u16 no_pairwise
Definition mac_frame.h:1117
osal_u16 rsv1
Definition mac_frame.h:1128
osal_u16 ptska_relay_counter
Definition mac_frame.h:1118
Definition mac_frame.h:1563
osal_u8 category
Definition mac_frame.h:1564
osal_u8 sm_ctl
Definition mac_frame.h:1566
osal_u8 arg
Definition mac_frame.h:1567
osal_u8 action
Definition mac_frame.h:1565
Definition mac_frame.h:1249
osal_u16 rx_highest_rate
Definition mac_frame.h:1251
osal_u32 resv2
Definition mac_frame.h:1257
osal_u8 rx_mcs[10]
Definition mac_frame.h:1250
osal_u16 resv1
Definition mac_frame.h:1252
osal_u32 tx_rx_not_equal
Definition mac_frame.h:1254
osal_u32 tx_max_stream
Definition mac_frame.h:1255
osal_u32 tx_unequal_modu
Definition mac_frame.h:1256
osal_u32 tx_mcs_set_def
Definition mac_frame.h:1253
Definition mac_frame.h:1525
osal_u16 traffic_type
Definition mac_frame.h:1526
osal_u16 user_prio
Definition mac_frame.h:1532
osal_u8 rsvd
Definition mac_frame.h:1535
osal_u16 tsid
Definition mac_frame.h:1527
osal_u8 schedule
Definition mac_frame.h:1534
osal_u16 ack_policy
Definition mac_frame.h:1533
osal_u16 aggr
Definition mac_frame.h:1530
osal_u16 acc_policy
Definition mac_frame.h:1529
osal_u16 apsd
Definition mac_frame.h:1531
osal_u16 direction
Definition mac_frame.h:1528
Definition mac_frame.h:1287
osal_u32 rx_ndp
Definition mac_frame.h:1291
osal_u32 tx_ndp
Definition mac_frame.h:1292
osal_u32 calibration
Definition mac_frame.h:1294
osal_u32 tx_stagg_sounding
Definition mac_frame.h:1290
osal_u32 implicit_txbf
Definition mac_frame.h:1293
osal_u32 explicit_txbf_csi_fdbk
Definition mac_frame.h:1298
osal_u32 csi_maxnum_rows_bf_sup
Definition mac_frame.h:1305
osal_u32 chan_estimation
Definition mac_frame.h:1306
osal_u32 compr_steering_num_bf_antssup
Definition mac_frame.h:1304
osal_u32 noncompr_steering_num_bf_antssup
Definition mac_frame.h:1303
osal_u32 explicit_noncompr_bf_fdbk
Definition mac_frame.h:1299
osal_u32 explicit_compr_bf_fdbk
Definition mac_frame.h:1300
osal_u32 implicit_txbf_rx
Definition mac_frame.h:1288
osal_u32 bit_resv
Definition mac_frame.h:1307
osal_u32 minimal_grouping
Definition mac_frame.h:1301
osal_u32 csi_num_bf_antssup
Definition mac_frame.h:1302
osal_u32 explicit_compr_steering
Definition mac_frame.h:1297
osal_u32 explicit_csi_txbf
Definition mac_frame.h:1295
osal_u32 explicit_noncompr_steering
Definition mac_frame.h:1296
osal_u32 rx_stagg_sounding
Definition mac_frame.h:1289
Definition mac_frame.h:766
osal_u32 su_beamformer_cap
Definition mac_frame.h:774
osal_u32 rx_stbc
Definition mac_frame.h:773
osal_u32 su_beamformee_cap
Definition mac_frame.h:775
osal_u32 supported_channel_width
Definition mac_frame.h:768
osal_u32 mu_beamformer_cap
Definition mac_frame.h:778
osal_u32 bit_max_mpdu_length
Definition mac_frame.h:767
osal_u32 max_ampdu_len_exp
Definition mac_frame.h:782
osal_u32 short_gi_80mhz
Definition mac_frame.h:770
osal_u32 short_gi_160mhz
Definition mac_frame.h:771
osal_u32 vht_link_adaptation
Definition mac_frame.h:783
osal_u32 tx_stbc
Definition mac_frame.h:772
osal_u32 num_bf_ant_supported
Definition mac_frame.h:776
osal_u32 vht_txop_ps
Definition mac_frame.h:780
osal_u32 rx_ldpc
Definition mac_frame.h:769
osal_u32 bit_resv
Definition mac_frame.h:786
osal_u32 rx_ant_pattern
Definition mac_frame.h:784
osal_u32 mu_beamformee_cap
Definition mac_frame.h:779
osal_u32 tx_ant_pattern
Definition mac_frame.h:785
osal_u32 htc_vht_capable
Definition mac_frame.h:781
osal_u32 num_sounding_dim
Definition mac_frame.h:777
Definition mac_frame.h:1361
osal_u8 channel_center_freq_seg1
Definition mac_frame.h:1364
osal_u16 basic_mcs_set
Definition mac_frame.h:1365
osal_u8 channel_width
Definition mac_frame.h:1362
osal_u8 channel_center_freq_seg0
Definition mac_frame.h:1363
Definition mac_frame.h:1263
osal_u32 tx_mcs_map
Definition mac_frame.h:1267
osal_u32 resv2
Definition mac_frame.h:1269
osal_u32 rx_mcs_map
Definition mac_frame.h:1264
osal_u32 rx_highest_rate
Definition mac_frame.h:1265
osal_u32 bit_resv
Definition mac_frame.h:1266
osal_u32 tx_highest_rate
Definition mac_frame.h:1268
Definition mac_frame.h:1213
osal_u8 ecwmin
Definition mac_frame.h:1218
osal_u8 aifsn
Definition mac_frame.h:1214
osal_u8 bit_resv
Definition mac_frame.h:1217
osal_u8 aci
Definition mac_frame.h:1216
osal_u8 acm
Definition mac_frame.h:1215
osal_u16 txop
Definition mac_frame.h:1220
osal_u8 ecwmax
Definition mac_frame.h:1219
Definition oal_skbuff.h:82
unsigned char td_u8
Definition td_type.h:36
unsigned int td_u32
Definition td_type.h:38
Definition hal_uart_v151_regs_def.h:38
#define WLAN_FC0_TYPE_MGT
Definition wlan_types.h:59
#define WLAN_FC0_SUBTYPE_ACTION
Definition wlan_types.h:75
osal_u8 wlan_nss_enum_uint8
Definition wlan_types_base_rom.h:240
@ WLAN_ACTION
Definition wlan_types_base_rom.h:40
@ WLAN_WME_AC_BUTT
Definition wlan_types_base_rom.h:54
osal_u8 wlan_pmf_cap_status_uint8
Definition wlan_types_common.h:194