linux/drivers/net/wireless/realtek/rtlwifi/rtl8192du/phy.c

// SPDX-License-Identifier: GPL-2.0
/* Copyright(c) 2024  Realtek Corporation.*/

#include "../wifi.h"
#include "../ps.h"
#include "../core.h"
#include "../efuse.h"
#include "../usb.h"
#include "../rtl8192d/reg.h"
#include "../rtl8192d/def.h"
#include "../rtl8192d/phy_common.h"
#include "../rtl8192d/rf_common.h"
#include "phy.h"
#include "rf.h"
#include "table.h"

#define MAX_RF_IMR_INDEX
#define MAX_RF_IMR_INDEX_NORMAL
#define RF_REG_NUM_FOR_C_CUT_5G
#define RF_REG_NUM_FOR_C_CUT_5G_INTERNALPA
#define RF_REG_NUM_FOR_C_CUT_2G
#define RF_CHNL_NUM_5G
#define RF_CHNL_NUM_5G_40M
#define CV_CURVE_CNT

static const u32 rf_reg_for_5g_swchnl_normal[MAX_RF_IMR_INDEX_NORMAL] =;

static const u8 rf_reg_for_c_cut_5g[RF_REG_NUM_FOR_C_CUT_5G] =;

static const u8 rf_reg_for_c_cut_2g[RF_REG_NUM_FOR_C_CUT_2G] =;

static const u8 rf_for_c_cut_5g_internal_pa[RF_REG_NUM_FOR_C_CUT_5G_INTERNALPA] =;

static const u32 rf_reg_mask_for_c_cut_2g[RF_REG_NUM_FOR_C_CUT_2G] =;

static const u8 rf_chnl_5g[RF_CHNL_NUM_5G] =;

static const u8 rf_chnl_5g_40m[RF_CHNL_NUM_5G_40M] =;

static const u32 rf_reg_pram_c_5g[5][RF_REG_NUM_FOR_C_CUT_5G] =;

static const u32 rf_reg_param_for_c_cut_2g[3][RF_REG_NUM_FOR_C_CUT_2G] =;

static const u32 rf_syn_g4_for_c_cut_2g =;

static const u32 rf_pram_c_5g_int_pa[3][RF_REG_NUM_FOR_C_CUT_5G_INTERNALPA] =;

/* [patha+b][reg] */
static const u32 rf_imr_param_normal[3][MAX_RF_IMR_INDEX_NORMAL] =;

static const u32 targetchnl_5g[TARGET_CHNL_NUM_5G] =;

/* channel 1~14 */
static const u32 targetchnl_2g[TARGET_CHNL_NUM_2G] =;

u32 rtl92du_phy_query_bb_reg(struct ieee80211_hw *hw, u32 regaddr, u32 bitmask)
{}

void rtl92du_phy_set_bb_reg(struct ieee80211_hw *hw,
			    u32 regaddr, u32 bitmask, u32 data)
{}

/* To avoid miswrite Reg0x800 for 92D */
static void rtl92du_phy_set_bb_reg_1byte(struct ieee80211_hw *hw,
					 u32 regaddr, u32 bitmask, u32 data)
{}

bool rtl92du_phy_mac_config(struct ieee80211_hw *hw)
{}

static bool _rtl92du_phy_config_bb(struct ieee80211_hw *hw, u8 configtype)
{}

static bool _rtl92du_phy_config_bb_pg(struct ieee80211_hw *hw, u8 configtype)
{}

static bool _rtl92du_phy_bb_config(struct ieee80211_hw *hw)
{}

bool rtl92du_phy_bb_config(struct ieee80211_hw *hw)
{}

bool rtl92du_phy_rf_config(struct ieee80211_hw *hw)
{}

bool rtl92du_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
					   enum rf_content content,
					   enum radio_path rfpath)
{}

void rtl92du_phy_set_bw_mode(struct ieee80211_hw *hw,
			     enum nl80211_channel_type ch_type)
{}

static void _rtl92du_phy_stop_trx_before_changeband(struct ieee80211_hw *hw)
{}

static void rtl92du_phy_switch_wirelessband(struct ieee80211_hw *hw, u8 band)
{}

