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

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

#include "../wifi.h"
#include "../pci.h"
#include "../ps.h"
#include "reg.h"
#include "def.h"
#include "phy.h"
#include "rf.h"
#include "dm.h"
#include "table.h"

static u32 _rtl88e_phy_rf_serial_read(struct ieee80211_hw *hw,
				      enum radio_path rfpath, u32 offset);
static void _rtl88e_phy_rf_serial_write(struct ieee80211_hw *hw,
					enum radio_path rfpath, u32 offset,
					u32 data);
static bool _rtl88e_phy_bb8188e_config_parafile(struct ieee80211_hw *hw);
static bool _rtl88e_phy_config_mac_with_headerfile(struct ieee80211_hw *hw);
static bool phy_config_bb_with_headerfile(struct ieee80211_hw *hw,
					  u8 configtype);
static bool phy_config_bb_with_pghdr(struct ieee80211_hw *hw,
				     u8 configtype);
static void _rtl88e_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw);
static bool _rtl88e_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable,
					     u32 cmdtableidx, u32 cmdtablesz,
					     enum swchnlcmd_id cmdid, u32 para1,
					     u32 para2, u32 msdelay);
static bool _rtl88e_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw,
					     u8 channel, u8 *stage, u8 *step,
					     u32 *delay);

static long _rtl88e_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
					 enum wireless_mode wirelessmode,
					 u8 txpwridx);
static void rtl88ee_phy_set_rf_on(struct ieee80211_hw *hw);
static void rtl88e_phy_set_io(struct ieee80211_hw *hw);

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

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

u32 rtl88e_phy_query_rf_reg(struct ieee80211_hw *hw,
			    enum radio_path rfpath, u32 regaddr, u32 bitmask)
{}

void rtl88e_phy_set_rf_reg(struct ieee80211_hw *hw,
			   enum radio_path rfpath,
			   u32 regaddr, u32 bitmask, u32 data)
{}

static u32 _rtl88e_phy_rf_serial_read(struct ieee80211_hw *hw,
				      enum radio_path rfpath, u32 offset)
{}

static void _rtl88e_phy_rf_serial_write(struct ieee80211_hw *hw,
					enum radio_path rfpath, u32 offset,
					u32 data)
{}

bool rtl88e_phy_mac_config(struct ieee80211_hw *hw)
{}

bool rtl88e_phy_bb_config(struct ieee80211_hw *hw)
{}

bool rtl88e_phy_rf_config(struct ieee80211_hw *hw)
{}

static bool _rtl88e_check_condition(struct ieee80211_hw *hw,
				    const u32  condition)
{}

static void _rtl8188e_config_rf_reg(struct ieee80211_hw *hw, u32 addr,
				    u32 data, enum radio_path rfpath,
				    u32 regaddr)
{}

static void _rtl8188e_config_rf_radio_a(struct ieee80211_hw *hw,
					u32 addr, u32 data)
{}

static void _rtl8188e_config_bb_reg(struct ieee80211_hw *hw,
				    u32 addr, u32 data)
{}

static bool _rtl88e_phy_bb8188e_config_parafile(struct ieee80211_hw *hw)
{}

static bool _rtl88e_phy_config_mac_with_headerfile(struct ieee80211_hw *hw)
{}

#define READ_NEXT_PAIR(v1, v2, i)

static void handle_branch1(struct ieee80211_hw *hw, u16 arraylen,
			   u32 *array_table)
{}

static void handle_branch2(struct ieee80211_hw *hw, u16 arraylen,
			   u32 *array_table)
{}

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

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

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

#define READ_NEXT_RF_PAIR(v1, v2, i)

static void process_path_a(struct ieee80211_hw *hw,
			   u16  radioa_arraylen,
			   u32 *radioa_array_table)
{}

bool rtl88e_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
					  enum radio_path rfpath)
{}

void rtl88e_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw)
{}

static void _rtl88e_phy_init_bb_rf_register_definition(struct ieee80211_hw *hw)
{}

void rtl88e_phy_get_txpower_level(struct ieee80211_hw *hw, long *powerlevel)
{}

static void handle_path_a(struct rtl_efuse *rtlefuse, u8 index,
			  u8 *cckpowerlevel, u8 *ofdmpowerlevel,
			  u8 *bw20powerlevel, u8 *bw40powerlevel)
{}

static void _rtl88e_get_txpower_index(struct ieee80211_hw *hw, u8 channel,
				      u8 *cckpowerlevel, u8 *ofdmpowerlevel,
				      u8 *bw20powerlevel, u8 *bw40powerlevel)
{}

static void _rtl88e_ccxpower_index_check(struct ieee80211_hw *hw,
					 u8 channel, u8 *cckpowerlevel,
					 u8 *ofdmpowerlevel, u8 *bw20powerlevel,
					 u8 *bw40powerlevel)
{}

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

static long _rtl88e_phy_txpwr_idx_to_dbm(struct ieee80211_hw *hw,
					 enum wireless_mode wirelessmode,
					 u8 txpwridx)
{}

void rtl88e_phy_scan_operation_backup(struct ieee80211_hw *hw, u8 operation)
{}

void rtl88e_phy_set_bw_mode_callback(struct ieee80211_hw *hw)
{}

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

void rtl88e_phy_sw_chnl_callback(struct ieee80211_hw *hw)
{}

u8 rtl88e_phy_sw_chnl(struct ieee80211_hw *hw)
{}

static bool _rtl88e_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw,
					     u8 channel, u8 *stage, u8 *step,
					     u32 *delay)
{}

static bool _rtl88e_phy_set_sw_chnl_cmdarray(struct swchnlcmd *cmdtable,
					     u32 cmdtableidx, u32 cmdtablesz,
					     enum swchnlcmd_id cmdid,
					     u32 para1, u32 para2, u32 msdelay)
{}

static u8 _rtl88e_phy_path_a_iqk(struct ieee80211_hw *hw, bool config_pathb)
{}

static u8 _rtl88e_phy_path_b_iqk(struct ieee80211_hw *hw)
{}

static u8 _rtl88e_phy_path_a_rx_iqk(struct ieee80211_hw *hw, bool config_pathb)
{}

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

static void _rtl88e_phy_save_adda_registers(struct ieee80211_hw *hw,
					    u32 *addareg, u32 *addabackup,
					    u32 registernum)
{}

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

static void _rtl88e_phy_reload_adda_registers(struct ieee80211_hw *hw,
					      u32 *addareg, u32 *addabackup,
					      u32 regiesternum)
{}

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

static void _rtl88e_phy_path_adda_on(struct ieee80211_hw *hw,
				     u32 *addareg, bool is_patha_on, bool is2t)
{}

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

static void _rtl88e_phy_path_a_standby(struct ieee80211_hw *hw)
{}

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

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

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

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

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

#undef IQK_ADDA_REG_NUM
#undef IQK_DELAY_TIME

void rtl88e_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery)
{}

void rtl88e_phy_lc_calibrate(struct ieee80211_hw *hw)
{}

void rtl88e_phy_set_rfpath_switch(struct ieee80211_hw *hw, bool bmain)
{}

bool rtl88e_phy_set_io_cmd(struct ieee80211_hw *hw, enum io_type iotype)
{}

static void rtl88e_phy_set_io(struct ieee80211_hw *hw)
{}

static void rtl88ee_phy_set_rf_on(struct ieee80211_hw *hw)
{}

static void _rtl88ee_phy_set_rf_sleep(struct ieee80211_hw *hw)
{}

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

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