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: netbuf enum type head file.
15 * Create: 2022-11-26
16 */
17
18 #ifndef MAC_USER_COMMON_H
19 #define MAC_USER_COMMON_H
20
21 #include "mac_user_common_rom.h"
22 #include "wlan_util_common_rom.h"
23
24 #ifdef __cplusplus
25 #if __cplusplus
26 extern "C" {
27 #endif
28 #endif
29
30 #define MAC_INVALID_RA_LUT_IDX WLAN_ACTIVE_USER_MAX_NUM /* 不可用的RA LUT IDX */
31
32 /*****************************************************************************
33 函 数 名 : mac_user_get_ra_lut_index
34 功能描述 : 获取用户对应的ra lut index
35
36 *****************************************************************************/
mac_user_get_ra_lut_index(osal_u8 * index_table,osal_u16 start,osal_u16 stop)37 static inline osal_u8 mac_user_get_ra_lut_index(osal_u8 *index_table, osal_u16 start, osal_u16 stop)
38 {
39 return oal_get_lut_index(index_table, WLAN_ACTIVE_USER_IDX_BMAP_LEN, MAC_INVALID_RA_LUT_IDX, start, stop);
40 }
41 /*****************************************************************************
42 函 数 名 : mac_user_del_ra_lut_index
43 功能描述 : 删除用户对应的ra lut index
44
45 *****************************************************************************/
mac_user_del_ra_lut_index(osal_u8 * index_table,osal_u8 ra_lut_index)46 static inline osal_void mac_user_del_ra_lut_index(osal_u8 *index_table, osal_u8 ra_lut_index)
47 {
48 oal_del_lut_index(index_table, ra_lut_index);
49 }
50 #ifdef __cplusplus
51 #if __cplusplus
52 }
53 #endif
54 #endif
55
56 #endif /* end of mac_user_common.h */