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

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

#include "../wifi.h"
#include "../pci.h"
#include "../ps.h"
#include "reg.h"
#include "def.h"
#include "phy.h"
#include "../rtl8723com/phy_common.h"
#include "rf.h"
#include "dm.h"
#include "../rtl8723com/dm_common.h"
#include "table.h"
#include "trx.h"
#include <linux/kernel.h>

static bool _rtl8723be_phy_bb8723b_config_parafile(struct ieee80211_hw *hw);
static bool _rtl8723be_phy_config_mac_with_headerfile(struct ieee80211_hw *hw);
static bool _rtl8723be_phy_config_bb_with_headerfile(struct ieee80211_hw *hw,
						     u8 configtype);
static bool _rtl8723be_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw,
						       u8 configtype);
static bool _rtl8723be_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw,
						u8 channel, u8 *stage,
						u8 *step, u32 *delay);

static void rtl8723be_phy_set_rf_on(struct ieee80211_hw *hw);
static void rtl8723be_phy_set_io(struct ieee80211_hw *hw);

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

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

bool rtl8723be_phy_mac_config(struct ieee80211_hw *hw)
{}

bool rtl8723be_phy_bb_config(struct ieee80211_hw *hw)
{}

bool rtl8723be_phy_rf_config(struct ieee80211_hw *hw)
{}

static bool _rtl8723be_check_positive(struct ieee80211_hw *hw,
				      const u32 condition1,
				      const u32 condition2)
{}

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

static void _rtl8723be_phy_init_tx_power_by_rate(struct ieee80211_hw *hw)
{}

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

static void _rtl8723be_phy_set_txpower_by_rate_base(struct ieee80211_hw *hw,
						    u8 band,
						    u8 path, u8 rate_section,
						    u8 txnum, u8 value)
{}

static u8 _rtl8723be_phy_get_txpower_by_rate_base(struct ieee80211_hw *hw,
						  u8 band, u8 path, u8 txnum,
						  u8 rate_section)
{}

static void _rtl8723be_phy_store_txpower_by_rate_base(struct ieee80211_hw *hw)
{}

static void _phy_convert_txpower_dbm_to_relative_value(u32 *data, u8 start,
						u8 end, u8 base_val)
{}

static void _rtl8723be_phy_convert_txpower_dbm_to_relative_value(
							struct ieee80211_hw *hw)
{}

static void phy_txpower_by_rate_config(struct ieee80211_hw *hw)
{}

static bool _rtl8723be_phy_bb8723b_config_parafile(struct ieee80211_hw *hw)
{}

static bool rtl8723be_phy_config_with_headerfile(struct ieee80211_hw *hw,
						 u32 *array_table,
						 u16 arraylen,
		void (*set_reg)(struct ieee80211_hw *hw, u32 regaddr, u32 data))
{}

static bool _rtl8723be_phy_config_mac_with_headerfile(struct ieee80211_hw *hw)
{}

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

static u8 _rtl8723be_get_rate_section_index(u32 regaddr)
{}

static void _rtl8723be_store_tx_power_by_rate(struct ieee80211_hw *hw,
					      u32 band, u32 rfpath,
					      u32 txnum, u32 regaddr,
					      u32 bitmask, u32 data)
{}

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

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

void rtl8723be_phy_get_hw_reg_originalvalue(struct ieee80211_hw *hw)
{}

static u8 _rtl8723be_phy_get_ratesection_intxpower_byrate(enum radio_path path,
							  u8 rate)
{}

static u8 _rtl8723be_get_txpower_by_rate(struct ieee80211_hw *hw,
					 enum band_type band,
					 enum radio_path rfpath, u8 rate)
{}

static u8 _rtl8723be_get_txpower_index(struct ieee80211_hw *hw, u8 path,
				       u8 rate, u8 bandwidth, u8 channel)
{}

static void _rtl8723be_phy_set_txpower_index(struct ieee80211_hw *hw,
					     u8 power_index, u8 path, u8 rate)
{}

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

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

void rtl8723be_phy_set_bw_mode_callback(struct ieee80211_hw *hw)
{}

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

void rtl8723be_phy_sw_chnl_callback(struct ieee80211_hw *hw)
{}

u8 rtl8723be_phy_sw_chnl(struct ieee80211_hw *hw)
{}

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

static u8 _rtl8723be_phy_path_a_iqk(struct ieee80211_hw *hw)
{}

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

static u8 _rtl8723be_phy_path_b_iqk(struct ieee80211_hw *hw)
{}

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

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

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

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

static u8 _get_right_chnl_place_for_iqk(u8 chnl)
{}

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

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

#undef IQK_ADDA_REG_NUM
#undef IQK_DELAY_TIME
/* IQK is merge from Merge Temp */
void rtl8723be_phy_iq_calibrate(struct ieee80211_hw *hw, bool b_recovery)
{}

void rtl8723be_phy_lc_calibrate(struct ieee80211_hw *hw)
{}

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

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

static void rtl8723be_phy_set_io(struct ieee80211_hw *hw)
{}

static void rtl8723be_phy_set_rf_on(struct ieee80211_hw *hw)
{}

static void _rtl8723be_phy_set_rf_sleep(struct ieee80211_hw *hw)
{}

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

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