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_psd 15 * Author: 16 * Create: 2022-08-15 17 */ 18 19 #ifndef __HMAC_PSD_H__ 20 #define __HMAC_PSD_H__ 21 22 /***************************************************************************** 23 1 其他头文件包含 24 *****************************************************************************/ 25 #include "oal_ext_if.h" 26 #include "hmac_ext_if.h" 27 28 #ifdef __cplusplus 29 #if __cplusplus 30 extern "C" { 31 #endif 32 #endif 33 34 #undef THIS_FILE_ID 35 #define THIS_FILE_ID OAM_FILE_ID_HMAC_PSD_H 36 37 #define DIAG_CMD_ID_PSD_ENABLE 0x71D0 38 #define DIAG_CMD_ID_PSD_REPORT 0x71D1 39 #define PSD_DATA_LEN 256 40 #define PSD_DEV_NAME "wlan0" 41 #define PSD_CENTER_CHAN 7 /* psd 中心信道固定7 */ 42 43 #ifndef _PRE_WLAN_FEATURE_WS73 44 #define DIAG_OPTION diag_option_t 45 #else 46 #define DIAG_OPTION diag_option 47 #endif 48 /* HSO PSD消息 */ 49 typedef struct { 50 osal_bool enable; 51 osal_u8 channel; 52 osal_u8 band; 53 osal_u32 cycle; 54 osal_u16 duration; 55 } hmac_psd_enable_stru; 56 57 typedef struct { 58 frw_timeout_stru psd_timer; 59 osal_u32 sampling_count; /* 当前采样次数 */ 60 osal_u32 max_sampling_count; /* 最大采样次数 */ 61 } hmac_psd_enable_timer; 62 63 osal_s32 hmac_config_psd_enable(hmac_vap_stru *hmac_vap, frw_msg *msg); 64 osal_s32 hmac_config_psd_data_report(hmac_vap_stru *hmac_vap, frw_msg *msg); 65 typedef osal_u8 (*hmac_psd_get_switch_cb)(void); 66 67 static osal_u32 hmac_psd_init_weakref(osal_void) __attribute__ ((weakref("hmac_psd_init"), used)); 68 static osal_void hmac_psd_deinit_weakref(osal_void) __attribute__ ((weakref("hmac_psd_deinit"), used)); 69 70 #ifdef __cplusplus 71 #if __cplusplus 72 } 73 #endif 74 #endif 75 76 #endif /* end of hmac_psd.h */ 77