static void _rtl92du_phy_reload_imr_setting(struct ieee80211_hw *hw,
					    u8 channel, u8 rfpath)
{}

static void _rtl92du_phy_switch_rf_setting(struct ieee80211_hw *hw, u8 channel)
{}

/* bit0 = 1 => Tx OK, bit1 = 1 => Rx OK */
static u8 _rtl92du_phy_patha_iqk(struct ieee80211_hw *hw, bool configpathb)
{}

/* bit0 = 1 => Tx OK, bit1 = 1 => Rx OK */
static u8 _rtl92du_phy_patha_iqk_5g_normal(struct ieee80211_hw *hw,
					   bool configpathb)
{}

/* bit0 = 1 => Tx OK, bit1 = 1 => Rx OK */
static u8 _rtl92du_phy_pathb_iqk(struct ieee80211_hw *hw)
{}

/* bit0 = 1 => Tx OK, bit1 = 1 => Rx OK */
static u8 _rtl92du_phy_pathb_iqk_5g_normal(struct ieee80211_hw *hw)
{}

static void _rtl92du_phy_reload_adda_registers(struct ieee80211_hw *hw,
					       const u32 *adda_reg,
					       u32 *adda_backup, u32 regnum)
{}

static void _rtl92du_phy_reload_mac_registers(struct ieee80211_hw *hw,
					      const u32 *macreg, u32 *macbackup)
{}

static void _rtl92du_phy_patha_standby(struct ieee80211_hw *hw)
{}

static void _rtl92du_phy_pimode_switch(struct ieee80211_hw *hw, bool pi_mode)
{}

static void _rtl92du_phy_iq_calibrate(struct ieee80211_hw *hw, long result[][8],
				      u8 t, bool is2t)
{}

static void _rtl92du_phy_iq_calibrate_5g_normal(struct ieee80211_hw *hw,
						long result[][8], u8 t)
{}

static bool _rtl92du_phy_simularity_compare(struct ieee80211_hw *hw,
					    long result[][8], u8 c1, u8 c2)
{}

static void _rtl92du_phy_patha_fill_iqk_matrix_5g_normal(struct ieee80211_hw *hw,
							 bool iqk_ok,
							 long result[][8],
							 u8 final_candidate,
							 bool txonly)
{}

static void _rtl92du_phy_patha_fill_iqk_matrix(struct ieee80211_hw *hw,
					       bool iqk_ok, long result[][8],
					       u8 final_candidate, bool txonly)
{}

static void _rtl92du_phy_pathb_fill_iqk_matrix_5g_normal(struct ieee80211_hw *hw,
							 bool iqk_ok,
							 long result[][8],
							 u8 final_candidate,
							 bool txonly)
{}

static void _rtl92du_phy_pathb_fill_iqk_matrix(struct ieee80211_hw *hw,
					       bool iqk_ok, long result[][8],
					       u8 final_candidate, bool txonly)
{}

void rtl92du_phy_iq_calibrate(struct ieee80211_hw *hw)
{}

void rtl92du_phy_reload_iqk_setting(struct ieee80211_hw *hw, u8 channel)
{}

static void _rtl92du_phy_reload_lck_setting(struct ieee80211_hw *hw, u8 channel)
{}

static void _rtl92du_phy_lc_calibrate_sw(struct ieee80211_hw *hw, bool is2t)
{}

void rtl92du_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t)
{}

void rtl92du_phy_ap_calibrate(struct ieee80211_hw *hw, s8 delta)
{}

u8 rtl92du_phy_sw_chnl(struct ieee80211_hw *hw)
{}

static void _rtl92du_phy_set_rfon(struct ieee80211_hw *hw)
{}

static void _rtl92du_phy_set_rfsleep(struct ieee80211_hw *hw)
{}

bool rtl92du_phy_set_rf_power_state(struct ieee80211_hw *hw,
				    enum rf_pwrstate rfpwr_state)
{}

void rtl92du_phy_set_poweron(struct ieee80211_hw *hw)
{}

void rtl92du_update_bbrf_configuration(struct ieee80211_hw *hw)
{}

bool rtl92du_phy_check_poweroff(struct ieee80211_hw *hw)
{}

void rtl92du_phy_init_pa_bias(struct ieee80211_hw *hw)
{}