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: hmac_mfg 15 * Create: 2023-05-20 16 */ 17 18 #ifndef HMAC_MFG_H 19 #define HMAC_MFG_H 20 21 /***************************************************************************** 22 1 其他头文件包含 23 *****************************************************************************/ 24 #include "hmac_vap.h" 25 #include "wlan_types.h" 26 #include "hmac_feature_interface.h" 27 #include "hal_mfg.h" 28 29 #ifdef __cplusplus 30 #if __cplusplus 31 extern "C" { 32 #endif 33 #endif 34 35 #define WLAN_CFG_MAX_PARAM_NUM 10 /* 产测保存数据最大长度 */ 36 37 #define WLAN_CFG_MIN_RSSI_OFFSET (-16) /* rssi偏移最小值 */ 38 #define WLAN_CFG_MAX_RSSI_OFFSET 15 /* rssi偏移最大值 */ 39 #define WLAN_CFG_MIN_CHANNEL_NUM 1 40 #define WLAN_CFG_MAX_CHANNEL_NUM 14 41 42 #define WLAN_CFG_ONE_CURVE_FACTOR_NUM 3 /* 单条曲线放大系数个数 */ 43 #define WLAN_CFG_CURVE_FACTOR_NUM 6 /* 放大系数个数 */ 44 #define WLAN_CFG_POWER_PARAM_NUM 9 /* 功率偏移值个数 */ 45 #define WLAN_CFG_MAX_POWER_PARAM_NUM 9 /* 曲线系数个数 */ 46 #define WLAN_CFG_TES_POWER_NUM 2 /* 设置目标功率个数 */ 47 #define WLAN_CFG_MAX_TAR_POWER 230 /* 设置目标功率最大值 */ 48 #define WLAN_CFG_MIN_TAR_POWER 100 /* 设置目标功率最小值 */ 49 #define WLAN_CFG_MAX_CALI_POWER 300 /* 设置实际功率最大值 */ 50 #define WLAN_CFG_MIN_CALI_POWER 0 /* 设置实际功率最小值 */ 51 #define WLAN_CFG_CURVE_FACTOR_MIN 0 /* 放大系数最小值 */ 52 #define WLAN_CFG_CURVE_FACTOR_MAX 31 /* 放大系数最大值 */ 53 #define WLAN_CFG_CONSTANT_OFFSET_MIN (-32758) /* 系数c的偏移值最小值 */ 54 #define WLAN_CFG_CONSTANT_OFFSET_MAX 32767 /* 系数c的偏移值最大值 */ 55 #define WLAN_CFG_CONSTANT_OFFSET_HIGH_GAIN 0 /* 设置高功率段系数c的偏移值 */ 56 #define WLAN_CFG_CONSTANT_OFFSET_LOW_GAIN 1 /* 设置低功率段系数c的偏移值 */ 57 58 #define WLAN_CFG_TEMPER_MIN_LEVEL (-40) /* 最低温度温度 */ 59 #define WLAN_CFG_TEMPER_MAX_LEVEL 120 /* 最高温度 */ 60 #define WLAN_CFG_CONSTANT_OFFSET_NUM 3 61 62 #define SIZE_8_BITS 8 63 #define TEST_PARAM_NUM 3 64 65 typedef enum { 66 MAC_CURVE_FACTOR_DEFAULT, 67 MAC_HIGH_CURVE_FACTOR, 68 MAC_LOW_CURVE_FACTOR, 69 MAC_CURVE_FACTOR_BUTT 70 } mfg_power_curve_factor; 71 72 typedef struct { 73 osal_s32 param[WLAN_CFG_MAX_PARAM_NUM]; 74 osal_s32 output_param[WLAN_CFG_MAX_PARAM_NUM]; 75 osal_u32 output_param_num; 76 } mfg_param_stru; 77 78 /***************************************************************************** 79 2 函数声明 80 *****************************************************************************/ 81 82 static osal_u32 hmac_mfg_init_weakref(osal_void) __attribute__ ((weakref("hmac_mfg_init"), used)); 83 static osal_void hmac_mfg_deinit_weakref(osal_void) __attribute__ ((weakref("hmac_mfg_deinit"), used)); 84 #ifdef __cplusplus 85 #if __cplusplus 86 } 87 #endif 88 #endif 89 90 #endif /* end of hmac_mfg.h */ 91