blob: b03c9569fc806128ebcc4df2033e27b4f62fd132 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001/**
2 ******************************************************************************
3 *
4 * @file rwnx_main.h
5 *
6 * Copyright (C) RivieraWaves 2012-2019
7 *
8 ******************************************************************************
9 */
10
11#ifndef _RWNX_MAIN_H_
12#define _RWNX_MAIN_H_
13
14#include "rwnx_defs.h"
15
16int rwnx_cfg80211_init(struct rwnx_plat *rwnx_plat, void **platform_data);
17void rwnx_cfg80211_deinit(struct rwnx_hw *rwnx_hw);
18extern int testmode;
19extern u8 chip_sub_id;
20extern u8 chip_mcu_id;
21extern u8 chip_id;
22#ifdef CONFIG_DYNAMIC_PWR
23#define RSSI_GET_INTERVAL (10 * 1000) //time interval
24#define RSSI_THD_0 (-30) //rssi 0 (dBm)
25#define RSSI_THD_1 (-60) //rssi 1 (dBm)
26#define RSSI_THD_2 (-75) //rssi 2 (dBm)
27
28#define PWR_LOSS_LVL0 (-10) //RSSI > RSSI_THD_0
29#define PWR_LOSS_LVL1 (-5 ) //RSSI_THD_1 < RSSI <RSSI_THD_0
30#define PWR_LOSS_LVL2 (0) //RSSI_THD_2 < RSSI <RSSI_THD_1
31#define PWR_LOSS_LVL3 (2) //RSSI <RSSI_THD_2
32void set_txpwrloss_ctrl(struct rwnx_hw *rwnx_hw, s8 value);
33
34void aicwf_pwrloss_worker(struct work_struct *work);
35
36#endif
37
38
39#endif /* _RWNX_MAIN_H_ */