• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  * Description: Header file of mac_vap_etc.c.
15  * Create: 2020-7-8
16  */
17 #ifndef __MAC_VAP_EXT_H__
18 #define __MAC_VAP_EXT_H__
19 
20 /* 文件合一后去掉HMAC、DMAC两个宏 */
21 #include "mac_device_ext.h"
22 #include "mac_user_ext.h"
23 #include "hcc_types.h"
24 #include "hcc_host_if.h"
25 #include "oal_schedule.h"
26 #include "oal_fsm.h"
27 #include "oal_netbuf_ext.h"
28 #include "oam_ext_if.h"
29 #include "hmac_tcp_opt_struc.h"    // tcp_opt优化的特性移除之后,不在关联此头文件
30 #include "hal_ext_if.h"
31 #include "alg_common_rom.h"
32 #include "msg_vap_manage_rom.h"
33 #include "msg_wow_rom.h"
34 
35 #ifdef __cplusplus
36 #if __cplusplus
37 extern "C" {
38 #endif
39 #endif
40 
41 /* ****************************************************************************
42     宏定义
43 **************************************************************************** */
44 #define MAC_NUM_DR_802_11A 8  /* 11A 5g模式时的数据速率(DR)个数 */
45 #define MAC_NUM_BR_802_11A 3  /* 11A 5g模式时的基本速率(BR)个数 */
46 #define MAC_NUM_NBR_802_11A 5 /* 11A 5g模式时的非基本速率(NBR)个数 */
47 
48 #define MAC_NUM_DR_802_11B 4  /* 11B 2.4G模式时的数据速率(DR)个数 */
49 #define MAC_NUM_BR_802_11B 2  /* 11B 2.4G模式时的数据速率(BR)个数 */
50 #define MAC_NUM_NBR_802_11B 2 /* 11B 2.4G模式时的数据速率(NBR)个数 */
51 
52 #define MAC_NUM_DR_802_11G 8  /* 11G 2.4G模式时的数据速率(DR)个数 */
53 #define MAC_NUM_BR_802_11G 3  /* 11G 2.4G模式时的基本速率(BR)个数 */
54 #define MAC_NUM_NBR_802_11G 5 /* 11G 2.4G模式时的非基本速率(NBR)个数 */
55 
56 #define MAC_NUM_DR_802_11G_MIXED 12     /* 11G 混合模式时的数据速率(DR)个数 */
57 #define MAC_NUM_BR_802_11G_MIXED_ONE 4  /* 11G 混合1模式时的基本速率(BR)个数 */
58 #define MAC_NUM_NBR_802_11G_MIXED_ONE 8 /* 11G 混合1模式时的非基本速率(NBR)个数 */
59 
60 #define MAC_NUM_BR_802_11G_MIXED_TWO 7  /* 11G 混合2模式时的基本速率(BR)个数 */
61 #define MAC_NUM_NBR_802_11G_MIXED_TWO 5 /* 11G 混合2模式时的非基本速率(NBR)个数 */
62 
63 /* 11N MCS相关的内容 */
64 #define MAC_MAX_RATE_SINGLE_NSS_20M_11N 0 /* 1个空间流20MHz的最大速率 */
65 #define MAC_MAX_RATE_SINGLE_NSS_40M_11N 0 /* 1个空间流40MHz的最大速率 */
66 #define MAC_MAX_RATE_DOUBLE_NSS_20M_11N 0 /* 1个空间流80MHz的最大速率 */
67 #define MAC_MAX_RATE_DOUBLE_NSS_40M_11N 0 /* 2个空间流20MHz的最大速率 */
68 
69 /* 11AC MCS相关的内容 */
70 #define MAC_MAX_SUP_MCS7_11AC_EACH_NSS 0  /* 11AC各空间流支持的最大MCS序号,支持0-7 */
71 #define MAC_MAX_SUP_MCS8_11AC_EACH_NSS 1  /* 11AC各空间流支持的最大MCS序号,支持0-8 */
72 #define MAC_MAX_SUP_MCS9_11AC_EACH_NSS 2  /* 11AC各空间流支持的最大MCS序号,支持0-9 */
73 #define MAC_MAX_UNSUP_MCS_11AC_EACH_NSS 3 /* 11AC各空间流支持的最大MCS序号,不支持n个空间流 */
74 
75 #ifdef _PRE_WLAN_FEATURE_1024QAM
76 #define MAC_MAX_RATE_SINGLE_NSS_20M_11AC 107   /* 1个空间流20MHz的最大Long GI速率 */
77 #define MAC_MAX_RATE_SINGLE_NSS_40M_11AC 225   /* 1个空间流40MHz的最大Long GI速率 */
78 #define MAC_MAX_RATE_SINGLE_NSS_80M_11AC 487   /* 1个空间流80MHz的最大Long GI速率 */
79 #define MAC_MAX_RATE_SINGLE_NSS_160M_11AC 975  /* 1个空间流160MHz的最大Long GI速率 */
80 #define MAC_MAX_RATE_DOUBLE_NSS_20M_11AC 216   /* 2个空间流20MHz的最大Long GI速率 */
81 #define MAC_MAX_RATE_DOUBLE_NSS_40M_11AC 450   /* 2个空间流40MHz的最大Long GI速率 */
82 #define MAC_MAX_RATE_DOUBLE_NSS_80M_11AC 975   /* 2个空间流80MHz的最大Long GI速率 */
83 #define MAC_MAX_RATE_DOUBLE_NSS_160M_11AC 1950 /* 2个空间流160MHz的最大Long GI速率 */
84 #else
85 /* 按照协议要求(9.4.2.158.3章节),修改为long gi速率 */
86 #define MAC_MAX_RATE_SINGLE_NSS_20M_11AC 86    /* 1个空间流20MHz的最大速率 */
87 #define MAC_MAX_RATE_SINGLE_NSS_40M_11AC 180   /* 1个空间流40MHz的最大速率 */
88 #define MAC_MAX_RATE_SINGLE_NSS_80M_11AC 390   /* 1个空间流80MHz的最大速率 */
89 #define MAC_MAX_RATE_SINGLE_NSS_160M_11AC 780  /* 1个空间流160MHz的最大速率 */
90 #define MAC_MAX_RATE_DOUBLE_NSS_20M_11AC 173   /* 2个空间流20MHz的最大速率 */
91 #define MAC_MAX_RATE_DOUBLE_NSS_40M_11AC 360   /* 2个空间流40MHz的最大速率 */
92 #define MAC_MAX_RATE_DOUBLE_NSS_80M_11AC 780   /* 2个空间流80MHz的最大速率 */
93 #define MAC_MAX_RATE_DOUBLE_NSS_160M_11AC 1560 /* 2个空间流160MHz的最大速率 */
94 #endif
95 
96 #define HMAC_FBT_RSSI_ADJUST_VALUE 100
97 #define HMAC_RSSI_SIGNAL_INVALID 0xff /* 上报RSSI无效值 */
98 #define HMAC_FBT_RSSI_MAX_VALUE 100
99 
100 #define MAC_VAP_USER_HASH_INVALID_VALUE 0xFFFFFFFF                /* HSAH非法值 */
101 #define MAC_VAP_USER_HASH_MAX_VALUE (WLAN_ASSOC_USER_MAX_NUM * 2) /* 2为扩展因子 */
102 
103 #define MAC_VAP_CAP_ENABLE 1
104 #define MAC_VAP_CAP_DISABLE 0
105 
106 #define MAC_VAP_FEATURE_ENABLE 1
107 #define MAC_VAP_FEATRUE_DISABLE 0
108 
109 #define MAC_DATA_CONTAINER_HEADER_LEN 4
110 #define MAC_DATA_CONTAINER_MAX_LEN 512
111 #define MAC_DATA_CONTAINER_MIN_LEN 8 /* 至少要包含1个事件 */
112 
113 #define MAC_SEND_TWO_DEAUTH_FLAG 0xf000
114 
115 #define MAC_DBB_SCALING_2G_RATE_NUM 12              /* 2G rate速率的个数 */
116 #define MAC_DBB_SCALING_5G_RATE_NUM 8               /* 2G rate速率的个数 */
117 #define MAC_DBB_SCALING_2G_RATE_OFFSET 0            /* 2G Rate dbb scaling 索引偏移值 */
118 #define MAC_DBB_SCALING_2G_HT20_MCS_OFFSET 12       /* 2G HT20 dbb scaling 索引偏移值 */
119 #define MAC_DBB_SCALING_2G_HT40_MCS_OFFSET 20       /* 2G HT40 dbb scaling 索引偏移值 */
120 #define MAC_DBB_SCALING_2G_HT40_MCS32_OFFSET 61     /* 2G HT40 mcs32 dbb scaling 索引偏移值 */
121 #define MAC_DBB_SCALING_5G_RATE_OFFSET 28           /* 5G Rate dbb scaling 索引偏移值 */
122 #define MAC_DBB_SCALING_5G_HT20_MCS_OFFSET 40       /* 5G HT20 dbb scaling 索引偏移值 */
123 #define MAC_DBB_SCALING_5G_HT20_MCS8_OFFSET 36      /* 5G HT20 mcs8 dbb scaling 索引偏移值 */
124 #define MAC_DBB_SCALING_5G_HT40_MCS_OFFSET 48       /* 5G HT40 dbb scaling 索引偏移值 */
125 #define MAC_DBB_SCALING_5G_HT40_MCS32_OFFSET 60     /* 5G HT40 mcs32 dbb scaling 索引偏移值 */
126 #define MAC_DBB_SCALING_5G_HT80_MCS_OFFSET 66       /* 5G HT80 dbb scaling 索引偏移值 */
127 #define MAC_DBB_SCALING_5G_HT80_MCS0_DELTA_OFFSET 2 /* 5G HT80 mcs0/1 dbb scaling 索引偏移值回退值 */
128 
129 #ifdef _PRE_PLAT_FEATURE_CUSTOMIZE
130 #define MAC_2G_CHANNEL_NUM 13
131 #define MAC_NUM_2G_BAND 3            /* 2g band数 */
132 #define MAC_NUM_5G_BAND 7            /* 5g band数 */
133 #define MAC_EXT_PA_GAIN_MAX_LVL 2    /* 定制化外置PA最大档位数 */
134 #define CUS_RF_PA_BIAS_REG_NUM 43    /* 定制化RF部分PA偏置寄存器最大数 */
135 #define CUS_DY_CALI_PARAMS_NUM 14    /* 动态校准参数个数,2.4g 3个(ofdm 20/40 11b cw),5g 5*2个band */
136 #define CUS_DY_CALI_PARAMS_TIMES 3   /* 动态校准参数二次项系数个数 */
137 #define CUS_DY_CALI_DPN_PARAMS_NUM 4 /* 定制化动态校准2.4G DPN参数个数11b OFDM20/40 CW OR 5G 160/80/40/20 */
138 #define CUS_DY_CALI_NUM_5G_BAND 5    /* 动态校准5g band1 2&3 4&5 6 7 */
139 #define CUS_DY_CALI_2G_VAL_DPN_MAX (50)  /* 动态校准2g dpn读取nvram最大值 */
140 #define CUS_DY_CALI_2G_VAL_DPN_MIN (-50) /* 动态校准2g dpn读取nvram最小值 */
141 #define CUS_DY_CALI_5G_VAL_DPN_MAX (50)  /* 动态校准5g dpn读取nvram最大值 */
142 #define CUS_DY_CALI_5G_VAL_DPN_MIN (-50) /* 动态校准5g dpn读取nvram最小值 */
143 #define CUS_NUM_2G_DELTA_RSSI_NUM (2)    /* 20M/40M */
144 #define CUS_NUM_5G_DELTA_RSSI_NUM (4)    /* 20M/40M/80M/160M */
145 #endif
146 
147 #ifdef _PRE_WLAN_ONLINE_DPD
148 #define MAC_DPD_CALI_CUS_PARAMS_NUM (5)
149 #endif
150 
151 #define HMAC_RSP_MSG_MAX_LEN 128 /* get wid返回消息最大长度 */
152 
153 #define MAC_VAP_INVAILD (0x0) /* 0为vap无效 */
154 #define MAC_VAP_VAILD (0x2b)
155 
156 /* ****************************************************************************
157     枚举定义
158 **************************************************************************** */
159 /* 功率设置维测命令类型枚举 */
160 typedef enum {
161     MAC_SET_POW_RF_REG_CTL = 0, /* 功率是否RF寄存器控 */
162     MAC_SET_POW_FIX_LEVEL,      /* 固定功率等级 */
163     MAC_SET_POW_MAG_LEVEL,      /* 管理帧功率等级 */
164     MAC_SET_POW_CTL_LEVEL,      /* 控制帧功率等级 */
165     MAC_SET_POW_AMEND,          /* 修正UPC code */
166     MAC_SET_POW_NO_MARGIN,      /* 功率不留余量 */
167     MAC_SET_POW_SHOW_LOG,       /* 日志显示 */
168     MAC_SET_POW_SAR_LVL_DEBUG,  /* 降sar  */
169 
170     MAC_SET_POW_BUTT
171 } mac_set_pow_type_enum;
172 typedef osal_u8 mac_set_pow_type_enum_uint8;
173 
174 typedef enum {
175     MAC_VAP_CONFIG_UCAST_DATA = 0,
176     MAC_VAP_CONFIG_MCAST_DATA,
177     MAC_VAP_CONFIG_BCAST_DATA,
178     MAC_VAP_CONFIG_UCAST_MGMT_2G,
179     MAC_VAP_CONFIG_UCAST_MGMT_5G,
180     MAC_VAP_CONFIG_MBCAST_MGMT_2G,
181     MAC_VAP_CONFIG_MBCAST_MGMT_5G,
182 
183     MAC_VAP_CONFIG_BUTT,
184 } mac_vap_config_dscr_frame_type_enum;
185 typedef osal_u8 mac_vap_config_dscr_frame_type_uint8;
186 
187 typedef enum {
188     MAC_DYN_CALI_CFG_SET_EN_REALTIME_CALI_ADJUST,
189     MAC_DYN_CALI_CFG_SET_2G_DSCR_INT,
190     MAC_DYN_CALI_CFG_SET_5G_DSCR_INT,
191     MAC_DYN_CALI_CFG_SET_CHAIN_INT,
192     MAC_DYN_CALI_CFG_SET_PDET_MIN_TH,
193     MAC_DYN_CALI_CFG_SET_PDET_MAX_TH,
194     MAC_DYN_CALI_CFG_BUFF,
195 } mac_dyn_cali_cfg_enum;
196 typedef osal_u8 mac_dyn_cali_cfg_enum_uint8;
197 
198 typedef enum {
199     SCAN_PARAM_START,
200     SCAN_PARAM_TX_POWER,
201     SCAN_PARAM_COUNT,
202     SCAN_PARAM_STAY_TIME,
203     SCAN_PARAM_ON_HOME_TIME,
204     SCAN_PARAM_CHANNEL_LIST,
205     SCAN_PARAM_INTERVAL,
206     SCAN_PARAM_SCAN_MODE,
207     SCAN_PARAM_NOT_SCAN,
208     SCAN_PARAM_DEL_SCAN_LIST,
209     SCAN_PARAM_MAX
210 } scan_param_cfg;
211 
212 typedef enum {
213     MAC_SET_BEACON = 0,
214     MAC_ADD_BEACON = 1,
215 
216     MAC_BEACON_OPERATION_BUTT
217 } mac_beacon_operation_type;
218 typedef osal_u8 mac_beacon_operation_type_uint8;
219 
220 typedef enum {
221     MAC_WMM_SET_PARAM_TYPE_DEFAULT,
222     MAC_WMM_SET_PARAM_TYPE_UPDATE_EDCA,
223 
224     MAC_WMM_SET_PARAM_TYPE_BUTT
225 } mac_wmm_set_param_type_enum;
226 typedef osal_u8 mac_wmm_set_param_type_enum_uint8;
227 
228 #define MAC_VAP_AP_STATE_BUTT (MAC_VAP_STATE_AP_WAIT_START + 1)
229 #define MAC_VAP_STA_STATE_BUTT MAC_VAP_STATE_BUTT
230 
231 #define H2D_SYNC_MASK_BARK_PREAMBLE (1 << 1)
232 #define H2D_SYNC_MASK_MIB (1 << 2)
233 #define H2D_SYNC_MASK_PROT (1 << 3)
234 
235 #define WAL_HIPRIV_RATE_INVALID 255 /* 无效速率配置值 */
236 
237 enum {
238     PKT_STAT_SET_ENABLE = 0,
239     PKT_STAT_SET_START_STAT = 1,
240     PKT_STAT_SET_FRAME_LEN = 2,
241     PKT_STAT_SET_BUTT
242 };
243 typedef osal_u8 oal_pkts_stat_enum_uint8;
244 
245 enum {
246     OAL_SET_ENABLE = 0,
247     OAL_SET_MAX_BUFF = 1,
248     OAL_SET_THRESHOLD = 2,
249     OAL_SET_LOG_PRINT = 3,
250     OAL_SET_CLEAR = 10,
251 
252     OAL_SET_BUTT
253 };
254 typedef osal_u8 oal_stat_enum_uint8;
255 
256 typedef enum {
257     /* 上报hal消息类型,定义和0506保持一致 */
258     HMAC_CHAN_MEAS_INIT_REPORT                    = 0,       /* 初始化信息上报 */
259     HMAC_CHAN_MEAS_LINK_INFO_REPORT               = 1,       /* 当前链路信息反馈 */
260     HMAC_CHAN_MEAS_CHAN_STAT_REPORT               = 2,       /* 探测信道信息反馈 */
261     HMAC_CHAN_MEAS_SUCC_REPORT                    = 3,       /* 切换成功反馈 */
262     HMAC_CHAN_MEAS_EXTI_REPORT                    = 4,       /* 退出原因上报 */
263     HMAC_CHBA_CHAN_SWITCH_REPORT             = 5,       /* 信道切换信息上报 */
264     HMAC_CHBA_ROLE_REPORT                    = 6,       /* CHBA 角色信息上报 */
265     HMAC_CHBA_GET_BEST_CHANNEL               = 7,       /* CHBA获取最优信道 */
266     HMAC_CHBA_REPORT_TYPE_BUTT,
267 } hmac_info_report_type_enum;
268 
269 #ifdef _PRE_WLAN_DFR_STAT
270 typedef struct {
271     osal_u8 index;
272     osal_u8 mode;
273     osal_u8 resv[2]; /* 保留字节 */
274 } mac_cfg_queue_reset_stru;
275 #endif
276 #ifdef _PRE_WLAN_FEATURE_PK_MODE
277 typedef struct {
278     osal_u32 high_th;
279     osal_u32 low_th;
280 } mac_cfg_pk_mode_th_reset_stru;
281 #endif
282 typedef struct {
283     osal_u8 ch;      /* 信道编号 */
284     osal_s8 power;   /* 功率 */
285     osal_u8 resv[2]; /* 2保留字节 */
286 } mac_cfg_adjust_tx_power_stru;
287 
288 typedef struct {
289     /* tx dscr tx_count0/1/2/3 */
290     osal_u8 tx_count0;
291     osal_u8 tx_count1;
292     osal_u8 tx_count2;
293     osal_u8 tx_count3;
294 } mac_hw_retry_num_stru;
295 
296 typedef struct {
297     osal_u32 rate;
298     osal_u32 phy_mode;
299     osal_u8 addr1[WLAN_MAC_ADDR_LEN];
300 } mac_cfg_rts_info;
301 
302 
303 typedef struct {
304     osal_u8 ac;
305     osal_u16 lifetime;
306     osal_u8 resv; /* 1保留字节 */
307 } mac_cfg_lifetime;
308 
309 #ifdef _PRE_WLAN_FEATURE_WOW_OFFLOAD
310 typedef enum {
311     MAC_WOW_DISABLE,
312     MAC_WOW_ENABLE,
313     MAC_WOW_EN_BUTT
314 } mac_wow_en_enum;
315 
316 typedef enum {
317     MAC_WOW_WAKEUP_NOTIFY,
318     MAC_WOW_SLEEP_REQUEST,
319     MAC_WOW_NOTIFY_TYPE_BUTT
320 } mac_wow_notify_type_enum;
321 
322 typedef enum {
323     MAC_WOW_FIELD_ALL_CLEAR = 0,             /* Clear all events */
324     MAC_WOW_FIELD_MAGIC_PACKET = BIT0,       /* Wakeup on Magic Packet */
325     MAC_WOW_FIELD_NETPATTERN_TCP = BIT1,     /* Wakeup on TCP NetPattern */
326     MAC_WOW_FIELD_NETPATTERN_UDP = BIT2,     /* Wakeup on UDP NetPattern */
327     MAC_WOW_FIELD_DISASSOC = BIT3,           /* 去关联/去认证,Wakeup on Disassociation/Deauth */
328 } mac_wow_field_enum;
329 
330 typedef enum {
331     MAC_WOW_WKUP_REASON_TYPE_NULL = 0,               /* None */
332     MAC_WOW_WKUP_REASON_TYPE_MAGIC_PACKET = 1,       /* Wakeup on Magic Packet */
333     MAC_WOW_WKUP_REASON_TYPE_NETPATTERN_TCP = 2,     /* Wakeup on TCP NetPattern */
334     MAC_WOW_WKUP_REASON_TYPE_NETPATTERN_UDP = 3,     /* Wakeup on UDP NetPattern */
335     MAC_WOW_WKUP_REASON_TYPE_DISASSOC_RX = 4,        /* 对端去关联/去认证,Wakeup on Disassociation/Deauth */
336     MAC_WOW_WKUP_REASON_TYPE_DISASSOC_TX = 5,        /* 对端去关联/去认证,Wakeup on Disassociation/Deauth */
337     MAC_WOW_WKUP_REASON_TYPE_BUT
338 } mac_wow_wakeup_reason_type_enum;
339 #endif
340 
341 #ifdef _PRE_WLAN_FEATURE_TCP_ACK_BUFFER
342 typedef enum {
343     MAC_TCP_ACK_BUF_ENABLE,
344     MAC_TCP_ACK_BUF_TIMEOUT,
345     MAC_TCP_ACK_BUF_MAX,
346 
347     MAC_TCP_ACK_BUF_TYPE_BUTT
348 } mac_tcp_ack_buf_cfg_cmd_enum;
349 typedef osal_u8 mac_tcp_ack_buf_cfg_cmd_enum_uint8;
350 typedef struct {
351     osal_s8 *string;
352     mac_tcp_ack_buf_cfg_cmd_enum_uint8 tcp_ack_buf_cfg_id;
353     osal_u8 auc_resv[3];
354 } mac_tcp_ack_buf_cfg_table_stru;
355 typedef struct {
356     mac_tcp_ack_buf_cfg_cmd_enum_uint8 cmd;
357     oal_bool_enum_uint8 enable;
358     osal_u8 timeout_ms;
359     osal_u8 count_limit;
360 } mac_cfg_tcp_ack_buf_stru;
361 #endif
362 typedef struct {
363     osal_u8 type;
364     osal_u8 chan_list[WLAN_MAX_CHANNEL_NUM];
365     osal_u16 value;
366     osal_u8 resv[2]; /* 2保留字节 */
367 } mac_cfg_set_scan_param;
368 
369 typedef struct {
370     osal_u8 scan_cnt;                  /* 扫描次数 */
371     osal_u8 scan_time;                 /* 扫描驻留时间 */
372     osal_u8 scan_channel_interval;     /* 间隔n个信道,切回工作信道工作一段时间 */
373     osal_u8 work_time_on_home_channel; /* 背景扫描时,返回工作信道工作的时间 */
374     osal_u8 single_probe_send_times; /* 单个probe req报文的发送次数 */
375     osal_u8 resv[3]; /* 3保留字节 */
376 } mac_cfg_scan_param_stru;
377 
378 typedef struct {
379     osal_u16 txop_limit_cycle;
380     osal_u8 resv[2]; /* 2保留字节 */
381 } mac_cfg_txop_limit_cycle;
382 
383 typedef enum {
384     WITP_WPA_VERSION_1 = 1,
385     WITP_WPA_VERSION_2 = 2,
386     WITP_WAPI_VERSION = 1 << 7,
387 } witp_wpa_versions_enum;
388 
389 typedef struct {
390     osal_char *car_name;
391     mac_rssi_limit_type_enum_uint8 rssi_cfg_id;
392     osal_u8 auc_resv[3]; /* 3字节对齐 */
393 } mac_rssi_cfg_table_stru;
394 
cipher_suite_selector(osal_u32 a,osal_u32 b,osal_u32 c,osal_u32 d)395 static INLINE__ osal_u32 cipher_suite_selector(osal_u32 a, osal_u32 b, osal_u32 c, osal_u32 d)
396 {
397     return (((osal_u32)d) << 24) | (((osal_u32)c) << 16) | (((osal_u32)b) << 8) | (osal_u32)a;
398 }
399 #define MAC_WPA_CHIPER_CCMP cipher_suite_selector(0x00, 0x50, 0xf2, 4)
400 #define MAC_WPA_CHIPER_TKIP cipher_suite_selector(0x00, 0x50, 0xf2, 2)
401 #define MAC_WPA_AKM_PSK cipher_suite_selector(0x00, 0x50, 0xf2, 2)
402 #define MAC_WPA_AKM_PSK_SHA256 cipher_suite_selector(0x00, 0x50, 0xf2, 6)
403 #define MAC_RSN_CHIPER_CCMP cipher_suite_selector(0x00, 0x0f, 0xac, 4)
404 #define MAC_RSN_CHIPER_TKIP cipher_suite_selector(0x00, 0x0f, 0xac, 2)
405 #define MAC_RSN_AKM_PSK cipher_suite_selector(0x00, 0x0f, 0xac, 2)
406 #define MAC_RSN_AKM_PSK_SHA256 cipher_suite_selector(0x00, 0x0f, 0xac, 6)
407 #define MAC_RSN_AKM_SAE_SHA256 cipher_suite_selector(0x00, 0x0f, 0xac, 8)
408 #define MAC_RSN_AKM_OWE cipher_suite_selector(0x00, 0x0f, 0xac, 18)
409 #define MAC_RSN_CIPHER_SUITE_AES_128_CMAC cipher_suite_selector(0x00, 0x0f, 0xac, 6)
410 #define MAC_RSN_CIPHER_SUITE_GCMP cipher_suite_selector(0x00, 0x0f, 0xac, 8)
411 #define MAC_RSN_CIPHER_SUITE_GCMP_256 cipher_suite_selector(0x00, 0x0f, 0xac, 9)
412 #define MAC_RSN_CIPHER_SUITE_CCMP_256 cipher_suite_selector(0x00, 0x0f, 0xac, 10)
413 #define MAC_RSN_CIPHER_SUITE_BIP_GMAC_128 cipher_suite_selector(0x00, 0x0f, 0xac, 11)
414 #define MAC_RSN_CIPHER_SUITE_BIP_GMAC_256 cipher_suite_selector(0x00, 0x0f, 0xac, 12)
415 #define MAC_RSN_CIPHER_SUITE_BIP_CMAC_256 cipher_suite_selector(0x00, 0x0f, 0xac, 13)
416 
417 /* ****************************************************************************
418     STRUCT定义
419 **************************************************************************** */
420 #define SHORTGI_CFG_STRU_LEN 4
421 
422 typedef struct {
423     frw_timeout_stru tbtt_timer;
424     osal_u32 last_tbtt_time;
425 } hmac_sta_tbtt_stru;
426 
427 typedef struct {
428     oal_ieee80211_channel *channel;
429     osal_u64 time;
430     osal_u64 time_busy;
431     osal_u64 time_ext_busy;
432     osal_u64 time_rx;
433     osal_u64 time_tx;
434     osal_u64 time_scan;
435     osal_u32 filled;
436     osal_s8 noise;
437 
438     osal_u8 free_power_cnt;                           /* 信道空闲功率测量次数 */
439     osal_s16 free_power_stats_20m;
440 } hmac_survey_info_stru;
441 
442 #ifdef _PRE_WLAN_FEATURE_WS92_MERGE
443 #define CCPRIV_CMD_NAME_MAX_LEN 40 /* 字符串中每个单词的最大长度 */
444 #else
445 #define CCPRIV_CMD_NAME_MAX_LEN 80 /* 字符串中每个单词的最大长度(原20) */
446 #endif
447 
448 #define CCPRIV_MAC_ADDR_STR_LEN 18 /* mac地址字符串长度 12位数字+5个分隔符+1个结束符 */
449 
450 /* CCPRIV命令参数 */
451 typedef struct {
452     osal_s8 name[CCPRIV_CMD_NAME_MAX_LEN]; /* 命令名 */
453     const osal_s8 *param; /* 参数 */
454 } hmac_ccpriv_para;
455 
456 #ifdef _PRE_WLAN_FEATURE_ISOLATION
457 /* 隔离信息 */
458 typedef struct {
459     osal_u8 single_type;    /* 单bss隔离类型   */
460     osal_u8 multi_type;     /* 多bss隔离类型       */
461     osal_u8 mode;           /* 隔离模式bit0:广播隔离 bit1:组播隔离 bit2:单播隔离   */
462     osal_u8 forward;        /* forwarding方式 */
463     osal_u32 counter_bcast; /* 广播隔离计数器 */
464     osal_u32 counter_mcast; /* 组播隔离计数器 */
465     osal_u32 counter_ucast; /* 单播隔离计数器 */
466 } mac_isolation_info_stru;
467 #endif /* _PRE_WLAN_FEATURE_CUSTOM_SECURITY */
468 #ifdef _PRE_WLAN_FEATURE_PROXY_ARP
469 typedef struct {
470     struct osal_list_head ipv4_head[MAC_VAP_USER_HASH_MAX_VALUE];
471     struct osal_list_head ipv6_head[MAC_VAP_USER_HASH_MAX_VALUE];
472     osal_u16 ipv4_num; /* 记录ipv4的条数 */
473     osal_u16 ipv6_num; /* 记录ipv6的条数 */
474     oal_bool_enum_uint8 is_proxyarp;
475     oal_bool_enum_uint8 en_2wlan;
476 } mac_vap_proxyarp_stru;
477 #endif
478 
479 typedef struct {
480     wlan_bw_switch_status_enum_uint8 bw_switch_status;     /* 带宽切换状态 */
481     wlan_channel_bandwidth_enum_uint8 user_pref_bandwidth;
482     /* VAP为STA时,特有成员        */
483     oal_bool_enum_uint8 te_b;
484     osal_u8 wait_bw_change;         /* 收到action帧,等待切换带宽 */
485     osal_u32 chan_report_for_te_a;
486 } mac_ch_switch_info_stru;
487 
488 typedef struct {
489     osal_u8 rs_nrates;   /* 速率个数 */
490     osal_u8 auc_resv[3]; /* 保留3字节对齐 */
491     mac_data_rate_stru rs_rates[WLAN_MAX_SUPP_RATES];
492 } mac_rateset_stru;
493 
494 typedef struct {
495     osal_u8 br_rate_num;  /* 基本速率个数 */
496     osal_u8 nbr_rate_num; /* 非基本速率个数 */
497     osal_u8 max_rate;     /* 最大基本速率 */
498     osal_u8 min_rate;     /* 最小基本速率 */
499     mac_rateset_stru rate;
500 } mac_curr_rateset_stru;
501 
502 /* VAP收发包统计 */
503 typedef struct {
504     /* net_device用统计信息, net_device统计经过以太网的报文 */
505     osal_u32 rx_packets_to_lan;                /* 接收流程到LAN的包数 */
506     osal_u32 rx_bytes_to_lan;                  /* 接收流程到LAN的字节数 */
507     osal_u32 rx_dropped_packets;               /* 接收流程中丢弃的包数 */
508     osal_u32 rx_vap_non_up_dropped;            /* vap没有up丢弃的包的个数 */
509     osal_u32 rx_dscr_error_dropped;            /* 描述符出错丢弃的包的个数 */
510     osal_u32 rx_first_dscr_excp_dropped;       /* 描述符首包异常丢弃的包的个数 */
511     osal_u32 rx_alg_filter_dropped;            /* 算法过滤丢弃的包的个数 */
512     osal_u32 rx_feature_ap_dropped;            /* AP特性帧过滤丢包个数 */
513     osal_u32 rx_null_frame_dropped;            /* 收到NULL帧的数目 */
514     osal_u32 rx_transmit_addr_checked_dropped; /* 发送端地址过滤失败丢弃 */
515     osal_u32 rx_dest_addr_checked_dropped;     /* 目的地址过滤失败丢弃 */
516     osal_u32 rx_multicast_dropped;             /* 组播帧失败(netbuf copy失败)丢弃 */
517 
518     osal_u32 tx_packets_from_lan; /* 发送流程LAN过来的包数 */
519     osal_u32 tx_bytes_from_lan;   /* 发送流程LAN过来的字节数 */
520     osal_u32 tx_dropped_packets;  /* 发送流程中丢弃的包数 */
521 
522     /* 其它报文统计信息 */
523 } mac_vap_stats_stru;
524 
525 typedef struct {
526     osal_u16 user_idx;
527     wlan_protocol_enum_uint8 avail_protocol_mode; /* 用户协议模式 */
528     wlan_protocol_enum_uint8 cur_protocol_mode;
529     wlan_protocol_enum_uint8 protocol_mode;
530     osal_u8 auc_resv[3];
531 } mac_h2d_user_protocol_stru;
532 
533 typedef struct {
534     osal_u16 user_idx;
535     osal_u8 arg1;
536     osal_u8 arg2;
537 
538     /* 协议模式信息 */
539     wlan_protocol_enum_uint8 cur_protocol_mode;
540     wlan_protocol_enum_uint8 protocol_mode;
541     osal_u8 avail_protocol_mode; /* 用户和VAP协议模式交集, 供算法调用 */
542 
543     wlan_bw_cap_enum_uint8 bandwidth_cap;   /* 用户带宽能力信息 */
544     wlan_bw_cap_enum_uint8 avail_bandwidth; /* 用户和VAP带宽能力交集,供算法调用 */
545     wlan_bw_cap_enum_uint8 cur_bandwidth;   /* 默认值与avail_bandwidth相同,供算法调用修改 */
546 
547     oal_bool_enum_uint8 user_pmf;
548     mac_user_asoc_state_enum_uint8 user_asoc_state; /* 用户关联状态 */
549 } mac_h2d_usr_info_stru;
550 
551 typedef struct {
552     osal_u16 user_idx;
553     wlan_protocol_enum_uint8 avail_protocol_mode; /* 用户协议模式 */
554     wlan_bw_cap_enum_uint8 bandwidth_cap;         /* 用户带宽能力信息 */
555     wlan_bw_cap_enum_uint8 avail_bandwidth;       /* 用户和VAP带宽能力交集,供算法调用 */
556     wlan_bw_cap_enum_uint8 cur_bandwidth;         /* 默认值与avail_bandwidth相同,供算法调用修改 */
557     osal_u8 rsv[2];
558 } mac_h2d_user_bandwidth_stru;
559 
560 typedef struct {
561     oal_bool_enum_uint8 cap_11ax; /* 是否支持11ax能力 */
562     oal_bool_enum_uint8 radar_detector_cap;
563     oal_bool_enum_uint8 sounding_11n;
564     wlan_bw_cap_enum_uint8 wlan_bw_max;
565 
566     osal_u16 beacon_period;
567     oal_bool_enum_uint8 green_field;
568     oal_bool_enum_uint8 mu_beamformee_cap;
569 
570     oal_bool_enum_uint8 txopps_is_supp;
571     oal_bool_enum_uint8 su_bfee_num;
572     oal_bool_enum_uint8 shortgi_40m;
573     oal_bool_enum_uint8 txbf_11n;
574 
575     oal_bool_enum_uint8 enable_40m;
576     osal_u8 rsv[3];
577 } mac_d2h_mib_update_info_stru;
578 
579 typedef struct {
580     osal_u8 queue_action;
581 } mac_d2h_syn_vap_flowctl_stru;
582 
583 typedef struct {
584     osal_u16 user_idx;
585     mac_user_asoc_state_enum_uint8 asoc_state;
586     osal_u8 rsv[1];
587 } mac_h2d_user_asoc_state_stru;
588 
589 typedef struct {
590     osal_u8 addr[WLAN_MAC_ADDR_LEN];
591     osal_u8 pmkid[WLAN_PMKID_LEN];
592     osal_u8 resv0[2];
593 } mac_pmkid_info_stu;
594 
595 typedef struct {
596     osal_u8 num_elems;
597     osal_u8 resv0[3];
598     mac_pmkid_info_stu elem[WLAN_PMKID_CACHE_SIZE];
599 } mac_pmkid_cache_stru;
600 
601 #ifdef _PRE_WLAN_FEATURE_TXBF
602 typedef struct {
603     osal_u8 imbf_receive_cap : 1, /* 隐式TxBf接收能力 */
604         exp_comp_txbf_cap : 1,    /* 应用压缩矩阵进行TxBf的能力 */
605         min_grouping : 2,         /* 0=不分组,1=1,2分组,2=1,4分组,3=1,2,4分组 */
606         csi_bfee_max_rows : 2,    /* bfer支持的来自bfee的CSI显示反馈的最大行数 */
607         channel_est_cap : 2;      /* 信道估计的能力,0=1空时流,依次递增 */
608 } mac_vap_txbf_add_stru;
609 #endif
610 
611 typedef struct {
612     /* word 0 */
613     wlan_prot_mode_enum_uint8 protection_mode; /* 保护模式 */
614     osal_u8 obss_non_erp_aging_cnt;            /* 指示OBSS中non erp 站点的老化时间 */
615     osal_u8 obss_non_ht_aging_cnt;             /* 指示OBSS中non ht 站点的老化时间 */
616     osal_u8 auto_protection : 1; /* 指示保护策略是否开启,OAL_SWITCH_ON 打开, OAL_SWITCH_OFF 关闭 */
617     osal_u8 obss_non_erp_present : 1; /* 指示obss中是否存在non ERP的站点 */
618     osal_u8 obss_non_ht_present : 1;  /* 指示obss中是否存在non HT的站点 */
619     osal_u8 lsig_txop_protect_mode : 1; /* 指示L-SIG protect是否打开, OAL_SWITCH_ON 打开, OAL_SWITCH_OFF 关闭 */
620     osal_u8 reserved : 4;
621 
622     /* word 1 */
623     osal_u8 sta_no_short_slot_num;     /* 不支持short slot的STA个数 */
624     osal_u8 sta_no_short_preamble_num; /* 不支持short preamble的STA个数 */
625     osal_u8 sta_non_erp_num;           /* 不支持ERP的STA个数 */
626     osal_u8 sta_non_ht_num;            /* 不支持HT的STA个数 */
627     /* word 2 */
628     osal_u8 sta_non_gf_num;        /* 支持ERP/HT,不支持GF的STA个数 */
629     osal_u8 sta_20m_only_num;      /* 只支持20M 频段的STA个数 */
630     osal_u8 sta_no_40dsss_cck_num; /* 不用40M DSSS-CCK STA个数  */
631     osal_u8 sta_no_lsig_txop_num;  /* 不支持L-SIG TXOP Protection STA个数 */
632 } mac_protection_stru;
633 
634 /* 用于同步带宽切换的参数 */
635 typedef struct {
636     wlan_channel_bandwidth_enum_uint8 bandwidth_40m;
637     oal_bool_enum_uint8 intol_user_40m;
638     osal_u8 auc_resv[2];
639 } mac_bandwidth_stru;
640 
641 typedef struct {
642     osal_u8 *ie;     /* APP 信息元素 */
643     osal_u16 ie_len; /* APP 信息元素长度 */
644     osal_u8 ie_type_bitmap;
645     osal_u8 resv[1];
646 } mac_app_ie_stru;
647 
648 /* 协议参数 对应cfgid: WLAN_CFGID_MODE */
649 typedef struct {
650     wlan_protocol_enum_uint8 protocol;              /* 协议 */
651     wlan_channel_band_enum_uint8 band;              /* 频带 */
652     wlan_channel_bandwidth_enum_uint8 en_bandwidth; /* 带宽 */
653     osal_u8 channel_idx;                            /* 主20M信道号 */
654 } mac_cfg_mode_param_stru;
655 
656 typedef struct {
657     wlan_channel_band_enum_uint8 band;              /* 频带 */
658     wlan_channel_bandwidth_enum_uint8 en_bandwidth; /* 带宽 */
659 } mac_cfg_mib_by_bw_param_stru;
660 
661 typedef struct {
662     osal_u8 dscp;
663     osal_u8 tid;
664     osal_u8 reserve[2];
665 } mac_map_dscp_to_tid_stru;
666 
667 typedef struct {
668     osal_u8 flags;
669     osal_u8 mcs;
670     osal_u16 legacy;
671     osal_u8 nss;
672     osal_u8 bw;
673     osal_u8 rsv[3];
674 } mac_rate_info_stru;
675 
676 typedef enum mac_rate_info_flags {
677     MAC_RATE_INFO_FLAGS_MCS = (1UL << 0),
678     MAC_RATE_INFO_FLAGS_VHT_MCS = (1UL << 1),
679     MAC_RATE_INFO_FLAGS_40_MHZ_WIDTH = (1UL << 2),
680     MAC_RATE_INFO_FLAGS_80_MHZ_WIDTH = (1UL << 3),
681     MAC_RATE_INFO_FLAGS_80P80_MHZ_WIDTH = (1UL << 4),
682     MAC_RATE_INFO_FLAGS_160_MHZ_WIDTH = (1UL << 5),
683     MAC_RATE_INFO_FLAGS_SHORT_GI = (1UL << 6),
684     MAC_RATE_INFO_FLAGS_60G = (1UL << 7),
685 } mac_rate_info_flags;
686 
687 typedef struct {
688     oal_bool_enum_uint8 open;    /* 打开关闭此特性 */
689     mac_narrow_bw_enum_uint8 bw; /* 1M,5M,10M */
690     osal_u8 rsv[2];
691 } mac_cfg_narrow_bw_stru;
692 
693 typedef struct {
694     oal_bool_enum_uint8 rate_cfg_tag;
695     oal_bool_enum_uint8 tx_ampdu_last;
696     osal_u8 reserv[2];
697 } mac_fix_rate_cfg_para_stru;
698 
699 typedef struct {
700     osal_u8 new_bss_color_info  : 6,
701             new_bss_color_exit  : 2;
702     osal_u8 rsv[3];
703 } mac_vap_he_config_info_stru;
704 
705 #ifdef _PRE_WLAN_FEATURE_WPA3
706 typedef struct {
707     osal_spinlock lock;
708     struct osal_list_head pmksa_list_head;
709     osal_u32 pmksa_num;
710 } hmac_sae_pmksa_cache_stru;
711 
712 typedef struct {
713     osal_spinlock lock;
714     struct osal_list_head dlist_head;
715     osal_u8 mac_addr[WLAN_MAC_ADDR_LEN];
716     osal_u8 pmkid[WLAN_PMKID_LEN];
717     osal_u32 timestamp;
718     osal_u16 reverse;
719 } hmac_sae_pmksa_entry_info;
720 
721 /* The driver reports an event to trigger WPA to start SAE authentication. */
722 /* 驱动上报事件触发WPA开始SAE认证 */
723 typedef struct {
724     osal_u8 bssid[WLAN_MAC_ADDR_LEN];
725     osal_u8 *ssid;
726     osal_u32 ssid_len;
727     osal_u32 key_mgmt_suite;
728     osal_u16 status;
729     osal_u8 pmkid[WLAN_PMKID_LEN];
730     osal_u8 have_pmkid;
731 } hmac_external_auth_stru;
732 
733 typedef struct {
734     osal_u8 peer[WLAN_MAC_ADDR_LEN];
735     osal_u16 status;
736     osal_u8 *ie;
737     osal_u32 ie_len;
738 } hmac_owe_info;
739 #endif
740 
741 typedef struct {
742     osal_u16 linkloss_threshold;     /* LinkLoss门限 */
743     osal_u16 link_loss;              /* LinkLoss计数器 */
744     osal_u16 int_linkloss_threshold; /* beacon计算初始值 */
745     osal_u8 resv[2];
746 } vap_linkloss_stru;
747 
748 typedef struct {
749     osal_u16 linkloss_threshold;   /* 表示linkloss阈值基础时间为(100*n)ms. */
750     osal_u8 send_proberequest_ratio; /* 表示linkloss计数达到阈值的(n/10)时,开始发送探测帧保活. */
751     osal_u8 resv[1];
752 } wifi_linkloss_params;
753 
754 /* 按照不同聚合长度分类的索引的枚举值 */
755 /* 0:1~14 */
756 /* 1:15~17 */
757 /* 2:18~30 */
758 /* 3:31~32 */
759 typedef enum {
760     HMAC_COUNT_BY_AMPDU_LENGTH_INDEX_0,
761     HMAC_COUNT_BY_AMPDU_LENGTH_INDEX_1,
762     HMAC_COUNT_BY_AMPDU_LENGTH_INDEX_2,
763     HMAC_COUNT_BY_AMPDU_LENGTH_INDEX_3,
764     HMAC_COUNT_BY_AMPDU_LENGTH_INDEX_BUTT
765 } hmac_count_by_ampdu_length_enum;
766 
767 typedef struct {
768     vap_linkloss_stru linkloss_info[WLAN_LINKLOSS_MODE_BUTT]; /* linkloss计数结构 */
769     osal_u32 dot11_beacon_period;                             /* 记录dot11BeaconPeriod是否变化 */
770     osal_u8 linkloss_times; /* 记录linkloss当前门限值相对于正常的倍数,反映beacon的周期倍数 */
771     osal_u8 state;          /* 记录状态 */
772     osal_u8 send_probe_req_period; /* linkloss发送probe req频率 */
773     osal_u8 linkloss_mode : 2;     /* linkloss场景 */
774     osal_u8 roam_scan_done : 1;    /* 记录是否发生过漫游扫描 */
775     osal_u8 linkloss_rate : 5; /* 记录当前linkloss的已丢失cnt占门限的比例,同步给device侧算法使用 */
776     osal_u32 last_active_time_h32;  /* 记录上次活跃时的linkloss时间戳高32位 */
777     osal_u32 last_active_time_l32;  /* 记录上次活跃时的linkloss时间戳低32位 */
778 } hmac_vap_linkloss_stru;
779 
780 typedef struct {
781     osal_s16 signal;           /* 驱动接收包记录的RSSI值 */
782     osal_char snr_ant0;        /* 天线0上上报的SNR */
783     osal_char snr_ant1;        /* 天线1上上报的SNR */
784     osal_s16 signal_mgmt_data; /* 管理帧和数据帧的RSSI平滑值 */
785 
786     /* **************************************************************************
787                                 接收包统计
788     ************************************************************************** */
789     /* 数据帧统计 */
790     osal_u32 rx_d_from_hw_pkts;   /* 驱动接收数据包数目 */
791     osal_u32 rx_rcv_data_bytes;   /* 驱动接收字节数,不包括80211头尾 */
792     osal_u32 rx_d_send_hmac_fail; /* DMAC发送给HMAC的失败netbuf数目 */
793 } hmac_vap_query_stats_stru;
794 
795 #ifdef _PRE_WLAN_FEATURE_WOW_OFFLOAD
796 #define FREE_ARP_INTERVAL_DEFAULT_VALUE 2
797 #endif
798 
799 /* Update join req 需要配置的速率集参数 */
800 typedef struct {
801     union {
802         osal_u8 value;
803         struct {
804             osal_u8 support_11b : 1;  /* 该AP是否支持11b */
805             osal_u8 support_11ag : 1; /* 该AP是否支持11ag */
806             osal_u8 ht_capable : 1;   /* 是否支持ht */
807             osal_u8 vht_capable : 1;  /* 是否支持vht */
808             osal_u8 reserved : 4;
809         } capable; /* 与dmac层wlan_phy_protocol_enum对应 */
810     } capable_flag;
811     osal_u8 min_rate[2]; /* 第1个存储11b协议对应的速率,第2个存储11ag协议对应的速率 */
812     osal_u8 reserved1;
813 } hmac_set_rate_stru;
814 
815 /* 启用VAP参数结构体 对应cfgid: WLAN_CFGID_START_VAP */
816 typedef struct {
817     oal_bool_enum_uint8 mgmt_rate_init_flag; /* start vap时候,管理帧速率是否需要初始化 */
818     osal_u8 protocol;
819     osal_u8 band;
820     osal_u8 bandwidth;
821 
822 #ifdef _PRE_WLAN_FEATURE_P2P
823     wlan_p2p_mode_enum_uint8 p2p_mode;
824     osal_u8 resv2[3];
825 #endif
826     osal_s32 ifindex;
827     oal_net_device_stru *net_dev; /* 此成员仅供Host(WAL&HMAC)使用,Device侧(DMAC&ALG&HAL层)不使用 */
828 } mac_cfg_start_vap_param_stru;
829 typedef mac_cfg_start_vap_param_stru mac_cfg_down_vap_param_stru;
830 
831 /* CFG VAP h2d */
832 typedef struct {
833     oal_net_device_stru *net_dev;
834 } mac_cfg_vap_h2d_stru;
835 
836 /* 设置mac地址参数 对应cfgid: WLAN_CFGID_STATION_ID */
837 typedef struct {
838     osal_u8 station_id[WLAN_MAC_ADDR_LEN];
839     osal_u8 auc_resv[2];
840 } mac_cfg_staion_id_param_stru;
841 
842 /* SSID参数 对应cfgid: WLAN_CFGID_SSID */
843 typedef struct {
844     osal_u8 ssid_len;
845     osal_u8 auc_resv[2];
846     osal_char ac_ssid[WLAN_SSID_MAX_LEN];
847 } mac_cfg_ssid_param_stru;
848 
849 /* 获取的字符串参数 */
850 typedef struct {
851     osal_s32 buff_len;
852     osal_u8 buff[WLAN_IWPRIV_MAX_BUFF_LEN];
853 } mac_cfg_param_char_stru;
854 
855 /* HOSTAPD 设置工作频段,信道和带宽参数 */
856 typedef struct {
857     wlan_channel_band_enum_uint8 band;              /* 频带 */
858     wlan_channel_bandwidth_enum_uint8 en_bandwidth; /* 带宽 */
859     osal_u8 channel;                                /* 信道编号 */
860     osal_u8 auc_resv[1];                            /* 保留位 */
861 } mac_cfg_channel_param_stru;
862 
863 /* HOSTAPD 设置wiphy 物理设备信息,包括RTS 门限值,分片报文门限值 */
864 typedef struct {
865     osal_u8 frag_threshold_changed;
866     osal_u8 rts_threshold_changed;
867     osal_u8 rsv[2];
868     osal_u32 frag_threshold;
869     osal_u32 rts_threshold;
870 } mac_cfg_wiphy_param_stru;
871 
872 /* HOSTAPD 设置 Beacon 信息 */
873 typedef struct {
874     osal_s32 interval;    /* beacon interval */
875     osal_s32 dtim_period; /* DTIM period     */
876     oal_bool_enum_uint8 privacy;
877     osal_u8 rsn_ie[MAC_MAX_RSN_LEN];
878     osal_u8 wpa_ie[MAC_MAX_RSN_LEN];
879     oal_bool_enum_uint8 hidden_ssid;
880     oal_bool_enum_uint8 shortgi_20;
881     oal_bool_enum_uint8 shortgi_40;
882     oal_bool_enum_uint8 shortgi_80;
883     wlan_protocol_enum_uint8 protocol;
884 #if (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION)
885     osal_u8 crypto_mode;                             /* WPA/WPA2 */
886     osal_u8 group_crypto;                            /* 组播密钥类型 */
887     osal_u8 auth_type[MAC_AUTHENTICATION_SUITE_NUM]; /* akm 类型 */
888     osal_u8 pairwise_crypto_wpa[MAC_PAIRWISE_CIPHER_SUITES_NUM];
889     osal_u8 pairwise_crypto_wpa2[MAC_PAIRWISE_CIPHER_SUITES_NUM];
890     osal_u16 rsn_capability;
891 #endif
892     osal_u8 smps_mode;
893     mac_beacon_operation_type_uint8 operation_type;
894     osal_u8 sae_pwe;
895     osal_u8 auc_resv1[1];
896 } mac_beacon_param_stru;
897 
898 /* 设置log模块开关的配置命令参数 */
899 typedef struct {
900     osal_u16 mod_id;                 /* 对应的模块id */
901     oal_bool_enum_uint8 switch_code; /* 对应的开关设置 */
902     osal_u8 auc_resv[1];
903 } mac_cfg_log_module_param_stru;
904 
905 /* 用户相关的配置命令参数 */
906 typedef struct {
907     osal_u8 mac_addr[WLAN_MAC_ADDR_LEN]; /* MAC地址 */
908     oal_bool_enum_uint8 ht_cap;          /* ht能力 */
909     osal_u8 auc_resv[3];
910     osal_u16 user_idx; /* 用户索引 */
911 } mac_cfg_add_user_param_stru;
912 
913 typedef mac_cfg_add_user_param_stru mac_cfg_del_user_param_stru;
914 
915 /* 接收帧的统计信息 */
916 typedef struct {
917     osal_u32 data_op;    /* 数据操作模式: 0:保留 1:清除 */
918     osal_u32 print_info; /* 打印数据内容:
919                                0:所有数据 1:总帧数 2:self fcs correct
920                                3:other fcs correct 4:fcs error */
921 } mac_cfg_al_rx_info_stru;
922 
923 /* 剔除用户配置命令参数 */
924 typedef struct {
925     osal_u8 mac_addr[WLAN_MAC_ADDR_LEN]; /* MAC地址 */
926     osal_u16 reason_code;                /* 去关联 reason code */
927 } mac_cfg_kick_user_param_stru;
928 
929 /* 暂停tid配置命令参数 */
930 typedef struct {
931     osal_u8 mac_addr[WLAN_MAC_ADDR_LEN]; /* MAC地址 */
932     osal_u8 tid;
933     osal_u8 is_paused;
934 } mac_cfg_pause_tid_param_stru;
935 
936 /* 配置用户是否为vip */
937 typedef struct {
938     osal_u8 mac_addr[WLAN_MAC_ADDR_LEN]; /* MAC地址 */
939     osal_u8 vip_flag;
940 } mac_cfg_user_vip_param_stru;
941 
942 #ifdef _PRE_WLAN_FEATURE_OFFLOAD_FLOWCTL
943 /* 设置host某个队列的每次调度报文个数,low_waterline, high_waterline */
944 typedef struct {
945     osal_u8 queue_type;
946     osal_u8 auc_resv[1];
947     osal_u16 burst_limit;
948     osal_u16 low_waterline;
949     osal_u16 high_waterline;
950 } mac_cfg_flowctl_param_stru;
951 #endif
952 
953 #ifdef _PRE_WLAN_FEATURE_WMMAC
954 /* TSPEC相关的配置命令参数 */
955 typedef struct {
956     mac_ts_info_stru ts_info;
957     osal_u8 rsvd;
958     osal_u16 norminal_msdu_size;
959     osal_u16 max_msdu_size;
960     osal_u32 min_data_rate;
961     osal_u32 mean_data_rate;
962     osal_u32 peak_data_rate;
963     osal_u32 min_phy_rate;
964     osal_u16 surplus_bw;
965     osal_u16 medium_time;
966 } mac_cfg_wmm_tspec_stru_param_stru;
967 
968 typedef struct {
969     oal_switch_enum_uint8 wmm_ac_switch;
970     oal_switch_enum_uint8 auth_flag; /* WMM AC认证开关 */
971     osal_u16 timeout_period;         /* 定时器超时时间 */
972     osal_u8 factor;                  /* 除数因子,medium_time/2^factor */
973     osal_u8 rsv[3];
974 } mac_cfg_wmm_ac_param_stru;
975 
976 #endif /* _PRE_WLAN_FEATURE_WMMAC */
977 
978 typedef struct {
979     osal_u8 pcie_pm_level; /* pcie低功耗级别: 0:normal 1:L0S 2:L1 3:L1PM 4:L1s */
980     osal_u8 resv[3];
981 } mac_cfg_pcie_pm_level_stru;
982 
983 /* 使能qempty命令 */
984 typedef struct {
985     osal_u8 is_on;
986     osal_u8 auc_resv[3];
987 } mac_cfg_resume_qempty_stru;
988 
989 /* 发送mpdu/ampdu命令参数  */
990 typedef struct {
991     osal_u8 tid;
992     osal_u8 packet_num;
993     osal_u16 packet_len;
994     osal_u8 ra_mac[OAL_MAC_ADDR_LEN];
995 } mac_cfg_mpdu_ampdu_tx_param_stru;
996 
997 typedef struct {
998     osal_u8 show_profiling_type; /* 0:Rx 1: Tx */
999     osal_u8 show_level; /* 0:分段输出正确的 1:每个节点、分段都输出正确的 2每个节点、分段都输出所有的 */
1000 } mac_cfg_show_profiling_param_stru;
1001 
1002 /* AMPDU相关的配置命令参数 */
1003 typedef struct {
1004     osal_u8 mac_addr[WLAN_MAC_ADDR_LEN]; /* 用户的MAC ADDR */
1005     osal_u8 tidno;                       /* 对应的tid号 */
1006     osal_u8 reserve[1];                  /* 确认策略 */
1007 } mac_cfg_ampdu_start_param_stru;
1008 
1009 typedef mac_cfg_ampdu_start_param_stru mac_cfg_ampdu_end_param_stru;
1010 
1011 /* BA会话相关的配置命令参数 */
1012 typedef struct {
1013     osal_u8 mac_addr[WLAN_MAC_ADDR_LEN]; /* 用户的MAC ADDR */
1014     osal_u8 tidno;                       /* 对应的tid号 */
1015     mac_ba_policy_enum_uint8 ba_policy;  /* BA确认策略 */
1016     osal_u16 buff_size;                  /* BA窗口的大小 */
1017     osal_u16 timeout;                    /* BA会话的超时时间 */
1018 } mac_cfg_addba_req_param_stru;
1019 
1020 typedef struct {
1021     osal_u8 mac_addr[WLAN_MAC_ADDR_LEN];      /* 用户的MAC ADDR */
1022     osal_u8 tidno;                            /* 对应的tid号 */
1023     mac_delba_initiator_enum_uint8 direction; /* 删除ba会话的发起端 */
1024     mac_delba_trigger_enum_uint8 trigger;     /* 删除原因 */
1025 } mac_cfg_delba_req_param_stru;
1026 
1027 typedef struct {
1028     osal_u8 mac_addr[6];
1029     osal_u8 amsdu_max_num; /* amsdu最大个数 */
1030     osal_u8 reserve[3];
1031     osal_u16 amsdu_max_size; /* amsdu最大长度 */
1032 } mac_cfg_amsdu_start_param_stru;
1033 
1034 /* 发送功率配置参数 */
1035 typedef struct {
1036     mac_set_pow_type_enum_uint8 type;
1037     osal_u8 reserve;
1038     osal_u8 auc_value[18];
1039 } mac_cfg_set_tx_pow_param_stru;
1040 
1041 /* 设置用户配置参数 */
1042 typedef struct {
1043     osal_u8 function_index;
1044     osal_u8 reserve[2];
1045     mac_vap_config_dscr_frame_type_uint8 pkt_type; /* 配置的帧类型 */
1046     osal_s32 value;
1047 } mac_cfg_set_dscr_param_stru;
1048 
1049 /* non-HT协议模式下速率配置结构体 */
1050 typedef struct {
1051     wlan_legacy_rate_value_enum_uint8 rate;     /* 速率值 */
1052     wlan_phy_protocol_enum_uint8 protocol_mode; /* 对应的协议 */
1053     osal_u8 reserve[2];                         /* 保留 */
1054 } mac_cfg_non_ht_rate_stru;
1055 
1056 /* 配置发送描述符内部元素结构体 */
1057 typedef enum {
1058     RF_PAYLOAD_ALL_ZERO = 0,
1059     RF_PAYLOAD_ALL_ONE,
1060     RF_PAYLOAD_ALL_AA,
1061     RF_PAYLOAD_RAND,
1062     RF_PAYLOAD_DATA,
1063     RF_PAYLOAD_BUTT
1064 } mac_rf_payload_enum;
1065 typedef osal_u8 mac_rf_payload_enum_uint8;
1066 
1067 typedef struct {
1068     osal_u8 param; /* 查询或配置信息 */
1069     wlan_phy_protocol_enum_uint8 protocol_mode;
1070     mac_rf_payload_enum_uint8 payload_flag;
1071     wlan_tx_ack_policy_enum_uint8 ack_policy;
1072     osal_u32 payload_len;
1073     osal_u32 al_tx_max; /* 常发发送的最大个数 */
1074     osal_u8 *payload;   /* RF_PAYLOAD_DATA使用,记录输入payload字段 */
1075     osal_u32 pkt_len;   /* RF_PAYLOAD_DATA使用,记录输入字段长度 */
1076     osal_u8 tpc_code;   /* 软件常发时填写的tpc_code */
1077     osal_u8 tpc_code_carried; /* 是否携带了tpc_code */
1078     osal_u8 resv[2];
1079 } mac_cfg_tx_comp_stru;
1080 
1081 typedef struct {
1082     osal_u32 length;
1083     osal_u32 dieid[WLAN_DIEID_MAX_LEN];
1084 } mac_cfg_show_dieid_stru;
1085 
1086 /* 配置硬件常发 */
1087 typedef struct {
1088     osal_u32 devid;
1089     osal_u32 mode;
1090     osal_u32 rate;
1091 } mac_cfg_al_tx_hw_cfg_stru;
1092 
1093 typedef enum {
1094     HW_PAYLOAD_ALL_ZERO = 0,
1095     HW_PAYLOAD_ALL_ONE,
1096     HW_PAYLOAD_RAND,
1097     HW_PAYLOAD_REPEAT,
1098     HW_PAYLOAD_BUTT
1099 } mac_hw_payload_enum;
1100 typedef osal_u8 mac_hw_payload_enum_uint8;
1101 
1102 /* 硬件常发开关 */
1103 typedef struct {
1104     osal_u8  switch_code : 1,
1105              dev_id : 1,
1106              flag   : 2, /* 常发帧的内容: 0:全0 1:全1 2:随机 3:重复content的数据 */
1107         rsv : 4;
1108     osal_u8 content;
1109     osal_u8 rsv1[2];
1110     osal_u32 len;
1111     osal_u32 times; /* 次数 0为无限次 */
1112     osal_u32 ifs;   /* 常发帧间隔,单位0.1us */
1113 } mac_cfg_al_tx_hw_stru;
1114 
1115 typedef struct {
1116     osal_u8 offset_addr_a;
1117     osal_u8 offset_addr_b;
1118     osal_u16 delta_gain;
1119 } mac_cfg_dbb_scaling_stru;
1120 
1121 /* 频偏较正命令格式 */
1122 typedef struct {
1123     osal_u16 idx;             /* 全局数组索引值 */
1124     osal_u16 chn;             /* 配置信道 */
1125     osal_s16 as_corr_data[8]; /* 校正数据 */
1126 } mac_cfg_freq_skew_stru;
1127 
1128 /* wfa edca参数配置 */
1129 typedef struct {
1130     oal_bool_enum_uint8 switch_code; /* 开关 */
1131     wlan_wme_ac_type_enum_uint8 ac;  /* AC */
1132     osal_u16 val;                    /* 数据 */
1133 } mac_edca_cfg_stru;
1134 
1135 /* PPM调整命令格式 */
1136 typedef struct {
1137     osal_char ppm_val;  /* PPM差值 */
1138     osal_u8 clock_freq; /* 时钟频率 */
1139     osal_u8 resv[1];
1140 } mac_cfg_adjust_ppm_stru;
1141 
1142 /* 用户信息相关的配置命令参数 */
1143 typedef struct {
1144     osal_u16 user_idx; /* 用户索引 */
1145     osal_u8 reserve[2];
1146 } mac_cfg_user_info_param_stru;
1147 
1148 /* 获取当前管制域国家码字符配置命令结构体 */
1149 typedef struct {
1150     osal_char ac_country[3];
1151     osal_u8 auc_resv[1];
1152 } mac_cfg_get_country_stru;
1153 
1154 /* query消息格式:2字节WID x N */
1155 typedef struct {
1156     wlan_tidno_enum_uint8 tid;
1157     osal_u8 resv[3];
1158 } mac_cfg_get_tid_stru;
1159 
1160 typedef struct {
1161     osal_s8 rssi;
1162     osal_s8 free_power;
1163     osal_s8 rsv[2]; /* 保留2字节 */
1164     osal_u32 best_rate; /* 最佳速率 */
1165 } mac_cfg_query_rssi_stru;
1166 
1167 typedef struct {
1168     osal_u16 user_id;
1169     osal_u8 ps_st;
1170     osal_u8 auc_resv[1];
1171 } mac_cfg_query_psst_stru;
1172 
1173 typedef struct {
1174     osal_u16 user_id;
1175     osal_u8 auc_resv[2];
1176     osal_u32 tx_dropped[WLAN_WME_AC_BUTT];
1177 } mac_cfg_query_drop_num_stru;
1178 
1179 typedef struct {
1180     osal_u16 user_id;
1181     osal_u8 auc_resv[2];
1182     osal_u32 max_tx_delay; /* 最大发送延时 */
1183     osal_u32 min_tx_delay; /* 最小发送延时 */
1184     osal_u32 ave_tx_delay; /* 平均发送延时 */
1185 } mac_cfg_query_tx_delay_stru;
1186 
1187 typedef struct {
1188     osal_u8 vap_id;
1189     osal_u8 bsd;
1190     osal_u8 auc_resv[2];
1191 } mac_cfg_query_bsd_stru;
1192 
1193 #ifdef _PRE_WLAN_DFT_STAT
1194 typedef struct {
1195     osal_u8 device_distance;
1196     osal_u8 intf_state_cca;
1197     osal_u8 intf_state_co;
1198     osal_u8 auc_resv[1];
1199 } mac_cfg_query_ani_stru;
1200 #endif
1201 
1202 typedef struct {
1203     osal_u8 link_meas_cmd_type;
1204     osal_u8 scan_chan;
1205     osal_u8 scan_band;
1206     osal_u8 rsv;
1207     osal_u16 scan_time;
1208     osal_u16 scan_interval;
1209 } mac_cfg_link_meas_stru;
1210 
1211 typedef struct {
1212     /* 实时的信息,从描述符中获取 */
1213     osal_u8 channel_number;
1214     osal_u8 preabmle;
1215     osal_u8 gi_type;
1216     osal_u8 nss_rate : 6;
1217     osal_u8 nss_mode : 2;
1218 
1219     osal_u8 protocol_type;
1220     osal_s8 rssi_dbm;
1221     osal_s8 snr_ant0;
1222     osal_s8 snr_ant1;
1223 
1224     osal_u8 freq_bw;
1225     osal_u8 freq_bandwidth_mode;
1226     osal_u16 data_cnt;
1227 } mac_cfg_rx_user_rate_stru;
1228 
1229 #ifdef _PRE_WLAN_DFT_STAT
1230 typedef struct {
1231     osal_u32 tx_mpdu_num;
1232     osal_u32 tx_msdu_num;
1233     osal_u32 rx_mpdu_num;
1234     osal_u32 rx_msdu_num;
1235 } wlan_aggregation_stats_stru;
1236 #endif
1237 
1238 #ifdef _PRE_WLAN_FEATURE_SMPS
1239 typedef struct {
1240     osal_u32 cfg_id;
1241     osal_u32 ac;
1242     osal_u32 value;
1243 } mac_cfg_set_smps_mode_stru;
1244 #endif
1245 
1246 /* 以下为解析内核配置参数转化为驱动内部参数下发的结构体 */
1247 
1248 /* 解析内核配置的扫描参数后,下发给驱动的扫描参数 */
1249 typedef struct {
1250     oal_ssids_stru ssids[WLAN_SCAN_REQ_MAX_SSID];
1251     osal_s32 ssid_num;
1252     osal_u8 *ie;
1253     osal_u32 ie_len;
1254 
1255     oal_scan_enum_uint8 scan_type;
1256     osal_u8 num_channels_2g;
1257     osal_u8 num_channels_5g;
1258     osal_u8 num_channels_all;
1259     osal_u32 *channels_2g;
1260     osal_u32 *channels_5g;
1261     osal_u8 rsv_1;
1262 #ifdef _PRE_WLAN_FEATURE_ACS
1263     osal_u8 acs_scan_flag;
1264 #endif
1265 
1266     /* WLAN/P2P 特性情况下,p2p0 和p2p-p2p0 cl 扫描时候,需要使用不同设备,增加is_p2p0_scan来区分 */
1267     osal_u8 is_p2p0_scan; /* 是否为p2p0 发起扫描 */
1268 #ifdef _PRE_WLAN_FEATURE_ACS
1269     osal_u8 rsv; /* 保留位 */
1270 #else
1271     osal_u8 rsv[2];  /* 保留位 */
1272 #endif
1273 } mac_cfg80211_scan_param_stru;
1274 
1275 /* 解析内核配置的connect参数后,下发给驱动的connect参数 */
1276 #if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
1277 typedef struct {
1278     osal_u32 wpa_versions;
1279     osal_u32 group_suite;
1280     osal_u32 pair_suite[WLAN_PAIRWISE_CIPHER_SUITES];
1281     osal_u32 akm_suite[WLAN_AUTHENTICATION_SUITES];
1282     osal_u32 group_mgmt_suite;
1283     osal_u32 have_pmkid; /* WPA3关联判断是否是重关联 */
1284 } mac_crypto_settings_stru;
1285 #endif
1286 #if (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION)
1287 typedef struct {
1288     td_u32 wpa_versions;
1289     td_u32 group_suite;
1290     td_u32 n_ciphers_pairwise;
1291     td_u32 pair_suite[WLAN_PAIRWISE_CIPHER_SUITES];
1292     td_u32 n_akm_suites;
1293     td_u32 akm_suite[WLAN_AUTHENTICATION_SUITES];
1294     td_u32 group_mgmt_suite;
1295     td_u32 control_port;
1296     td_u32 have_pmkid; /* WPA3关联判断是否是重关联 */
1297 } mac_crypto_settings_stru;
1298 #endif
1299 
1300 typedef struct {
1301     osal_u8 channel;  /* ap所在信道编号,eg 1,2,11,36,40... */
1302     osal_u8 ssid_len; /* SSID 长度 */
1303     mac_nl80211_mfp_enum_uint8 mfp;
1304     osal_u8 wapi;
1305 
1306     osal_u8 *ie;
1307     osal_u8 *ssid;  /* 期望关联的AP SSID  */
1308     osal_u8 *bssid; /* 期望关联的AP BSSID  */
1309 
1310     oal_bool_enum_uint8 privacy;                /* 是否加密标志 */
1311     oal_nl80211_auth_type_enum_uint8 auth_type; /* 认证类型,OPEN or SHARE-KEY */
1312 
1313     osal_u8 wep_key_len;             /* WEP KEY长度 */
1314     osal_u8 wep_key_index;           /* WEP KEY索引 */
1315     const osal_u8 *wep_key;          /* WEP KEY密钥 */
1316     mac_crypto_settings_stru crypto; /* 密钥套件信息 */
1317     osal_u32 ie_len;
1318 #ifdef _PRE_WLAN_FEATURE_WPA3
1319     osal_u8 sae_pwe;
1320     osal_u8 rsv[3]; /* 预留3字节 */
1321 #endif
1322 } mac_conn_param_stru;
1323 
1324 typedef struct {
1325     oal_bool_enum_uint8 privacy;                /* 是否加密标志 */
1326     oal_nl80211_auth_type_enum_uint8 auth_type; /* 认证类型,OPEN or SHARE-KEY */
1327     osal_u8 wep_key_len;                        /* WEP KEY长度 */
1328     osal_u8 wep_key_index;                      /* WEP KEY索引 */
1329     osal_u8 wep_key[WLAN_WEP104_KEY_LEN];       /* WEP KEY密钥 */
1330     mac_nl80211_mfp_enum_uint8 mgmt_proteced;   /* 此条链接pmf是否使能 */
1331     wlan_pmf_cap_status_uint8 pmf_cap;          /* 设备pmf能力 */
1332     oal_bool_enum_uint8 wps_enable;
1333     mac_crypto_settings_stru crypto; /* 密钥套件信息 */
1334     osal_s8 rssi;      /* 关联AP的RSSI信息 */
1335     osal_s8 ant0_rssi; /* 天线0的rssi */
1336     osal_s8 ant1_rssi; /* 天线1的rssi */
1337     osal_u8 rsv[1];
1338 } mac_conn_security_stru;
1339 
1340 typedef struct {
1341     osal_u8 mac_addr[OAL_MAC_ADDR_LEN];
1342     osal_u8 rsv[2];
1343 } mac_cfg80211_init_port_stru;
1344 
1345 /* 解析内核配置的disconnect参数后,下发给驱动的disconnect参数 */
1346 typedef struct mac_cfg80211_disconnect_param_tag {
1347     osal_u16 reason_code; /* disconnect reason code */
1348     osal_u16 aid;
1349 
1350     osal_u8 type;
1351     osal_u8 arry[3];
1352 } mac_cfg80211_disconnect_param_stru;
1353 
1354 /* 把mac_cfg_lpm_wow_en_stru定义挪到_PRE_WLAN_CHIP_TEST外面,使得关闭_PRE_WLAN_CHIP_TEST也可以正常编译 */
1355 typedef struct mac_cfg_lpm_wow_en {
1356     osal_u8 en;        /* 0:off 1:on */
1357     osal_u8 null_wake; /* 1:null data wakeup */
1358 } mac_cfg_lpm_wow_en_stru;
1359 
1360 typedef enum {
1361     MAC_LPM_SOC_BUS_GATING = 0,
1362     MAC_LPM_SOC_PCIE_RD_BYPASS = 1,
1363     MAC_LPM_SOC_MEM_PRECHARGE = 2,
1364     MAC_LPM_SOC_PCIE_L0_S = 3,
1365     MAC_LPM_SOC_PCIE_L1_0 = 4,
1366     MAC_LPM_SOC_AUTOCG_ALL = 5,
1367     MAC_LPM_SOC_ADC_FREQ = 6,
1368     MAC_LPM_SOC_PCIE_L1S = 7,
1369 
1370     MAC_LPM_SOC_SET_BUTT
1371 } mac_lpm_soc_set_enum;
1372 typedef osal_u8 mac_lpm_soc_set_enum_uint8;
1373 
1374 typedef struct mac_cfg_lpm_soc_set_tag {
1375     mac_lpm_soc_set_enum_uint8 mode;
1376     osal_u8 on_off;
1377     osal_u8 pcie_idle;
1378     osal_u8 rsv[1];
1379 } mac_cfg_lpm_soc_set_stru;
1380 
1381 #ifdef _PRE_WLAN_FEATURE_SMPS
1382 typedef struct {
1383     wlan_mib_mimo_power_save_enum_uint8 smps_mode;
1384     osal_u8 trigger_smps_frame;
1385     osal_u16 user_idx;
1386 } mac_cfg_smps_mode_stru;
1387 #endif
1388 
1389 /* 设置以太网开关需要的参数 */
1390 typedef struct {
1391     osal_u8 frame_direction;
1392     osal_u8 switch_code;
1393     osal_u8 user_macaddr[WLAN_MAC_ADDR_LEN];
1394 } mac_cfg_eth_switch_param_stru;
1395 
1396 /* 设置probe request和probe response开关需要的参数 */
1397 typedef struct {
1398     osal_u8 frame_direction;
1399     osal_u8 frame_switch;
1400     osal_u8 cb_switch;
1401     osal_u8 dscr_switch;
1402 } mac_cfg_probe_switch_stru;
1403 
1404 /* 获取mpdu数目需要的参数 */
1405 typedef struct {
1406     osal_u8 user_macaddr[WLAN_MAC_ADDR_LEN];
1407     osal_u8 auc_resv[2];
1408 } mac_cfg_get_mpdu_num_stru;
1409 
1410 #ifdef _PRE_WLAN_DFT_STAT
1411 typedef struct {
1412     osal_u8 user_macaddr[WLAN_MAC_ADDR_LEN];
1413     osal_u8 param;
1414     osal_u8 resv;
1415 } mac_cfg_usr_queue_param_stru;
1416 #endif
1417 
1418 typedef struct {
1419     osal_u16 duration_ms;
1420     oal_bool_enum_uint8 probe;
1421     osal_u8 chan_cnt;
1422     osal_u8 channels[WLAN_MAX_CHANNEL_NUM];
1423 } mac_chan_stat_param_stru;
1424 
1425 typedef struct {
1426     osal_u32 coext_info;
1427     osal_u32 channel_report;
1428 } mac_cfg_set_2040_coexist_stru;
1429 
1430 typedef struct {
1431     osal_u32 mib_idx;
1432     osal_u32 mib_value;
1433 } mac_cfg_set_mib_stru;
1434 
1435 typedef struct {
1436     osal_u8 thruput_type;
1437     osal_u8 value;
1438     osal_u8 resv[2];
1439 } mac_cfg_thruput_test_stru;
1440 
1441 typedef struct {
1442     osal_u8 performance_log_switch_type;
1443     osal_u8 value;
1444     osal_u8 auc_resv[2];
1445 } mac_cfg_set_performance_log_switch_stru;
1446 
1447 typedef struct {
1448     osal_u8 scan_type;
1449     oal_bool_enum_uint8 current_bss_ignore;
1450     osal_u8 auc_resv[2];
1451 } mac_cfg_set_roam_start_stru;
1452 
1453 typedef struct {
1454     osal_u32 timeout;
1455     osal_u8 is_period;
1456     osal_u8 stop_start;
1457     osal_u8 auc_resv[2];
1458 } mac_cfg_test_timer_stru;
1459 
1460 typedef struct {
1461     osal_u32 frag_threshold;
1462 } mac_cfg_frag_threshold_stru;
1463 
1464 typedef struct {
1465     osal_u32 rts_threshold;
1466 } mac_cfg_rts_threshold_stru;
1467 
1468 typedef struct {
1469     oal_bool_enum_uint8 default_key;
1470     osal_u8 key_index;
1471     osal_u8 key_len;
1472     osal_u8 wep_key[WLAN_WEP104_KEY_LEN];
1473 } mac_wep_key_param_stru;
1474 
1475 typedef struct mac_pmksa_tag {
1476     osal_u8 bssid[OAL_MAC_ADDR_LEN];
1477     osal_u8 pmkid[OAL_PMKID_LEN];
1478 } mac_pmksa_stru;
1479 
1480 typedef struct {
1481     osal_u8 key_index;
1482     oal_bool_enum_uint8 pairwise;
1483     osal_u8 mac_addr[OAL_MAC_ADDR_LEN];
1484     mac_key_params_stru key;
1485 } mac_addkey_param_stru;
1486 
1487 typedef struct {
1488     osal_s32 key_len;
1489     osal_u8 key[OAL_WPA_KEY_LEN];
1490 } mac_key_stru;
1491 
1492 typedef struct {
1493     osal_s32 seq_len;
1494     osal_u8 seq[OAL_WPA_SEQ_LEN];
1495 } mac_seq_stru;
1496 
1497 typedef struct {
1498     osal_u8 key_index;
1499     oal_bool_enum_uint8 pairwise;
1500     osal_u8 mac_addr[OAL_MAC_ADDR_LEN];
1501     osal_u8 cipher;
1502     osal_u8 rsv[3];
1503     mac_key_stru key;
1504     mac_seq_stru seq;
1505 } mac_addkey_hmac2dmac_param_stru;
1506 
1507 typedef struct {
1508     oal_net_device_stru *netdev;
1509     osal_u8 key_index;
1510     oal_bool_enum_uint8 pairwise;
1511     osal_u8 auc_resv1[2];
1512     osal_u8 *mac_addr;
1513     osal_void *cookie;
1514     osal_void (*callback)(osal_void *cookie, oal_key_params_stru *key_param);
1515 } mac_getkey_param_stru;
1516 
1517 typedef struct {
1518     osal_u8 key_index;
1519     oal_bool_enum_uint8 pairwise;
1520     osal_u8 mac_addr[OAL_MAC_ADDR_LEN];
1521 } mac_removekey_param_stru;
1522 
1523 typedef struct {
1524     osal_u8 key_index;
1525     oal_bool_enum_uint8 unicast;
1526     oal_bool_enum_uint8 multicast;
1527     osal_u8 auc_resv1[1];
1528 } mac_setdefaultkey_param_stru;
1529 
1530 typedef struct {
1531     osal_u32 dfs_mode;
1532     osal_s32 para[3];
1533 } mac_cfg_dfs_param_stru;
1534 
1535 typedef struct {
1536     osal_u8 total_channel_num;
1537     osal_u8 channel_number[15];
1538 } mac_cfg_dfs_auth_channel_stru;
1539 
1540 typedef struct {
1541     osal_ulong addr;
1542     osal_u32 len;
1543 } mac_cfg_dump_memory_stru;
1544 
1545 /* 动态校准参数枚举,参数值 */
1546 typedef struct {
1547     mac_dyn_cali_cfg_enum_uint8 dyn_cali_cfg; /* 配置命令枚举 */
1548     osal_u8 resv;                             /* 字节对齐 */
1549     osal_u16 value;                           /* 配置参数值 */
1550 } mac_ioctl_dyn_cali_param_stru;
1551 
1552 #ifdef _PRE_WLAN_FEATURE_INTRF_MODE
1553 /* 发包duration配置 */
1554 typedef struct {
1555     osal_u8 enable;      /* 开关 */
1556     osal_u8 resv[3];     /* 字节对齐 */
1557     osal_u16 be_val;   /* 配置参数值 */
1558     osal_u16 bk_val;   /* 配置参数值 */
1559     osal_u16 vi_val;   /* 配置参数值 */
1560     osal_u16 vo_val;   /* 配置参数值 */
1561 } mac_ioctl_alg_set_duration_stru;
1562 #endif
1563 
1564 #ifdef _PRE_WLAN_FEATURE_HERA_MCAST
1565 /* 异频组播转发配置 */
1566 typedef struct {
1567     osal_u8 m2u_frequency_on;
1568     osal_u8 rsv[3];
1569 } mac_cfg_m2u_frequency_on_param_stru;
1570 
1571 /* 配网模式参数 */
1572 typedef struct {
1573     osal_u8 m2u_adaptive_on;
1574     osal_u8 adaptive_num;
1575     osal_u8 rsv[2];
1576     osal_u32 threshold_time;
1577 } mac_cfg_m2u_adaptive_on_param_stru;
1578 #endif
1579 
1580 typedef struct {
1581     osal_u32 deny_group_ipv4_addr;
1582     osal_u8 deny_group_ipv6_addr[OAL_IPV6_ADDR_SIZE];
1583     osal_u8 cfg_type;
1584     osal_u8 rsv[3];
1585 } mac_cfg_m2u_deny_table_stru;
1586 
1587 /* 组播转单播 发送参数 */
1588 typedef struct {
1589     osal_u8 m2u_mcast_mode;
1590     osal_u8 m2u_snoop_on;
1591 } mac_cfg_m2u_snoop_on_param_stru;
1592 
1593 /* set snoop tid */
1594 typedef struct {
1595     osal_u8 m2u_tid_num;
1596 } mac_set_m2u_tid_num_stru;
1597 
1598 /* 加组播转单播黑名单 */
1599 typedef struct {
1600     osal_u32 deny_group_ipv4_addr;
1601     osal_u8 deny_group_ipv6_addr[OAL_IPV6_ADDR_SIZE];
1602     oal_bool_enum_uint8 ip_type;
1603     osal_u8 rsv[3]; /* 保留3字节对齐 */
1604 } mac_add_m2u_deny_table_stru;
1605 
1606 /* 删除组播转单播黑名单 */
1607 typedef struct {
1608     osal_u32 deny_group_ipv4_addr;
1609     osal_u8 deny_group_ipv6_addr[OAL_IPV6_ADDR_SIZE];
1610     oal_bool_enum_uint8 ip_type;
1611     osal_u8 rsv[3]; /* 保留3字节对齐 */
1612 } mac_del_m2u_deny_table_stru;
1613 
1614 
1615 /* 清空组播转单播黑名单 */
1616 typedef struct {
1617     osal_u8 m2u_clear_deny_table;
1618     osal_u8 m2u_show_deny_table;
1619 } mac_clg_m2u_deny_table_stru;
1620 
1621 
1622 /* print snoop table */
1623 typedef struct {
1624     osal_u8 m2u_show_snoop_table;
1625 } mac_show_m2u_snoop_table_stru;
1626 typedef struct {
1627     osal_u8 m2u_show_snoop_deny_table;
1628     osal_u8 rsv[3]; /* 保留3字节对齐 */
1629 } mac_show_m2u_snoop_deny_table_stru;
1630 
1631 /* add snoop table */
1632 typedef struct {
1633     osal_u8 m2u_add_snoop_table;
1634 } mac_add_m2u_snoop_table_stru;
1635 
1636 typedef struct {
1637     oal_bool_enum_uint8 proxyarp;
1638     osal_u8 rsv[3];
1639 } mac_proxyarp_en_stru;
1640 
1641 typedef struct {
1642     osal_u8 bssid[WLAN_MAC_ADDR_LEN];
1643     osal_u8 resv0[2];
1644     osal_u8 pmkid[WLAN_PMKID_LEN];
1645 } mac_cfg_pmksa_param_stru;
1646 
1647 typedef struct {
1648     osal_u64 cookie;
1649     osal_u32 listen_duration;                              /* 监听时间   */
1650     osal_u8 listen_channel;                                /* 监听的信道 */
1651     wlan_channel_bandwidth_enum_uint8 listen_channel_type; /* 监听信道类型 */
1652     osal_u8 home_channel;                                  /* 监听结束返回的信道 */
1653     wlan_channel_bandwidth_enum_uint8 home_channel_type;   /* 监听结束,返回主信道类型 */
1654     mac_vap_state_enum_uint8 last_vap_state; /* P2P0和P2P_CL 公用VAP 结构.保存进入监听前VAP 的状态
1655                                                    便于监听结束时恢复该状态 */
1656     wlan_channel_band_enum_uint8 band;
1657     wlan_ieee80211_roc_type_uint8 roc_type; /* roc类型 */
1658     osal_u8 rev;
1659     oal_ieee80211_channel_stru listen_channel_para;
1660 } mac_remain_on_channel_param_stru;
1661 
1662 typedef struct {
1663     osal_u8 pool_id;
1664 } mac_device_pool_id_stru;
1665 
1666 /* WPAS 管理帧发送结构 */
1667 typedef struct {
1668     osal_s32 channel;
1669     osal_u8 mgmt_frame_id;
1670     osal_u8 rsv;
1671     osal_u16 len;
1672     const osal_u8 *frame;
1673 } mac_mgmt_frame_stru;
1674 
1675 typedef struct {
1676     osal_u8 tx_switch;
1677     osal_u8 rx_switch;
1678     osal_u8 auc_resv[2]; /* 保留2字节对齐 */
1679 } mac_cfg_set_ampdu_amsdu_stru;
1680 
1681 typedef struct {
1682     osal_u8 show_ip_addr : 4;         /* show ip addr */
1683     osal_u8 show_arpoffload_info : 4; /* show arpoffload 维测 */
1684 } mac_cfg_arpoffload_info_stru;
1685 
1686 typedef struct {
1687     osal_u8 in_suspend;        // 亮暗屏
1688     osal_u8 arpoffload_switch; // arpoffload开关
1689 } mac_cfg_suspend_stru;
1690 
1691 /* P2P 节能控制命令 */
1692 typedef struct {
1693     osal_u8 p2p_statistics_ctrl; /* 0:清除P2P 统计值 1:打印输出统计值 */
1694     osal_u8 rsv[3];
1695 } mac_cfg_p2p_stat_param_stru;
1696 
1697 #ifdef _PRE_PLAT_FEATURE_CUSTOMIZE
1698 /* 定制化 power ref 2g 5g配置参数 */
1699 /* customize rf cfg struct */
1700 typedef struct {
1701     osal_s8 rf_gain_db_mult4; /* 外部PA/LNA bypass时的增益(精度0.25dB) */
1702     osal_u8 auc_resv[3];
1703 } mac_cfg_gain_db_per_band;
1704 
1705 typedef struct {
1706     mac_cfg_gain_db_per_band ac_gain_db_2g[MAC_NUM_2G_BAND]; /* 2g */
1707 #ifdef _PRE_WLAN_SUPPORT_5G
1708     mac_cfg_gain_db_per_band ac_gain_db_5g[MAC_NUM_5G_BAND]; /* 5g */
1709 #endif
1710 } mac_cfg_custom_gain_db_stru;
1711 
1712 typedef struct {
1713     osal_s8 cfg_delta_pwr_ref_rssi_2g[CUS_NUM_2G_DELTA_RSSI_NUM];
1714 #ifdef _PRE_WLAN_SUPPORT_5G
1715     osal_s8 cfg_delta_pwr_ref_rssi_5g[CUS_NUM_5G_DELTA_RSSI_NUM];
1716 #endif
1717 } mac_cfg_custom_delta_pwr_ref_stru;
1718 
1719 typedef struct {
1720     osal_u16 lna_on2off_time_ns; /* LNA开到LNA关的时间(ns) */
1721     osal_u16 lna_off2on_time_ns; /* LNA关到LNA开的时间(ns) */
1722 
1723     osal_s8 lna_bypass_gain_db; /* 外部LNA bypass时的增益(dB) */
1724     osal_s8 lna_gain_db;        /* 外部LNA增益(dB) */
1725     osal_s8 pa_gain_b0_db;      /* 外部PA b0 增益(dB) */
1726     osal_u8 ext_switch_isexist;   /* 是否使用外部switch */
1727 
1728     osal_u8 ext_pa_isexist;  /* 是否使用外部pa */
1729     osal_u8 ext_lna_isexist; /* 是否使用外部lna */
1730     osal_s8 pa_gain_b1_db;   /* 外部PA b1增益(dB) */
1731     osal_u8 pa_gain_lvl_num; /* 外部PA 增益档位数 */
1732 } mac_cfg_custom_ext_rf_stru;
1733 
1734 typedef struct {
1735     mac_cfg_custom_gain_db_stru rf_gain_db_rf[WLAN_RF_CHANNEL_NUMS];           /* 2.4g 5g 插损 */
1736     mac_cfg_custom_delta_pwr_ref_stru delta_pwr_ref_cfg[WLAN_RF_CHANNEL_NUMS]; /* delta_rssi */
1737     osal_u8 far_dist_pow_gain_switch;                                          /* 超远距离功率增益开关 */
1738     osal_u8 far_dist_dsss_scale_promote_switch; /* 超远距11b 1m 2m dbb scale提升使能开关 */
1739     osal_u8 chn_radio_cap;
1740     osal_s8 junction_temp_diff; /* 结温偏差补偿值 */
1741 
1742     /* 注意,如果修改了对应的位置,需要同步修改函数: hal_config_custom_rf  */
1743     osal_s8 delta_cca_ed_high_20th_2g;
1744     osal_s8 delta_cca_ed_high_40th_2g;
1745     osal_s8 delta_cca_ed_high_20th_5g;
1746     osal_s8 delta_cca_ed_high_40th_5g;
1747 } mac_cfg_customize_rf;
1748 
1749 typedef struct {
1750     osal_u16 tx_ratio;        /* tx占空比 */
1751     osal_u16 tx_pwr_comp_val; /* 发射功率补偿值 */
1752 } mac_tx_ratio_vs_pwr_stru;
1753 
1754 /* 定制化TX占空比&温度补偿发射功率的参数 */
1755 typedef struct {
1756     mac_tx_ratio_vs_pwr_stru txratio2pwr[3]; /* 3档占空比分别对应功率补偿值 */
1757     osal_u32 more_pwr;                       /* 根据温度额外补偿的发射功率 */
1758 } mac_cfg_customize_tx_pwr_comp_stru;
1759 
1760 /* RF寄存器定制化结构体 */
1761 typedef struct {
1762     osal_u16 rf_reg117;
1763     osal_u16 rf_reg123;
1764     osal_u16 rf_reg124;
1765     osal_u16 rf_reg125;
1766     osal_u16 rf_reg126;
1767     osal_u8 auc_resv[2];
1768 } mac_cus_dts_rf_reg;
1769 
1770 /* FCC认证 参数结构体 */
1771 typedef struct {
1772     osal_u8 index;       /* 下标表示偏移 */
1773     osal_u8 max_txpower; /* 最大发送功率 */
1774     osal_u16 dbb_scale;  /* dbb scale */
1775 } mac_cus_band_edge_limit_stru;
1776 #endif
1777 
1778 /* 定制化 校准配置参数 */
1779 typedef struct {
1780     /* dts */
1781     osal_s16 aus_cali_txpwr_pa_dc_ref_2g_val_chan[MAC_2G_CHANNEL_NUM]; /* txpwr分信道ref值 */
1782     osal_s16 aus_cali_txpwr_pa_dc_ref_5g_val_band[MAC_NUM_5G_BAND];
1783 } mac_cus_cali_stru;
1784 
1785 #ifdef _PRE_PLAT_FEATURE_CUSTOMIZE
1786 #ifdef _PRE_WLAN_ONLINE_DPD
1787 /* 定制化 DPD校准配置参数 */
1788 typedef struct {
1789     osal_u32 dpd_cali_cus_dts[MAC_DPD_CALI_CUS_PARAMS_NUM];
1790 } mac_dpd_cus_cali_stru;
1791 #endif
1792 
1793 #ifdef _PRE_WLAN_FIT_BASED_REALTIME_CALI
1794 typedef struct {
1795     osal_s16 as_dy_cali_base_ratio_params[CUS_DY_CALI_PARAMS_NUM][CUS_DY_CALI_PARAMS_TIMES]; /* 产测定制化参数数组 */
1796     osal_s8 ac_dy_cali_2g_dpn_params[MAC_2G_CHANNEL_NUM][CUS_DY_CALI_DPN_PARAMS_NUM];
1797     osal_s8 ac_dy_cali_5g_dpn_params[CUS_DY_CALI_NUM_5G_BAND][WLAN_BW_CAP_80PLUS80];
1798     osal_s16 as_extre_point_val[CUS_DY_CALI_NUM_5G_BAND];
1799 } mac_cus_dy_cali_param_stru;
1800 #endif
1801 
1802 typedef struct {
1803     mac_cus_cali_stru cali[WLAN_RF_CHANNEL_NUMS];
1804 #ifdef _PRE_WLAN_ONLINE_DPD
1805     mac_dpd_cus_cali_stru dpd_cali_para[WLAN_RF_CHANNEL_NUMS];
1806 #endif
1807 #ifdef _PRE_WLAN_FIT_BASED_REALTIME_CALI
1808     osal_u16 aus_dyn_cali_dscr_interval[WLAN_BAND_BUTT]; /* 动态校准开关2.4g 5g */
1809 #endif /* _PRE_WLAN_FIT_BASED_REALTIME_CALI */
1810     osal_s8 band_5g_enable;
1811     osal_u8 tone_amp_grade;
1812     osal_u8 auc_resv[2];
1813 } mac_cus_dts_cali_stru;
1814 
1815 /* perf */
1816 typedef struct {
1817     signed char ac_used_mem_param[16];
1818     unsigned char sdio_assem_d2h;
1819     unsigned char auc_resv[3];
1820 } config_device_perf_h2d_stru;
1821 #endif /* #ifdef _PRE_PLAT_FEATURE_CUSTOMIZE */
1822 
1823 /* wiphy Vendor CMD参数 对应cfgid: WLAN_CFGID_VENDOR_CMD */
1824 typedef struct mac_vendor_cmd_channel_list_info {
1825     osal_u8 channel_num_2g;
1826     osal_u8 channel_num_5g;
1827     osal_u8 channel_list_2g[MAC_CHANNEL_FREQ_2_BUTT];
1828     osal_u8 channel_list_5g[MAC_CHANNEL_FREQ_5_BUTT];
1829 } mac_vendor_cmd_channel_list_stru;
1830 
1831 typedef struct mac_sta_bss_parameters_ {
1832     td_u8  flags;
1833     td_u8  dtim_period;
1834     td_u16 beacon_interval;
1835 } mac_sta_bss_parameters;
1836 
1837 typedef struct mac_nl80211_sta_flag_update_ {
1838     td_u32 mask;
1839     td_u32 set;
1840 } mac_nl80211_sta_flag_update;
1841 
1842 typedef struct mac_station_info_tag {
1843     td_u32                          filled;
1844     td_u32                          connected_time;
1845     td_u32                          inactive_time;
1846     td_u16                          llid;
1847     td_u16                          plid;
1848 
1849     td_u64                          rx_bytes;
1850     td_u64                          tx_bytes;
1851     mac_rate_info_stru             txrate;
1852     mac_rate_info_stru             rxrate;
1853 
1854     td_u32                          rx_packets;
1855     td_u32                          tx_packets;
1856     td_u32                          tx_retries;
1857     td_u32                          tx_failed;
1858 
1859     td_u32                          rx_dropped_misc;
1860     td_s32                          generation;
1861     mac_sta_bss_parameters         bss_param;
1862     mac_nl80211_sta_flag_update    sta_flags;
1863 
1864     td_s64                          t_offset;
1865     const td_u8*                    assoc_req_ies;
1866     td_u32                          assoc_req_ies_len;
1867     td_u32                          beacon_loss_count;
1868 
1869     td_u8                           plink_state;
1870     td_s8                           signal;
1871     td_s8                           signal_avg;
1872     td_u8                           resv1;
1873 
1874     td_u32                          resv2;
1875 } mac_station_info_stru;
1876 
1877 /* CHR2.0使用的STA统计信息 */
1878 typedef struct {
1879     osal_u8 distance; /* 算法的tpc距离,对应dmac_alg_tpc_user_distance_enum */
1880     osal_u8 cca_intr; /* 算法的cca_intr干扰,对应alg_cca_opt_intf_enum */
1881     osal_s8 snr_ant0; /* 天线0上报的SNR值 */
1882     osal_s8 snr_ant1; /* 天线1上报的SNR值 */
1883 } station_info_extend_stru;
1884 
1885 /* m2s vap信息结构体 */
1886 typedef struct {
1887     osal_u8 vap_id;                    /* 业务vap id */
1888     wlan_nss_enum_uint8 vap_rx_nss;    /* vap的接收空间流个数 */
1889     wlan_m2s_type_enum_uint8 m2s_type; /* 0:软切换 1:硬切换 */
1890     wlan_mib_mimo_power_save_enum_uint8 sm_power_save;
1891 
1892     oal_bool_enum_uint8 tx_stbc;
1893     oal_bool_enum_uint8 transmit_stagger_sounding;
1894     oal_bool_enum_uint8 vht_ctrl_field_supported;
1895     oal_bool_enum_uint8 vht_number_sounding_dimensions;
1896 
1897     oal_bool_enum_uint8 vht_su_beamformer_optionimplemented;
1898     oal_bool_enum_uint8 tx_vht_stbc_optionimplemented;
1899     oal_bool_enum_uint8 support_opmode;
1900     osal_u8 reserved[1];
1901 } mac_vap_m2s_stru;
1902 
1903 typedef struct {
1904     const osal_char *pstr;
1905     wlan_channel_bandwidth_enum_uint8 width;
1906 } width_type_info_stru;
1907 
1908 #ifdef _PRE_WLAN_FEATURE_PMF
1909 typedef struct {
1910     osal_bool     mac_mib_dot11rsnamfpc;
1911     osal_bool     mac_mib_dot11rsnamfpr;
1912 } mac_vap_pmf_mab_stru;
1913 #endif
1914 
1915 /* 查询事件ID枚举 */
1916 typedef enum {
1917     QUERY_ID_KO_VERSION = 0,
1918     QUERY_ID_PWR_REF = 1,
1919     QUERY_ID_BCAST_RATE = 2,
1920     QUERY_ID_STA_INFO = 3,
1921     QUERY_ID_ANT_RSSI = 4,
1922     QUERY_ID_STA_DIAG_INFO = 5,
1923     QUERY_ID_VAP_DIAG_INFO = 6,
1924     QUERY_ID_SENSING_BSSID_INFO = 7,
1925     QUERY_ID_BG_NOISE = 8,
1926 #ifdef _PRE_WLAN_FEATURE_TCP_ACK_BUFFER
1927     QUERY_ID_TCP_ACK_BUF = 10,
1928 #endif
1929     QUERY_ID_MODE_BUTT
1930 } hmac_vap_query_enent_id_enum;
1931 typedef osal_u8 hmac_vap_query_enent_id_enumm_uint8;
1932 #define HMAC_MAX_DSCP_VALUE_NUM 64
1933 
1934 typedef struct {
1935     osal_wait wait_queue;
1936     oal_bool_enum_uint8 mgmt_tx_complete;
1937     osal_u32 mgmt_tx_status;
1938     osal_u8 mgmt_frame_id;
1939 } oal_mgmt_tx_stru;
1940 
1941 typedef struct {
1942     osal_u16 user_index;
1943     mac_vap_state_enum_uint8 state;
1944     osal_u8 vap_id;
1945     mac_status_code_enum_uint16 status_code;
1946     osal_u8 rsv[2];
1947 } hmac_mgmt_timeout_param_stru;
1948 
1949 typedef struct {
1950     osal_u8 type;
1951     osal_u8 eid;
1952     osal_u8 auc_resv[2];
1953 } hmac_remove_ie_stru;
1954 
1955 #ifdef _PRE_WLAN_FEATURE_HS20
1956 typedef struct {
1957     osal_u8 up_low[MAX_QOS_UP_RANGE]; /* User Priority */
1958     osal_u8 up_high[MAX_QOS_UP_RANGE];
1959     osal_u8 dscp_exception_up[MAX_DSCP_EXCEPT]; /* User Priority of DSCP Exception field */
1960     osal_u8 valid;
1961     osal_u8 num_dscp_except;
1962     osal_u8 dscp_exception[MAX_DSCP_EXCEPT]; /* DSCP exception field  */
1963 } hmac_cfg_qos_map_param_stru;
1964 #endif
1965 
1966 /* 装备测试 */
1967 typedef struct {
1968     osal_u32 rx_pkct_succ_num;    /* 接收成功mpdu数据包数 */
1969     osal_u32 rx_ampdu_succ_num;    /* 接收成功ampdu数据包数 */
1970     osal_u32 rx_fail_num;    /* 接收失败数据包数 */
1971     osal_u32 dbb_num;             /* DBB版本号 */
1972     osal_u32 check_fem_pa_status; /* fem和pa是否烧毁标志 */
1973     osal_s16 s_rx_rssi;
1974     oal_bool_enum_uint8 get_dbb_completed_flag; /* 获取DBB版本号成功上报标志 */
1975     oal_bool_enum_uint8 check_fem_pa_flag;      /* fem和pa是否烧毁上报标志 */
1976     oal_bool_enum_uint8 get_rx_pkct_flag;       /* 接收数据包上报标志位 */
1977     oal_bool_enum_uint8 lte_gpio_check_flag;    /* 接收数据包上报标志位 */
1978     oal_bool_enum_uint8 report_efuse_reg_flag;  /* efuse 寄存器读取 */
1979     oal_bool_enum_uint8 report_reg_flag;        /* 单个寄存器读取 */
1980     osal_u32 reg_value;
1981     osal_u8  ant_status : 4,
1982              get_ant_flag : 4;
1983 } hmac_atcmdsrv_get_stats_stru;
1984 typedef struct _mac_sta_collision_handler {
1985     osal_bool enable_flag;
1986     osal_bool rpt_count;
1987     osal_bool resv[2];
1988 
1989     frw_timeout_stru collision_timer;
1990     osal_u32 collision_timeout;
1991 } mac_sta_collision_handler;
1992 
1993 #ifdef _PRE_WLAN_FEATURE_VIRTUAL_MULTI_STA
1994 #define WDS_HASH_NUM (1 << 2)
1995 #define WDS_AGING_TIME (300 * OAL_TIME_HZ)
1996 
1997 typedef enum {
1998     WDS_MODE_NONE = 0,
1999     WDS_MODE_ROOTAP,
2000     WDS_MODE_REPEATER_STA,
2001     WDS_MODE_BUTT
2002 } hmac_vap_wds_vap_mode_enum;
2003 typedef osal_u8 hmac_vap_wds_vap_mode_enum_uint8;
2004 
2005 typedef struct {
2006     oal_rwlock_stru lock;
2007     frw_timeout_stru wds_timer;
2008     struct osal_list_head peer_node[WDS_HASH_NUM];
2009     struct osal_list_head wds_stas[WDS_HASH_NUM];
2010     struct osal_list_head neigh[WDS_HASH_NUM];
2011     osal_u32 wds_aging;
2012     hmac_vap_wds_vap_mode_enum_uint8 wds_vap_mode;
2013     osal_u8 wds_node_num;
2014     osal_u16 wds_stas_num;
2015     osal_u16 neigh_num;
2016     osal_u8 auc_resv[2];
2017 } hmac_vap_wds_stru;
2018 #endif
2019 
2020 typedef struct hmac_chba_vap_tag hmac_chba_vap_stru;
2021 
2022 /* wme参数 */
2023 typedef struct {
2024     osal_u32 aifsn;      /* AIFSN parameters */
2025     osal_u32 logcwmin;   /* cwmin in exponential form, 单位2^n -1 slot */
2026     osal_u32 logcwmax;   /* cwmax in exponential form, 单位2^n -1 slot */
2027     osal_u32 txop_limit; /* txopLimit, us */
2028 } mac_wme_param_stru;
2029 
2030 typedef struct hmac_vap_tag {
2031     /* -->> Public Start */
2032     osal_u8 device_id;  /* 设备ID */
2033     osal_u8 chip_id;    /* chip ID */
2034     osal_u8 user_nums; /* VAP下已挂接的用户个数 */
2035     osal_atomic use_cnt; /* 用于vap引用计数使用,该值在自增自减时需要使用原子操作 */
2036 
2037     osal_u8 bssid[WLAN_MAC_ADDR_LEN];           /* BSSID,非MAC地址,MAC地址是mib中的auc_dot11StationID */
2038     mac_vap_state_enum_uint8 vap_state;         /* VAP状态 */
2039     wlan_protocol_enum_uint8 protocol;          /* 工作的协议模式 */
2040     wlan_protocol_mode_enum_uint8 max_protocol; /* vap最大工作的协议模式 */
2041     osal_u8 resv0[3];                           /* 保留3字节对齐 */
2042 
2043     mac_channel_stru channel; /* channel 合并,dmac_config_offload_start_vap修改 */
2044     mac_ch_switch_info_stru ch_switch_info;
2045 
2046     osal_u8 has_user_bw_limit : 1; /* 该vap是否存在user限速 */
2047     osal_u8 vap_bw_limit : 1;      /* 该vap是否已限速 */
2048     osal_u8 voice_aggr : 1;        /* 该vap是否针对VO业务支持聚合 */
2049     osal_u8 one_tx_tcp_be : 1;     /* 该vap是否只有1路发送TCP BE业务 */
2050     osal_u8 one_rx_tcp_be : 1;     /* 该vap是否只有1路接收TCP BE业务 */
2051     osal_u8 no_tcp_or_udp : 1;     /* 该vap没有跑TCP或UDP业务 */
2052     osal_u8 random_mac : 1;
2053     osal_u8 roam_scan_valid_rslt : 1;
2054 
2055     osal_u8 al_tx_flag : 1;   /* 常发标志 */
2056     osal_u8 payload_flag : 3; /* 常发 payload内容:0:全0  1:全1  2:random */
2057     osal_u8 al_rx_flag : 1;   /* 常收标志 */
2058     osal_u8 custom_switch_11ax : 1;
2059     osal_u8 hal_cap_11ax : 1;
2060 
2061     osal_u8 he_mu_edca_update_count;
2062     osal_u8 tx_power; /* 传输功率, 单位dBm */
2063 
2064     wlan_nss_enum_uint8 vap_rx_nss; /* vap的接收空间流个数 */
2065     osal_u8 init_flag; /* vap为静态资源,标记VAP有没有被申请,DMAC OFFLOAD模式VAP被删除后过滤缓冲的帧 */
2066     osal_u8 vap_id;                    /* vap ID 即资源池索引值 */
2067     wlan_vap_mode_enum_uint8 vap_mode; /* vap模式  */
2068 
2069 #if (defined(CONFIG_ATP_FASTIP) && defined(_PRE_WLAN_FASTIP_SUPPORT))
2070     osal_u32 fastip_idx; /* 用于保存netdev初始化 的 fastip index */
2071 #endif
2072 
2073     /* 加密相关 */
2074     /* 结构体需要保证4字节对齐 */
2075     mac_cap_flag_stru cap_flag; /* vap能力特性标识 */
2076 
2077     wlan_mib_ieee802dot11_stru *mib_info;
2078 
2079     mac_curr_rateset_stru curr_sup_rates; /* 当前支持的速率集 */
2080     osal_spinlock cache_user_lock; /* cache_user lock */
2081 
2082     /* --------- Public STA成员 Start ----------------- */
2083     osal_u16 sta_aid; /* VAP为STA模式时保存AP分配给STA的AID(从响应帧获取),范围1~2007;VAP为AP模式时,不用此成员变量 */
2084     osal_u16 assoc_vap_id; /* VAP为STA模式时保存user(ap)的资源池索引;VAP为AP模式时,不用此成员变量 */
2085 
2086     osal_u8 user_pmf_cap : 1; /* STA侧在未创建user前,存储目标user的pmf使能信息 */
2087     osal_u8 uapsd_cap : 1;    /* 保存与STA关联的AP是否支持uapsd能力信息 */
2088     osal_u8 wpa3_roaming : 6; /* wpa3漫游标志位 */
2089     osal_u16 user_rsn_cap; /* 存储关联用户的rsn信息 */
2090     osal_u8 disable_clear_ip : 1; /* 禁止断开连接清除ip */
2091     osal_u8 resv3 : 7;
2092 
2093     mac_curr_rateset_stru sta_sup_rates_ie[WLAN_BAND_BUTT]; /* 只在sta全信道扫描时使用,填写支持的速率集ie,分2.4和5G */
2094     /* --------- Public STA成员 End ------------------- */
2095 
2096     /* --------- Public AP成员 Start ----------------- */
2097     mac_app_ie_stru app_ie[OAL_APP_IE_NUM];
2098 
2099     osal_u16 multi_user_idx;                        /* 组播用户ID */
2100     osal_u8 cache_user_mac_addr[WLAN_MAC_ADDR_LEN]; /* cache user对应的MAC地址 */
2101     osal_u16 cache_user_id;                         /* cache user对应的userID */
2102     osal_u8 resv4[2];
2103     struct osal_list_head mac_user_list_head; /* 关联用户节点双向链表,使用USER结构内的DLIST */
2104     /* --------- Public AP成员 End ------------------- */
2105     /* -->> Public End */
2106 
2107     /* -->> Private Start */
2108     oal_net_device_stru *net_device; /* VAP对应的net_devices */
2109     osal_u8 name[OAL_IF_NAME_SIZE];  /* VAP名字 */
2110     oal_mgmt_tx_stru mgmt_tx;
2111 
2112     frw_timeout_stru mgmt_timer;
2113     hmac_mgmt_timeout_param_stru mgmt_timetout_param;
2114 
2115     frw_timeout_stru scan_timeout; /* vap发起扫描时,会启动定时器,做超时保护处理 */
2116 #if (_PRE_OS_VERSION_LITEOS == _PRE_OS_VERSION)
2117     frw_timeout_stru scanresult_clean_timeout; /* vap扫描结束时,会启动定时器,做扫描结果老化处理 */
2118 #endif
2119     hmac_remove_ie_stru remove_ie; /* 配置需要屏蔽的IE信息 */
2120 
2121     osal_u16 rx_timeout[WLAN_WME_AC_BUTT]; /* 不同业务重排序超时时间 */
2122     osal_u8 beamformee_sts_below_80mhz;
2123 
2124     mac_cfg_mode_param_stru preset_para;     /* STA协议变更时变更前的协议模式 */
2125     osal_u8 supp_rates[WLAN_MAX_SUPP_RATES]; /* 支持的速率集 */
2126 
2127     osal_u8 tx_noack; /* NOACK发送用于峰值性能测试 */
2128     osal_u8 protocol_fall : 1; /* 降协议标志位 */
2129     osal_u8 reassoc_flag : 1;  /* 关联过程中判断是否为重关联动作 */
2130     /* 表示vap是否支持接收对端的ampdu+amsdu联合聚合的帧,暂时没找到协议中对应的能力位,
2131        后续看是否需要将该能力定义到mib库中 */
2132     osal_u8 rx_ampduplusamsdu_active : 1;
2133     osal_u8 ap_11ntxbf : 1; /* sta要关联的用户的11n txbf能力信息 */
2134     osal_u8 resv5 : 4;
2135     /* 要加入的AP的国家字符串,前两个字节为国家字母,第三个为\0 */
2136     osal_s8 ac_desired_country[3];
2137 
2138     /* 信息上报 */
2139     osal_wait query_wait_q;
2140 #if defined(_PRE_OS_VERSION_LINUX) && defined(_PRE_OS_VERSION) \
2141     && (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
2142     mac_station_info_stru station_info;
2143 #endif
2144     hmac_atcmdsrv_get_stats_stru atcmdsrv_get_status;
2145 
2146 #if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
2147     oal_proc_dir_entry_stru *proc_dir; /* vap对应的proc目录 */
2148 #endif
2149     mac_sta_collision_handler collision_handler;
2150     osal_u8 dscp_tid_map[HMAC_MAX_DSCP_VALUE_NUM];
2151 
2152     osal_u8 max_scan_count_per_channel; /* 每个信道的扫描次数 */
2153     osal_u8 scan_channel_interval;      /* 间隔n个信道,切回工作信道工作一段时间 */
2154     osal_u16 channel_list_2g;           /* 2.4G信道列表,共13位,按BIT位设置1-13 */
2155     osal_u32 channel_list_5g;           /* 5G信道列表,共29位,按BIT位设置36-196 */
2156     osal_u16 scan_time; /* 扫描在某一信道停留此时间后,扫描结束, ms,必须是10的整数倍 */
2157     osal_u16 work_time_on_home_channel; /* 背景扫描时,返回工作信道工作的时间 */
2158     wlan_scan_type_enum_uint8 scan_type; /* 扫描模式, 0-主动模式, 1-被动模式, 供ccpriv命令使用, 跟正常宏定义的值相反 */
2159     osal_u8 not_scan_flag : 1; /* 对该变量赋值为1, 关联状态下不进行扫描. 配置为0时 恢复扫描; 86是复用扫描时间配置字段 */
2160     osal_u8 single_probe_send_times : 3; /* 单个probe req发送次数,相当于host侧重发次数,目前配置范围[1,3],3bits够用 */
2161     osal_u8 scan_rsv : 4; /* 预留字段, 4个bits */
2162 
2163     osal_u8 dhcp_debug;
2164     osal_u8 dhcp_resv;
2165     osal_u8 ng16_su_feedback;
2166     osal_u8 ng16_mu_feedback;
2167 
2168     /* --------- Private STA成员 Start ----------------- */
2169     osal_u16 assoc_user_cap_info; /* sta要关联的用户的能力信息 */
2170     oal_bool_enum_uint8 no_beacon;
2171     osal_u8 ba_dialog_token;                    /* BA会话创建伪随机值 */
2172     oal_bool_enum_uint8 updata_rd_by_ie_switch; /* 是否根据关联的ap跟新自己的国家码 */
2173     osal_u8 resv6[2];
2174     hmac_sta_tbtt_stru sta_tbtt; /* sta_tbtt处理信息 */
2175     /* --------- Private STA成员 End ------------------- */
2176 
2177     /* --------- Private AP成员 Start ----------------- */
2178     /* --------- Private AP成员 End ------------------- */
2179     /* -->> Private End */
2180 
2181     /* -->> Features Start */
2182     mac_blacklist_info_stru *blacklist_info; /* 黑名单信息 */
2183 #ifdef _PRE_WLAN_FEATURE_ISOLATION
2184     mac_isolation_info_stru isolation_info; /* 用户隔离信息 */
2185 #endif
2186 
2187 #ifdef _PRE_WLAN_FEATURE_P2P
2188     oal_net_device_stru *del_net_device;  /* 指向需要通过cfg80211 接口删除的 net device */
2189     oal_bool_enum_uint8 wait_roc_end;
2190     osal_u8 resv7[3];
2191 #if defined(_PRE_OS_VERSION_LINUX) && defined(_PRE_OS_VERSION) && (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)
2192     oal_completion roc_end_ready; /* roc end completion */
2193 #endif
2194 #endif
2195 
2196 #ifdef _PRE_WLAN_FEATURE_HS20
2197     hmac_cfg_qos_map_param_stru cfg_qos_map_param;
2198 #endif
2199 
2200 #ifdef _PRE_WLAN_FEATURE_ALWAYS_TX
2201     osal_u8 bit_init_flag : 1; /* 常发关闭再次打开标志 */
2202     osal_u8 ack_policy : 1;    /* ack policy: 0:normal ack 1:normal ack */
2203     osal_u8 resv9 : 6;
2204     osal_u8 resv10[3];
2205 #endif
2206 
2207     /* 组播转单播字段 */
2208     osal_void *m2u;
2209 
2210 #ifdef _PRE_WLAN_DFT_STAT
2211     osal_u8 device_distance;
2212     osal_u8 intf_state_cca;
2213     osal_u8 intf_state_co;
2214     osal_u8 resv11;
2215 #endif
2216 
2217     struct osal_list_head pmksa_list_head;
2218 
2219     station_info_extend_stru station_info_extend; /* CHR2.0使用的STA统计信息 */
2220 
2221 #ifdef _PRE_WLAN_TCP_OPT
2222     hmac_tcp_ack_stru hmac_tcp_ack[HCC_DIR_COUNT];
2223 #endif
2224 
2225 #ifdef _PRE_WLAN_FEATURE_STA_PM
2226     osal_u8 cfg_sta_pm_manual;    /* 手动设置sta pm mode的标志 */
2227     osal_u8 ps_mode;
2228     osal_u8 resv14[2];
2229 #endif
2230 
2231 #ifdef _PRE_WLAN_FEATURE_VIRTUAL_MULTI_STA
2232     hmac_vap_wds_stru wds_table;
2233 #endif
2234 
2235 #ifdef _PRE_WLAN_FEATURE_WPA3
2236     hmac_sae_pmksa_cache_stru pmksa_mgmt;
2237     frw_timeout_stru pmksa_timer;
2238 #endif
2239 
2240     osal_u8 bw_fixed : 1;          /* AP模式的VAP的带宽是否固定20M */
2241     osal_u8 en_40m_intol_user : 1; /* ap下是否有关联的40M intolerant的user */
2242     osal_u8 mgmt_report : 1;
2243     osal_u8 resv : 3;
2244     osal_u8 sae_have_pmkid : 1;
2245     osal_u8 en_radar_detector_is_supp : 1; /* 辅路hal device不支持雷达探测,增加判断 */
2246 
2247     osal_u8 uc_wmm_params_update_count; /* 初始为0,AP模式下,每跟新一次wmm参数这个变量加1,在beacon帧和assoc rsp中会
2248                                          填写,4bit,不能超过15;STA模式下解析帧并更新这个值 */
2249 
2250     mac_protection_stru protection; /* 与保护相关变量 */
2251     osal_u8 sae_pwe;
2252     osal_u8 resv17[3]; /* 预留3字节 */
2253 
2254     /* -->> Features End */
2255 
2256     /* -->> Private Start */
2257     osal_u8 use_rts_threshold : 1; /* 该vap的RTS策略是否使用协议规定的RTS门限 */
2258     osal_u8 obss_scan_timer_started : 1;
2259     osal_u8 bw_cmd : 1;   /* 是否使能配置数据带宽的命令 0:No  1:Yes */
2260     osal_u8 resv18 : 5;
2261 
2262     osal_u8 dtim_count;
2263 
2264     wlan_mib_dot11edcaentry_stru wlan_mib_mu_edca;
2265 
2266     hmac_vap_linkloss_stru linkloss_info; /* linkloss机制相关信息 */
2267 
2268     osal_u32 obss_scan_timer_remain; /* 02最大定时器超时65s, OBSS扫描定时器可能为几分钟,通过计数器来实现大定时器 */
2269 
2270     /* 统计信息+信息上报新增字段,修改这个字段,必须修改SDT才能解析正确 */
2271     hmac_vap_query_stats_stru query_stats;
2272 
2273     frw_timeout_stru obss_aging_timer; /* OBSS保护老化定时器 */
2274 
2275     osal_u8 *sta_bw_switch_fsm; /* 带宽切换状态机 */
2276 
2277     mac_scanned_all_bss_info all_bss_info;
2278     hmac_set_rate_stru vap_curr_rate;
2279 
2280     osal_u16 in_tbtt_offset; /* 内部tbtt offset配置值 */
2281     osal_u8 resv19[1];
2282 
2283     /* --------- Private STA成员 Start ------------------ */
2284     osal_u8 resv30 : 1;
2285     osal_u8 beacon_timeout_times : 7; /* sta等待beacon超时计数 */
2286 
2287     osal_u8 non_erp_exist : 1;      /* sta模式下,是否有non_erp station */
2288     osal_u8 auth_received : 1;      /* 接收了auth */
2289     osal_u8 assoc_rsp_received : 1; /* 接收了assoc */
2290     osal_u8 resv20 : 5;
2291     osal_u8 resv21[3];
2292     /* --------- Private STA成员 End ------------------ */
2293 
2294     /* --------- Private AP成员 Start ------------------ */
2295     osal_u8 resv28 : 1;               /* 当前放入硬件beacon帧索引值 */
2296     osal_u8 multi_user_multi_ac_flag : 1; /* 多用户多优先级时是否使能拥塞控制 */
2297     osal_u8 beacon_tx_policy : 2; /* beacon发送策略, 0-单通道, 1-双通道轮流(如果有),2-双通道(如果有) */
2298     osal_u8 resv22 : 4;
2299     osal_u8 resv23[3];
2300 
2301     oal_netbuf_stru *beacon_buffer;
2302     /* --------- Private AP成员 End ------------------ */
2303 
2304     /* -->> Private End */
2305 
2306     /* -->> HAL Start */
2307     hal_tx_txop_alg_stru tx_mgmt_ucast[WLAN_BAND_BUTT];  /* 单播管理帧参数 */
2308     hal_tx_txop_alg_stru tx_mgmt_bmcast[WLAN_BAND_BUTT]; /* 组播、广播管理帧参数 */
2309 
2310     hal_to_dmac_vap_stru *hal_vap;       /* hal vap结构 */
2311     hal_to_dmac_device_stru *hal_device; /* hal device结构体以免二次获取 */
2312     hal_to_dmac_chip_stru *hal_chip;     /* hal chip结构体以免二次获取 */
2313 
2314     oal_netbuf_queue_header_stru tx_dscr_queue_fake[HAL_TX_QUEUE_NUM];
2315     hal_vap_pow_info_stru vap_pow_info; /* VAP级别功率信息结构体 */
2316     /* -->> HAL End */
2317 
2318     /* -->> Features Start */
2319 
2320     osal_u8 intol_user_40m : 1;         /* ap下是否有关联的40M intolerant的user */
2321     osal_u8 radar_detector_is_supp : 1; /* 辅路hal device不支持雷达探测,增加判断 */
2322     osal_u8 p2p_mode : 3;               /* 0:非P2P设备; 1:P2P_GO; 2:P2P_Device; 3:P2P_CL */
2323     osal_u8 hml : 1;
2324     osal_u8 enable_11r : 1;
2325 
2326     osal_u8 resv29 : 1;
2327     osal_u8 cfg_pm_mode : 3; /* 手动挡保存的低功耗模式 */
2328     osal_u8 resv24 : 5;
2329 
2330     osal_u8 sta_pm_close_status; /* sta 低功耗状态, 包含多个模块的低功耗控制信息 */
2331     wlan_channel_bandwidth_enum_uint8 bandwidth_40m; /* 记录ap在切换到20M之前的带宽 */
2332 
2333     osal_u8 *tim_bitmap; /* 本地保存的tim_bitmap,AP模式有效 */
2334 
2335     osal_u8 tim_bitmap_len;
2336     osal_u8 ps_user_num;      /* 处于节能模式的用户的数目,AP模式有效 */
2337     osal_u8 bcn_tout_max_cnt; /* beacon连续收不到最大睡眠次数 */
2338     osal_u8 er_su_disable            : 1;
2339     osal_u8 dcm_constellation_tx     : 2;
2340     osal_u8 bandwidth_extended_range : 1;
2341     osal_u8 resv31                   : 4;
2342     osal_u8 resv25[2];
2343 
2344     osal_u16 beacon_timeout;      /* beacon timeout配置值 */
2345 #ifdef _PRE_WLAN_FEATURE_P2P
2346     osal_u8 p2p_listen_channel;           /* P2P Listen channel, 跟之前的变量合一 */
2347 #endif
2348 #ifdef _PRE_WLAN_FEATURE_PMF
2349     osal_u32 user_pmf_status; /* 记录此vap下user pmf使能的情况,供控制硬件vap是否打开加解密开关 */
2350 #endif
2351     mac_sta_pm_handler_stru sta_pm_handler; /* sta侧pm管理结构定义 */
2352 #ifdef _PRE_WLAN_FEATURE_P2P
2353     mac_cfg_p2p_noa_param_stru p2p_noa_param;
2354     mac_cfg_p2p_ops_param_stru p2p_ops_param;
2355 #endif
2356 
2357 #ifdef _PRE_WLAN_FEATURE_WOW_OFFLOAD
2358     mac_vap_ip_entries_stru *ip_addr_info; /* Host侧IPv4和IPv6地址 */
2359 #endif
2360 
2361 #ifdef _PRE_WLAN_FEATURE_20_40_80_COEXIST
2362     frw_timeout_stru recovery_timer_40m; /* 40M恢复定时器 */
2363 #endif
2364     /* -->> Features End */
2365 
2366     /* -->> Features Array Start */
2367     osal_void **hmac_vap_feature_arr;
2368     /* -->> Features Array Start */
2369 } hmac_vap_stru;
2370 
is_ap(const hmac_vap_stru * hmac_vap)2371 static INLINE__ osal_u8 is_ap(const hmac_vap_stru *hmac_vap)
2372 {
2373     return (hmac_vap->vap_mode == WLAN_VAP_MODE_BSS_AP);
2374 }
2375 
is_sta(const hmac_vap_stru * hmac_vap)2376 static INLINE__ osal_u8 is_sta(const hmac_vap_stru *hmac_vap)
2377 {
2378     return (hmac_vap->vap_mode == WLAN_VAP_MODE_BSS_STA);
2379 }
2380 
is_p2p_dev(const hmac_vap_stru * hmac_vap)2381 static INLINE__ osal_u8 is_p2p_dev(const hmac_vap_stru *hmac_vap)
2382 {
2383     return (hmac_vap->p2p_mode == WLAN_P2P_DEV_MODE);
2384 }
2385 
is_p2p_go(const hmac_vap_stru * hmac_vap)2386 static INLINE__ osal_u8 is_p2p_go(const hmac_vap_stru *hmac_vap)
2387 {
2388     return (hmac_vap->p2p_mode == WLAN_P2P_GO_MODE);
2389 }
2390 
is_p2p_cl(const hmac_vap_stru * hmac_vap)2391 static INLINE__ osal_u8 is_p2p_cl(const hmac_vap_stru *hmac_vap)
2392 {
2393     return (hmac_vap->p2p_mode == WLAN_P2P_CL_MODE);
2394 }
2395 
is_legacy_vap(const hmac_vap_stru * hmac_vap)2396 static INLINE__ osal_u8 is_legacy_vap(const hmac_vap_stru *hmac_vap)
2397 {
2398     return (hmac_vap->p2p_mode == WLAN_LEGACY_VAP_MODE);
2399 }
2400 
is_p2p_mode(osal_u8 value)2401 static INLINE__ osal_u8 is_p2p_mode(osal_u8 value)
2402 {
2403     return ((value == WLAN_P2P_CL_MODE) || (value == WLAN_P2P_GO_MODE) || (value == WLAN_P2P_DEV_MODE));
2404 }
2405 
is_legacy_sta(const hmac_vap_stru * hmac_vap)2406 static INLINE__ osal_u8 is_legacy_sta(const hmac_vap_stru *hmac_vap)
2407 {
2408     return ((hmac_vap->vap_mode == WLAN_VAP_MODE_BSS_STA) && (hmac_vap->p2p_mode == WLAN_LEGACY_VAP_MODE));
2409 }
2410 
is_legacy_ap(const hmac_vap_stru * hmac_vap)2411 static INLINE__ osal_u8 is_legacy_ap(const hmac_vap_stru *hmac_vap)
2412 {
2413     return ((hmac_vap->vap_mode == WLAN_VAP_MODE_BSS_AP) && (hmac_vap->p2p_mode == WLAN_LEGACY_VAP_MODE));
2414 }
2415 
is_11ax_vap(const hmac_vap_stru * hmac_vap)2416 static INLINE__ osal_u8 is_11ax_vap(const hmac_vap_stru *hmac_vap)
2417 {
2418     return ((hmac_vap->hal_cap_11ax == OSAL_TRUE) && (hmac_vap->custom_switch_11ax == OSAL_TRUE));
2419 }
2420 
mac_vap_is_work_he_protocol(const hmac_vap_stru * hmac_vap)2421 static INLINE__ osal_u8 mac_vap_is_work_he_protocol(const hmac_vap_stru *hmac_vap)
2422 {
2423     return (hmac_vap->protocol == WLAN_HE_MODE);
2424 }
2425 
2426 #define is_2g(mac_vap) ((mac_vap)->channel.band == WLAN_BAND_2G)
2427 
mac_btcoex_check_valid_vap(const hmac_vap_stru * hmac_vap)2428 static INLINE__ osal_u8 mac_btcoex_check_valid_vap(const hmac_vap_stru *hmac_vap)
2429 {
2430     return ((hmac_vap->channel.band == WLAN_BAND_2G) ? OSAL_TRUE : OSAL_FALSE);
2431 }
2432 
mac_btcoex_check_valid_sta(const hmac_vap_stru * hmac_vap)2433 static INLINE__ osal_u8 mac_btcoex_check_valid_sta(const hmac_vap_stru *hmac_vap)
2434 {
2435     return ((is_sta(hmac_vap) && (hmac_vap->channel.band == WLAN_BAND_2G)) ? OSAL_TRUE : OSAL_FALSE);
2436 }
2437 
2438 /* ap形态考虑go */
mac_btcoex_check_valid_ap(const hmac_vap_stru * hmac_vap)2439 static INLINE__ osal_u8 mac_btcoex_check_valid_ap(const hmac_vap_stru *hmac_vap)
2440 {
2441     return ((is_ap(hmac_vap) && (hmac_vap->channel.band == WLAN_BAND_2G)) ? OSAL_TRUE : OSAL_FALSE);
2442 }
2443 
2444 #ifdef _PRE_WLAN_FEATURE_M2S
mac_vap_is_2g_spec_siso(const hmac_vap_stru * hmac_vap)2445 static INLINE__ osal_u8 mac_vap_is_2g_spec_siso(const hmac_vap_stru *hmac_vap)
2446 {
2447     return ((hmac_vap->channel.band == WLAN_BAND_2G) && (hmac_vap->cap_flag.custom_siso_2g == OSAL_TRUE));
2448 }
2449 
mac_vap_is_5g_spec_siso(const hmac_vap_stru * hmac_vap)2450 static INLINE__ osal_u8 mac_vap_is_5g_spec_siso(const hmac_vap_stru *hmac_vap)
2451 {
2452     return ((hmac_vap->channel.band == WLAN_BAND_5G) && (hmac_vap->cap_flag.custom_siso_5g == OSAL_TRUE));
2453 }
2454 
mac_vap_spec_is_sw_need_m2s_switch(const hmac_vap_stru * hmac_vap)2455 static INLINE__ osal_u8 mac_vap_spec_is_sw_need_m2s_switch(const hmac_vap_stru *hmac_vap)
2456 {
2457     return (mac_vap_is_2g_spec_siso(hmac_vap) || mac_vap_is_5g_spec_siso(hmac_vap));
2458 }
2459 #endif
2460 
is_user_single_nss(const hmac_user_stru * hmac_user)2461 static INLINE__ osal_u8 is_user_single_nss(const hmac_user_stru *hmac_user)
2462 {
2463     return (hmac_user->user_num_spatial_stream == WLAN_SINGLE_NSS);
2464 }
2465 
is_vap_single_nss(const hmac_vap_stru * hmac_vap)2466 static INLINE__ osal_u8 is_vap_single_nss(const hmac_vap_stru *hmac_vap)
2467 {
2468     return (hmac_vap->vap_rx_nss == WLAN_SINGLE_NSS);
2469 }
2470 
mac_vap_get_cap_bw(const hmac_vap_stru * hmac_vap)2471 static INLINE__ wlan_channel_bandwidth_enum_uint8 mac_vap_get_cap_bw(const hmac_vap_stru *hmac_vap)
2472 {
2473     return hmac_vap->channel.en_bandwidth;
2474 }
2475 
mac_vap_set_cap_bw(hmac_vap_stru * hmac_vap,osal_u8 value)2476 static INLINE__ osal_void mac_vap_set_cap_bw(hmac_vap_stru *hmac_vap, osal_u8 value)
2477 {
2478     hmac_vap->channel.en_bandwidth = value;
2479 }
2480 
2481 /* ****************************************************************************
2482     OTHERS定义
2483 **************************************************************************** */
mac_vap_width_to_str(wlan_channel_bandwidth_enum_uint8 width)2484 static INLINE__ const osal_char *mac_vap_width_to_str(wlan_channel_bandwidth_enum_uint8 width)
2485 {
2486     osal_u32 i;
2487     width_type_info_stru width_tbl[] = {
2488         {"20",   WLAN_BAND_WIDTH_20M},
2489         {"40+",  WLAN_BAND_WIDTH_40PLUS},
2490         {"40-",  WLAN_BAND_WIDTH_40MINUS},
2491         {"80++", WLAN_BAND_WIDTH_80PLUSPLUS},
2492         {"80--", WLAN_BAND_WIDTH_80MINUSMINUS},
2493         {"80+-", WLAN_BAND_WIDTH_80PLUSMINUS},
2494         {"80-+", WLAN_BAND_WIDTH_80MINUSPLUS}
2495     };
2496 
2497     for (i = 0; i < sizeof(width_tbl) / sizeof(width_type_info_stru); i++) {
2498         if (width == width_tbl[i].width) {
2499             return width_tbl[i].pstr;
2500         }
2501     }
2502 
2503     return "unknown";
2504 }
2505 
2506 #ifdef _PRE_WLAN_FEATURE_MULTI_NETBUF_AMSDU
2507 typedef struct {
2508     /* 定制化是否打开amsdu大包聚合 */
2509     osal_u8 host_large_amsdu_en;
2510     /* 当前聚合是否为amsdu聚合 */
2511     osal_u8 cur_amsdu_enable;
2512     osal_u16 amsdu_throughput_high;
2513     osal_u16 amsdu_throughput_low;
2514     osal_u16 resv;
2515 } mac_tx_large_amsdu_ampdu_stru;
2516 extern mac_tx_large_amsdu_ampdu_stru g_st_tx_large_amsdu;
2517 #endif
2518 
2519 typedef struct {
2520     /* 是否使能手动配置接收聚合个数 */
2521     osal_u8 rx_buffer_size_set_en;
2522     osal_u8 rx_buffer_size; /* addba rsp回复的聚合个数 */
2523     osal_u16 resv;
2524 } mac_rx_buffer_size_stru;
2525 
2526 typedef struct {
2527     /* 定制化小包amsdu开关 */
2528     osal_u8 ini_small_amsdu_en;
2529     osal_u8 cur_small_amsdu_en;
2530     osal_u16 small_amsdu_throughput_high;
2531     osal_u16 small_amsdu_throughput_low;
2532     osal_u16 small_amsdu_pps_high;
2533     osal_u16 small_amsdu_pps_low;
2534     osal_u16 resv;
2535 } mac_small_amsdu_switch_stru;
2536 
2537 typedef struct {
2538     osal_u8 ini_tcp_ack_buf_en;
2539     osal_u8 cur_tcp_ack_buf_en;
2540     osal_u16 tcp_ack_buf_throughput_high;
2541     osal_u16 tcp_ack_buf_throughput_low;
2542     osal_u16 resv;
2543 } mac_tcp_ack_buf_switch_stru;
2544 
2545 typedef enum {
2546     MAC_VAP_11AX_PARAM_CONFIG_INIT = 0,
2547     MAC_VAP_11AX_PARAM_CONFIG_UPDAT = 1,
2548 
2549     MAC_VAP_11AX_PARAM_CONFIG_BUTT
2550 } mac_vap_11ax_param_config_enum;
2551 typedef osal_u8 mac_vap_11ax_param_config_enum_uint8;
2552 
2553 /* cfg id对应的参数结构体 */
2554 /* 创建VAP参数结构体, 对应cfgid: WLAN_CFGID_ADD_VAP */
2555 typedef struct {
2556     mac_cfg_add_vap_param_stru add_vap;
2557 
2558     oal_bool_enum_uint8 custom_switch_11ax;
2559     osal_u8 resv4[3]; /* 预留3字节对齐 */
2560     oal_net_device_stru *net_dev;
2561 } hmac_cfg_add_vap_param_stru;
2562 typedef hmac_cfg_add_vap_param_stru hmac_cfg_del_vap_param_stru;
2563 
2564 #ifdef _PRE_WLAN_FEATURE_11AX
mac_mib_set_qap_mu_edca_table_cwmin(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u32 val)2565 static INLINE__ osal_void mac_mib_set_qap_mu_edca_table_cwmin(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u32 val)
2566 {
2567     hmac_vap->wlan_mib_mu_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_c_wmin = (osal_u8)val;
2568 }
2569 
mac_mib_get_qap_mu_edca_table_cwmin(hmac_vap_stru * hmac_vap,osal_u8 index)2570 static INLINE__ osal_u32 mac_mib_get_qap_mu_edca_table_cwmin(hmac_vap_stru *hmac_vap, osal_u8 index)
2571 {
2572     return hmac_vap->wlan_mib_mu_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_c_wmin;
2573 }
2574 
mac_mib_set_qap_mu_edca_table_cwmax(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u32 val)2575 static INLINE__ osal_void mac_mib_set_qap_mu_edca_table_cwmax(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u32 val)
2576 {
2577     hmac_vap->wlan_mib_mu_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_c_wmax = (osal_u8)val;
2578 }
2579 
mac_mib_get_qap_mu_edca_table_cwmax(hmac_vap_stru * hmac_vap,osal_u8 index)2580 static INLINE__ osal_u32 mac_mib_get_qap_mu_edca_table_cwmax(hmac_vap_stru *hmac_vap, osal_u8 index)
2581 {
2582     return hmac_vap->wlan_mib_mu_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_c_wmax;
2583 }
2584 
mac_mib_set_qap_mu_edca_table_aifsn(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u32 val)2585 static INLINE__ osal_void mac_mib_set_qap_mu_edca_table_aifsn(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u32 val)
2586 {
2587     hmac_vap->wlan_mib_mu_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_aifsn = (osal_u8)val;
2588 }
2589 
mac_mib_get_qap_mu_edca_table_aifsn(hmac_vap_stru * hmac_vap,osal_u8 index)2590 static INLINE__ osal_u32 mac_mib_get_qap_mu_edca_table_aifsn(hmac_vap_stru *hmac_vap, osal_u8 index)
2591 {
2592     return hmac_vap->wlan_mib_mu_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_aifsn;
2593 }
2594 
mac_mib_set_qap_mu_edca_table_txop_limit(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u32 val)2595 static INLINE__ osal_void mac_mib_set_qap_mu_edca_table_txop_limit(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u32 val)
2596 {
2597     hmac_vap->wlan_mib_mu_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_txop_limit = (osal_u16)val;
2598 }
2599 
mac_mib_get_qap_mu_edca_table_txop_limit(hmac_vap_stru * hmac_vap,osal_u8 index)2600 static INLINE__ osal_u32 mac_mib_get_qap_mu_edca_table_txop_limit(hmac_vap_stru *hmac_vap, osal_u8 index)
2601 {
2602     return hmac_vap->wlan_mib_mu_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_txop_limit;
2603 }
2604 
mac_mib_set_QAPMUEDCATableMandatory(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u8 val)2605 static INLINE__ void mac_mib_set_QAPMUEDCATableMandatory(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u8 val)
2606 {
2607     hmac_vap->wlan_mib_mu_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_mandatory = val;
2608 }
2609 
mac_mib_get_QAPMUEDCATableMandatory(hmac_vap_stru * hmac_vap,osal_u8 index)2610 static INLINE__ osal_u8 mac_mib_get_QAPMUEDCATableMandatory(hmac_vap_stru *hmac_vap, osal_u8 index)
2611 {
2612     return hmac_vap->wlan_mib_mu_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_mandatory;
2613 }
mac_mib_set_ppe_thresholds_required(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 value)2614 static INLINE__ osal_void mac_mib_set_ppe_thresholds_required(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 value)
2615 {
2616     hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_ppe_thresholds_required = value;
2617 }
2618 
mac_mib_get_ppe_thresholds_required(const hmac_vap_stru * hmac_vap)2619 static INLINE__ oal_bool_enum_uint8 mac_mib_get_ppe_thresholds_required(const hmac_vap_stru *hmac_vap)
2620 {
2621     return hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_ppe_thresholds_required;
2622 }
2623 #endif
2624 
2625 /* cfg id对应的get set函数 */
2626 typedef struct {
2627     wlan_cfgid_enum_uint16 cfgid;
2628     osal_u8 auc_resv[2]; /* 2字节对齐 */
2629     osal_u32 (*get_func)(hmac_vap_stru *hmac_vap, osal_u8 *len, osal_u8 *param);
2630     osal_u32 (*set_func)(hmac_vap_stru *hmac_vap, osal_u8 len, osal_u8 *param);
2631 } mac_cfgid_stru;
2632 
2633 typedef struct {
2634     hmac_vap_stru *hmac_vap;
2635     osal_char param[4]; /* 查询或配置信息占用4字节 */
2636 } mac_cfg_event_stru;
2637 
2638 typedef void (*ch_mib_by_bw)(hmac_vap_stru *hmac_vap, wlan_channel_band_enum_uint8 band,
2639     wlan_channel_bandwidth_enum_uint8 en_bandwidth);
2640 typedef void (*init_11ac_rates)(hmac_vap_stru *hmac_vap, hmac_device_stru *hmac_device);
2641 typedef void (*init_11n_rates)(hmac_vap_stru *hmac_vap, hmac_device_stru *hmac_device);
2642 typedef osal_u32 (*init_privacy)(hmac_vap_stru *hmac_vap, mac_conn_security_stru *conn_sec);
2643 typedef void (*init_rates_by_prot)(hmac_vap_stru *hmac_vap, wlan_protocol_enum_uint8 vap_protocol,
2644     mac_data_rate_stru *rates);
2645 typedef void (*init_11ax_mib)(hmac_vap_stru *hmac_vap);
2646 typedef void (*init_11ax_rates)(hmac_vap_stru *hmac_vap, hmac_device_stru *hmac_device);
2647 typedef void (*p_mac_vap_init_mib_11n_cb)(hmac_vap_stru *hmac_vap);
2648 typedef void (*p_mac_init_mib_cb)(hmac_vap_stru *hmac_vap);
2649 typedef osal_u32 (*p_mac_vap_init_by_protocol_cb)(hmac_vap_stru *hmac_vap, wlan_protocol_enum_uint8 protocol);
2650 typedef void (*p_mac_vap_init_11ac_mcs_singlenss_cb)(hmac_vap_stru *hmac_vap,
2651     wlan_channel_bandwidth_enum_uint8 en_bandwidth);
2652 typedef void (*p_mac_vap_init_11ac_mcs_doublenss_cb)(hmac_vap_stru *hmac_vap,
2653     wlan_channel_bandwidth_enum_uint8 en_bandwidth);
2654 
2655 typedef struct {
2656     p_mac_init_mib_cb mac_init_mib_cb;
2657     p_mac_vap_init_mib_11n_cb mac_vap_init_mib_11n_cb;
2658     p_mac_vap_init_by_protocol_cb mac_vap_init_by_protocol_cb;
2659     p_mac_vap_init_11ac_mcs_singlenss_cb mac_vap_init_11ac_mcs_singlenss_cb;
2660     p_mac_vap_init_11ac_mcs_doublenss_cb mac_vap_init_11ac_mcs_doublenss_cb;
2661     ch_mib_by_bw ch_mib_by_bw_cb;
2662     init_11ac_rates init_11ac_rates_cb;
2663     init_11n_rates init_11n_rates_cb;
2664     init_privacy init_privacy_cb;
2665     init_rates_by_prot init_rates_by_prot_cb;
2666     init_11ax_rates init_11ax_rates_cb;
2667     init_11ax_mib init_11ax_mib_cb;
2668 } mac_vap_cb;
2669 
2670 void hmac_vap_free_mib_etc(hmac_vap_stru *hmac_vap);
mac_mib_get_pre_auth_actived(hmac_vap_stru * hmac_vap)2671 static INLINE__ oal_bool_enum_uint8 mac_mib_get_pre_auth_actived(hmac_vap_stru *hmac_vap)
2672 {
2673     return hmac_vap->mib_info->wlan_mib_privacy.dot11_rsna_preauthentication_activated;
2674 }
2675 
mac_mib_set_pre_auth_actived(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 pre_auth)2676 static INLINE__ osal_void mac_mib_set_pre_auth_actived(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 pre_auth)
2677 {
2678     hmac_vap->mib_info->wlan_mib_privacy.dot11_rsna_preauthentication_activated = pre_auth;
2679 }
2680 
mac_mib_get_rsnacfg_ptksareplaycounters(hmac_vap_stru * hmac_vap)2681 static INLINE__ osal_u8 mac_mib_get_rsnacfg_ptksareplaycounters(hmac_vap_stru *hmac_vap)
2682 {
2683     return hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.dot11_rsna_config_ptksa_replay_counters;
2684 }
2685 
mac_mib_set_rsnacfg_ptksareplaycounters(hmac_vap_stru * hmac_vap,osal_u8 ptksa_replay_counters)2686 static INLINE__ osal_void mac_mib_set_rsnacfg_ptksareplaycounters(hmac_vap_stru *hmac_vap,
2687     osal_u8 ptksa_replay_counters)
2688 {
2689     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.dot11_rsna_config_ptksa_replay_counters =
2690         ptksa_replay_counters;
2691 }
2692 
mac_mib_get_rsnacfg_gtksareplaycounters(hmac_vap_stru * hmac_vap)2693 static INLINE__ osal_u8 mac_mib_get_rsnacfg_gtksareplaycounters(hmac_vap_stru *hmac_vap)
2694 {
2695     return hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.dot11_rsna_config_gtksa_replay_counters;
2696 }
2697 
mac_mib_set_rsnacfg_gtksareplaycounters(hmac_vap_stru * hmac_vap,osal_u8 gtksa_replay_counters)2698 static INLINE__ osal_void mac_mib_set_rsnacfg_gtksareplaycounters(hmac_vap_stru *hmac_vap,
2699     osal_u8 gtksa_replay_counters)
2700 {
2701     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.dot11_rsna_config_gtksa_replay_counters =
2702         gtksa_replay_counters;
2703 }
2704 
mac_mib_init_rsnacfg_suites(hmac_vap_stru * hmac_vap)2705 static INLINE__ osal_void mac_mib_init_rsnacfg_suites(hmac_vap_stru *hmac_vap)
2706 {
2707     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_group_suite = MAC_WPA_CHIPER_TKIP;
2708     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_pair_suites[0] = MAC_WPA_CHIPER_CCMP;
2709     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_pair_suites[1] = MAC_WPA_CHIPER_TKIP;
2710 
2711     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_akm_suites[0] = MAC_WPA_AKM_PSK;
2712     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_akm_suites[1] = MAC_WPA_AKM_PSK_SHA256;
2713 
2714     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_group_suite = MAC_RSN_CHIPER_CCMP;
2715     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_pair_suites[0] = MAC_RSN_CHIPER_CCMP;
2716     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_pair_suites[1] = MAC_RSN_CHIPER_TKIP;
2717 
2718     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_akm_suites[0] = MAC_RSN_AKM_PSK;
2719     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_akm_suites[1] = MAC_RSN_AKM_PSK_SHA256;
2720     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_group_mgmt_suite = MAC_RSN_CIPHER_SUITE_AES_128_CMAC;
2721 }
2722 
mac_mib_set_wpa_group_suite(hmac_vap_stru * hmac_vap,osal_u32 suite)2723 static INLINE__ osal_void mac_mib_set_wpa_group_suite(hmac_vap_stru *hmac_vap, osal_u32 suite)
2724 {
2725     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_group_suite = suite;
2726 }
2727 
mac_mib_set_rsn_group_suite(hmac_vap_stru * hmac_vap,osal_u32 suite)2728 static INLINE__ osal_void mac_mib_set_rsn_group_suite(hmac_vap_stru *hmac_vap, osal_u32 suite)
2729 {
2730     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_group_suite = suite;
2731 }
2732 
mac_mib_set_rsn_group_mgmt_suite(hmac_vap_stru * hmac_vap,osal_u32 suite)2733 static INLINE__ osal_void mac_mib_set_rsn_group_mgmt_suite(hmac_vap_stru *hmac_vap, osal_u32 suite)
2734 {
2735     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_group_mgmt_suite = suite;
2736 }
2737 
mac_mib_get_wpa_group_suite(hmac_vap_stru * hmac_vap)2738 static INLINE__ osal_u32 mac_mib_get_wpa_group_suite(hmac_vap_stru *hmac_vap)
2739 {
2740     return hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_group_suite;
2741 }
2742 
mac_mib_get_rsn_group_suite(hmac_vap_stru * hmac_vap)2743 static INLINE__ osal_u32 mac_mib_get_rsn_group_suite(hmac_vap_stru *hmac_vap)
2744 {
2745     return hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_group_suite;
2746 }
2747 
mac_mib_get_rsn_group_mgmt_suite(hmac_vap_stru * hmac_vap)2748 static INLINE__ osal_u32 mac_mib_get_rsn_group_mgmt_suite(hmac_vap_stru *hmac_vap)
2749 {
2750     return hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_group_mgmt_suite;
2751 }
2752 
mac_mib_set_wpa_pair_suites(hmac_vap_stru * hmac_vap,const osal_u32 * suites)2753 static INLINE__ osal_void mac_mib_set_wpa_pair_suites(hmac_vap_stru *hmac_vap, const osal_u32 *suites)
2754 {
2755     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_pair_suites[0] = suites[0];
2756     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_pair_suites[1] = suites[1];
2757 }
2758 
mac_mib_set_rsn_pair_suites(hmac_vap_stru * hmac_vap,const osal_u32 * suites)2759 static INLINE__ osal_void mac_mib_set_rsn_pair_suites(hmac_vap_stru *hmac_vap, const osal_u32 *suites)
2760 {
2761     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_pair_suites[0] = suites[0];
2762     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_pair_suites[1] = suites[1];
2763 }
2764 
mac_mib_set_wpa_akm_suites(hmac_vap_stru * hmac_vap,const osal_u32 * suites)2765 static INLINE__ osal_void mac_mib_set_wpa_akm_suites(hmac_vap_stru *hmac_vap, const osal_u32 *suites)
2766 {
2767     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_akm_suites[0] = suites[0];
2768     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_akm_suites[1] = suites[1];
2769 }
2770 
mac_mib_set_rsn_akm_suites(hmac_vap_stru * hmac_vap,const osal_u32 * suites)2771 static INLINE__ osal_void mac_mib_set_rsn_akm_suites(hmac_vap_stru *hmac_vap, const osal_u32 *suites)
2772 {
2773     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_akm_suites[0] = suites[0];
2774     hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_akm_suites[1] = suites[1];
2775 }
2776 
mac_mib_get_rsn_akm_suites_direct(hmac_vap_stru * hmac_vap,osal_u8 number)2777 static INLINE__ osal_u32 mac_mib_get_rsn_akm_suites_direct(hmac_vap_stru *hmac_vap, osal_u8 number)
2778 {
2779     return hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_akm_suites[number];
2780 }
2781 
mac_mib_wpa_pair_match_suites(const hmac_vap_stru * hmac_vap,const osal_u32 * pul_suites)2782 static INLINE__ osal_u32 mac_mib_wpa_pair_match_suites(const hmac_vap_stru *hmac_vap, const osal_u32 *pul_suites)
2783 {
2784     osal_u8 idx_local;
2785     osal_u8 idx_peer;
2786 
2787     for (idx_local = 0; idx_local < WLAN_PAIRWISE_CIPHER_SUITES; idx_local++) {
2788         for (idx_peer = 0; idx_peer < WLAN_PAIRWISE_CIPHER_SUITES; idx_peer++) {
2789             if (hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_pair_suites[idx_local] ==
2790                 pul_suites[idx_peer]) {
2791                 return pul_suites[idx_peer];
2792             }
2793         }
2794     }
2795     return 0;
2796 }
2797 
mac_mib_rsn_pair_match_suites(const hmac_vap_stru * hmac_vap,osal_u32 * pul_suites)2798 static INLINE__ osal_u32 mac_mib_rsn_pair_match_suites(const hmac_vap_stru *hmac_vap, osal_u32 *pul_suites)
2799 {
2800     osal_u8 idx_local;
2801     osal_u8 idx_peer;
2802 
2803     for (idx_local = 0; idx_local < WLAN_PAIRWISE_CIPHER_SUITES; idx_local++) {
2804         for (idx_peer = 0; idx_peer < WLAN_PAIRWISE_CIPHER_SUITES; idx_peer++) {
2805             if (hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_pair_suites[idx_local] ==
2806                 pul_suites[idx_peer]) {
2807                 return pul_suites[idx_peer];
2808             }
2809         }
2810     }
2811     return 0;
2812 }
2813 
mac_mib_wpa_akm_match_suites(const hmac_vap_stru * hmac_vap,osal_u32 * pul_suites)2814 static INLINE__ osal_u32 mac_mib_wpa_akm_match_suites(const hmac_vap_stru *hmac_vap, osal_u32 *pul_suites)
2815 {
2816     osal_u8 idx_local;
2817     osal_u8 idx_peer;
2818 
2819     for (idx_local = 0; idx_local < WLAN_AUTHENTICATION_SUITES; idx_local++) {
2820         for (idx_peer = 0; idx_peer < WLAN_AUTHENTICATION_SUITES; idx_peer++) {
2821             if (hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_akm_suites[idx_local] ==
2822                 pul_suites[idx_peer]) {
2823                 return pul_suites[idx_peer];
2824             }
2825         }
2826     }
2827     return 0;
2828 }
2829 
mac_mib_rsn_akm_match_suites(const hmac_vap_stru * hmac_vap,const osal_u32 * pul_suites)2830 static INLINE__ osal_u32 mac_mib_rsn_akm_match_suites(const hmac_vap_stru *hmac_vap, const osal_u32 *pul_suites)
2831 {
2832     osal_u8 idx_local;
2833     osal_u8 idx_peer;
2834 
2835     for (idx_local = 0; idx_local < WLAN_AUTHENTICATION_SUITES; idx_local++) {
2836         for (idx_peer = 0; idx_peer < WLAN_AUTHENTICATION_SUITES; idx_peer++) {
2837             if (hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_akm_suites[idx_local] ==
2838                 pul_suites[idx_peer]) {
2839                 return pul_suites[idx_peer];
2840             }
2841         }
2842     }
2843     return 0;
2844 }
2845 
mac_mib_get_wpa_pair_suites(hmac_vap_stru * hmac_vap,osal_u32 * pul_suites,osal_u32 len)2846 static INLINE__ osal_u8 mac_mib_get_wpa_pair_suites(hmac_vap_stru *hmac_vap, osal_u32 *pul_suites, osal_u32 len)
2847 {
2848     osal_u8 loop;
2849     osal_u8 num = 0;
2850 
2851     for (loop = 0; loop < WLAN_PAIRWISE_CIPHER_SUITES; loop++) {
2852         if (hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_pair_suites[loop] != 0) {
2853             if (num >= len) {
2854                 break;
2855             }
2856             pul_suites[num++] = hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_pair_suites[loop];
2857         }
2858     }
2859     return num;
2860 }
2861 
mac_mib_get_rsn_pair_suites(hmac_vap_stru * hmac_vap,osal_u32 * pul_suites,osal_u32 len)2862 static INLINE__ osal_u8 mac_mib_get_rsn_pair_suites(hmac_vap_stru *hmac_vap, osal_u32 *pul_suites, osal_u32 len)
2863 {
2864     osal_u8 loop;
2865     osal_u8 num = 0;
2866 
2867     for (loop = 0; loop < WLAN_PAIRWISE_CIPHER_SUITES; loop++) {
2868         if (hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_pair_suites[loop] != 0) {
2869             if (num >= len) {
2870                 break;
2871             }
2872             pul_suites[num++] = hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_pair_suites[loop];
2873         }
2874     }
2875     return num;
2876 }
2877 
mac_mib_get_wpa_akm_suites(hmac_vap_stru * hmac_vap,osal_u32 * pul_suites,osal_u32 len)2878 static INLINE__ osal_u8 mac_mib_get_wpa_akm_suites(hmac_vap_stru *hmac_vap, osal_u32 *pul_suites, osal_u32 len)
2879 {
2880     osal_u8 num = 0;
2881     osal_u8 loop;
2882 
2883     for (loop = 0; loop < WLAN_AUTHENTICATION_SUITES; loop++) {
2884         if (hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_akm_suites[loop] != 0) {
2885             if (num >= len) {
2886                 break;
2887             }
2888             pul_suites[num++] = hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.wpa_akm_suites[loop];
2889         }
2890     }
2891 
2892     return num;
2893 }
2894 
mac_mib_get_rsn_akm_suites(hmac_vap_stru * hmac_vap,osal_u32 * pul_suites,osal_u32 len)2895 static INLINE__ osal_u8 mac_mib_get_rsn_akm_suites(hmac_vap_stru *hmac_vap, osal_u32 *pul_suites, osal_u32 len)
2896 {
2897     osal_u8 num = 0;
2898     osal_u8 loop;
2899 
2900     for (loop = 0; loop < WLAN_AUTHENTICATION_SUITES; loop++) {
2901         if (hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_akm_suites[loop] != 0) {
2902             if (num >= len) {
2903                 break;
2904             }
2905             pul_suites[num++] = hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_rsna_cfg.rsn_akm_suites[loop];
2906         }
2907     }
2908 
2909     return num;
2910 }
2911 
mac_mib_get_maxmpdu_length(hmac_vap_stru * hmac_vap)2912 static INLINE__ osal_u32 mac_mib_get_maxmpdu_length(hmac_vap_stru *hmac_vap)
2913 {
2914     return hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_max_mpdu_length;
2915 }
2916 
mac_mib_set_maxmpdu_length(hmac_vap_stru * hmac_vap,osal_u32 maxmpdu_length)2917 static INLINE__ osal_void mac_mib_set_maxmpdu_length(hmac_vap_stru *hmac_vap, osal_u32 maxmpdu_length)
2918 {
2919     hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_max_mpdu_length = maxmpdu_length;
2920 }
2921 
mac_mib_get_vht_max_rx_ampdu_factor(hmac_vap_stru * hmac_vap)2922 static INLINE__ osal_u32 mac_mib_get_vht_max_rx_ampdu_factor(hmac_vap_stru *hmac_vap)
2923 {
2924     return hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_max_rx_ampdu_factor;
2925 }
2926 
mac_mib_set_vht_max_rx_ampdu_factor(hmac_vap_stru * hmac_vap,osal_u32 vht_max_rx_ampdu_factor)2927 static INLINE__ osal_void mac_mib_set_vht_max_rx_ampdu_factor(hmac_vap_stru *hmac_vap, osal_u32 vht_max_rx_ampdu_factor)
2928 {
2929     hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_max_rx_ampdu_factor = vht_max_rx_ampdu_factor;
2930 }
2931 
mac_mib_get_vht_ctrl_field_cap(hmac_vap_stru * hmac_vap)2932 static INLINE__ oal_bool_enum_uint8 mac_mib_get_vht_ctrl_field_cap(hmac_vap_stru *hmac_vap)
2933 {
2934     return hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_control_field_supported;
2935 }
2936 
mac_mib_set_vht_ctrl_field_cap(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 vht_ctrl_field_supported)2937 static INLINE__ osal_void mac_mib_set_vht_ctrl_field_cap(hmac_vap_stru *hmac_vap,
2938     oal_bool_enum_uint8 vht_ctrl_field_supported)
2939 {
2940     hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_control_field_supported = vht_ctrl_field_supported;
2941 }
2942 
mac_mib_get_txopps(const hmac_vap_stru * hmac_vap)2943 static INLINE__ oal_bool_enum_uint8 mac_mib_get_txopps(const hmac_vap_stru *hmac_vap)
2944 {
2945     return hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vhttxop_power_save_option_implemented;
2946 }
2947 
mac_mib_set_txopps(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 vht_txop_ps)2948 static INLINE__ osal_void mac_mib_set_txopps(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 vht_txop_ps)
2949 {
2950     hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vhttxop_power_save_option_implemented = vht_txop_ps;
2951 }
2952 
mac_mib_get_vht_rx_mcs_map(hmac_vap_stru * hmac_vap)2953 static INLINE__ osal_u16 mac_mib_get_vht_rx_mcs_map(hmac_vap_stru *hmac_vap)
2954 {
2955     return hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_rx_mcs_map;
2956 }
2957 
mac_mib_get_ptr_vht_rx_mcs_map(const hmac_vap_stru * hmac_vap)2958 static INLINE__ osal_void *mac_mib_get_ptr_vht_rx_mcs_map(const hmac_vap_stru *hmac_vap)
2959 {
2960     return &(hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_rx_mcs_map);
2961 }
2962 
mac_mib_set_vht_rx_mcs_map(const hmac_vap_stru * hmac_vap,osal_u16 vht_mcs_mpa)2963 static INLINE__ osal_void mac_mib_set_vht_rx_mcs_map(const hmac_vap_stru *hmac_vap, osal_u16 vht_mcs_mpa)
2964 {
2965     hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_rx_mcs_map = vht_mcs_mpa;
2966 }
2967 
mac_mib_get_us_rx_highest_rate(hmac_vap_stru * hmac_vap)2968 static INLINE__ osal_u32 mac_mib_get_us_rx_highest_rate(hmac_vap_stru *hmac_vap)
2969 {
2970     return hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_rx_highest_data_rate_supported;
2971 }
2972 
mac_mib_set_us_rx_highest_rate(const hmac_vap_stru * hmac_vap,osal_u32 rx_highest_rate)2973 static INLINE__ osal_void mac_mib_set_us_rx_highest_rate(const hmac_vap_stru *hmac_vap, osal_u32 rx_highest_rate)
2974 {
2975     hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_rx_highest_data_rate_supported = rx_highest_rate;
2976 }
2977 
mac_mib_get_vht_tx_mcs_map(hmac_vap_stru * hmac_vap)2978 static INLINE__ osal_u16 mac_mib_get_vht_tx_mcs_map(hmac_vap_stru *hmac_vap)
2979 {
2980     return hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_tx_mcs_map;
2981 }
2982 
mac_mib_get_ptr_vht_tx_mcs_map(const hmac_vap_stru * hmac_vap)2983 static INLINE__ osal_void *mac_mib_get_ptr_vht_tx_mcs_map(const hmac_vap_stru *hmac_vap)
2984 {
2985     return &(hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_tx_mcs_map);
2986 }
2987 
mac_mib_set_vht_tx_mcs_map(const hmac_vap_stru * hmac_vap,osal_u16 vht_mcs_mpa)2988 static INLINE__ osal_void mac_mib_set_vht_tx_mcs_map(const hmac_vap_stru *hmac_vap, osal_u16 vht_mcs_mpa)
2989 {
2990     hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_tx_mcs_map = vht_mcs_mpa;
2991 }
2992 
mac_mib_get_us_tx_highest_rate(hmac_vap_stru * hmac_vap)2993 static INLINE__ osal_u32 mac_mib_get_us_tx_highest_rate(hmac_vap_stru *hmac_vap)
2994 {
2995     return hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_tx_highest_data_rate_supported;
2996 }
2997 
mac_mib_set_us_tx_highest_rate(const hmac_vap_stru * hmac_vap,osal_u32 tx_highest_rate)2998 static INLINE__ osal_void mac_mib_set_us_tx_highest_rate(const hmac_vap_stru *hmac_vap, osal_u32 tx_highest_rate)
2999 {
3000     hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_tx_highest_data_rate_supported = tx_highest_rate;
3001 }
3002 
3003 #ifdef _PRE_WLAN_FEATURE_SMPS
mac_mib_get_smps(const hmac_vap_stru * hmac_vap)3004 static INLINE__ wlan_mib_mimo_power_save_enum_uint8 mac_mib_get_smps(const hmac_vap_stru *hmac_vap)
3005 {
3006     return hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_mimo_power_save;
3007 }
3008 
mac_mib_set_smps(hmac_vap_stru * hmac_vap,wlan_mib_mimo_power_save_enum_uint8 sm_power_save)3009 static INLINE__ osal_void mac_mib_set_smps(hmac_vap_stru *hmac_vap, wlan_mib_mimo_power_save_enum_uint8 sm_power_save)
3010 {
3011     hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_mimo_power_save = sm_power_save;
3012 }
3013 #endif // _PRE_WLAN_FEATURE_SMPS
3014 
mac_mib_get_max_amsdu_length(hmac_vap_stru * hmac_vap)3015 static INLINE__ wlan_mib_max_amsdu_lenth_enum_uint16 mac_mib_get_max_amsdu_length(hmac_vap_stru *hmac_vap)
3016 {
3017     return hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_max_amsdu_length;
3018 }
3019 
mac_mib_set_max_amsdu_length(hmac_vap_stru * hmac_vap,wlan_mib_max_amsdu_lenth_enum_uint16 max_amsdu_length)3020 static INLINE__ osal_void mac_mib_set_max_amsdu_length(hmac_vap_stru *hmac_vap,
3021     wlan_mib_max_amsdu_lenth_enum_uint16 max_amsdu_length)
3022 {
3023     hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_max_amsdu_length = max_amsdu_length;
3024 }
3025 
mac_mib_get_lsig_txop_protection(hmac_vap_stru * hmac_vap)3026 static INLINE__ oal_bool_enum_uint8 mac_mib_get_lsig_txop_protection(hmac_vap_stru *hmac_vap)
3027 {
3028     return hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_lsig_txop_protection_option_implemented;
3029 }
3030 
mac_mib_set_lsig_txop_protection(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 lsig_txop_protection)3031 static INLINE__ void mac_mib_set_lsig_txop_protection(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 lsig_txop_protection)
3032 {
3033     hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_lsig_txop_protection_option_implemented = lsig_txop_protection;
3034 }
3035 
mac_mib_get_max_ampdu_len_exponent(hmac_vap_stru * hmac_vap)3036 static INLINE__ osal_u32 mac_mib_get_max_ampdu_len_exponent(hmac_vap_stru *hmac_vap)
3037 {
3038     return hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_max_rx_ampdu_factor;
3039 }
3040 
mac_mib_set_max_ampdu_len_exponent(hmac_vap_stru * hmac_vap,osal_u32 max_ampdu_len_exponent)3041 static INLINE__ osal_void mac_mib_set_max_ampdu_len_exponent(hmac_vap_stru *hmac_vap, osal_u32 max_ampdu_len_exponent)
3042 {
3043     hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_max_rx_ampdu_factor = max_ampdu_len_exponent;
3044 }
3045 
mac_mib_get_min_mpdu_start_spacing(hmac_vap_stru * hmac_vap)3046 static INLINE__ osal_u8 mac_mib_get_min_mpdu_start_spacing(hmac_vap_stru *hmac_vap)
3047 {
3048     return hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_minimum_mpdu_start_spacing;
3049 }
3050 
mac_mib_set_min_mpdu_start_spacing(hmac_vap_stru * hmac_vap,osal_u8 min_mpdu_start_spacing)3051 static INLINE__ osal_void mac_mib_set_min_mpdu_start_spacing(hmac_vap_stru *hmac_vap, osal_u8 min_mpdu_start_spacing)
3052 {
3053     hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_minimum_mpdu_start_spacing = min_mpdu_start_spacing;
3054 }
3055 
mac_mib_get_pco_option_implemented(hmac_vap_stru * hmac_vap)3056 static INLINE__ oal_bool_enum_uint8 mac_mib_get_pco_option_implemented(hmac_vap_stru *hmac_vap)
3057 {
3058     return hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_pco_option_implemented;
3059 }
3060 
mac_mib_set_pco_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 pco_option_implemented)3061 static INLINE__ osal_void mac_mib_set_pco_option_implemented(hmac_vap_stru *hmac_vap,
3062     oal_bool_enum_uint8 pco_option_implemented)
3063 {
3064     hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_pco_option_implemented = pco_option_implemented;
3065 }
3066 
mac_mib_get_transition_time(hmac_vap_stru * hmac_vap)3067 static INLINE__ osal_u32 mac_mib_get_transition_time(hmac_vap_stru *hmac_vap)
3068 {
3069     return hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_transition_time;
3070 }
3071 
mac_mib_set_transition_time(hmac_vap_stru * hmac_vap,osal_u32 transition_time)3072 static INLINE__ osal_void mac_mib_set_transition_time(hmac_vap_stru *hmac_vap, osal_u32 transition_time)
3073 {
3074     hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_transition_time = transition_time;
3075 }
3076 
mac_mib_get_mcs_fdbk(hmac_vap_stru * hmac_vap)3077 static INLINE__ wlan_mib_mcs_feedback_opt_implt_enum_uint8 mac_mib_get_mcs_fdbk(hmac_vap_stru *hmac_vap)
3078 {
3079     return hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_mcs_feedback_option_implemented;
3080 }
3081 
mac_mib_set_mcs_fdbk(hmac_vap_stru * hmac_vap,wlan_mib_mcs_feedback_opt_implt_enum_uint8 mcs_fdbk)3082 static INLINE__ osal_void mac_mib_set_mcs_fdbk(hmac_vap_stru *hmac_vap,
3083     wlan_mib_mcs_feedback_opt_implt_enum_uint8 mcs_fdbk)
3084 {
3085     hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_mcs_feedback_option_implemented = mcs_fdbk;
3086 }
3087 
mac_mib_get_htc_sup(hmac_vap_stru * hmac_vap)3088 static INLINE__ oal_bool_enum_uint8 mac_mib_get_htc_sup(hmac_vap_stru *hmac_vap)
3089 {
3090     return hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_ht_control_field_supported;
3091 }
3092 
mac_mib_set_htc_sup(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 htc_sup)3093 static INLINE__ osal_void mac_mib_set_htc_sup(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 htc_sup)
3094 {
3095     hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_ht_control_field_supported = htc_sup;
3096 }
3097 
mac_mib_get_rd_rsp(hmac_vap_stru * hmac_vap)3098 static INLINE__ oal_bool_enum_uint8 mac_mib_get_rd_rsp(hmac_vap_stru *hmac_vap)
3099 {
3100     return hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_rd_responder_option_implemented;
3101 }
3102 
mac_mib_set_rd_rsp(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 rd_rsp)3103 static INLINE__ osal_void mac_mib_set_rd_rsp(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 rd_rsp)
3104 {
3105     hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_rd_responder_option_implemented = rd_rsp;
3106 }
3107 
mac_mib_get_ft_trainsistion(hmac_vap_stru * hmac_vap)3108 static INLINE__ oal_bool_enum_uint8 mac_mib_get_ft_trainsistion(hmac_vap_stru *hmac_vap)
3109 {
3110     return hmac_vap->mib_info->wlan_mib_fast_bss_trans_cfg.dot11_fast_bss_transition_activated;
3111 }
3112 
mac_mib_set_ft_trainsistion(const hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 ft_trainsistion)3113 static INLINE__ osal_void mac_mib_set_ft_trainsistion(const hmac_vap_stru *hmac_vap,
3114     oal_bool_enum_uint8 ft_trainsistion)
3115 {
3116     hmac_vap->mib_info->wlan_mib_fast_bss_trans_cfg.dot11_fast_bss_transition_activated = ft_trainsistion;
3117 }
3118 
mac_mib_get_ft_mdid(hmac_vap_stru * hmac_vap)3119 static INLINE__ osal_u16 mac_mib_get_ft_mdid(hmac_vap_stru *hmac_vap)
3120 {
3121     return hmac_vap->mib_info->wlan_mib_fast_bss_trans_cfg.dot11_ft_mobility_domain_id;
3122 }
3123 
mac_mib_set_ft_mdid(const hmac_vap_stru * hmac_vap,osal_u16 ft_mdid)3124 static INLINE__ osal_void mac_mib_set_ft_mdid(const hmac_vap_stru *hmac_vap, osal_u16 ft_mdid)
3125 {
3126     hmac_vap->mib_info->wlan_mib_fast_bss_trans_cfg.dot11_ft_mobility_domain_id = ft_mdid;
3127 }
3128 
mac_mib_get_ft_over_ds(hmac_vap_stru * hmac_vap)3129 static INLINE__ oal_bool_enum_uint8 mac_mib_get_ft_over_ds(hmac_vap_stru *hmac_vap)
3130 {
3131     return hmac_vap->mib_info->wlan_mib_fast_bss_trans_cfg.dot11_ft_over_ds_activated;
3132 }
3133 
mac_mib_set_ft_over_ds(const hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 ft_over_ds)3134 static INLINE__ osal_void mac_mib_set_ft_over_ds(const hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 ft_over_ds)
3135 {
3136     hmac_vap->mib_info->wlan_mib_fast_bss_trans_cfg.dot11_ft_over_ds_activated = ft_over_ds;
3137 }
3138 
mac_mib_get_ft_resource_req(hmac_vap_stru * hmac_vap)3139 static INLINE__ oal_bool_enum_uint8 mac_mib_get_ft_resource_req(hmac_vap_stru *hmac_vap)
3140 {
3141     return hmac_vap->mib_info->wlan_mib_fast_bss_trans_cfg.dot11_ft_resource_request_supported;
3142 }
3143 
mac_mib_set_ft_resource_req(const hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 ft_resource_req)3144 static INLINE__ osal_void mac_mib_set_ft_resource_req(const hmac_vap_stru *hmac_vap,
3145     oal_bool_enum_uint8 ft_resource_req)
3146 {
3147     hmac_vap->mib_info->wlan_mib_fast_bss_trans_cfg.dot11_ft_resource_request_supported = ft_resource_req;
3148 }
3149 
mac_mib_get_privacyinvoked(const hmac_vap_stru * hmac_vap)3150 static INLINE__ oal_bool_enum_uint8 mac_mib_get_privacyinvoked(const hmac_vap_stru *hmac_vap)
3151 {
3152     return hmac_vap->mib_info->wlan_mib_privacy.dot11_privacy_invoked;
3153 }
3154 
mac_mib_set_privacyinvoked(const hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 privacyinvoked)3155 static INLINE__ osal_void mac_mib_set_privacyinvoked(const hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 privacyinvoked)
3156 {
3157     hmac_vap->mib_info->wlan_mib_privacy.dot11_privacy_invoked = privacyinvoked;
3158 }
3159 
mac_mib_get_rsnaactivated(const hmac_vap_stru * hmac_vap)3160 static INLINE__ oal_bool_enum_uint8 mac_mib_get_rsnaactivated(const hmac_vap_stru *hmac_vap)
3161 {
3162     return hmac_vap->mib_info->wlan_mib_privacy.dot11_rsna_activated;
3163 }
3164 
mac_mib_set_rsnaactivated(const hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 rsnaactivated)3165 static INLINE__ osal_void mac_mib_set_rsnaactivated(const hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 rsnaactivated)
3166 {
3167     hmac_vap->mib_info->wlan_mib_privacy.dot11_rsna_activated = rsnaactivated;
3168 }
3169 
mac_is_wep_enabled(const hmac_vap_stru * hmac_vap)3170 static INLINE__ oal_bool_enum_uint8 mac_is_wep_enabled(const hmac_vap_stru *hmac_vap)
3171 {
3172     if (hmac_vap == OSAL_NULL) {
3173         return OSAL_FALSE;
3174     }
3175 
3176     if ((mac_mib_get_privacyinvoked(hmac_vap) == OSAL_FALSE) || (mac_mib_get_rsnaactivated(hmac_vap) == OSAL_TRUE)) {
3177         return OSAL_FALSE;
3178     }
3179 
3180     return OSAL_TRUE;
3181 }
3182 
mac_is_wep_allowed(const hmac_vap_stru * hmac_vap)3183 static INLINE__ oal_bool_enum_uint8 mac_is_wep_allowed(const hmac_vap_stru *hmac_vap)
3184 {
3185     if (mac_mib_get_rsnaactivated(hmac_vap) == OSAL_TRUE) {
3186         return OSAL_FALSE;
3187     } else {
3188         return mac_is_wep_enabled(hmac_vap);
3189     }
3190 }
3191 
mac_set_wep_default_keyid(hmac_vap_stru * hmac_vap,osal_u8 default_key_id)3192 static INLINE__ void mac_set_wep_default_keyid(hmac_vap_stru *hmac_vap, osal_u8 default_key_id)
3193 {
3194     hmac_vap->mib_info->wlan_mib_privacy.dot11_wep_default_key_id = default_key_id;
3195 }
3196 
mac_get_wep_default_keyid(hmac_vap_stru * hmac_vap)3197 static INLINE__ osal_u8 mac_get_wep_default_keyid(hmac_vap_stru *hmac_vap)
3198 {
3199     return (hmac_vap->mib_info->wlan_mib_privacy.dot11_wep_default_key_id);
3200 }
3201 
mac_get_wep_default_keysize(hmac_vap_stru * hmac_vap)3202 static INLINE__ osal_u8 mac_get_wep_default_keysize(hmac_vap_stru *hmac_vap)
3203 {
3204     return (hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_wep_dflt_key[mac_get_wep_default_keyid(hmac_vap)]
3205                 .dot11_wep_default_key_value[WLAN_WEP_SIZE_OFFSET]);
3206 }
3207 
3208 /* ****************************************************************************
3209  功能描述  : 获取指定序列号的wep key的值
3210 **************************************************************************** */
mac_get_wep_keysize(hmac_vap_stru * hmac_vap,osal_u8 idx)3211 static INLINE__ osal_u8 mac_get_wep_keysize(hmac_vap_stru *hmac_vap, osal_u8 idx)
3212 {
3213     return (hmac_vap->mib_info->wlan_mib_privacy.wlan_mib_wep_dflt_key[idx]
3214                 .dot11_wep_default_key_value[WLAN_WEP_SIZE_OFFSET]);
3215 }
3216 
3217 /* ****************************************************************************
3218  功能描述  : 获取wep type的值
3219 **************************************************************************** */
mac_get_wep_type(hmac_vap_stru * hmac_vap,osal_u8 key_id)3220 static INLINE__ wlan_ciper_protocol_type_enum_uint8 mac_get_wep_type(hmac_vap_stru *hmac_vap, osal_u8 key_id)
3221 {
3222     wlan_ciper_protocol_type_enum_uint8 cipher_type = WLAN_80211_CIPHER_SUITE_NO_ENCRYP;
3223 
3224     switch (mac_get_wep_keysize(hmac_vap, key_id)) {
3225         case 40:
3226             cipher_type = WLAN_80211_CIPHER_SUITE_WEP_40;
3227             break;
3228         case 104:
3229             cipher_type = WLAN_80211_CIPHER_SUITE_WEP_104;
3230             break;
3231         default:
3232             cipher_type = WLAN_80211_CIPHER_SUITE_WEP_40;
3233             break;
3234     }
3235     return cipher_type;
3236 }
3237 
3238 /* ****************************************************************************
3239  功能描述  : 加密方式是否是tkip only模式
3240 **************************************************************************** */
mac_is_tkip_only(hmac_vap_stru * hmac_vap)3241 static INLINE__ oal_bool_enum_uint8 mac_is_tkip_only(hmac_vap_stru *hmac_vap)
3242 {
3243     osal_u8 pair_suites_num;
3244     osal_u32        pcip[WLAN_PAIRWISE_CIPHER_SUITES] = {0};
3245 
3246     if (hmac_vap == OSAL_NULL) {
3247         return OSAL_FALSE;
3248     }
3249 
3250     if ((hmac_vap->cap_flag.wpa2 == OSAL_FALSE) && (hmac_vap->cap_flag.wpa == OSAL_FALSE)) {
3251         return OSAL_FALSE;
3252     }
3253 
3254     if ((mac_mib_get_privacyinvoked(hmac_vap) == OSAL_FALSE) || (mac_mib_get_rsnaactivated(hmac_vap) == OSAL_FALSE)) {
3255         // 不加密或者是WEP加密时,返回false
3256         return OSAL_FALSE;
3257     }
3258 
3259     if (hmac_vap->cap_flag.wpa == OSAL_TRUE) {
3260         pair_suites_num = mac_mib_get_wpa_pair_suites(hmac_vap, pcip, WLAN_PAIRWISE_CIPHER_SUITES);
3261         if ((pair_suites_num != 1) || (pcip[0] != MAC_WPA_CHIPER_TKIP)) {
3262             // wpa加密时,若非tkip only,返回false
3263             return OSAL_FALSE;
3264         }
3265     }
3266 
3267     if (hmac_vap->cap_flag.wpa2 == OSAL_TRUE) {
3268         pair_suites_num = mac_mib_get_rsn_pair_suites(hmac_vap, pcip, WLAN_PAIRWISE_CIPHER_SUITES);
3269         if ((pair_suites_num != 1) || (pcip[0] != MAC_RSN_CHIPER_TKIP)) {
3270             // wpa2加密时,若非tkip only,返回false
3271             return OSAL_FALSE;
3272         }
3273     }
3274 
3275     return OSAL_TRUE;
3276 }
3277 
mac_mib_get_station_id(const hmac_vap_stru * hmac_vap)3278 static INLINE__ osal_u8 *mac_mib_get_station_id(const hmac_vap_stru *hmac_vap)
3279 {
3280     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_station_id;
3281 }
3282 
mac_mib_set_station_id(hmac_vap_stru * hmac_vap,osal_u8 * sta_id)3283 static INLINE__ void mac_mib_set_station_id(hmac_vap_stru *hmac_vap, osal_u8 *sta_id)
3284 {
3285     oal_set_mac_addr(hmac_vap->mib_info->wlan_mib_sta_config.dot11_station_id, sta_id);
3286 }
3287 
mac_mib_get_obss_scan_passive_dwell(hmac_vap_stru * hmac_vap)3288 static INLINE__ osal_u32 mac_mib_get_obss_scan_passive_dwell(hmac_vap_stru *hmac_vap)
3289 {
3290     return hmac_vap->mib_info->wlan_mib_operation.dot11_obss_scan_passive_dwell;
3291 }
3292 
mac_mib_set_obss_scan_passive_dwell(hmac_vap_stru * hmac_vap,osal_u32 val)3293 static INLINE__ osal_void mac_mib_set_obss_scan_passive_dwell(hmac_vap_stru *hmac_vap, osal_u32 val)
3294 {
3295     hmac_vap->mib_info->wlan_mib_operation.dot11_obss_scan_passive_dwell = val;
3296 }
3297 
mac_mib_get_obss_scan_active_dwell(hmac_vap_stru * hmac_vap)3298 static INLINE__ osal_u32 mac_mib_get_obss_scan_active_dwell(hmac_vap_stru *hmac_vap)
3299 {
3300     return hmac_vap->mib_info->wlan_mib_operation.dot11_obss_scan_active_dwell;
3301 }
3302 
mac_mib_set_obss_scan_active_dwell(hmac_vap_stru * hmac_vap,osal_u32 val)3303 static INLINE__ osal_void mac_mib_set_obss_scan_active_dwell(hmac_vap_stru *hmac_vap, osal_u32 val)
3304 {
3305     hmac_vap->mib_info->wlan_mib_operation.dot11_obss_scan_active_dwell = val;
3306 }
3307 
mac_mib_get_bss_width_trigger_scan_interval(hmac_vap_stru * hmac_vap)3308 static INLINE__ osal_u32 mac_mib_get_bss_width_trigger_scan_interval(hmac_vap_stru *hmac_vap)
3309 {
3310     return hmac_vap->mib_info->wlan_mib_operation.dot11_bss_width_trigger_scan_interval;
3311 }
3312 
mac_mib_set_bss_width_trigger_scan_interval(hmac_vap_stru * hmac_vap,osal_u32 val)3313 static INLINE__ osal_void mac_mib_set_bss_width_trigger_scan_interval(hmac_vap_stru *hmac_vap, osal_u32 val)
3314 {
3315     hmac_vap->mib_info->wlan_mib_operation.dot11_bss_width_trigger_scan_interval = val;
3316 }
3317 
mac_mib_get_obss_scan_passive_total_per_channel(hmac_vap_stru * hmac_vap)3318 static INLINE__ osal_u32 mac_mib_get_obss_scan_passive_total_per_channel(hmac_vap_stru *hmac_vap)
3319 {
3320     return hmac_vap->mib_info->wlan_mib_operation.dot11_obss_scan_passive_total_per_channel;
3321 }
3322 
mac_mib_set_obss_scan_passive_total_per_channel(hmac_vap_stru * hmac_vap,osal_u32 val)3323 static INLINE__ osal_void mac_mib_set_obss_scan_passive_total_per_channel(hmac_vap_stru *hmac_vap, osal_u32 val)
3324 {
3325     hmac_vap->mib_info->wlan_mib_operation.dot11_obss_scan_passive_total_per_channel = val;
3326 }
3327 
mac_mib_get_obss_scan_active_total_per_channel(hmac_vap_stru * hmac_vap)3328 static INLINE__ osal_u32 mac_mib_get_obss_scan_active_total_per_channel(hmac_vap_stru *hmac_vap)
3329 {
3330     return hmac_vap->mib_info->wlan_mib_operation.dot11_obss_scan_active_total_per_channel;
3331 }
3332 
mac_mib_set_obss_scan_active_total_per_channel(hmac_vap_stru * hmac_vap,osal_u32 val)3333 static INLINE__ osal_void mac_mib_set_obss_scan_active_total_per_channel(hmac_vap_stru *hmac_vap, osal_u32 val)
3334 {
3335     hmac_vap->mib_info->wlan_mib_operation.dot11_obss_scan_active_total_per_channel = val;
3336 }
3337 
mac_mib_get_bss_width_channel_transition_delay_factor(hmac_vap_stru * hmac_vap)3338 static INLINE__ osal_u32 mac_mib_get_bss_width_channel_transition_delay_factor(hmac_vap_stru *hmac_vap)
3339 {
3340     return hmac_vap->mib_info->wlan_mib_operation.dot11_bss_width_channel_transition_delay_factor;
3341 }
3342 
mac_mib_set_bss_width_channel_transition_delay_factor(hmac_vap_stru * hmac_vap,osal_u32 val)3343 static INLINE__ osal_void mac_mib_set_bss_width_channel_transition_delay_factor(hmac_vap_stru *hmac_vap, osal_u32 val)
3344 {
3345     hmac_vap->mib_info->wlan_mib_operation.dot11_bss_width_channel_transition_delay_factor = val;
3346 }
3347 
mac_mib_get_obss_scan_activity_threshold(hmac_vap_stru * hmac_vap)3348 static INLINE__ osal_u32 mac_mib_get_obss_scan_activity_threshold(hmac_vap_stru *hmac_vap)
3349 {
3350     return hmac_vap->mib_info->wlan_mib_operation.dot11_obss_scan_activity_threshold;
3351 }
3352 
mac_mib_set_obss_scan_activity_threshold(hmac_vap_stru * hmac_vap,osal_u32 val)3353 static INLINE__ osal_void mac_mib_set_obss_scan_activity_threshold(hmac_vap_stru *hmac_vap, osal_u32 val)
3354 {
3355     hmac_vap->mib_info->wlan_mib_operation.dot11_obss_scan_activity_threshold = val;
3356 }
3357 
mac_mib_get_high_throughput_option_implemented(const hmac_vap_stru * hmac_vap)3358 static INLINE__ oal_bool_enum_uint8 mac_mib_get_high_throughput_option_implemented(const hmac_vap_stru *hmac_vap)
3359 {
3360     return hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_high_throughput_option_implemented;
3361 }
3362 
mac_mib_set_high_throughput_option_implemented(const hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3363 static INLINE__ osal_void mac_mib_set_high_throughput_option_implemented(const hmac_vap_stru *hmac_vap,
3364     oal_bool_enum_uint8 val)
3365 {
3366     hmac_vap->mib_info->wlan_mib_ht_sta_cfg.dot11_high_throughput_option_implemented = val;
3367 }
3368 
mac_mib_set_vht_option_implemented(const hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3369 static INLINE__ osal_void mac_mib_set_vht_option_implemented(const hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3370 {
3371     hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_option_implemented = val;
3372 }
3373 
mac_mib_get_vht_option_implemented(const hmac_vap_stru * hmac_vap)3374 static INLINE__ oal_bool_enum_uint8 mac_mib_get_vht_option_implemented(const hmac_vap_stru *hmac_vap)
3375 {
3376     return hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_vht_option_implemented;
3377 }
3378 
3379 #ifdef _PRE_WLAN_FEATURE_11AX
mac_mib_set_he_option_implemented(const hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3380 static INLINE__ osal_void mac_mib_set_he_option_implemented(const hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3381 {
3382     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_option_implemented = val;
3383 }
3384 
mac_mib_get_he_option_implemented(hmac_vap_stru * hmac_vap)3385 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_option_implemented(hmac_vap_stru *hmac_vap)
3386 {
3387     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_option_implemented;
3388 }
3389 
3390 /* ****************************************************************************
3391  功能描述  : 设置MIB项 dot11TRSOptionImplemented 的值
3392 **************************************************************************** */
mac_mib_set_trs_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3393 static INLINE__ osal_void mac_mib_set_trs_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3394 {
3395     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_trs_option_implemented = val;
3396 }
3397 
3398 /* ****************************************************************************
3399  功能描述  : 获取MIB项 dot11TRSOptionImplemented 的值
3400 **************************************************************************** */
mac_mib_get_trs_option_implemented(hmac_vap_stru * hmac_vap)3401 static INLINE__ oal_bool_enum_uint8 mac_mib_get_trs_option_implemented(hmac_vap_stru *hmac_vap)
3402 {
3403     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_trs_option_implemented;
3404 }
3405 
3406 /* ****************************************************************************
3407  函 数 名  : mac_mib_set_ba_32bit_bitmap_implemented
3408  功能描述  : 设置MIB项 dot11_he_ba_bitmap_support_32bit 的值
3409 
3410 **************************************************************************** */
mac_mib_set_ba_32bit_bitmap_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3411 static INLINE__ void mac_mib_set_ba_32bit_bitmap_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3412 {
3413     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_ba_bitmap_support_32bit = val;
3414 }
3415 
3416 /* ****************************************************************************
3417  函 数 名  : mac_mib_get_ba_32bit_bitmap_implemented
3418  功能描述  : 获取MIB项 dot11_he_ba_bitmap_support_32bit 的值
3419 
3420 **************************************************************************** */
mac_mib_get_ba_32bit_bitmap_implemented(hmac_vap_stru * hmac_vap)3421 static INLINE__ osal_u8 mac_mib_get_ba_32bit_bitmap_implemented(hmac_vap_stru *hmac_vap)
3422 {
3423     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_ba_bitmap_support_32bit;
3424 }
3425 
3426 /* ****************************************************************************
3427  功能描述  : 设置MIB项 dot11HEPSROptionImplemented 的值
3428 **************************************************************************** */
mac_mib_set_he_psr_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3429 static INLINE__ osal_void mac_mib_set_he_psr_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3430 {
3431     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_psr_option_implemented = val;
3432 }
3433 
3434 /* ****************************************************************************
3435  功能描述  : 获取MIB项 dot11HEPSROptionImplemented 的值
3436 **************************************************************************** */
mac_mib_get_he_psr_option_implemented(const hmac_vap_stru * hmac_vap)3437 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_psr_option_implemented(const hmac_vap_stru *hmac_vap)
3438 {
3439     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_psr_option_implemented;
3440 }
3441 
3442 /* ****************************************************************************
3443  功能描述  : 设置MIB项 dot11HEBQRControlImplemented 的值
3444 **************************************************************************** */
mac_mib_set_he_bqr_control_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3445 static INLINE__ osal_void mac_mib_set_he_bqr_control_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3446 {
3447     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_bqr_control_implemented = val;
3448 }
3449 
3450 /* ****************************************************************************
3451  功能描述  : 获取MIB项 dot11HEBQRControlImplemented 的值
3452 **************************************************************************** */
mac_mib_get_he_bqr_control_implemented(hmac_vap_stru * hmac_vap)3453 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_bqr_control_implemented(hmac_vap_stru *hmac_vap)
3454 {
3455     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_bqr_control_implemented;
3456 }
3457 
3458 /* ****************************************************************************
3459  功能描述  : 设置MIB项 dot11_support_response_nfrp_trigger 的值
3460 **************************************************************************** */
mac_mib_set_support_response_nfrp_trigger(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3461 static INLINE__ osal_void mac_mib_set_support_response_nfrp_trigger(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3462 {
3463     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_support_response_nfrp_trigger = val;
3464 }
3465 
3466 /* ****************************************************************************
3467  功能描述  : 获取MIB项 dot11_support_response_nfrp_trigger 的值
3468 **************************************************************************** */
mac_mib_get_support_response_nfrp_trigger(hmac_vap_stru * hmac_vap)3469 static INLINE__ oal_bool_enum_uint8 mac_mib_get_support_response_nfrp_trigger(hmac_vap_stru *hmac_vap)
3470 {
3471     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_support_response_nfrp_trigger;
3472 }
3473 
mac_mib_set_he_ht_control_field_supported(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3474 static INLINE__ osal_void mac_mib_set_he_ht_control_field_supported(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3475 {
3476     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_heht_control_field_supported = val;
3477 }
3478 
mac_mib_get_he_ht_control_field_supported(hmac_vap_stru * hmac_vap)3479 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_ht_control_field_supported(hmac_vap_stru *hmac_vap)
3480 {
3481     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_heht_control_field_supported;
3482 }
3483 
mac_mib_set_he_twt_option_activated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3484 static INLINE__ osal_void mac_mib_set_he_twt_option_activated(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3485 {
3486     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_twt_option_activated = val;
3487 }
3488 
mac_mib_get_he_twt_option_activated(hmac_vap_stru * hmac_vap)3489 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_twt_option_activated(hmac_vap_stru *hmac_vap)
3490 {
3491     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_twt_option_activated;
3492 }
3493 
mac_mib_set_he_trigger_mac_padding_duration(hmac_vap_stru * hmac_vap,osal_u8 val)3494 static INLINE__ osal_void mac_mib_set_he_trigger_mac_padding_duration(hmac_vap_stru *hmac_vap, osal_u8 val)
3495 {
3496     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_trigger_mac_padding_duration = val;
3497 }
3498 
mac_mib_get_he_trigger_mac_padding_duration(hmac_vap_stru * hmac_vap)3499 static INLINE__ osal_u8 mac_mib_get_he_trigger_mac_padding_duration(hmac_vap_stru *hmac_vap)
3500 {
3501     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_trigger_mac_padding_duration;
3502 }
3503 
3504 /* ****************************************************************************
3505  函 数 名  : mac_mib_set_he_mtid_aggr_rx_support
3506  功能描述  : 设置MIB项 dot11_he_mtid_aggregation_rx_support 的值
3507 
3508 **************************************************************************** */
mac_mib_set_he_mtid_aggr_rx_support(hmac_vap_stru * hmac_vap,osal_u8 val)3509 static INLINE__ void mac_mib_set_he_mtid_aggr_rx_support(hmac_vap_stru *hmac_vap, osal_u8 val)
3510 {
3511     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_mtid_aggregation_rx_support = val;
3512 }
3513 
3514 /* ****************************************************************************
3515  函 数 名  : mac_mib_get_he_mtid_aggr_rx_support
3516  功能描述  : 获取MIB项 dot11_he_mtid_aggregation_rx_support 的值
3517 
3518 **************************************************************************** */
mac_mib_get_he_mtid_aggr_rx_support(hmac_vap_stru * hmac_vap)3519 static INLINE__ osal_u8 mac_mib_get_he_mtid_aggr_rx_support(hmac_vap_stru *hmac_vap)
3520 {
3521     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_mtid_aggregation_rx_support;
3522 }
3523 
mac_mib_set_he_max_ampdu_length(hmac_vap_stru * hmac_vap,osal_u8 val)3524 static INLINE__ osal_void mac_mib_set_he_max_ampdu_length(hmac_vap_stru *hmac_vap, osal_u8 val)
3525 {
3526     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_max_ampdu_length = val;
3527 }
3528 
mac_mib_get_he_max_ampdu_length(hmac_vap_stru * hmac_vap)3529 static INLINE__ osal_u8 mac_mib_get_he_max_ampdu_length(hmac_vap_stru *hmac_vap)
3530 {
3531     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_max_ampdu_length;
3532 }
3533 
mac_mib_set_he_rx_mcs_map(hmac_vap_stru * hmac_vap,osal_u32 he_mcs_map)3534 static INLINE__ void mac_mib_set_he_rx_mcs_map(hmac_vap_stru *hmac_vap, osal_u32 he_mcs_map)
3535 {
3536     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_rx_mcs_map = he_mcs_map;
3537 }
3538 
mac_mib_get_he_rx_mcs_map(hmac_vap_stru * hmac_vap)3539 static INLINE__ osal_u32 mac_mib_get_he_rx_mcs_map(hmac_vap_stru *hmac_vap)
3540 {
3541     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_rx_mcs_map;
3542 }
3543 
mac_mib_get_ptr_he_rx_mcs_map(const hmac_vap_stru * hmac_vap)3544 static INLINE__ osal_void *mac_mib_get_ptr_he_rx_mcs_map(const hmac_vap_stru *hmac_vap)
3545 {
3546     return &(hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_rx_mcs_map);
3547 }
3548 
mac_mib_set_he_tx_mcs_map(hmac_vap_stru * hmac_vap,osal_u32 he_mcs_map)3549 static INLINE__ void mac_mib_set_he_tx_mcs_map(hmac_vap_stru *hmac_vap, osal_u32 he_mcs_map)
3550 {
3551     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_tx_mcs_map = he_mcs_map;
3552 }
3553 
mac_mib_get_he_tx_mcs_map(hmac_vap_stru * hmac_vap)3554 static INLINE__ osal_u32 mac_mib_get_he_tx_mcs_map(hmac_vap_stru *hmac_vap)
3555 {
3556     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_tx_mcs_map;
3557 }
3558 
mac_mib_get_ptr_he_tx_mcs_map(const hmac_vap_stru * hmac_vap)3559 static INLINE__ osal_void *mac_mib_get_ptr_he_tx_mcs_map(const hmac_vap_stru *hmac_vap)
3560 {
3561     return &(hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_tx_mcs_map);
3562 }
3563 
mac_mib_get_he_om_control_support(hmac_vap_stru * hmac_vap)3564 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_om_control_support(hmac_vap_stru *hmac_vap)
3565 {
3566     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_oper_om_implemented;
3567 }
3568 
mac_mib_set_he_om_control_support(hmac_vap_stru * hmac_vap,osal_u8 val)3569 static INLINE__ osal_void mac_mib_set_he_om_control_support(hmac_vap_stru *hmac_vap, osal_u8 val)
3570 {
3571     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_oper_om_implemented = val;
3572 }
3573 
mac_mib_get_he_DualBandSupport(hmac_vap_stru * hmac_vap)3574 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_DualBandSupport(hmac_vap_stru *hmac_vap)
3575 {
3576     return hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_he_dual_band_support;
3577 }
3578 
mac_mib_set_he_DualBandSupport(hmac_vap_stru * hmac_vap,osal_u8 val)3579 static INLINE__ void mac_mib_set_he_DualBandSupport(hmac_vap_stru *hmac_vap, osal_u8 val)
3580 {
3581     hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_he_dual_band_support = val;
3582 }
3583 
mac_mib_get_he_ldpc_coding_in_payload(const hmac_vap_stru * hmac_vap)3584 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_ldpc_coding_in_payload(const hmac_vap_stru *hmac_vap)
3585 {
3586     return hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_heldpc_coding_in_payload;
3587 }
3588 
mac_mib_set_he_ldpc_coding_in_payload(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3589 static INLINE__ osal_void mac_mib_set_he_ldpc_coding_in_payload(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3590 {
3591     hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_heldpc_coding_in_payload = val;
3592 }
3593 
mac_mib_set_he_su_beamformer(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3594 static INLINE__ osal_void mac_mib_set_he_su_beamformer(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3595 {
3596     hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_su_beamformer = val;
3597 }
3598 
mac_mib_get_he_su_beamformer(const hmac_vap_stru * hmac_vap)3599 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_su_beamformer(const hmac_vap_stru *hmac_vap)
3600 {
3601     return hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_su_beamformer;
3602 }
3603 
mac_mib_set_he_su_beamformee(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3604 static INLINE__ osal_void mac_mib_set_he_su_beamformee(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3605 {
3606     hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_su_beamformee = val;
3607 }
3608 
mac_mib_get_he_su_beamformee(const hmac_vap_stru * hmac_vap)3609 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_su_beamformee(const hmac_vap_stru *hmac_vap)
3610 {
3611     return hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_su_beamformee;
3612 }
3613 
mac_mib_set_he_rx_stbc_beamformer(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3614 static INLINE__ osal_void mac_mib_set_he_rx_stbc_beamformer(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3615 {
3616     hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_hestbc_rx_below_80mhz = val;
3617 }
3618 
mac_mib_get_he_rx_stbc_beamformer(const hmac_vap_stru * hmac_vap)3619 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_rx_stbc_beamformer(const hmac_vap_stru *hmac_vap)
3620 {
3621     return hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_hestbc_rx_below_80mhz;
3622 }
3623 
mac_mib_set_he_mu_beamformer(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3624 static INLINE__ osal_void mac_mib_set_he_mu_beamformer(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3625 {
3626     hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_mu_beamformer = val;
3627 }
3628 
mac_mib_get_he_mu_beamformer(const hmac_vap_stru * hmac_vap)3629 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_mu_beamformer(const hmac_vap_stru *hmac_vap)
3630 {
3631     return hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_mu_beamformer;
3632 }
3633 
mac_mib_set_multi_bssid_implement(hmac_vap_stru * hmac_vap,osal_u8 val)3634 static INLINE__ void mac_mib_set_multi_bssid_implement(hmac_vap_stru *hmac_vap, osal_u8 val)
3635 {
3636     hmac_vap->mib_info->wlan_mib_wireless_mgmt_op.dot11_mgmt_option_multi_bssid_implemented = val;
3637 }
3638 
3639 /* ****************************************************************************
3640  功能描述  : 获取MIB项 dot11MgmtOptionMultiBSSIDImplemented 的值
3641 **************************************************************************** */
mac_mib_get_multi_bssid_implement(hmac_vap_stru * hmac_vap)3642 static INLINE__ osal_u8 mac_mib_get_multi_bssid_implement(hmac_vap_stru *hmac_vap)
3643 {
3644     return hmac_vap->mib_info->wlan_mib_wireless_mgmt_op.dot11_mgmt_option_multi_bssid_implemented;
3645 }
3646 
3647 /* ****************************************************************************
3648  功能描述  : 设置MIB项 dot11HEBSRControlImplemented 的值
3649 **************************************************************************** */
mac_mib_set_he_bsr_control_implemented(hmac_vap_stru * hmac_vap,osal_u8 val)3650 static INLINE__ osal_void mac_mib_set_he_bsr_control_implemented(hmac_vap_stru *hmac_vap, osal_u8 val)
3651 {
3652     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_bsr_control_implemented = val;
3653 }
3654 
3655 /* ****************************************************************************
3656  功能描述  : 获取MIB项 dot11HEBSRControlImplemented 的值
3657 **************************************************************************** */
mac_mib_get_he_bsr_control_implemented(hmac_vap_stru * hmac_vap)3658 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_bsr_control_implemented(hmac_vap_stru *hmac_vap)
3659 {
3660     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_he_bsr_control_implemented;
3661 }
3662 
3663 /* ****************************************************************************
3664  功能描述  : 设置MIB项 dot11HTVHTTriggerOptionImplemented 的值
3665 **************************************************************************** */
mac_mib_set_he_ht_vht_trigger_option_implemented(hmac_vap_stru * hmac_vap,osal_u8 val)3666 static INLINE__ osal_void mac_mib_set_he_ht_vht_trigger_option_implemented(hmac_vap_stru *hmac_vap, osal_u8 val)
3667 {
3668     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_ht_vht_trigger_option_implemented = val;
3669 }
3670 
3671 /* ****************************************************************************
3672  功能描述  : 获取MIB项 dot11HTVHTTriggerOptionImplemented 的值
3673 **************************************************************************** */
mac_mib_get_he_ht_vht_trigger_option_implemented(hmac_vap_stru * hmac_vap)3674 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_ht_vht_trigger_option_implemented(hmac_vap_stru *hmac_vap)
3675 {
3676     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_ht_vht_trigger_option_implemented;
3677 }
3678 
3679 /* ****************************************************************************
3680  功能描述  : 设置MIB项 dot11HENumberSoundingDimensionsLessThanOrEqualTo80 的值
3681 **************************************************************************** */
mac_mib_set_he_num_sounding_dims_below_80mhz(hmac_vap_stru * hmac_vap,osal_u32 val)3682 static INLINE__ osal_void mac_mib_set_he_num_sounding_dims_below_80mhz(hmac_vap_stru *hmac_vap, osal_u32 val)
3683 {
3684     hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_he_num_sounding_dims_below_80mhz = val;
3685 }
3686 
3687 /* ****************************************************************************
3688  功能描述  : 获取MIB项 dot11HENumberSoundingDimensionsLessThanOrEqualTo80 的值
3689 **************************************************************************** */
mac_mib_get_he_num_sounding_dims_below_80mhz(const hmac_vap_stru * hmac_vap)3690 static INLINE__ osal_u32 mac_mib_get_he_num_sounding_dims_below_80mhz(const hmac_vap_stru *hmac_vap)
3691 {
3692     return hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_he_num_sounding_dims_below_80mhz;
3693 }
3694 
3695 /* ****************************************************************************
3696  功能描述  : 设置MIB项 dot11HENG16MUFeedbackSupport 的值
3697 **************************************************************************** */
mac_mib_set_he_ng16_mufeedback_support(hmac_vap_stru * hmac_vap,osal_u8 val)3698 static INLINE__ osal_void mac_mib_set_he_ng16_mufeedback_support(hmac_vap_stru *hmac_vap, osal_u8 val)
3699 {
3700     hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_he_ng16_mufeedback_support = val;
3701 }
3702 
3703 /* ****************************************************************************
3704  功能描述  : 获取MIB项 dot11HENG16MUFeedbackSupport 的值
3705 **************************************************************************** */
mac_mib_get_he_ng16_mufeedback_support(const hmac_vap_stru * hmac_vap)3706 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_ng16_mufeedback_support(const hmac_vap_stru *hmac_vap)
3707 {
3708     return hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_he_ng16_mufeedback_support;
3709 }
3710 
3711 /* ****************************************************************************
3712  功能描述  : 设置MIB项 dot11HECodebookSizePhi7Psi5MUFeedbackSupport 的值
3713 **************************************************************************** */
mac_mib_set_he_codebooksize_mufeedback_support(hmac_vap_stru * hmac_vap,osal_u8 val)3714 static INLINE__ osal_void mac_mib_set_he_codebooksize_mufeedback_support(hmac_vap_stru *hmac_vap, osal_u8 val)
3715 {
3716     hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_he_codebooksize_mufeedback_support = val;
3717 }
3718 
3719 /* ****************************************************************************
3720  功能描述  : 获取MIB项 dot11HECodebookSizePhi7Psi5MUFeedbackSupport 的值
3721 **************************************************************************** */
mac_mib_get_he_codebooksize_mufeedback_support(const hmac_vap_stru * hmac_vap)3722 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_codebooksize_mufeedback_support(const hmac_vap_stru *hmac_vap)
3723 {
3724     return hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_he_codebooksize_mufeedback_support;
3725 }
3726 
3727 /* ****************************************************************************
3728  功能描述  : 设置MIB项 dot11HEPartialBWDLMUMIMOImplemented 的值
3729 **************************************************************************** */
mac_mib_set_he_partial_bw_dlmumimo_implemented(hmac_vap_stru * hmac_vap,osal_u8 val)3730 static INLINE__ osal_void mac_mib_set_he_partial_bw_dlmumimo_implemented(hmac_vap_stru *hmac_vap, osal_u8 val)
3731 {
3732     hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_he_partial_bw_dlmumimo_implemented = val;
3733 }
3734 
3735 /* ****************************************************************************
3736  功能描述  : 获取MIB项 dot11HEPartialBWDLMUMIMOImplemented 的值
3737 **************************************************************************** */
mac_mib_get_he_partial_bw_dlmumimo_implemented(const hmac_vap_stru * hmac_vap)3738 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_partial_bw_dlmumimo_implemented(const hmac_vap_stru *hmac_vap)
3739 {
3740     return hmac_vap->mib_info->wlan_mib_he_phy_config.dot11_he_partial_bw_dlmumimo_implemented;
3741 }
3742 
3743 /* ****************************************************************************
3744  功能描述  : 设置MIB项 dot11HEBssColorDisable的值
3745 **************************************************************************** */
mac_mib_set_he_oper_bss_color_disable(hmac_vap_stru * hmac_vap,osal_u8 val)3746 static INLINE__ osal_void mac_mib_set_he_oper_bss_color_disable(hmac_vap_stru *hmac_vap, osal_u8 val)
3747 {
3748     hmac_vap->mib_info->wlan_mib_he_oper_config.dot11_he_bss_color_disable = val;
3749 }
3750 
3751 /* ****************************************************************************
3752  功能描述  : 获取MIB项 dot11HEBssColorDisable的值
3753 **************************************************************************** */
mac_mib_get_he_oper_bss_color_disable(const hmac_vap_stru * hmac_vap)3754 static INLINE__ oal_bool_enum_uint8 mac_mib_get_he_oper_bss_color_disable(const hmac_vap_stru *hmac_vap)
3755 {
3756     return hmac_vap->mib_info->wlan_mib_he_oper_config.dot11_he_bss_color_disable;
3757 }
3758 
3759 /* ****************************************************************************
3760  功能描述  : 设置MIB项 dot11HEBssColor的值
3761 **************************************************************************** */
mac_mib_set_he_oper_bss_color(hmac_vap_stru * hmac_vap,osal_u8 val)3762 static INLINE__ osal_void mac_mib_set_he_oper_bss_color(hmac_vap_stru *hmac_vap, osal_u8 val)
3763 {
3764     hmac_vap->mib_info->wlan_mib_he_oper_config.dot11_he_bss_color = val;
3765 }
3766 
3767 /* ****************************************************************************
3768  功能描述  : 获取MIB项 dot11HEBssColor的值
3769 **************************************************************************** */
mac_mib_get_he_oper_bss_color(const hmac_vap_stru * hmac_vap)3770 static INLINE__ osal_u8 mac_mib_get_he_oper_bss_color(const hmac_vap_stru *hmac_vap)
3771 {
3772     return hmac_vap->mib_info->wlan_mib_he_oper_config.dot11_he_bss_color;
3773 }
3774 #endif  /* ifdef _PRE_WLAN_FEATURE_11AX */
3775 
mac_mib_get_forty_mhz_operation_implemented(const hmac_vap_stru * hmac_vap)3776 static INLINE__ oal_bool_enum_uint8 mac_mib_get_forty_mhz_operation_implemented(const hmac_vap_stru *hmac_vap)
3777 {
3778     return (hmac_vap->channel.band == WLAN_BAND_2G) ?
3779         hmac_vap->mib_info->wlan_mib_phy_ht.dot11_2g_40mhz_operation_implemented :
3780         hmac_vap->mib_info->wlan_mib_phy_ht.dot11_5g_40mhz_operation_implemented;
3781 }
3782 
mac_mib_set_forty_mhz_operation_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3783 static INLINE__ osal_void mac_mib_set_forty_mhz_operation_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3784 {
3785     if (hmac_vap->channel.band == WLAN_BAND_2G) {
3786         hmac_vap->mib_info->wlan_mib_phy_ht.dot11_2g_40mhz_operation_implemented = val;
3787     } else {
3788         hmac_vap->mib_info->wlan_mib_phy_ht.dot11_5g_40mhz_operation_implemented = val;
3789     }
3790 }
3791 
mac_mib_get_short_gi_option_in_forty_implemented(const hmac_vap_stru * hmac_vap)3792 static INLINE__ oal_bool_enum_uint8 mac_mib_get_short_gi_option_in_forty_implemented(const hmac_vap_stru *hmac_vap)
3793 {
3794     return (hmac_vap->channel.band == WLAN_BAND_2G) ?
3795         hmac_vap->mib_info->wlan_mib_phy_ht.dot112_g_short_gi_option_in_forty_implemented :
3796         hmac_vap->mib_info->wlan_mib_phy_ht.dot115_g_short_gi_option_in_forty_implemented;
3797 }
3798 
mac_mib_set_short_gi_option_in_forty_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3799 static INLINE__ osal_void mac_mib_set_short_gi_option_in_forty_implemented(hmac_vap_stru *hmac_vap,
3800     oal_bool_enum_uint8 val)
3801 {
3802     if (hmac_vap->channel.band == WLAN_BAND_2G) {
3803         hmac_vap->mib_info->wlan_mib_phy_ht.dot112_g_short_gi_option_in_forty_implemented = val;
3804     } else {
3805         hmac_vap->mib_info->wlan_mib_phy_ht.dot115_g_short_gi_option_in_forty_implemented = val;
3806     }
3807 }
3808 
mac_mib_get_2GFortyMHzOperationImplemented(hmac_vap_stru * hmac_vap)3809 static INLINE__ oal_bool_enum_uint8 mac_mib_get_2GFortyMHzOperationImplemented(hmac_vap_stru *hmac_vap)
3810 {
3811     return (hmac_vap->mib_info->wlan_mib_phy_ht.dot11_2g_40mhz_operation_implemented);
3812 }
3813 
mac_mib_get_5GFortyMHzOperationImplemented(hmac_vap_stru * hmac_vap)3814 static INLINE__ oal_bool_enum_uint8 mac_mib_get_5GFortyMHzOperationImplemented(hmac_vap_stru *hmac_vap)
3815 {
3816     return (hmac_vap->mib_info->wlan_mib_phy_ht.dot11_5g_40mhz_operation_implemented);
3817 }
3818 
3819 
mac_mib_set_2g_forty_mhz_operation_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3820 static INLINE__ osal_void mac_mib_set_2g_forty_mhz_operation_implemented(hmac_vap_stru *hmac_vap,
3821     oal_bool_enum_uint8 val)
3822 {
3823     hmac_vap->mib_info->wlan_mib_phy_ht.dot11_2g_40mhz_operation_implemented = val;
3824 }
3825 
mac_mib_set_5g_forty_mhz_operation_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3826 static INLINE__ osal_void mac_mib_set_5g_forty_mhz_operation_implemented(hmac_vap_stru *hmac_vap,
3827     oal_bool_enum_uint8 val)
3828 {
3829     hmac_vap->mib_info->wlan_mib_phy_ht.dot11_5g_40mhz_operation_implemented = val;
3830 }
3831 
mac_mib_get_spectrum_management_implemented(hmac_vap_stru * hmac_vap)3832 static INLINE__ oal_bool_enum_uint8 mac_mib_get_spectrum_management_implemented(hmac_vap_stru *hmac_vap)
3833 {
3834     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_spectrum_management_implemented;
3835 }
3836 
mac_mib_set_spectrum_management_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3837 static INLINE__ osal_void mac_mib_set_spectrum_management_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3838 {
3839     hmac_vap->mib_info->wlan_mib_sta_config.dot11_spectrum_management_implemented = val;
3840 }
3841 
mac_mib_get_forty_mhz_intolerant(const hmac_vap_stru * hmac_vap)3842 static INLINE__ oal_bool_enum_uint8 mac_mib_get_forty_mhz_intolerant(const hmac_vap_stru *hmac_vap)
3843 {
3844     return hmac_vap->mib_info->wlan_mib_operation.dot11_40mhz_intolerant;
3845 }
3846 
mac_mib_set_forty_mhz_intolerant(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3847 static INLINE__ osal_void mac_mib_set_forty_mhz_intolerant(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3848 {
3849     hmac_vap->mib_info->wlan_mib_operation.dot11_40mhz_intolerant = val;
3850 }
3851 
mac_mib_get_2040_bss_coexistence_management_support(const hmac_vap_stru * hmac_vap)3852 static INLINE__ oal_bool_enum_uint8 mac_mib_get_2040_bss_coexistence_management_support(const hmac_vap_stru *hmac_vap)
3853 {
3854     return hmac_vap->mib_info->wlan_mib_operation.dot112040_bss_coexistence_management_support;
3855 }
3856 
mac_mib_get_dot11_rsnamfpc(const hmac_vap_stru * hmac_vap)3857 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11_rsnamfpc(const hmac_vap_stru *hmac_vap)
3858 {
3859     return hmac_vap->mib_info->wlan_mib_privacy.dot11_rsnamfpc;
3860 }
3861 
mac_mib_get_dot11_rsnamfpr(const hmac_vap_stru * hmac_vap)3862 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11_rsnamfpr(const hmac_vap_stru *hmac_vap)
3863 {
3864     return hmac_vap->mib_info->wlan_mib_privacy.dot11_rsnamfpr;
3865 }
3866 
mac_mib_set_dot11_rsnamfpc(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3867 static INLINE__ osal_void mac_mib_set_dot11_rsnamfpc(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3868 {
3869     hmac_vap->mib_info->wlan_mib_privacy.dot11_rsnamfpc = val;
3870 }
3871 
mac_mib_set_dot11_rsnamfpr(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3872 static INLINE__ osal_void mac_mib_set_dot11_rsnamfpr(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3873 {
3874     hmac_vap->mib_info->wlan_mib_privacy.dot11_rsnamfpr = val;
3875 }
3876 
mac_mib_get_dot11AssociationSAQueryMaximumTimeout(hmac_vap_stru * hmac_vap)3877 static INLINE__ osal_u32 mac_mib_get_dot11AssociationSAQueryMaximumTimeout(hmac_vap_stru *hmac_vap)
3878 {
3879     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_association_sa_query_maximum_timeout;
3880 }
3881 
mac_mib_get_dot11AssociationSAQueryRetryTimeout(hmac_vap_stru * hmac_vap)3882 static INLINE__ osal_u32 mac_mib_get_dot11AssociationSAQueryRetryTimeout(hmac_vap_stru *hmac_vap)
3883 {
3884     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_association_sa_query_retry_timeout;
3885 }
3886 
mac_mib_set_dot11AssociationSAQueryMaximumTimeout(hmac_vap_stru * hmac_vap,osal_u32 val)3887 static INLINE__ void mac_mib_set_dot11AssociationSAQueryMaximumTimeout(hmac_vap_stru *hmac_vap, osal_u32 val)
3888 {
3889     hmac_vap->mib_info->wlan_mib_sta_config.dot11_association_sa_query_maximum_timeout = val;
3890 }
3891 
mac_mib_set_dot11AssociationSAQueryRetryTimeout(hmac_vap_stru * hmac_vap,osal_u32 val)3892 static INLINE__ void mac_mib_set_dot11AssociationSAQueryRetryTimeout(hmac_vap_stru *hmac_vap, osal_u32 val)
3893 {
3894     hmac_vap->mib_info->wlan_mib_sta_config.dot11_association_sa_query_retry_timeout = val;
3895 }
3896 
mac_mib_set_dot11_extended_channel_switch_activated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3897 static INLINE__ osal_void mac_mib_set_dot11_extended_channel_switch_activated(hmac_vap_stru *hmac_vap,
3898     oal_bool_enum_uint8 val)
3899 {
3900     hmac_vap->mib_info->wlan_mib_sta_config.dot11_extended_channel_switch_activated = val;
3901 }
3902 
mac_mib_get_dot11_extended_channel_switch_activated(hmac_vap_stru * hmac_vap)3903 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11_extended_channel_switch_activated(hmac_vap_stru *hmac_vap)
3904 {
3905     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_extended_channel_switch_activated;
3906 }
3907 
mac_mib_set_dot11_radio_measurement_activated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3908 static INLINE__ osal_void mac_mib_set_dot11_radio_measurement_activated(hmac_vap_stru *hmac_vap,
3909     oal_bool_enum_uint8 val)
3910 {
3911     hmac_vap->mib_info->wlan_mib_sta_config.dot11_radio_measurement_activated = val;
3912 }
3913 
mac_mib_get_dot11_radio_measurement_activated(const hmac_vap_stru * hmac_vap)3914 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11_radio_measurement_activated(const hmac_vap_stru *hmac_vap)
3915 {
3916     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_radio_measurement_activated;
3917 }
3918 
mac_mib_set_dot11_qbss_load_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3919 static INLINE__ osal_void mac_mib_set_dot11_qbss_load_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3920 {
3921     hmac_vap->mib_info->wlan_mib_sta_config.dot11_qbss_load_implemented = val;
3922 }
3923 
mac_mib_get_dot11_qbss_load_implemented(hmac_vap_stru * hmac_vap)3924 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11_qbss_load_implemented(hmac_vap_stru *hmac_vap)
3925 {
3926     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_qbss_load_implemented;
3927 }
3928 
mac_mib_set_dot11_apsd_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3929 static INLINE__ osal_void mac_mib_set_dot11_apsd_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
3930 {
3931     hmac_vap->mib_info->wlan_mib_sta_config.dot11_apsd_option_implemented = val;
3932 }
3933 
mac_mib_get_dot11_apsd_option_implemented(const hmac_vap_stru * hmac_vap)3934 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11_apsd_option_implemented(const hmac_vap_stru *hmac_vap)
3935 {
3936     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_apsd_option_implemented;
3937 }
3938 
mac_mib_set_dot11_delayed_block_ack_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3939 static INLINE__ osal_void mac_mib_set_dot11_delayed_block_ack_option_implemented(hmac_vap_stru *hmac_vap,
3940     oal_bool_enum_uint8 val)
3941 {
3942     hmac_vap->mib_info->wlan_mib_sta_config.dot11_delayed_block_ack_option_implemented = val;
3943 }
3944 
3945 static INLINE__ oal_bool_enum_uint8
mac_mib_get_dot11_delayed_block_ack_option_implemented(const hmac_vap_stru * hmac_vap)3946 mac_mib_get_dot11_delayed_block_ack_option_implemented(const hmac_vap_stru *hmac_vap)
3947 {
3948     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_delayed_block_ack_option_implemented;
3949 }
3950 
mac_mib_set_dot11ImmediateBlockAckOptionImplemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3951 static INLINE__ osal_void mac_mib_set_dot11ImmediateBlockAckOptionImplemented(hmac_vap_stru *hmac_vap,
3952     oal_bool_enum_uint8 val)
3953 {
3954     hmac_vap->mib_info->wlan_mib_sta_config.dot11_immediate_block_ack_option_implemented = val;
3955 }
3956 
mac_mib_get_dot11ImmediateBlockAckOptionImplemented(hmac_vap_stru * hmac_vap)3957 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11ImmediateBlockAckOptionImplemented(hmac_vap_stru *hmac_vap)
3958 {
3959     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_immediate_block_ack_option_implemented;
3960 }
3961 
mac_mib_set_dot11_qos_option_implemented(const hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3962 static INLINE__ osal_void mac_mib_set_dot11_qos_option_implemented(const hmac_vap_stru *hmac_vap,
3963     oal_bool_enum_uint8 val)
3964 {
3965     hmac_vap->mib_info->wlan_mib_sta_config.dot11_qos_option_implemented = val;
3966 }
3967 
mac_mib_get_dot11_qos_option_implemented(hmac_vap_stru * hmac_vap)3968 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11_qos_option_implemented(hmac_vap_stru *hmac_vap)
3969 {
3970     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_qos_option_implemented;
3971 }
3972 
mac_mib_set_dot11_multi_domain_capability_activated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)3973 static INLINE__ osal_void mac_mib_set_dot11_multi_domain_capability_activated(hmac_vap_stru *hmac_vap,
3974     oal_bool_enum_uint8 val)
3975 {
3976     hmac_vap->mib_info->wlan_mib_sta_config.dot11_multi_domain_capability_activated = val;
3977 }
3978 
mac_mib_get_dot11_multi_domain_capability_activated(hmac_vap_stru * hmac_vap)3979 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11_multi_domain_capability_activated(hmac_vap_stru *hmac_vap)
3980 {
3981     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_multi_domain_capability_activated;
3982 }
3983 
mac_mib_set_dot11AssociationResponseTimeOut(hmac_vap_stru * hmac_vap,osal_u32 val)3984 static INLINE__ void mac_mib_set_dot11AssociationResponseTimeOut(hmac_vap_stru *hmac_vap, osal_u32 val)
3985 {
3986     hmac_vap->mib_info->wlan_mib_sta_config.dot11_association_response_time_out = val;
3987 }
3988 
mac_mib_get_dot11AssociationResponseTimeOut(hmac_vap_stru * hmac_vap)3989 static INLINE__ osal_u32 mac_mib_get_dot11AssociationResponseTimeOut(hmac_vap_stru *hmac_vap)
3990 {
3991     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_association_response_time_out;
3992 }
3993 
mac_mib_set_MaxAssocUserNums(hmac_vap_stru * hmac_vap,osal_u16 val)3994 static INLINE__ void mac_mib_set_MaxAssocUserNums(hmac_vap_stru *hmac_vap, osal_u16 val)
3995 {
3996     hmac_vap->mib_info->wlan_mib_sta_config.dot11_max_assoc_user_nums = val;
3997 }
3998 
mac_mib_get_MaxAssocUserNums(hmac_vap_stru * hmac_vap)3999 static INLINE__ osal_u16 mac_mib_get_MaxAssocUserNums(hmac_vap_stru *hmac_vap)
4000 {
4001     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_max_assoc_user_nums;
4002 }
4003 
mac_mib_set_SupportRateSetNums(hmac_vap_stru * hmac_vap,osal_u8 val)4004 static INLINE__ void mac_mib_set_SupportRateSetNums(hmac_vap_stru *hmac_vap, osal_u8 val)
4005 {
4006     hmac_vap->mib_info->wlan_mib_sta_config.dot11_support_rate_set_nums = val;
4007 }
4008 
mac_mib_get_SupportRateSetNums(hmac_vap_stru * hmac_vap)4009 static INLINE__ osal_u8 mac_mib_get_SupportRateSetNums(hmac_vap_stru *hmac_vap)
4010 {
4011     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_support_rate_set_nums;
4012 }
4013 
mac_mib_set_CfgAmsduTxAtive(hmac_vap_stru * hmac_vap,osal_u8 val)4014 static INLINE__ void mac_mib_set_CfgAmsduTxAtive(hmac_vap_stru *hmac_vap, osal_u8 val)
4015 {
4016     hmac_vap->mib_info->wlan_mib_sta_config.dot11_cfg_amsdu_tx_ative = val;
4017 }
4018 
mac_mib_get_CfgAmsduTxAtive(hmac_vap_stru * hmac_vap)4019 static INLINE__ osal_u8 mac_mib_get_CfgAmsduTxAtive(hmac_vap_stru *hmac_vap)
4020 {
4021     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_cfg_amsdu_tx_ative;
4022 }
4023 
mac_mib_set_AmsduAggregateAtive(hmac_vap_stru * hmac_vap,osal_u8 val)4024 static INLINE__ void mac_mib_set_AmsduAggregateAtive(hmac_vap_stru *hmac_vap, osal_u8 val)
4025 {
4026     hmac_vap->mib_info->wlan_mib_sta_config.dot11_amsdu_aggregate_ative = val;
4027 }
4028 
mac_mib_get_AmsduAggregateAtive(hmac_vap_stru * hmac_vap)4029 static INLINE__ osal_u8 mac_mib_get_AmsduAggregateAtive(hmac_vap_stru *hmac_vap)
4030 {
4031     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_amsdu_aggregate_ative;
4032 }
4033 
mac_mib_set_AmsduPlusAmpduActive(hmac_vap_stru * hmac_vap,osal_u8 val)4034 static INLINE__ void mac_mib_set_AmsduPlusAmpduActive(hmac_vap_stru *hmac_vap, osal_u8 val)
4035 {
4036     hmac_vap->mib_info->wlan_mib_sta_config.dot11_amsdu_plus_ampdu_active = val;
4037 }
4038 
mac_mib_get_AmsduPlusAmpduActive(hmac_vap_stru * hmac_vap)4039 static INLINE__ osal_u8 mac_mib_get_AmsduPlusAmpduActive(hmac_vap_stru *hmac_vap)
4040 {
4041     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_amsdu_plus_ampdu_active;
4042 }
4043 
mac_mib_set_WPSActive(hmac_vap_stru * hmac_vap,osal_u8 val)4044 static INLINE__ void mac_mib_set_WPSActive(hmac_vap_stru *hmac_vap, osal_u8 val)
4045 {
4046     hmac_vap->mib_info->wlan_mib_sta_config.dot11_wps_active = val;
4047 }
4048 
mac_mib_get_WPSActive(hmac_vap_stru * hmac_vap)4049 static INLINE__ osal_u8 mac_mib_get_WPSActive(hmac_vap_stru *hmac_vap)
4050 {
4051     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_wps_active;
4052 }
4053 
mac_mib_set_2040_switch_prohibited(hmac_vap_stru * hmac_vap,osal_u8 val)4054 static INLINE__ osal_void mac_mib_set_2040_switch_prohibited(hmac_vap_stru *hmac_vap, osal_u8 val)
4055 {
4056     hmac_vap->mib_info->wlan_mib_sta_config.dot112040_switch_prohibited = val;
4057 }
4058 
mac_mib_get_2040_switch_prohibited(const hmac_vap_stru * hmac_vap)4059 static INLINE__ osal_u8 mac_mib_get_2040_switch_prohibited(const hmac_vap_stru *hmac_vap)
4060 {
4061     return hmac_vap->mib_info->wlan_mib_sta_config.dot112040_switch_prohibited;
4062 }
4063 
mac_mib_set_TxAggregateActived(hmac_vap_stru * hmac_vap,osal_u8 val)4064 static INLINE__ void mac_mib_set_TxAggregateActived(hmac_vap_stru *hmac_vap, osal_u8 val)
4065 {
4066     hmac_vap->mib_info->wlan_mib_sta_config.dot11_tx_aggregate_actived = val;
4067 }
4068 
mac_mib_get_TxAggregateActived(hmac_vap_stru * hmac_vap)4069 static INLINE__ osal_u8 mac_mib_get_TxAggregateActived(hmac_vap_stru *hmac_vap)
4070 {
4071     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_tx_aggregate_actived;
4072 }
4073 
mac_mib_set_CfgAmpduTxAtive(hmac_vap_stru * hmac_vap,osal_u8 val)4074 static INLINE__ void mac_mib_set_CfgAmpduTxAtive(hmac_vap_stru *hmac_vap, osal_u8 val)
4075 {
4076     hmac_vap->mib_info->wlan_mib_sta_config.dot11_cfg_ampdu_tx_ative = val;
4077 }
4078 
mac_mib_get_CfgAmpduTxAtive(hmac_vap_stru * hmac_vap)4079 static INLINE__ osal_u8 mac_mib_get_CfgAmpduTxAtive(hmac_vap_stru *hmac_vap)
4080 {
4081     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_cfg_ampdu_tx_ative;
4082 }
4083 
mac_mib_set_RxBASessionNumber(hmac_vap_stru * hmac_vap,osal_u8 val)4084 static INLINE__ void mac_mib_set_RxBASessionNumber(hmac_vap_stru *hmac_vap, osal_u8 val)
4085 {
4086     hmac_vap->mib_info->wlan_mib_sta_config.dot11_rx_ba_session_number = val;
4087 }
4088 
mac_mib_get_RxBASessionNumber(hmac_vap_stru * hmac_vap)4089 static INLINE__ osal_u8 mac_mib_get_RxBASessionNumber(hmac_vap_stru *hmac_vap)
4090 {
4091     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_rx_ba_session_number;
4092 }
4093 
mac_mib_incr_RxBASessionNumber(hmac_vap_stru * hmac_vap)4094 static INLINE__ void mac_mib_incr_RxBASessionNumber(hmac_vap_stru *hmac_vap)
4095 {
4096     hmac_vap->mib_info->wlan_mib_sta_config.dot11_rx_ba_session_number++;
4097 }
4098 
mac_mib_decr_RxBASessionNumber(hmac_vap_stru * hmac_vap)4099 static INLINE__ void mac_mib_decr_RxBASessionNumber(hmac_vap_stru *hmac_vap)
4100 {
4101     hmac_vap->mib_info->wlan_mib_sta_config.dot11_rx_ba_session_number--;
4102 }
4103 
mac_mib_set_TxBASessionNumber(hmac_vap_stru * hmac_vap,osal_u8 val)4104 static INLINE__ void mac_mib_set_TxBASessionNumber(hmac_vap_stru *hmac_vap, osal_u8 val)
4105 {
4106     hmac_vap->mib_info->wlan_mib_sta_config.dot11_tx_ba_session_number = val;
4107 }
4108 
mac_mib_get_TxBASessionNumber(hmac_vap_stru * hmac_vap)4109 static INLINE__ osal_u8 mac_mib_get_TxBASessionNumber(hmac_vap_stru *hmac_vap)
4110 {
4111     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_tx_ba_session_number;
4112 }
4113 
mac_mib_incr_TxBASessionNumber(hmac_vap_stru * hmac_vap)4114 static INLINE__ void mac_mib_incr_TxBASessionNumber(hmac_vap_stru *hmac_vap)
4115 {
4116     hmac_vap->mib_info->wlan_mib_sta_config.dot11_tx_ba_session_number++;
4117 }
4118 
mac_mib_decr_TxBASessionNumber(hmac_vap_stru * hmac_vap)4119 static INLINE__ void mac_mib_decr_TxBASessionNumber(hmac_vap_stru *hmac_vap)
4120 {
4121     hmac_vap->mib_info->wlan_mib_sta_config.dot11_tx_ba_session_number--;
4122 }
4123 
mac_mib_set_authentication_mode(hmac_vap_stru * hmac_vap,osal_u8 val)4124 static INLINE__ osal_void mac_mib_set_authentication_mode(hmac_vap_stru *hmac_vap, osal_u8 val)
4125 {
4126     hmac_vap->mib_info->wlan_mib_sta_config.dot11_authentication_mode = val;
4127 }
4128 
mac_mib_get_authentication_mode(const hmac_vap_stru * hmac_vap)4129 static INLINE__ osal_u8 mac_mib_get_authentication_mode(const hmac_vap_stru *hmac_vap)
4130 {
4131     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_authentication_mode;
4132 }
4133 
mac_mib_set_AddBaMode(hmac_vap_stru * hmac_vap,osal_u8 val)4134 static INLINE__ void mac_mib_set_AddBaMode(hmac_vap_stru *hmac_vap, osal_u8 val)
4135 {
4136     hmac_vap->mib_info->wlan_mib_sta_config.dot11_add_ba_mode = val;
4137 }
4138 
mac_mib_get_AddBaMode(hmac_vap_stru * hmac_vap)4139 static INLINE__ osal_u8 mac_mib_get_AddBaMode(hmac_vap_stru *hmac_vap)
4140 {
4141     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_add_ba_mode;
4142 }
4143 
mac_mib_set_TxTrafficClassifyFlag(hmac_vap_stru * hmac_vap,osal_u8 val)4144 static INLINE__ void mac_mib_set_TxTrafficClassifyFlag(hmac_vap_stru *hmac_vap, osal_u8 val)
4145 {
4146     hmac_vap->mib_info->wlan_mib_sta_config.dot11_tx_traffic_classify_flag = val;
4147 }
4148 
mac_mib_get_TxTrafficClassifyFlag(hmac_vap_stru * hmac_vap)4149 static INLINE__ osal_u8 mac_mib_get_TxTrafficClassifyFlag(hmac_vap_stru *hmac_vap)
4150 {
4151     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_tx_traffic_classify_flag;
4152 }
4153 
mac_mib_set_StaAuthCount(hmac_vap_stru * hmac_vap,osal_u8 val)4154 static INLINE__ void mac_mib_set_StaAuthCount(hmac_vap_stru *hmac_vap, osal_u8 val)
4155 {
4156     hmac_vap->mib_info->wlan_mib_sta_config.dot11_sta_auth_count = val;
4157 }
4158 
mac_mib_get_StaAuthCount(hmac_vap_stru * hmac_vap)4159 static INLINE__ osal_u8 mac_mib_get_StaAuthCount(hmac_vap_stru *hmac_vap)
4160 {
4161     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_sta_auth_count;
4162 }
4163 
mac_mib_set_StaAssocCount(hmac_vap_stru * hmac_vap,osal_u8 val)4164 static INLINE__ void mac_mib_set_StaAssocCount(hmac_vap_stru *hmac_vap, osal_u8 val)
4165 {
4166     hmac_vap->mib_info->wlan_mib_sta_config.dot11_sta_assoc_count = val;
4167 }
4168 
mac_mib_get_StaAssocCount(hmac_vap_stru * hmac_vap)4169 static INLINE__ osal_u8 mac_mib_get_StaAssocCount(hmac_vap_stru *hmac_vap)
4170 {
4171     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_sta_assoc_count;
4172 }
4173 
mac_mib_incr_StaAuthCount(hmac_vap_stru * hmac_vap)4174 static INLINE__ void mac_mib_incr_StaAuthCount(hmac_vap_stru *hmac_vap)
4175 {
4176     hmac_vap->mib_info->wlan_mib_sta_config.dot11_sta_auth_count++;
4177 }
4178 
mac_mib_incr_StaAssocCount(hmac_vap_stru * hmac_vap)4179 static INLINE__ void mac_mib_incr_StaAssocCount(hmac_vap_stru *hmac_vap)
4180 {
4181     hmac_vap->mib_info->wlan_mib_sta_config.dot11_sta_assoc_count++;
4182 }
4183 
mac_mib_set_dot11RMBeaconTableMeasurementActivated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4184 static INLINE__ void mac_mib_set_dot11RMBeaconTableMeasurementActivated(hmac_vap_stru *hmac_vap,
4185     oal_bool_enum_uint8 val)
4186 {
4187     hmac_vap->mib_info->wlan_mib_sta_config.dot11_rm_beacon_table_measurement_activated = val;
4188 }
4189 
mac_mib_get_dot11RMBeaconTableMeasurementActivated(hmac_vap_stru * hmac_vap)4190 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11RMBeaconTableMeasurementActivated(hmac_vap_stru *hmac_vap)
4191 {
4192     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_rm_beacon_table_measurement_activated;
4193 }
4194 
mac_mib_set_dot11RMBeaconActiveMeasurementActivated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4195 static INLINE__ void mac_mib_set_dot11RMBeaconActiveMeasurementActivated(hmac_vap_stru *hmac_vap,
4196     oal_bool_enum_uint8 val)
4197 {
4198     hmac_vap->mib_info->wlan_mib_sta_config.dot11_rm_beacon_active_measurement_activated = val;
4199 }
4200 
mac_mib_get_dot11RMBeaconActiveMeasurementActivated(hmac_vap_stru * hmac_vap)4201 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11RMBeaconActiveMeasurementActivated(hmac_vap_stru *hmac_vap)
4202 {
4203     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_rm_beacon_active_measurement_activated;
4204 }
4205 
mac_mib_set_dot11RMBeaconPassiveMeasurementActivated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4206 static INLINE__ void mac_mib_set_dot11RMBeaconPassiveMeasurementActivated(hmac_vap_stru *hmac_vap,
4207     oal_bool_enum_uint8 val)
4208 {
4209     hmac_vap->mib_info->wlan_mib_sta_config.dot11_rm_beacon_passive_measurement_activated = val;
4210 }
4211 
mac_mib_get_dot11RMBeaconPassiveMeasurementActivated(hmac_vap_stru * hmac_vap)4212 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11RMBeaconPassiveMeasurementActivated(hmac_vap_stru *hmac_vap)
4213 {
4214     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_rm_beacon_passive_measurement_activated;
4215 }
4216 
mac_mib_set_dot11RMLinkMeasurementActivated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4217 static INLINE__ void mac_mib_set_dot11RMLinkMeasurementActivated(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4218 {
4219     hmac_vap->mib_info->wlan_mib_sta_config.dot11_rm_link_measurement_activated = val;
4220 }
4221 
mac_mib_get_dot11RMLinkMeasurementActivated(hmac_vap_stru * hmac_vap)4222 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11RMLinkMeasurementActivated(hmac_vap_stru *hmac_vap)
4223 {
4224     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_rm_link_measurement_activated;
4225 }
4226 
mac_mib_set_dot11RMChannelLoadMeasurementActivated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4227 static INLINE__ void mac_mib_set_dot11RMChannelLoadMeasurementActivated(hmac_vap_stru *hmac_vap,
4228     oal_bool_enum_uint8 val)
4229 {
4230     hmac_vap->mib_info->wlan_mib_sta_config.dot11_rm_channel_load_measurement_activated = val;
4231 }
4232 
mac_mib_get_dot11RMChannelLoadMeasurementActivated(hmac_vap_stru * hmac_vap)4233 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11RMChannelLoadMeasurementActivated(hmac_vap_stru *hmac_vap)
4234 {
4235     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_rm_channel_load_measurement_activated;
4236 }
4237 
mac_mib_set_dot11RMNeighborReportActivated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4238 static INLINE__ void mac_mib_set_dot11RMNeighborReportActivated(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4239 {
4240     hmac_vap->mib_info->wlan_mib_sta_config.dot11_rm_neighbor_report_activated = val;
4241 }
4242 
mac_mib_get_dot11RMNeighborReportActivated(hmac_vap_stru * hmac_vap)4243 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dot11RMNeighborReportActivated(hmac_vap_stru *hmac_vap)
4244 {
4245     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_rm_neighbor_report_activated;
4246 }
4247 
mac_mib_set_2040_bss_coexistence_management_support(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4248 static INLINE__ osal_void mac_mib_set_2040_bss_coexistence_management_support(hmac_vap_stru *hmac_vap,
4249     oal_bool_enum_uint8 val)
4250 {
4251     hmac_vap->mib_info->wlan_mib_operation.dot112040_bss_coexistence_management_support = val;
4252 }
4253 
mac_mib_get_dot11_dtim_period(const hmac_vap_stru * hmac_vap)4254 static INLINE__ osal_u32 mac_mib_get_dot11_dtim_period(const hmac_vap_stru *hmac_vap)
4255 {
4256     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_dtim_period;
4257 }
4258 
mac_mib_set_dot11_vap_max_bandwidth(hmac_vap_stru * hmac_vap,wlan_bw_cap_enum_uint8 bandwidth)4259 static INLINE__ osal_void mac_mib_set_dot11_vap_max_bandwidth(hmac_vap_stru *hmac_vap, wlan_bw_cap_enum_uint8 bandwidth)
4260 {
4261     hmac_vap->mib_info->wlan_mib_sta_config.dot11_vap_max_band_width = bandwidth;
4262 }
4263 
mac_mib_get_dot11_vap_max_bandwidth(const hmac_vap_stru * hmac_vap)4264 static INLINE__ wlan_bw_cap_enum_uint8 mac_mib_get_dot11_vap_max_bandwidth(const hmac_vap_stru *hmac_vap)
4265 {
4266     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_vap_max_band_width;
4267 }
4268 
mac_mib_set_beacon_period(hmac_vap_stru * hmac_vap,osal_u32 val)4269 static INLINE__ osal_void mac_mib_set_beacon_period(hmac_vap_stru *hmac_vap, osal_u32 val)
4270 {
4271     if (val != 0) {
4272         hmac_vap->mib_info->wlan_mib_sta_config.dot11_beacon_period = val;
4273     }
4274 }
mac_mib_get_beacon_period(const hmac_vap_stru * hmac_vap)4275 static INLINE__ osal_u32 mac_mib_get_beacon_period(const hmac_vap_stru *hmac_vap)
4276 {
4277     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_beacon_period;
4278 }
4279 
mac_mib_set_desired_bss_type(const hmac_vap_stru * hmac_vap,osal_u8 val)4280 static INLINE__ osal_void mac_mib_set_desired_bss_type(const hmac_vap_stru *hmac_vap, osal_u8 val)
4281 {
4282     hmac_vap->mib_info->wlan_mib_sta_config.dot11_desired_bss_type = val;
4283 }
mac_mib_get_desired_bss_type(const hmac_vap_stru * hmac_vap)4284 static INLINE__ osal_u8 mac_mib_get_desired_bss_type(const hmac_vap_stru *hmac_vap)
4285 {
4286     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_desired_bss_type;
4287 }
4288 
4289 
mac_mib_get_desired_ssid(const hmac_vap_stru * hmac_vap)4290 static INLINE__ osal_u8 *mac_mib_get_desired_ssid(const hmac_vap_stru *hmac_vap)
4291 {
4292     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_desired_ssid;
4293 }
4294 
mac_mib_set_AuthenticationResponseTimeOut(hmac_vap_stru * hmac_vap,osal_u32 val)4295 static INLINE__ void mac_mib_set_AuthenticationResponseTimeOut(hmac_vap_stru *hmac_vap, osal_u32 val)
4296 {
4297     hmac_vap->mib_info->wlan_mib_sta_config.dot11_authentication_response_time_out = val;
4298 }
mac_mib_get_AuthenticationResponseTimeOut(hmac_vap_stru * hmac_vap)4299 static INLINE__ osal_u32 mac_mib_get_AuthenticationResponseTimeOut(hmac_vap_stru *hmac_vap)
4300 {
4301     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_authentication_response_time_out;
4302 }
4303 
mac_mib_get_mgmt_option_bss_transition_activated(hmac_vap_stru * hmac_vap)4304 static INLINE__ oal_bool_enum_uint8 mac_mib_get_mgmt_option_bss_transition_activated(hmac_vap_stru *hmac_vap)
4305 {
4306     return hmac_vap->mib_info->wlan_mib_wireless_mgmt_op.dot11_mgmt_option_bss_transition_activated;
4307 }
4308 
mac_mib_set_mgmt_option_bss_transition_activated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4309 static INLINE__ osal_void mac_mib_set_mgmt_option_bss_transition_activated(hmac_vap_stru *hmac_vap,
4310     oal_bool_enum_uint8 val)
4311 {
4312     hmac_vap->mib_info->wlan_mib_wireless_mgmt_op.dot11_mgmt_option_bss_transition_activated = val;
4313 }
4314 
mac_mib_get_mgmt_option_bss_transition_implemented(hmac_vap_stru * hmac_vap)4315 static INLINE__ oal_bool_enum_uint8 mac_mib_get_mgmt_option_bss_transition_implemented(hmac_vap_stru *hmac_vap)
4316 {
4317     return hmac_vap->mib_info->wlan_mib_wireless_mgmt_op.dot11_mgmt_option_bss_transition_implemented;
4318 }
4319 
mac_mib_set_mgmt_option_bss_transition_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4320 static INLINE__ osal_void mac_mib_set_mgmt_option_bss_transition_implemented(hmac_vap_stru *hmac_vap,
4321     oal_bool_enum_uint8 val)
4322 {
4323     hmac_vap->mib_info->wlan_mib_wireless_mgmt_op.dot11_mgmt_option_bss_transition_implemented = val;
4324 }
4325 
mac_mib_get_wireless_management_implemented(hmac_vap_stru * hmac_vap)4326 static INLINE__ oal_bool_enum_uint8 mac_mib_get_wireless_management_implemented(hmac_vap_stru *hmac_vap)
4327 {
4328     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_wireless_management_implemented;
4329 }
4330 
mac_mib_set_wireless_management_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4331 static INLINE__ osal_void mac_mib_set_wireless_management_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4332 {
4333     hmac_vap->mib_info->wlan_mib_sta_config.dot11_wireless_management_implemented = val;
4334 }
4335 
4336 #ifdef _PRE_WLAN_FEATURE_FTM
mac_mib_set_fine_timing_msmt_init_activated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4337 static INLINE__ osal_void mac_mib_set_fine_timing_msmt_init_activated(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4338 {
4339     hmac_vap->mib_info->wlan_mib_wireless_mgmt_op.dot11_fine_timing_msmt_init_activated = val;
4340 }
mac_mib_get_fine_timing_msmt_init_activated(const hmac_vap_stru * hmac_vap)4341 static INLINE__ oal_bool_enum_uint8 mac_mib_get_fine_timing_msmt_init_activated(const hmac_vap_stru *hmac_vap)
4342 {
4343     return hmac_vap->mib_info->wlan_mib_wireless_mgmt_op.dot11_fine_timing_msmt_init_activated;
4344 }
mac_mib_set_fine_timing_msmt_resp_activated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4345 static INLINE__ osal_void mac_mib_set_fine_timing_msmt_resp_activated(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4346 {
4347     hmac_vap->mib_info->wlan_mib_wireless_mgmt_op.dot11_fine_timing_msmt_resp_activated = val;
4348 }
mac_mib_get_fine_timing_msmt_resp_activated(const hmac_vap_stru * hmac_vap)4349 static INLINE__ oal_bool_enum_uint8 mac_mib_get_fine_timing_msmt_resp_activated(const hmac_vap_stru *hmac_vap)
4350 {
4351     return hmac_vap->mib_info->wlan_mib_wireless_mgmt_op.dot11_fine_timing_msmt_resp_activated;
4352 }
mac_mib_set_fine_timing_msmt_range_req_activated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4353 static INLINE__ osal_void mac_mib_set_fine_timing_msmt_range_req_activated(hmac_vap_stru *hmac_vap,
4354     oal_bool_enum_uint8 val)
4355 {
4356     hmac_vap->mib_info->wlan_mib_wireless_mgmt_op.dot11_rm_fine_timing_msmt_range_rep_activated = val;
4357 }
mac_mib_get_fine_timing_msmt_range_req_activated(const hmac_vap_stru * hmac_vap)4358 static INLINE__ oal_bool_enum_uint8 mac_mib_get_fine_timing_msmt_range_req_activated(const hmac_vap_stru *hmac_vap)
4359 {
4360     return hmac_vap->mib_info->wlan_mib_wireless_mgmt_op.dot11_rm_fine_timing_msmt_range_rep_activated;
4361 }
4362 
4363 #endif
4364 
4365 /* ****************************************************************************
4366  功能描述  : 初始化支持2040共存
4367 **************************************************************************** */
mac_mib_init_2040(hmac_vap_stru * hmac_vap)4368 static INLINE__ osal_void mac_mib_init_2040(hmac_vap_stru *hmac_vap)
4369 {
4370     mac_mib_set_forty_mhz_intolerant(hmac_vap, OSAL_FALSE);
4371     mac_mib_set_spectrum_management_implemented(hmac_vap, OSAL_TRUE);
4372     mac_mib_set_2040_bss_coexistence_management_support(hmac_vap, OSAL_TRUE);
4373 }
4374 
4375 /* ****************************************************************************
4376  功能描述  : 初始化OBSS SCAN 参数
4377 **************************************************************************** */
mac_mib_init_obss_scan(hmac_vap_stru * hmac_vap)4378 static INLINE__ osal_void mac_mib_init_obss_scan(hmac_vap_stru *hmac_vap)
4379 {
4380     mac_mib_set_obss_scan_passive_dwell(hmac_vap, 20);
4381     mac_mib_set_obss_scan_active_dwell(hmac_vap, 10);
4382     mac_mib_set_bss_width_trigger_scan_interval(hmac_vap, 300);
4383     mac_mib_set_obss_scan_passive_total_per_channel(hmac_vap, 200);
4384     mac_mib_set_obss_scan_active_total_per_channel(hmac_vap, 20);
4385     mac_mib_set_bss_width_channel_transition_delay_factor(hmac_vap, 5);
4386     mac_mib_set_obss_scan_activity_threshold(hmac_vap, 25);
4387 }
4388 
mac_mib_set_dot11dtimperiod(hmac_vap_stru * hmac_vap,osal_u32 val)4389 static INLINE__ osal_void mac_mib_set_dot11dtimperiod(hmac_vap_stru *hmac_vap, osal_u32 val)
4390 {
4391     if (val != 0) {
4392         hmac_vap->mib_info->wlan_mib_sta_config.dot11_dtim_period = val;
4393     }
4394 }
4395 
mac_mib_get_powermanagementmode(const hmac_vap_stru * hmac_vap)4396 static INLINE__ osal_u32 mac_mib_get_powermanagementmode(const hmac_vap_stru *hmac_vap)
4397 {
4398     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_power_management_mode;
4399 }
4400 
mac_mib_set_powermanagementmode(hmac_vap_stru * hmac_vap,osal_u8 val)4401 static INLINE__ osal_void mac_mib_set_powermanagementmode(hmac_vap_stru *hmac_vap, osal_u8 val)
4402 {
4403     if (val != 0) {
4404         hmac_vap->mib_info->wlan_mib_sta_config.dot11_power_management_mode = val;
4405     }
4406 }
4407 
4408 #ifdef _PRE_WLAN_FEATURE_OPMODE_NOTIFY
mac_mib_get_operating_mode_notification_implemented(hmac_vap_stru * hmac_vap)4409 static INLINE__ oal_bool_enum_uint8 mac_mib_get_operating_mode_notification_implemented(hmac_vap_stru *hmac_vap)
4410 {
4411     return hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_operating_mode_notification_implemented;
4412 }
4413 
mac_mib_set_operating_mode_notification_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4414 static INLINE__ osal_void mac_mib_set_operating_mode_notification_implemented(hmac_vap_stru *hmac_vap,
4415     oal_bool_enum_uint8 val)
4416 {
4417     hmac_vap->mib_info->wlan_mib_vht_sta_config.dot11_operating_mode_notification_implemented = val;
4418 }
4419 #endif
4420 
mac_mib_get_lsig_txop_full_protection_activated(const hmac_vap_stru * hmac_vap)4421 static INLINE__ oal_bool_enum_uint8 mac_mib_get_lsig_txop_full_protection_activated(const hmac_vap_stru *hmac_vap)
4422 {
4423     return (hmac_vap->mib_info->wlan_mib_operation.dot11_lsigtxop_full_protection_activated);
4424 }
4425 
mac_mib_set_lsig_txop_full_protection_activated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 lsig_txop_full_protection_activated)4426 static INLINE__ osal_void mac_mib_set_lsig_txop_full_protection_activated(hmac_vap_stru *hmac_vap,
4427     oal_bool_enum_uint8 lsig_txop_full_protection_activated)
4428 {
4429     hmac_vap->mib_info->wlan_mib_operation.dot11_lsigtxop_full_protection_activated =
4430         lsig_txop_full_protection_activated;
4431 }
4432 
mac_mib_get_non_gf_entities_present(hmac_vap_stru * hmac_vap)4433 static INLINE__ oal_bool_enum_uint8 mac_mib_get_non_gf_entities_present(hmac_vap_stru *hmac_vap)
4434 {
4435     return (hmac_vap->mib_info->wlan_mib_operation.dot11_non_gf_entities_present);
4436 }
4437 
mac_mib_set_non_gf_entities_present(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 non_gf_entities_present)4438 static INLINE__ osal_void mac_mib_set_non_gf_entities_present(hmac_vap_stru *hmac_vap,
4439     oal_bool_enum_uint8 non_gf_entities_present)
4440 {
4441     hmac_vap->mib_info->wlan_mib_operation.dot11_non_gf_entities_present = non_gf_entities_present;
4442 }
4443 
mac_mib_get_rifs_mode(const hmac_vap_stru * hmac_vap)4444 static INLINE__ oal_bool_enum_uint8 mac_mib_get_rifs_mode(const hmac_vap_stru *hmac_vap)
4445 {
4446     return (hmac_vap->mib_info->wlan_mib_operation.dot11_rifs_mode);
4447 }
4448 
mac_mib_set_rifs_mode(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 rifs_mode)4449 static INLINE__ osal_void mac_mib_set_rifs_mode(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 rifs_mode)
4450 {
4451     hmac_vap->mib_info->wlan_mib_operation.dot11_rifs_mode = rifs_mode;
4452 }
4453 
mac_mib_get_ht_protection(const hmac_vap_stru * hmac_vap)4454 static INLINE__ wlan_mib_ht_protection_enum_uint8 mac_mib_get_ht_protection(const hmac_vap_stru *hmac_vap)
4455 {
4456     return (hmac_vap->mib_info->wlan_mib_operation.dot11_ht_protection);
4457 }
4458 
mac_mib_set_dual_cts_protection(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4459 static INLINE__ osal_void mac_mib_set_dual_cts_protection(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4460 {
4461     hmac_vap->mib_info->wlan_mib_operation.dot11_dual_cts_protection = val;
4462 }
4463 
mac_mib_get_dual_cts_protection(hmac_vap_stru * hmac_vap)4464 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dual_cts_protection(hmac_vap_stru *hmac_vap)
4465 {
4466     return (hmac_vap->mib_info->wlan_mib_operation.dot11_dual_cts_protection);
4467 }
4468 
mac_mib_set_pco_activated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4469 static INLINE__ osal_void mac_mib_set_pco_activated(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4470 {
4471     hmac_vap->mib_info->wlan_mib_operation.dot11_pco_activated = val;
4472 }
4473 
mac_mib_get_pco_activated(hmac_vap_stru * hmac_vap)4474 static INLINE__ oal_bool_enum_uint8 mac_mib_get_pco_activated(hmac_vap_stru *hmac_vap)
4475 {
4476     return (hmac_vap->mib_info->wlan_mib_operation.dot11_pco_activated);
4477 }
4478 
mac_mib_set_ht_protection(hmac_vap_stru * hmac_vap,wlan_mib_ht_protection_enum_uint8 ht_protection)4479 static INLINE__ osal_void mac_mib_set_ht_protection(hmac_vap_stru *hmac_vap,
4480     wlan_mib_ht_protection_enum_uint8 ht_protection)
4481 {
4482     hmac_vap->mib_info->wlan_mib_operation.dot11_ht_protection = ht_protection;
4483 }
4484 
mac_mib_set_spectrum_management_required(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4485 static INLINE__ osal_void mac_mib_set_spectrum_management_required(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4486 {
4487     hmac_vap->mib_info->wlan_mib_sta_config.dot11_spectrum_management_required = val;
4488 }
4489 
mac_mib_get_spectrum_management_required(const hmac_vap_stru * hmac_vap)4490 static INLINE__ oal_bool_enum_uint8 mac_mib_get_spectrum_management_required(const hmac_vap_stru *hmac_vap)
4491 {
4492     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_spectrum_management_required;
4493 }
4494 
mac_mib_set_2g_short_gi_option_in_forty_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4495 static INLINE__ osal_void mac_mib_set_2g_short_gi_option_in_forty_implemented(hmac_vap_stru *hmac_vap,
4496     oal_bool_enum_uint8 val)
4497 {
4498     hmac_vap->mib_info->wlan_mib_phy_ht.dot112_g_short_gi_option_in_forty_implemented = val;
4499 }
4500 
mac_mib_set_5g_short_gi_option_in_forty_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4501 static INLINE__ osal_void mac_mib_set_5g_short_gi_option_in_forty_implemented(hmac_vap_stru *hmac_vap,
4502     oal_bool_enum_uint8 val)
4503 {
4504     hmac_vap->mib_info->wlan_mib_phy_ht.dot115_g_short_gi_option_in_forty_implemented = val;
4505 }
4506 
mac_mib_set_FragmentationThreshold(hmac_vap_stru * hmac_vap,osal_u32 frag_threshold)4507 static INLINE__ void mac_mib_set_FragmentationThreshold(hmac_vap_stru *hmac_vap, osal_u32 frag_threshold)
4508 {
4509     hmac_vap->mib_info->wlan_mib_operation.dot11_fragmentation_threshold = frag_threshold;
4510 }
4511 
mac_mib_get_FragmentationThreshold(hmac_vap_stru * hmac_vap)4512 static INLINE__ osal_u32 mac_mib_get_FragmentationThreshold(hmac_vap_stru *hmac_vap)
4513 {
4514     return hmac_vap->mib_info->wlan_mib_operation.dot11_fragmentation_threshold;
4515 }
4516 
mac_mib_set_rts_threshold(hmac_vap_stru * hmac_vap,osal_u32 rts_threshold)4517 static INLINE__ osal_void mac_mib_set_rts_threshold(hmac_vap_stru *hmac_vap, osal_u32 rts_threshold)
4518 {
4519     hmac_vap->mib_info->wlan_mib_operation.dot11_rts_threshold = rts_threshold;
4520 }
4521 
mac_mib_get_rts_threshold(hmac_vap_stru * hmac_vap)4522 static INLINE__ osal_u32 mac_mib_get_rts_threshold(hmac_vap_stru *hmac_vap)
4523 {
4524     return hmac_vap->mib_info->wlan_mib_operation.dot11_rts_threshold;
4525 }
4526 
mac_mib_set_antenna_selection_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4527 static INLINE__ osal_void mac_mib_set_antenna_selection_option_implemented(hmac_vap_stru *hmac_vap,
4528     oal_bool_enum_uint8 val)
4529 {
4530     hmac_vap->mib_info->wlan_mib_phy_antenna.dot11_antenna_selection_option_implemented = val;
4531 }
4532 
mac_mib_get_antenna_selection_option_implemented(hmac_vap_stru * hmac_vap)4533 static INLINE__ oal_bool_enum_uint8 mac_mib_get_antenna_selection_option_implemented(hmac_vap_stru *hmac_vap)
4534 {
4535     return hmac_vap->mib_info->wlan_mib_phy_antenna.dot11_antenna_selection_option_implemented;
4536 }
4537 
4538 /* ****************************************************************************
4539  功能描述  : 设置是否使能基于显示CSI(信道状态信息)反馈的发射天线选择能力
4540 **************************************************************************** */
mac_mib_set_trans_explicit_csi_feedback_as_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4541 static INLINE__ osal_void mac_mib_set_trans_explicit_csi_feedback_as_option_implemented(hmac_vap_stru *hmac_vap,
4542     oal_bool_enum_uint8 val)
4543 {
4544     hmac_vap->mib_info->wlan_mib_phy_antenna.dot11_transmit_explicit_csi_feedback_as_option_implemented = val;
4545 }
4546 
4547 static INLINE__ oal_bool_enum_uint8
mac_mib_get_trans_explicit_csi_feedback_as_option_implemented(hmac_vap_stru * hmac_vap)4548 mac_mib_get_trans_explicit_csi_feedback_as_option_implemented(hmac_vap_stru *hmac_vap)
4549 {
4550     return hmac_vap->mib_info->wlan_mib_phy_antenna.dot11_transmit_explicit_csi_feedback_as_option_implemented;
4551 }
4552 
mac_mib_set_trans_indices_feedback_as_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4553 static INLINE__ osal_void mac_mib_set_trans_indices_feedback_as_option_implemented(hmac_vap_stru *hmac_vap,
4554     oal_bool_enum_uint8 val)
4555 {
4556     hmac_vap->mib_info->wlan_mib_phy_antenna.dot11_transmit_indices_feedback_as_option_implemented = val;
4557 }
4558 
mac_mib_get_trans_indices_feedback_as_option_implemented(hmac_vap_stru * hmac_vap)4559 static INLINE__ oal_bool_enum_uint8 mac_mib_get_trans_indices_feedback_as_option_implemented(hmac_vap_stru *hmac_vap)
4560 {
4561     return hmac_vap->mib_info->wlan_mib_phy_antenna.dot11_transmit_indices_feedback_as_option_implemented;
4562 }
4563 
4564 /* ****************************************************************************
4565  功能描述  : indicates that the computation of CSI and feedback the results to support the peer to do ASEL is supported
4566 **************************************************************************** */
mac_mib_set_explicit_csi_feedback_as_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4567 static INLINE__ osal_void mac_mib_set_explicit_csi_feedback_as_option_implemented(hmac_vap_stru *hmac_vap,
4568     oal_bool_enum_uint8 val)
4569 {
4570     hmac_vap->mib_info->wlan_mib_phy_antenna.dot11_explicit_csi_feedback_as_option_implemented = val;
4571 }
4572 
mac_mib_get_explicit_csi_feedback_as_option_implemented(hmac_vap_stru * hmac_vap)4573 static INLINE__ oal_bool_enum_uint8 mac_mib_get_explicit_csi_feedback_as_option_implemented(hmac_vap_stru *hmac_vap)
4574 {
4575     return hmac_vap->mib_info->wlan_mib_phy_antenna.dot11_explicit_csi_feedback_as_option_implemented;
4576 }
4577 
mac_mib_set_receive_antenna_selection_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4578 static INLINE__ osal_void mac_mib_set_receive_antenna_selection_option_implemented(hmac_vap_stru *hmac_vap,
4579     oal_bool_enum_uint8 val)
4580 {
4581     hmac_vap->mib_info->wlan_mib_phy_antenna.dot11_receive_antenna_selection_option_implemented = val;
4582 }
4583 
mac_mib_get_receive_antenna_selection_option_implemented(hmac_vap_stru * hmac_vap)4584 static INLINE__ oal_bool_enum_uint8 mac_mib_get_receive_antenna_selection_option_implemented(hmac_vap_stru *hmac_vap)
4585 {
4586     return hmac_vap->mib_info->wlan_mib_phy_antenna.dot11_receive_antenna_selection_option_implemented;
4587 }
4588 
mac_mib_set_trans_sounding_ppdu_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4589 static INLINE__ osal_void mac_mib_set_trans_sounding_ppdu_option_implemented(hmac_vap_stru *hmac_vap,
4590     oal_bool_enum_uint8 val)
4591 {
4592     hmac_vap->mib_info->wlan_mib_phy_antenna.dot11_transmit_sounding_ppdu_option_implemented = val;
4593 }
4594 
mac_mib_get_trans_sounding_ppdu_option_implemented(hmac_vap_stru * hmac_vap)4595 static INLINE__ oal_bool_enum_uint8 mac_mib_get_trans_sounding_ppdu_option_implemented(hmac_vap_stru *hmac_vap)
4596 {
4597     return hmac_vap->mib_info->wlan_mib_phy_antenna.dot11_transmit_sounding_ppdu_option_implemented;
4598 }
4599 
4600 static INLINE__ wlan_11b_mib_preamble_enum_uint8
mac_mib_get_short_preamble_option_implemented(const hmac_vap_stru * hmac_vap)4601 mac_mib_get_short_preamble_option_implemented(const hmac_vap_stru *hmac_vap)
4602 {
4603     return (hmac_vap->mib_info->wlan_mib_phy_dsss.phy_hrdsss.dot11_short_preamble_option_implemented);
4604 }
4605 
mac_mib_set_short_preamble_option_implemented(hmac_vap_stru * hmac_vap,wlan_11b_mib_preamble_enum_uint8 preamble)4606 static INLINE__ osal_void mac_mib_set_short_preamble_option_implemented(hmac_vap_stru *hmac_vap,
4607     wlan_11b_mib_preamble_enum_uint8 preamble)
4608 {
4609     hmac_vap->mib_info->wlan_mib_phy_dsss.phy_hrdsss.dot11_short_preamble_option_implemented = preamble;
4610 }
4611 
mac_mib_set_pbcc_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4612 static INLINE__ osal_void mac_mib_set_pbcc_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4613 {
4614     hmac_vap->mib_info->wlan_mib_phy_dsss.phy_hrdsss.dot11_pbcc_option_implemented = val;
4615 }
4616 
mac_mib_get_pbcc_option_implemented(const hmac_vap_stru * hmac_vap)4617 static INLINE__ oal_bool_enum_uint8 mac_mib_get_pbcc_option_implemented(const hmac_vap_stru *hmac_vap)
4618 {
4619     return hmac_vap->mib_info->wlan_mib_phy_dsss.phy_hrdsss.dot11_pbcc_option_implemented;
4620 }
4621 
mac_mib_set_channel_agility_present(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4622 static INLINE__ osal_void mac_mib_set_channel_agility_present(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4623 {
4624     hmac_vap->mib_info->wlan_mib_phy_dsss.phy_hrdsss.dot11_channel_agility_present = val;
4625 }
4626 
mac_mib_get_channel_agility_present(const hmac_vap_stru * hmac_vap)4627 static INLINE__ oal_bool_enum_uint8 mac_mib_get_channel_agility_present(const hmac_vap_stru *hmac_vap)
4628 {
4629     return hmac_vap->mib_info->wlan_mib_phy_dsss.phy_hrdsss.dot11_channel_agility_present;
4630 }
4631 
mac_mib_set_dsss_ofdm_option_activated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4632 static INLINE__ osal_void mac_mib_set_dsss_ofdm_option_activated(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4633 {
4634     hmac_vap->mib_info->wlan_mib_phy_dsss.phy_erp.dot11_dsssofdm_option_activated = val;
4635 }
4636 
mac_mib_get_dsss_ofdm_option_activated(const hmac_vap_stru * hmac_vap)4637 static INLINE__ oal_bool_enum_uint8 mac_mib_get_dsss_ofdm_option_activated(const hmac_vap_stru *hmac_vap)
4638 {
4639     return hmac_vap->mib_info->wlan_mib_phy_dsss.phy_erp.dot11_dsssofdm_option_activated;
4640 }
4641 
mac_mib_set_short_slot_time_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4642 static INLINE__ osal_void mac_mib_set_short_slot_time_option_implemented(hmac_vap_stru *hmac_vap,
4643     oal_bool_enum_uint8 val)
4644 {
4645     hmac_vap->mib_info->wlan_mib_phy_dsss.phy_erp.dot11_short_slot_time_option_implemented = val;
4646 }
4647 
mac_mib_get_short_slot_time_option_implemented(const hmac_vap_stru * hmac_vap)4648 static INLINE__ oal_bool_enum_uint8 mac_mib_get_short_slot_time_option_implemented(const hmac_vap_stru *hmac_vap)
4649 {
4650     return hmac_vap->mib_info->wlan_mib_phy_dsss.phy_erp.dot11_short_slot_time_option_implemented;
4651 }
4652 
4653 /* ****************************************************************************
4654  功能描述  : 是否支持short slot time
4655 **************************************************************************** */
mac_mib_set_short_slot_time_option_activated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4656 static INLINE__ osal_void mac_mib_set_short_slot_time_option_activated(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4657 {
4658     hmac_vap->mib_info->wlan_mib_phy_dsss.phy_erp.dot11_short_slot_time_option_activated = val;
4659 }
4660 
mac_mib_get_short_slot_time_option_activated(const hmac_vap_stru * hmac_vap)4661 static INLINE__ oal_bool_enum_uint8 mac_mib_get_short_slot_time_option_activated(const hmac_vap_stru *hmac_vap)
4662 {
4663     return hmac_vap->mib_info->wlan_mib_phy_dsss.phy_erp.dot11_short_slot_time_option_activated;
4664 }
4665 
mac_mib_set_receive_stagger_sounding_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4666 static INLINE__ osal_void mac_mib_set_receive_stagger_sounding_option_implemented(hmac_vap_stru *hmac_vap,
4667     oal_bool_enum_uint8 val)
4668 {
4669     hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config.dot11_receive_stagger_sounding_option_implemented = val;
4670 }
4671 
mac_mib_get_receive_stagger_sounding_option_implemented(hmac_vap_stru * hmac_vap)4672 static INLINE__ oal_bool_enum_uint8 mac_mib_get_receive_stagger_sounding_option_implemented(hmac_vap_stru *hmac_vap)
4673 {
4674     return hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config.dot11_receive_stagger_sounding_option_implemented;
4675 }
4676 
4677 /* ****************************************************************************
4678  功能描述  : 表明是否支持staggered sounding帧的发送
4679 **************************************************************************** */
mac_mib_set_trans_stagger_sounding_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4680 static INLINE__ osal_void mac_mib_set_trans_stagger_sounding_option_implemented(hmac_vap_stru *hmac_vap,
4681     oal_bool_enum_uint8 val)
4682 {
4683     hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config.dot11_transmit_stagger_sounding_option_implemented = val;
4684 }
4685 
mac_mib_get_trans_stagger_sounding_option_implemented(hmac_vap_stru * hmac_vap)4686 static INLINE__ oal_bool_enum_uint8 mac_mib_get_trans_stagger_sounding_option_implemented(hmac_vap_stru *hmac_vap)
4687 {
4688     return hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config.dot11_transmit_stagger_sounding_option_implemented;
4689 }
4690 
mac_mib_set_receive_ndp_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4691 static INLINE__ osal_void mac_mib_set_receive_ndp_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4692 {
4693     hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config.dot11_receive_ndp_option_implemented = val;
4694 }
4695 
mac_mib_get_receive_ndp_option_implemented(hmac_vap_stru * hmac_vap)4696 static INLINE__ oal_bool_enum_uint8 mac_mib_get_receive_ndp_option_implemented(hmac_vap_stru *hmac_vap)
4697 {
4698     return hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config.dot11_receive_ndp_option_implemented;
4699 }
4700 
mac_mib_set_transmit_ndp_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4701 static INLINE__ osal_void mac_mib_set_transmit_ndp_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4702 {
4703     hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config.dot11_transmit_ndp_option_implemented = val;
4704 }
4705 
mac_mib_get_transmit_ndp_option_implemented(hmac_vap_stru * hmac_vap)4706 static INLINE__ oal_bool_enum_uint8 mac_mib_get_transmit_ndp_option_implemented(hmac_vap_stru *hmac_vap)
4707 {
4708     return hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config.dot11_transmit_ndp_option_implemented;
4709 }
4710 
mac_mib_set_implicit_trans_bf_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4711 static INLINE__ osal_void mac_mib_set_implicit_trans_bf_option_implemented(hmac_vap_stru *hmac_vap,
4712     oal_bool_enum_uint8 val)
4713 {
4714     hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config.dot11_implicit_transmit_beamforming_option_implemented =
4715         val;
4716 }
4717 
mac_mib_get_implicit_trans_bf_option_implemented(hmac_vap_stru * hmac_vap)4718 static INLINE__ oal_bool_enum_uint8 mac_mib_get_implicit_trans_bf_option_implemented(hmac_vap_stru *hmac_vap)
4719 {
4720     return hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4721         .dot11_implicit_transmit_beamforming_option_implemented;
4722 }
4723 
4724 /* ****************************************************************************
4725  功能描述  : 表明是否支持NDP sounding帧的发送
4726 **************************************************************************** */
mac_mib_set_calibration_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4727 static INLINE__ osal_void mac_mib_set_calibration_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4728 {
4729     hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config.dot11_calibration_option_implemented = val;
4730 }
4731 
mac_mib_get_calibration_option_implemented(hmac_vap_stru * hmac_vap)4732 static INLINE__ oal_bool_enum_uint8 mac_mib_get_calibration_option_implemented(hmac_vap_stru *hmac_vap)
4733 {
4734     return hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config.dot11_calibration_option_implemented;
4735 }
4736 
4737 /* ****************************************************************************
4738  功能描述  : 表明是否支持CSI显式反馈在txbf中
4739 **************************************************************************** */
mac_mib_set_explicit_csi_trans_bf_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4740 static INLINE__ osal_void mac_mib_set_explicit_csi_trans_bf_option_implemented(hmac_vap_stru *hmac_vap,
4741     oal_bool_enum_uint8 val)
4742 {
4743     hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4744         .dot11_explicit_csi_transmit_beamforming_option_implemented = val;
4745 }
4746 
mac_mib_get_explicit_csi_trans_bf_option_implemented(hmac_vap_stru * hmac_vap)4747 static INLINE__ oal_bool_enum_uint8 mac_mib_get_explicit_csi_trans_bf_option_implemented(hmac_vap_stru *hmac_vap)
4748 {
4749     return hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4750         .dot11_explicit_csi_transmit_beamforming_option_implemented;
4751 }
4752 
mac_mib_set_explicit_non_compress_bf_matrix_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4753 static INLINE__ osal_void mac_mib_set_explicit_non_compress_bf_matrix_option_implemented(hmac_vap_stru *hmac_vap,
4754     oal_bool_enum_uint8 val)
4755 {
4756     hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4757         .dot11_explicit_non_compressed_beamforming_matrix_option_implemented = val;
4758 }
4759 
4760 static INLINE__ oal_bool_enum_uint8
mac_mib_get_explicit_non_compress_bf_matrix_option_implemented(hmac_vap_stru * hmac_vap)4761 mac_mib_get_explicit_non_compress_bf_matrix_option_implemented(hmac_vap_stru *hmac_vap)
4762 {
4763     return hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4764         .dot11_explicit_non_compressed_beamforming_matrix_option_implemented;
4765 }
4766 
mac_mib_set_explicit_trans_bf_csi_feedback_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4767 static INLINE__ osal_void mac_mib_set_explicit_trans_bf_csi_feedback_option_implemented(hmac_vap_stru *hmac_vap,
4768     oal_bool_enum_uint8 val)
4769 {
4770     hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4771         .dot11_explicit_transmit_beamforming_csi_feedback_option_implemented = val;
4772 }
4773 
4774 static INLINE__ oal_bool_enum_uint8
mac_mib_get_explicit_trans_bf_csi_feedback_option_implemented(hmac_vap_stru * hmac_vap)4775 mac_mib_get_explicit_trans_bf_csi_feedback_option_implemented(hmac_vap_stru *hmac_vap)
4776 {
4777     return hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4778         .dot11_explicit_transmit_beamforming_csi_feedback_option_implemented;
4779 }
4780 
mac_mib_set_explicit_non_compressed_bf_feedback_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4781 static INLINE__ osal_void mac_mib_set_explicit_non_compressed_bf_feedback_option_implemented(hmac_vap_stru *hmac_vap,
4782     oal_bool_enum_uint8 val)
4783 {
4784     hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4785         .dot11_explicit_non_compressed_beamforming_feedback_option_implemented = val;
4786 }
4787 
4788 static INLINE__ oal_bool_enum_uint8
mac_mib_get_explicit_non_compressed_bf_feedback_option_implemented(hmac_vap_stru * hmac_vap)4789 mac_mib_get_explicit_non_compressed_bf_feedback_option_implemented(hmac_vap_stru *hmac_vap)
4790 {
4791     return hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4792         .dot11_explicit_non_compressed_beamforming_feedback_option_implemented;
4793 }
4794 
mac_mib_set_explicit_compressed_bf_feedback_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4795 static INLINE__ osal_void mac_mib_set_explicit_compressed_bf_feedback_option_implemented(hmac_vap_stru *hmac_vap,
4796     oal_bool_enum_uint8 val)
4797 {
4798     hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4799         .dot11_explicit_compressed_beamforming_feedback_option_implemented = val;
4800 }
4801 
4802 static INLINE__ oal_bool_enum_uint8
mac_mib_get_explicit_compressed_bf_feedback_option_implemented(hmac_vap_stru * hmac_vap)4803 mac_mib_get_explicit_compressed_bf_feedback_option_implemented(hmac_vap_stru *hmac_vap)
4804 {
4805     return hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4806         .dot11_explicit_compressed_beamforming_feedback_option_implemented;
4807 }
4808 
mac_mib_set_num_bf_csi_support_antenna(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4809 static INLINE__ osal_void mac_mib_set_num_bf_csi_support_antenna(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4810 {
4811     hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config.dot11_number_beam_forming_csi_support_antenna = val;
4812 }
4813 
mac_mib_get_num_bf_csi_support_antenna(hmac_vap_stru * hmac_vap)4814 static INLINE__ oal_bool_enum_uint8 mac_mib_get_num_bf_csi_support_antenna(hmac_vap_stru *hmac_vap)
4815 {
4816     return hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config.dot11_number_beam_forming_csi_support_antenna;
4817 }
4818 
mac_mib_set_num_non_compressed_bf_matrix_support_antenna(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4819 static INLINE__ osal_void mac_mib_set_num_non_compressed_bf_matrix_support_antenna(hmac_vap_stru *hmac_vap,
4820     oal_bool_enum_uint8 val)
4821 {
4822     hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4823         .dot11_number_non_compressed_beamforming_matrix_support_antenna = val;
4824 }
4825 
mac_mib_get_num_non_compressed_bf_matrix_support_antenna(hmac_vap_stru * hmac_vap)4826 static INLINE__ oal_bool_enum_uint8 mac_mib_get_num_non_compressed_bf_matrix_support_antenna(hmac_vap_stru *hmac_vap)
4827 {
4828     return hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4829         .dot11_number_non_compressed_beamforming_matrix_support_antenna;
4830 }
4831 
mac_mib_set_num_compressed_bf_matrix_support_antenna(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4832 static INLINE__ osal_void mac_mib_set_num_compressed_bf_matrix_support_antenna(hmac_vap_stru *hmac_vap,
4833     oal_bool_enum_uint8 val)
4834 {
4835     hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4836         .dot11_number_compressed_beamforming_matrix_support_antenna = val;
4837 }
4838 
mac_mib_get_num_compressed_bf_matrix_support_antenna(hmac_vap_stru * hmac_vap)4839 static INLINE__ oal_bool_enum_uint8 mac_mib_get_num_compressed_bf_matrix_support_antenna(hmac_vap_stru *hmac_vap)
4840 {
4841     return hmac_vap->mib_info->wlan_mib_phy_ht.wlan_mib_txbf_config
4842         .dot11_number_compressed_beamforming_matrix_support_antenna;
4843 }
4844 
mac_mib_set_vht_su_bfee_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4845 static INLINE__ osal_void mac_mib_set_vht_su_bfee_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4846 {
4847     hmac_vap->mib_info->wlan_mib_phy_vht.wlan_mib_vht_txbf_config.dot11_vhtsu_beamformee_option_implemented = val;
4848 }
4849 
mac_mib_get_vht_su_bfee_option_implemented(hmac_vap_stru * hmac_vap)4850 static INLINE__ oal_bool_enum_uint8 mac_mib_get_vht_su_bfee_option_implemented(hmac_vap_stru *hmac_vap)
4851 {
4852     return hmac_vap->mib_info->wlan_mib_phy_vht.wlan_mib_vht_txbf_config.dot11_vhtsu_beamformee_option_implemented;
4853 }
4854 
mac_mib_set_vht_su_bfer_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4855 static INLINE__ osal_void mac_mib_set_vht_su_bfer_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4856 {
4857     hmac_vap->mib_info->wlan_mib_phy_vht.wlan_mib_vht_txbf_config.dot11_vhtsu_beamformer_option_implemented = val;
4858 }
4859 
mac_mib_get_vht_su_bfer_option_implemented(const hmac_vap_stru * hmac_vap)4860 static INLINE__ oal_bool_enum_uint8 mac_mib_get_vht_su_bfer_option_implemented(const hmac_vap_stru *hmac_vap)
4861 {
4862     return hmac_vap->mib_info->wlan_mib_phy_vht.wlan_mib_vht_txbf_config.dot11_vhtsu_beamformer_option_implemented;
4863 }
4864 
mac_mib_set_vht_mu_bfee_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4865 static INLINE__ osal_void mac_mib_set_vht_mu_bfee_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4866 {
4867     hmac_vap->mib_info->wlan_mib_phy_vht.wlan_mib_vht_txbf_config.dot11_vhtmu_beamformee_option_implemented = val;
4868 }
4869 
mac_mib_get_vht_mu_bfee_option_implemented(const hmac_vap_stru * hmac_vap)4870 static INLINE__ oal_bool_enum_uint8 mac_mib_get_vht_mu_bfee_option_implemented(const hmac_vap_stru *hmac_vap)
4871 {
4872     return hmac_vap->mib_info->wlan_mib_phy_vht.wlan_mib_vht_txbf_config.dot11_vhtmu_beamformee_option_implemented;
4873 }
4874 
mac_mib_set_vht_mu_bfer_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4875 static INLINE__ osal_void mac_mib_set_vht_mu_bfer_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4876 {
4877     hmac_vap->mib_info->wlan_mib_phy_vht.wlan_mib_vht_txbf_config.dot11_vhtmu_beamformer_option_implemented = val;
4878 }
4879 
mac_mib_get_vht_mu_bfer_option_implemented(hmac_vap_stru * hmac_vap)4880 static INLINE__ oal_bool_enum_uint8 mac_mib_get_vht_mu_bfer_option_implemented(hmac_vap_stru *hmac_vap)
4881 {
4882     return hmac_vap->mib_info->wlan_mib_phy_vht.wlan_mib_vht_txbf_config.dot11_vhtmu_beamformer_option_implemented;
4883 }
4884 
mac_mib_set_vht_num_sounding_dimensions(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4885 static INLINE__ osal_void mac_mib_set_vht_num_sounding_dimensions(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4886 {
4887     hmac_vap->mib_info->wlan_mib_phy_vht.wlan_mib_vht_txbf_config.dot11_vht_number_sounding_dimensions = val;
4888 }
4889 
mac_mib_get_vht_num_sounding_dimensions(hmac_vap_stru * hmac_vap)4890 static INLINE__ oal_bool_enum_uint8 mac_mib_get_vht_num_sounding_dimensions(hmac_vap_stru *hmac_vap)
4891 {
4892     return hmac_vap->mib_info->wlan_mib_phy_vht.wlan_mib_vht_txbf_config.dot11_vht_number_sounding_dimensions;
4893 }
4894 
mac_mib_set_vht_channel_width_option_implemented(hmac_vap_stru * hmac_vap,wlan_mib_vht_supp_width_enum_uint8 val)4895 static INLINE__ osal_void mac_mib_set_vht_channel_width_option_implemented(hmac_vap_stru *hmac_vap,
4896     wlan_mib_vht_supp_width_enum_uint8 val)
4897 {
4898     hmac_vap->mib_info->wlan_mib_phy_vht.dot11_vht_channel_width_option_implemented = val;
4899 }
4900 
4901 static INLINE__ wlan_mib_vht_supp_width_enum_uint8
mac_mib_get_vht_channel_width_option_implemented(hmac_vap_stru * hmac_vap)4902 mac_mib_get_vht_channel_width_option_implemented(hmac_vap_stru *hmac_vap)
4903 {
4904     return hmac_vap->mib_info->wlan_mib_phy_vht.dot11_vht_channel_width_option_implemented;
4905 }
4906 
mac_mib_set_vht_short_gi_option_in80_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4907 static INLINE__ osal_void mac_mib_set_vht_short_gi_option_in80_implemented(hmac_vap_stru *hmac_vap,
4908     oal_bool_enum_uint8 val)
4909 {
4910     hmac_vap->mib_info->wlan_mib_phy_vht.dot11_vht_short_gi_option_in80_implemented = val;
4911 }
4912 
mac_mib_get_vht_short_gi_option_in80_implemented(hmac_vap_stru * hmac_vap)4913 static INLINE__ osal_u8 mac_mib_get_vht_short_gi_option_in80_implemented(hmac_vap_stru *hmac_vap)
4914 {
4915     return hmac_vap->mib_info->wlan_mib_phy_vht.dot11_vht_short_gi_option_in80_implemented;
4916 }
4917 
mac_mib_set_vht_ldpc_coding_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4918 static INLINE__ osal_void mac_mib_set_vht_ldpc_coding_option_implemented(hmac_vap_stru *hmac_vap,
4919     oal_bool_enum_uint8 val)
4920 {
4921     hmac_vap->mib_info->wlan_mib_phy_vht.dot11_vhtldpc_coding_option_implemented = val;
4922 }
4923 
mac_mib_get_vht_ldpc_coding_option_implemented(hmac_vap_stru * hmac_vap)4924 static INLINE__ osal_u8 mac_mib_get_vht_ldpc_coding_option_implemented(hmac_vap_stru *hmac_vap)
4925 {
4926     return hmac_vap->mib_info->wlan_mib_phy_vht.dot11_vhtldpc_coding_option_implemented;
4927 }
4928 
mac_mib_set_vht_tx_stbc_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4929 static INLINE__ osal_void mac_mib_set_vht_tx_stbc_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4930 {
4931     hmac_vap->mib_info->wlan_mib_phy_vht.dot11_vht_tx_stbc_option_implemented = val;
4932 }
4933 
mac_mib_get_vht_tx_stbc_option_implemented(const hmac_vap_stru * hmac_vap)4934 static INLINE__ osal_u8 mac_mib_get_vht_tx_stbc_option_implemented(const hmac_vap_stru *hmac_vap)
4935 {
4936     return hmac_vap->mib_info->wlan_mib_phy_vht.dot11_vht_tx_stbc_option_implemented;
4937 }
4938 
mac_mib_set_vht_rx_stbc_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4939 static INLINE__ osal_void mac_mib_set_vht_rx_stbc_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4940 {
4941     hmac_vap->mib_info->wlan_mib_phy_vht.dot11_vht_rx_stbc_option_implemented = val;
4942 }
4943 
mac_mib_get_vht_rx_stbc_option_implemented(hmac_vap_stru * hmac_vap)4944 static INLINE__ osal_u8 mac_mib_get_vht_rx_stbc_option_implemented(hmac_vap_stru *hmac_vap)
4945 {
4946     return hmac_vap->mib_info->wlan_mib_phy_vht.dot11_vht_rx_stbc_option_implemented;
4947 }
4948 
mac_mib_set_ht_greenfield_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4949 static INLINE__ osal_void mac_mib_set_ht_greenfield_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4950 {
4951     hmac_vap->mib_info->wlan_mib_phy_ht.dot11_ht_greenfield_option_implemented = val;
4952 }
4953 
mac_mib_get_ht_greenfield_option_implemented(hmac_vap_stru * hmac_vap)4954 static INLINE__ osal_u8 mac_mib_get_ht_greenfield_option_implemented(hmac_vap_stru *hmac_vap)
4955 {
4956     return hmac_vap->mib_info->wlan_mib_phy_ht.dot11_ht_greenfield_option_implemented;
4957 }
4958 
mac_mib_set_short_gi_option_in_twenty_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4959 static INLINE__ osal_void mac_mib_set_short_gi_option_in_twenty_implemented(hmac_vap_stru *hmac_vap,
4960     oal_bool_enum_uint8 val)
4961 {
4962     hmac_vap->mib_info->wlan_mib_phy_ht.dot11_short_gi_option_in_twenty_implemented = val;
4963 }
4964 
mac_mib_get_short_gi_option_in_twenty_implemented(hmac_vap_stru * hmac_vap)4965 static INLINE__ osal_u8 mac_mib_get_short_gi_option_in_twenty_implemented(hmac_vap_stru *hmac_vap)
4966 {
4967     return hmac_vap->mib_info->wlan_mib_phy_ht.dot11_short_gi_option_in_twenty_implemented;
4968 }
4969 
mac_mib_set_ldpc_coding_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4970 static INLINE__ osal_void mac_mib_set_ldpc_coding_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4971 {
4972     hmac_vap->mib_info->wlan_mib_phy_ht.dot11_ldpc_coding_option_implemented = val;
4973 }
4974 
mac_mib_get_ldpc_coding_option_implemented(hmac_vap_stru * hmac_vap)4975 static INLINE__ osal_u8 mac_mib_get_ldpc_coding_option_implemented(hmac_vap_stru *hmac_vap)
4976 {
4977     return hmac_vap->mib_info->wlan_mib_phy_ht.dot11_ldpc_coding_option_implemented;
4978 }
4979 
mac_mib_set_LDPCCodingOptionActivated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4980 static INLINE__ void mac_mib_set_LDPCCodingOptionActivated(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4981 {
4982     hmac_vap->mib_info->wlan_mib_phy_ht.dot11_ldpc_coding_option_activated = val;
4983 }
4984 
mac_mib_get_LDPCCodingOptionActivated(hmac_vap_stru * hmac_vap)4985 static INLINE__ osal_u8 mac_mib_get_LDPCCodingOptionActivated(hmac_vap_stru *hmac_vap)
4986 {
4987     return hmac_vap->mib_info->wlan_mib_phy_ht.dot11_ldpc_coding_option_activated;
4988 }
4989 
mac_mib_set_tx_stbc_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)4990 static INLINE__ osal_void mac_mib_set_tx_stbc_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
4991 {
4992     hmac_vap->mib_info->wlan_mib_phy_ht.dot11_tx_stbc_option_implemented = val;
4993 }
4994 
mac_mib_get_tx_stbc_option_implemented(const hmac_vap_stru * hmac_vap)4995 static INLINE__ oal_bool_enum_uint8 mac_mib_get_tx_stbc_option_implemented(const hmac_vap_stru *hmac_vap)
4996 {
4997     return hmac_vap->mib_info->wlan_mib_phy_ht.dot11_tx_stbc_option_implemented;
4998 }
4999 
mac_mib_set_TxSTBCOptionActivated(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)5000 static INLINE__ void mac_mib_set_TxSTBCOptionActivated(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
5001 {
5002     hmac_vap->mib_info->wlan_mib_phy_ht.dot11_tx_stbc_option_activated = val;
5003 }
5004 
mac_mib_get_TxSTBCOptionActivated(hmac_vap_stru * hmac_vap)5005 static INLINE__ oal_bool_enum_uint8 mac_mib_get_TxSTBCOptionActivated(hmac_vap_stru *hmac_vap)
5006 {
5007     return hmac_vap->mib_info->wlan_mib_phy_ht.dot11_tx_stbc_option_activated;
5008 }
5009 
mac_mib_set_rx_stbc_option_implemented(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)5010 static INLINE__ osal_void mac_mib_set_rx_stbc_option_implemented(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
5011 {
5012     hmac_vap->mib_info->wlan_mib_phy_ht.dot11_rx_stbc_option_implemented = val;
5013 }
5014 
mac_mib_get_rx_stbc_option_implemented(hmac_vap_stru * hmac_vap)5015 static INLINE__ osal_u8 mac_mib_get_rx_stbc_option_implemented(hmac_vap_stru *hmac_vap)
5016 {
5017     return hmac_vap->mib_info->wlan_mib_phy_ht.dot11_rx_stbc_option_implemented;
5018 }
5019 
mac_mib_set_highest_supported_data_rate(hmac_vap_stru * hmac_vap,osal_u32 val)5020 static INLINE__ osal_void mac_mib_set_highest_supported_data_rate(hmac_vap_stru *hmac_vap, osal_u32 val)
5021 {
5022     hmac_vap->mib_info->wlan_mib_phy_ht.dot11_highest_supported_data_rate = val;
5023 }
5024 
mac_mib_get_highest_supported_data_rate(hmac_vap_stru * hmac_vap)5025 static INLINE__ osal_u32 mac_mib_get_highest_supported_data_rate(hmac_vap_stru *hmac_vap)
5026 {
5027     return hmac_vap->mib_info->wlan_mib_phy_ht.dot11_highest_supported_data_rate;
5028 }
5029 
mac_mib_set_tx_mcs_set_defined(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)5030 static INLINE__ osal_void mac_mib_set_tx_mcs_set_defined(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
5031 {
5032     hmac_vap->mib_info->wlan_mib_phy_ht.dot11_tx_mcs_set_defined = val;
5033 }
5034 
mac_mib_get_tx_mcs_set_defined(hmac_vap_stru * hmac_vap)5035 static INLINE__ osal_u8 mac_mib_get_tx_mcs_set_defined(hmac_vap_stru *hmac_vap)
5036 {
5037     return hmac_vap->mib_info->wlan_mib_phy_ht.dot11_tx_mcs_set_defined;
5038 }
5039 
mac_mib_set_tx_rx_mcs_set_not_equal(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)5040 static INLINE__ osal_void mac_mib_set_tx_rx_mcs_set_not_equal(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
5041 {
5042     hmac_vap->mib_info->wlan_mib_phy_ht.dot11_tx_rx_mcs_set_not_equal = val;
5043 }
5044 
mac_mib_get_tx_rx_mcs_set_not_equal(hmac_vap_stru * hmac_vap)5045 static INLINE__ osal_u8 mac_mib_get_tx_rx_mcs_set_not_equal(hmac_vap_stru *hmac_vap)
5046 {
5047     return hmac_vap->mib_info->wlan_mib_phy_ht.dot11_tx_rx_mcs_set_not_equal;
5048 }
5049 
mac_mib_set_tx_maximum_num_spatial_streams_supported(hmac_vap_stru * hmac_vap,osal_u32 val)5050 static INLINE__ osal_void mac_mib_set_tx_maximum_num_spatial_streams_supported(hmac_vap_stru *hmac_vap, osal_u32 val)
5051 {
5052     hmac_vap->mib_info->wlan_mib_phy_ht.dot11_tx_maximum_number_spatial_streams_supported = val;
5053 }
5054 
mac_mib_get_tx_maximum_num_spatial_streams_supported(hmac_vap_stru * hmac_vap)5055 static INLINE__ osal_u32 mac_mib_get_tx_maximum_num_spatial_streams_supported(hmac_vap_stru *hmac_vap)
5056 {
5057     return hmac_vap->mib_info->wlan_mib_phy_ht.dot11_tx_maximum_number_spatial_streams_supported;
5058 }
5059 
mac_mib_set_tx_unequal_modulation_supported(hmac_vap_stru * hmac_vap,oal_bool_enum_uint8 val)5060 static INLINE__ osal_void mac_mib_set_tx_unequal_modulation_supported(hmac_vap_stru *hmac_vap, oal_bool_enum_uint8 val)
5061 {
5062     hmac_vap->mib_info->wlan_mib_phy_ht.dot11_tx_unequal_modulation_supported = val;
5063 }
5064 
mac_mib_get_tx_unequal_modulation_supported(hmac_vap_stru * hmac_vap)5065 static INLINE__ osal_u8 mac_mib_get_tx_unequal_modulation_supported(hmac_vap_stru *hmac_vap)
5066 {
5067     return hmac_vap->mib_info->wlan_mib_phy_ht.dot11_tx_unequal_modulation_supported;
5068 }
5069 
mac_mib_set_SupportedMCSTxValue(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u8 val)5070 static INLINE__ void mac_mib_set_SupportedMCSTxValue(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u8 val)
5071 {
5072     hmac_vap->mib_info->supported_mcs.supported_mcstx.dot11_supported_mcs_tx_value[index] = val;
5073 }
5074 
mac_mib_get_SupportedMCSTxValue(hmac_vap_stru * hmac_vap,osal_u8 index)5075 static INLINE__ osal_u8 mac_mib_get_SupportedMCSTxValue(hmac_vap_stru *hmac_vap, osal_u8 index)
5076 {
5077     return hmac_vap->mib_info->supported_mcs.supported_mcstx.dot11_supported_mcs_tx_value[index];
5078 }
5079 
mac_mib_get_SupportedMCSTx(hmac_vap_stru * hmac_vap)5080 static INLINE__ osal_u8 *mac_mib_get_SupportedMCSTx(hmac_vap_stru *hmac_vap)
5081 {
5082     return hmac_vap->mib_info->supported_mcs.supported_mcstx.dot11_supported_mcs_tx_value;
5083 }
5084 
mac_mib_set_supported_mcs_rx_value(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u8 val)5085 static INLINE__ osal_void mac_mib_set_supported_mcs_rx_value(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u8 val)
5086 {
5087     hmac_vap->mib_info->supported_mcs.supported_mcsrx.dot11_supported_mcs_rx_value[index] = val;
5088 }
5089 
mac_mib_get_SupportedMCSRxValue(hmac_vap_stru * hmac_vap,osal_u8 index)5090 static INLINE__ osal_u8 mac_mib_get_SupportedMCSRxValue(hmac_vap_stru *hmac_vap, osal_u8 index)
5091 {
5092     return hmac_vap->mib_info->supported_mcs.supported_mcsrx.dot11_supported_mcs_rx_value[index];
5093 }
5094 
mac_mib_get_supported_mcs_rx_value(hmac_vap_stru * hmac_vap)5095 static INLINE__ osal_u8 *mac_mib_get_supported_mcs_rx_value(hmac_vap_stru *hmac_vap)
5096 {
5097     return hmac_vap->mib_info->supported_mcs.supported_mcsrx.dot11_supported_mcs_rx_value;
5098 }
5099 
5100 
mac_mib_set_edca_table_index(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u32 val)5101 static INLINE__ osal_void mac_mib_set_edca_table_index(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u32 val)
5102 {
5103     hmac_vap->mib_info->wlan_mib_edca.wlan_mib_edca[index].dot11_edca_table_index = (osal_u8)val;
5104 }
5105 
mac_mib_get_edca_table_index(const hmac_vap_stru * hmac_vap,osal_u8 index)5106 static INLINE__ osal_u32 mac_mib_get_edca_table_index(const hmac_vap_stru *hmac_vap, osal_u8 index)
5107 {
5108     return hmac_vap->mib_info->wlan_mib_edca.wlan_mib_edca[index].dot11_edca_table_index;
5109 }
5110 
mac_mib_set_edca_table_cwmin(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u32 val)5111 static INLINE__ osal_void mac_mib_set_edca_table_cwmin(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u32 val)
5112 {
5113     hmac_vap->mib_info->wlan_mib_edca.wlan_mib_edca[index].dot11_edca_table_c_wmin = (osal_u8)val;
5114 }
5115 
mac_mib_get_edca_table_cwmin(const hmac_vap_stru * hmac_vap,osal_u8 index)5116 static INLINE__ osal_u32 mac_mib_get_edca_table_cwmin(const hmac_vap_stru *hmac_vap, osal_u8 index)
5117 {
5118     return hmac_vap->mib_info->wlan_mib_edca.wlan_mib_edca[index].dot11_edca_table_c_wmin;
5119 }
5120 
mac_mib_set_edca_table_cwmax(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u32 val)5121 static INLINE__ osal_void mac_mib_set_edca_table_cwmax(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u32 val)
5122 {
5123     hmac_vap->mib_info->wlan_mib_edca.wlan_mib_edca[index].dot11_edca_table_c_wmax = (osal_u8)val;
5124 }
5125 
mac_mib_get_edca_table_cwmax(const hmac_vap_stru * hmac_vap,osal_u8 index)5126 static INLINE__ osal_u32 mac_mib_get_edca_table_cwmax(const hmac_vap_stru *hmac_vap, osal_u8 index)
5127 {
5128     return hmac_vap->mib_info->wlan_mib_edca.wlan_mib_edca[index].dot11_edca_table_c_wmax;
5129 }
5130 
mac_mib_set_edca_table_aifsn(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u32 val)5131 static INLINE__ osal_void mac_mib_set_edca_table_aifsn(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u32 val)
5132 {
5133     hmac_vap->mib_info->wlan_mib_edca.wlan_mib_edca[index].dot11_edca_table_aifsn = (osal_u8)val;
5134 }
5135 
mac_mib_get_edca_table_aifsn(const hmac_vap_stru * hmac_vap,osal_u8 index)5136 static INLINE__ osal_u32 mac_mib_get_edca_table_aifsn(const hmac_vap_stru *hmac_vap, osal_u8 index)
5137 {
5138     return hmac_vap->mib_info->wlan_mib_edca.wlan_mib_edca[index].dot11_edca_table_aifsn;
5139 }
5140 
mac_mib_set_edca_table_txop_limit(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u32 val)5141 static INLINE__ osal_void mac_mib_set_edca_table_txop_limit(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u32 val)
5142 {
5143     hmac_vap->mib_info->wlan_mib_edca.wlan_mib_edca[index].dot11_edca_table_txop_limit = (osal_u16)val;
5144 }
5145 
mac_mib_get_edca_table_txop_limit(const hmac_vap_stru * hmac_vap,osal_u8 index)5146 static INLINE__ osal_u32 mac_mib_get_edca_table_txop_limit(const hmac_vap_stru *hmac_vap, osal_u8 index)
5147 {
5148     return hmac_vap->mib_info->wlan_mib_edca.wlan_mib_edca[index].dot11_edca_table_txop_limit;
5149 }
5150 
mac_mib_set_edca_table_mandatory(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u8 val)5151 static INLINE__ osal_void mac_mib_set_edca_table_mandatory(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u8 val)
5152 {
5153     hmac_vap->mib_info->wlan_mib_edca.wlan_mib_edca[index].dot11_edca_table_mandatory = val;
5154 }
5155 
mac_mib_get_edca_table_mandatory(const hmac_vap_stru * hmac_vap,osal_u8 index)5156 static INLINE__ osal_u8 mac_mib_get_edca_table_mandatory(const hmac_vap_stru *hmac_vap, osal_u8 index)
5157 {
5158     return hmac_vap->mib_info->wlan_mib_edca.wlan_mib_edca[index].dot11_edca_table_mandatory;
5159 }
5160 
mac_mib_set_qap_edca_table_cwmin(const hmac_vap_stru * hmac_vap,osal_u8 index,osal_u32 val)5161 static INLINE__ osal_void mac_mib_set_qap_edca_table_cwmin(const hmac_vap_stru *hmac_vap, osal_u8 index, osal_u32 val)
5162 {
5163     hmac_vap->mib_info->wlan_mib_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_c_wmin = (osal_u8)val;
5164 }
5165 
mac_mib_get_qap_edca_table_cwmin(const hmac_vap_stru * hmac_vap,osal_u8 index)5166 static INLINE__ osal_u32 mac_mib_get_qap_edca_table_cwmin(const hmac_vap_stru *hmac_vap, osal_u8 index)
5167 {
5168     return hmac_vap->mib_info->wlan_mib_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_c_wmin;
5169 }
5170 
mac_mib_set_qap_edca_table_cwmax(const hmac_vap_stru * hmac_vap,osal_u8 index,osal_u32 val)5171 static INLINE__ osal_void mac_mib_set_qap_edca_table_cwmax(const hmac_vap_stru *hmac_vap, osal_u8 index, osal_u32 val)
5172 {
5173     hmac_vap->mib_info->wlan_mib_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_c_wmax = (osal_u8)val;
5174 }
5175 
mac_mib_get_qap_edca_table_cwmax(const hmac_vap_stru * hmac_vap,osal_u8 index)5176 static INLINE__ osal_u32 mac_mib_get_qap_edca_table_cwmax(const hmac_vap_stru *hmac_vap, osal_u8 index)
5177 {
5178     return hmac_vap->mib_info->wlan_mib_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_c_wmax;
5179 }
5180 
mac_mib_set_qap_edca_table_aifsn(const hmac_vap_stru * hmac_vap,osal_u8 index,osal_u32 val)5181 static INLINE__ osal_void mac_mib_set_qap_edca_table_aifsn(const hmac_vap_stru *hmac_vap, osal_u8 index, osal_u32 val)
5182 {
5183     hmac_vap->mib_info->wlan_mib_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_aifsn = (osal_u8)val;
5184 }
5185 
mac_mib_get_qap_edca_table_aifsn(const hmac_vap_stru * hmac_vap,osal_u8 index)5186 static INLINE__ osal_u32 mac_mib_get_qap_edca_table_aifsn(const hmac_vap_stru *hmac_vap, osal_u8 index)
5187 {
5188     return hmac_vap->mib_info->wlan_mib_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_aifsn;
5189 }
5190 
mac_mib_set_qap_edca_table_txop_limit(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u32 val)5191 static INLINE__ osal_void mac_mib_set_qap_edca_table_txop_limit(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u32 val)
5192 {
5193     hmac_vap->mib_info->wlan_mib_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_txop_limit = (osal_u16)val;
5194 }
5195 
mac_mib_get_qap_edca_table_txop_limit(const hmac_vap_stru * hmac_vap,osal_u8 index)5196 static INLINE__ osal_u32 mac_mib_get_qap_edca_table_txop_limit(const hmac_vap_stru *hmac_vap, osal_u8 index)
5197 {
5198     return hmac_vap->mib_info->wlan_mib_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_txop_limit;
5199 }
5200 
5201 #ifdef _PRE_WLAN_FEATURE_11AX
mac_mib_set_txop_duration_rts_threshold(const hmac_vap_stru * hmac_vap,osal_u32 val)5202 static INLINE__ osal_void mac_mib_set_txop_duration_rts_threshold(const hmac_vap_stru *hmac_vap, osal_u32 val)
5203 {
5204     hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_txop_duration_rts_threshold = val;
5205 }
5206 
mac_mib_get_txop_duration_rts_threshold(hmac_vap_stru * hmac_vap)5207 static INLINE__ osal_u32 mac_mib_get_txop_duration_rts_threshold(hmac_vap_stru *hmac_vap)
5208 {
5209     return hmac_vap->mib_info->wlan_mib_he_sta_config.dot11_txop_duration_rts_threshold;
5210 }
5211 #endif /* #ifdef _PRE_WLAN_FEATURE_11AX */
5212 
mac_mib_set_qap_edca_table_mandatory(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u8 val)5213 static INLINE__ osal_void mac_mib_set_qap_edca_table_mandatory(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u8 val)
5214 {
5215     hmac_vap->mib_info->wlan_mib_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_mandatory = val;
5216 }
5217 
mac_mib_get_qap_edca_table_mandatory(hmac_vap_stru * hmac_vap,osal_u8 index)5218 static INLINE__ osal_u8 mac_mib_get_qap_edca_table_mandatory(hmac_vap_stru *hmac_vap, osal_u8 index)
5219 {
5220     return hmac_vap->mib_info->wlan_mib_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_mandatory;
5221 }
5222 
mac_mib_set_QAPEDCATableMSDULifetime(hmac_vap_stru * hmac_vap,osal_u8 index,osal_u32 val)5223 static INLINE__ void mac_mib_set_QAPEDCATableMSDULifetime(hmac_vap_stru *hmac_vap, osal_u8 index, osal_u32 val)
5224 {
5225     hmac_vap->mib_info->wlan_mib_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_msdu_lifetime = (osal_u16)val;
5226 }
5227 
mac_mib_get_QAPEDCATableMSDULifetime(hmac_vap_stru * hmac_vap,osal_u8 index)5228 static INLINE__ osal_u32 mac_mib_get_QAPEDCATableMSDULifetime(hmac_vap_stru *hmac_vap, osal_u8 index)
5229 {
5230     return hmac_vap->mib_info->wlan_mib_edca.wlan_mib_qap_edac[index].dot11_qapedca_table_msdu_lifetime;
5231 }
5232 
5233 #ifdef _PRE_WLAN_FEATURE_WUR_TX
5234 /* ****************************************************************************
5235  功能描述  : 设置MIB项 dot11WUROptionImplemented 的值
5236 **************************************************************************** */
mac_mib_set_dot11WUROptionImplemented(hmac_vap_stru * hmac_vap,osal_u8 val)5237 static INLINE__ osal_void mac_mib_set_dot11WUROptionImplemented(hmac_vap_stru *hmac_vap, osal_u8 val)
5238 {
5239     hmac_vap->mib_info->wlan_mib_sta_config.dot11_wur_option_implemented = val;
5240 }
5241 
5242 /* ****************************************************************************
5243  功能描述  : 获取MIB项 dot11WUROptionImplemented 的值
5244 **************************************************************************** */
mac_mib_get_dot11WUROptionImplemented(const hmac_vap_stru * hmac_vap)5245 static INLINE__ osal_u8 mac_mib_get_dot11WUROptionImplemented(const hmac_vap_stru *hmac_vap)
5246 {
5247     return hmac_vap->mib_info->wlan_mib_sta_config.dot11_wur_option_implemented;
5248 }
5249 #endif
5250 
5251 /* ****************************************************************************
5252  函 数 名  : mac_fcs_get_protect_type
5253  功能描述  : 根据VAP模式获取保护帧类型
5254 
5255 **************************************************************************** */
mac_fcs_get_protect_type(const hmac_vap_stru * hmac_vap)5256 static INLINE__ hal_fcs_protect_type_enum_uint8 mac_fcs_get_protect_type(const hmac_vap_stru *hmac_vap)
5257 {
5258     hal_fcs_protect_type_enum_uint8 protect_type;
5259 
5260     if (hmac_vap->vap_mode == WLAN_VAP_MODE_BSS_AP) {
5261         protect_type = HAL_FCS_PROTECT_TYPE_SELF_CTS;
5262     } else if (hmac_vap->vap_mode == WLAN_VAP_MODE_BSS_STA) {
5263         protect_type = HAL_FCS_PROTECT_TYPE_NULL_DATA;
5264     } else {
5265         protect_type = HAL_FCS_PROTECT_TYPE_NONE;
5266     }
5267 
5268 #ifdef _PRE_WLAN_FEATURE_P2P
5269     if (hmac_vap->p2p_mode == WLAN_P2P_GO_MODE) {
5270         protect_type = HAL_FCS_PROTECT_TYPE_NONE;
5271     }
5272 #endif
5273 
5274     return protect_type;
5275 }
5276 
mac_fcs_get_protect_cnt(const hmac_vap_stru * hmac_vap)5277 static INLINE__ osal_u8 mac_fcs_get_protect_cnt(const hmac_vap_stru *hmac_vap)
5278 {
5279     if (hmac_vap->vap_mode == WLAN_VAP_MODE_BSS_AP) {
5280         return HAL_FCS_PROTECT_CNT_1;
5281     }
5282 
5283     /* sta模式主要靠硬件超时来完成one pkt发送,次数可以尽量往高配置,btcoex普通音乐下需要配置更长时间 */
5284     return HAL_FCS_PROTECT_CNT_20;
5285 }
5286 
5287 /* ****************************************************************************
5288     函数声明
5289 **************************************************************************** */
5290 mac_wme_param_stru *hmac_get_wmm_cfg_etc(wlan_vap_mode_enum_uint8 vap_mode);
5291 void hmac_vap_init_rates_etc(hmac_vap_stru *hmac_vap);
5292 osal_u8 hmac_vap_set_bw_check(hmac_vap_stru *hmac_vap, wlan_channel_bandwidth_enum_uint8 sta_new_bandwidth);
5293 osal_u32 hmac_mib_get_bss_type_etc(hmac_vap_stru *hmac_vap, osal_u8 *len, osal_u8 *param);
5294 osal_u32 hmac_mib_set_bss_type_etc(hmac_vap_stru *hmac_vap, osal_u8 len, const osal_u8 *param);
5295 osal_u32 hmac_mib_set_ssid_etc(hmac_vap_stru *hmac_vap, osal_u8 len, osal_u8 *param);
5296 osal_u32 hmac_mib_get_ssid_etc(hmac_vap_stru *hmac_vap, osal_u8 *len, osal_u8 *param);
5297 osal_u32 hmac_mib_get_dtim_period_etc(hmac_vap_stru *hmac_vap, osal_u8 *len, osal_u8 *param);
5298 osal_u32 hmac_mib_set_dtim_period_etc(hmac_vap_stru *hmac_vap, osal_u8 len, const osal_u8 *param);
5299 osal_u32 hmac_mib_get_shpreamble_etc(hmac_vap_stru *hmac_vap, osal_u8 *len, osal_u8 *param);
5300 osal_u32 hmac_mib_set_shpreamble_etc(hmac_vap_stru *hmac_vap, osal_u8 len, const osal_u8 *param);
5301 osal_u32 hmac_vap_find_user_by_macaddr_etc(hmac_vap_stru *hmac_vap, const osal_u8 *sta_mac_addr,
5302     osal_u16 *user_idx);
5303 osal_u32 hmac_chip_find_user_by_macaddr(osal_u8 chip_id, osal_u8 *sta_mac_addr, osal_u16 *user_idx);
5304 osal_u8 hmac_vap_get_ap_usr_opern_bandwidth(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user);
5305 osal_u8 hmac_vap_get_bandwith(hmac_vap_stru *hmac_vap, wlan_channel_bandwidth_enum_uint8 bss_cap);
5306 void hmac_vap_set_tx_power_etc(hmac_vap_stru *hmac_vap, osal_u8 tx_power);
5307 void hmac_vap_set_assoc_id_etc(hmac_vap_stru *hmac_vap, osal_u16 assoc_vap_id);
5308 void hmac_vap_set_aid_etc(hmac_vap_stru *hmac_vap, osal_u16 aid);
5309 void hmac_vap_set_multi_user_idx_etc(hmac_vap_stru *hmac_vap, osal_u16 multi_user_idx);
5310 void hmac_vap_set_rx_nss_etc(hmac_vap_stru *hmac_vap, wlan_nss_enum_uint8 rx_nss);
5311 void hmac_vap_set_wmm_params_update_count_etc(hmac_vap_stru *hmac_vap, osal_u8 update_count);
5312 void hmac_vap_set_peer_obss_scan_etc(hmac_vap_stru *hmac_vap, osal_u8 value);
5313 void hmac_vap_set_hide_ssid_etc(hmac_vap_stru *hmac_vap, osal_u8 value);
5314 osal_u8 hmac_vap_get_peer_obss_scan_etc(const hmac_vap_stru *hmac_vap);
5315 osal_u32 hmac_vap_save_app_ie_etc(hmac_vap_stru *hmac_vap, oal_app_ie_stru *app_ie, app_ie_type_uint8 type);
5316 osal_void hmac_vap_clear_app_ie_etc(hmac_vap_stru *hmac_vap, app_ie_type_uint8 type);
5317 void hmac_vap_cap_init_legacy(hmac_vap_stru *hmac_vap);
5318 osal_u32 hmac_vap_cap_init_htvht(hmac_vap_stru *hmac_vap);
5319 osal_u32 hmac_vap_config_vht_ht_mib_by_protocol_etc(hmac_vap_stru *hmac_vap);
5320 void hmac_vap_init_rx_nss_by_protocol_etc(hmac_vap_stru *hmac_vap);
5321 wlan_bw_cap_enum_uint8 hmac_vap_bw_mode_to_bw(wlan_channel_bandwidth_enum_uint8 mode);
5322 void hmac_vap_state_change_etc(hmac_vap_stru *hmac_vap, mac_vap_state_enum_uint8 vap_state);
5323 void hmac_vap_get_bandwidth_cap_etc(const hmac_vap_stru *hmac_vap, wlan_bw_cap_enum_uint8 *cap);
5324 wlan_prot_mode_enum_uint8 mac_vap_get_user_protection_mode_etc(const hmac_vap_stru *mac_vap_sta,
5325     const hmac_user_stru *hmac_user);
5326 oal_bool_enum mac_protection_lsigtxop_check_etc(const hmac_vap_stru *hmac_vap, const hmac_user_stru *hmac_user);
5327 osal_void mac_protection_set_lsig_txop_mechanism_etc(hmac_vap_stru *hmac_vap, osal_u8 flag);
5328 osal_u32 hmac_vap_add_wep_key(hmac_vap_stru *hmac_vap, osal_u8 key_idx, osal_u8 key_len, osal_u8 *key);
5329 osal_u32 hmac_vap_init_privacy_etc(hmac_vap_stru *hmac_vap, mac_conn_security_stru *conn_sec);
5330 hmac_user_stru *hmac_vap_get_user_by_addr_etc(hmac_vap_stru *hmac_vap, const osal_u8 *mac_addr, size_t mac_len);
5331 osal_u32 hmac_vap_set_security(hmac_vap_stru *hmac_vap, mac_beacon_param_stru *beacon_param);
5332 osal_u32 hmac_vap_add_key_etc(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user, osal_u8 key_id,
5333     mac_key_params_stru *key);
5334 void hmac_vap_init_user_security_port_etc(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user);
5335 void hmac_device_set_vap_id_etc(hmac_device_stru *hmac_device, hmac_vap_stru *hmac_vap, osal_u8 vap_idx,
5336     const hmac_cfg_add_vap_param_stru *vap_param, osal_u8 is_add_vap);
5337 osal_u32 hmac_device_calc_up_vap_num_etc(hmac_device_stru *hmac_device);
5338 osal_u32 hmac_device_find_2up_vap_etc(hmac_device_stru *hmac_device, hmac_vap_stru **hmac_up_vap1,
5339     hmac_vap_stru **hmac_up_vap2);
5340 #ifdef _PRE_WLAN_FEATURE_SMPS
5341 extern osal_u32 hmac_device_find_smps_mode_en(hmac_device_stru *hmac_device,
5342     wlan_mib_mimo_power_save_enum_uint8 smps_mode);
5343 #endif
5344 void hmac_device_set_channel_etc(hmac_device_stru *hmac_device, mac_cfg_channel_param_stru *channel_param);
5345 void hmac_device_get_channel_etc(hmac_device_stru *hmac_device, mac_cfg_channel_param_stru *channel_param);
5346 extern osal_u32 mac_mib_set_station_id_etc(hmac_vap_stru *hmac_vap, osal_u8 len, osal_u8 *param);
5347 extern osal_u32 mac_vap_init_etc(hmac_vap_stru *hmac_vap, osal_u8 chip_id, osal_u8 device_id, osal_u8 vap_id,
5348     hmac_cfg_add_vap_param_stru *param);
5349 extern void mac_sta_init_bss_rates_etc(hmac_vap_stru *hmac_vap, mac_bss_dscr_stru *bss_dscr);
5350 extern osal_u32 hmac_vap_exit_etc(hmac_vap_stru *hmac_vap, hmac_device_stru *hmac_device);
5351 extern osal_u32 hmac_vap_del_user_etc(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user);
5352 extern osal_u32 hmac_vap_add_assoc_user_etc(hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user);
5353 
5354 extern osal_u32 mac_vap_set_bssid_etc(hmac_vap_stru *hmac_vap, osal_u8 *bssid);
5355 extern osal_u32 mac_vap_set_current_channel_etc(hmac_vap_stru *hmac_vap, wlan_channel_band_enum_uint8 band,
5356     osal_u8 channel);
5357 extern osal_u32 hmac_vap_init_wme_param_etc(hmac_vap_stru *hmac_vap);
5358 extern osal_u32 hmac_vap_init_by_protocol_etc(hmac_vap_stru *hmac_vap, wlan_protocol_enum_uint8 protocol);
5359 #ifdef _PRE_WIFI_DEBUG
5360 extern oal_bool_enum_uint8 mac_vap_check_bss_cap_info_phy_ap_etc(osal_u16 cap_info, hmac_vap_stru *hmac_vap);
5361 #endif
5362 extern void hmac_vap_change_mib_by_bandwidth_etc(hmac_vap_stru *hmac_vap, wlan_channel_band_enum_uint8 band,
5363     wlan_channel_bandwidth_enum_uint8 bandwidth);
5364 extern void hmac_vap_set_uapsd_cap_etc(hmac_vap_stru *hmac_vap, osal_u8 uapsd_cap);
5365 extern osal_u32 mac_dump_protection_etc(hmac_vap_stru *hmac_vap);
5366 osal_void mac_mib_set_wep_etc(hmac_vap_stru *hmac_vap, osal_u8 key_id, osal_u8 key_value);
5367 extern osal_u32 mac_device_find_up_vap_etc(hmac_device_stru *hmac_device, hmac_vap_stru **hmac_vap);
5368 extern osal_u32 mac_device_find_up_ap_etc(hmac_device_stru *hmac_device, hmac_vap_stru **hmac_vap);
5369 #ifdef _PRE_WLAN_FEATURE_P2P
5370 extern osal_u32 mac_device_find_up_p2p_go_etc(hmac_device_stru *hmac_device, hmac_vap_stru **phmac_vap);
5371 #endif
5372 extern osal_u32 mac_device_is_p2p_connected_etc(hmac_device_stru *hmac_device);
5373 
5374 extern void mac_blacklist_free_pointer(hmac_vap_stru *hmac_vap, mac_blacklist_info_stru *blacklist_info);
5375 extern mac_tcp_ack_buf_switch_stru *mac_get_pst_tcp_ack_buf_switch(osal_void);
5376 extern mac_small_amsdu_switch_stru *mac_get_pst_small_amsdu_switch(osal_void);
5377 extern mac_rx_buffer_size_stru *mac_get_pst_rx_buffer_size_stru(osal_void);
5378 osal_void mac_vap_init_rates_by_protocol_etc(hmac_vap_stru *hmac_vap, wlan_protocol_enum_uint8 vap_protocol,
5379     mac_data_rate_stru *rates);
5380 osal_u8 *mac_vap_get_uapsd_cap(osal_void);
5381 osal_u32 hmac_vap_check_ap_usr_opern_bandwidth(const hmac_vap_stru *mac_sta, const hmac_user_stru *hmac_user);
5382 osal_u8 hmac_vap_get_default_key_id_etc(const hmac_vap_stru *hmac_vap);
5383 osal_u8 *hmac_vap_get_mac_addr_etc(const hmac_vap_stru *hmac_vap);
5384 osal_u8 hmac_vap_protection_autoprot_is_enabled_etc(const hmac_vap_stru *hmac_vap);
5385 
5386 hmac_vap_stru *mac_device_find_another_up_vap_etc(const hmac_device_stru *hmac_device, osal_u8 vap_id_self);
5387 osal_u32 mac_device_find_up_sta_etc(const hmac_device_stru *hmac_device, hmac_vap_stru **hmac_vap);
5388 hmac_vap_stru *mac_find_up_legacy_sta_vap(osal_void);
5389 
5390 
5391 #ifdef __cplusplus
5392 #if __cplusplus
5393 }
5394 #endif
5395 #endif
5396 
5397 #endif
5398