From: Viktor Barna <viktor.barna@xxxxxxxxxx> (Part of the split. Please, take a look at the cover letter for more details). Signed-off-by: Viktor Barna <viktor.barna@xxxxxxxxxx> --- drivers/net/wireless/celeno/cl8k/power.h | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 drivers/net/wireless/celeno/cl8k/power.h diff --git a/drivers/net/wireless/celeno/cl8k/power.h b/drivers/net/wireless/celeno/cl8k/power.h new file mode 100644 index 000000000000..3dc12d618c7c --- /dev/null +++ b/drivers/net/wireless/celeno/cl8k/power.h @@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: MIT */ +/* Copyright(c) 2019-2021, Celeno Communications Ltd. */ + +#ifndef CL_POWER_H +#define CL_POWER_H + +#include "hw.h" + +#define POWER_MAX_DB 30 +#define POWER_MIN_DB -10 + +#define POWER_MIN_DB_Q1 (POWER_MIN_DB << 1) +#define POWER_MIN_DB_Q8 (POWER_MIN_DB << 8) + +#define POWER_OFFSET_RES 4 + +#define POWER_OFFSET_MAX_Q2 (16 << 2) /* +16dB * 4 */ +#define POWER_OFFSET_MIN_Q2 (-16 << 2) /* -16dB * 4 */ + +u8 cl_power_tx_ant(struct cl_hw *cl_hw, enum cl_wrs_mode mode); +s32 cl_power_antenna_gain_q8(struct cl_hw *cl_hw); +s32 cl_power_antenna_gain_q1(struct cl_hw *cl_hw); +s32 cl_power_array_gain_q8(struct cl_hw *cl_hw, u8 tx_ant); +s8 cl_power_array_gain_q2(struct cl_hw *cl_hw, u8 tx_ant); +s32 cl_power_array_gain_q1(struct cl_hw *cl_hw, u8 tx_ant); +s32 cl_power_bf_gain_q1(struct cl_hw *cl_hw, u8 tx_ant, u8 nss); +s32 cl_power_min_ant_q1(struct cl_hw *cl_hw); +s8 cl_power_bw_factor_q2(struct cl_hw *cl_hw, u8 bw); +s32 cl_power_average_calib_q1(struct cl_hw *cl_hw, u8 ant_num); +s32 cl_power_total_q1(struct cl_hw *cl_hw, s8 pwr_offset_q1, u8 tx_ant, u8 nss, + enum cl_wrs_mode mode, bool is_auto_resp); +s8 cl_power_offset_q1(struct cl_hw *cl_hw, u8 mode, u8 bw, u8 mcs); +s8 cl_power_offset_check_margin(struct cl_hw *cl_hw, u8 bw, u8 ant_idx, s8 offset_q2); +void cl_power_tables_update(struct cl_hw *cl_hw, struct cl_pwr_tables *pwr_tables); +s32 cl_power_get_max(struct cl_hw *cl_hw); + +#endif /* CL_POWER_H */ -- 2.30.0 ________________________________ The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any retransmission, dissemination, copying or other use of, or taking of any action in reliance upon this information is prohibited. If you received this in error, please contact the sender and delete the material from any computer. Nothing contained herein shall be deemed as a representation, warranty or a commitment by Celeno. No warranties are expressed or implied, including, but not limited to, any implied warranties of non-infringement, merchantability and fitness for a particular purpose. ________________________________