linux/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
 *
 * Contact Information: wlanfae <[email protected]>
 */
#include "rtl_core.h"
#include "rtl_dm.h"
#include "r8192E_hw.h"
#include "r8192E_phy.h"
#include "r8192E_phyreg.h"
#include "r8190P_rtl8256.h"
#include "r8192E_cmdpkt.h"

/*---------------------------Define Local Constant---------------------------*/
static u32 edca_setting_DL[HT_IOT_PEER_MAX] =;

static u32 edca_setting_DL_GMode[HT_IOT_PEER_MAX] =;

static u32 edca_setting_UL[HT_IOT_PEER_MAX] =;

const u32 dm_tx_bb_gain[TX_BB_GAIN_TABLE_LEN] =;

const u8 dm_cck_tx_bb_gain[CCK_TX_BB_GAIN_TABLE_LEN][8] =;

const u8 dm_cck_tx_bb_gain_ch14[CCK_TX_BB_GAIN_TABLE_LEN][8] =;

/*---------------------------Define Local Constant---------------------------*/


/*------------------------Define global variable-----------------------------*/
struct dig_t dm_digtable;

static struct drx_path_sel dm_rx_path_sel_table;
/*------------------------Define global variable-----------------------------*/


/*------------------------Define local variable------------------------------*/
/*------------------------Define local variable------------------------------*/



/*---------------------Define local function prototype-----------------------*/
static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev);

static void _rtl92e_dm_init_bandwidth_autoswitch(struct net_device *dev);
static	void	_rtl92e_dm_bandwidth_autoswitch(struct net_device *dev);

static	void	_rtl92e_dm_check_tx_power_tracking(struct net_device *dev);

static void _rtl92e_dm_dig_init(struct net_device *dev);
static void _rtl92e_dm_ctrl_initgain_byrssi(struct net_device *dev);
static void _rtl92e_dm_initial_gain(struct net_device *dev);
static void _rtl92e_dm_pd_th(struct net_device *dev);
static void _rtl92e_dm_cs_ratio(struct net_device *dev);

static	void _rtl92e_dm_init_cts_to_self(struct net_device *dev);

static void _rtl92e_dm_check_edca_turbo(struct net_device *dev);
static void _rtl92e_dm_check_rx_path_selection(struct net_device *dev);
static void _rtl92e_dm_init_rx_path_selection(struct net_device *dev);
static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev);

static void _rtl92e_dm_init_fsync(struct net_device *dev);
static void _rtl92e_dm_deinit_fsync(struct net_device *dev);

static	void _rtl92e_dm_check_txrateandretrycount(struct net_device *dev);
static void _rtl92e_dm_check_fsync(struct net_device *dev);
static void _rtl92e_dm_check_rf_ctrl_gpio(void *data);
static void _rtl92e_dm_fsync_timer_callback(struct timer_list *t);

/*---------------------Define local function prototype-----------------------*/

static	void	_rtl92e_dm_init_dynamic_tx_power(struct net_device *dev);
static void _rtl92e_dm_dynamic_tx_power(struct net_device *dev);

static void _rtl92e_dm_send_rssi_to_fw(struct net_device *dev);
static void _rtl92e_dm_cts_to_self(struct net_device *dev);
/*---------------------------Define function prototype------------------------*/

void rtl92e_dm_init(struct net_device *dev)
{}

void rtl92e_dm_deinit(struct net_device *dev)
{}

void rtl92e_dm_watchdog(struct net_device *dev)
{}

void rtl92e_init_adaptive_rate(struct net_device *dev)
{}

static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev)
{}

static void _rtl92e_dm_init_bandwidth_autoswitch(struct net_device *dev)
{}

static void _rtl92e_dm_bandwidth_autoswitch(struct net_device *dev)
{}

static u32 OFDMSwingTable[OFDM_TABLE_LEN] =;

static u8	CCKSwingTable_Ch1_Ch13[CCK_TABLE_LEN][8] =;

static u8	CCKSwingTable_Ch14[CCK_TABLE_LEN][8] =;

#define Pw_Track_Flag
#define Tssi_Mea_Value
#define Tssi_Report_Value1
#define Tssi_Report_Value2
#define FW_Busy_Flag

static void _rtl92e_dm_tx_update_tssi_weak_signal(struct net_device *dev)
{}

static void _rtl92e_dm_tx_update_tssi_strong_signal(struct net_device *dev)
{}

static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev)
{}

static void _rtl92e_dm_tx_power_tracking_cb_thermal(struct net_device *dev)
{}

void rtl92e_dm_txpower_tracking_wq(void *data)
{}

static void _rtl92e_dm_initialize_tx_power_tracking_tssi(struct net_device *dev)
{}

static void _rtl92e_dm_init_tx_power_tracking_thermal(struct net_device *dev)
{}

void rtl92e_dm_init_txpower_tracking(struct net_device *dev)
{}

static void _rtl92e_dm_check_tx_power_tracking_tssi(struct net_device *dev)
{}

static void _rtl92e_dm_check_tx_power_tracking_thermal(struct net_device *dev)
{}

static void _rtl92e_dm_check_tx_power_tracking(struct net_device *dev)
{}

static void _rtl92e_dm_cck_tx_power_adjust_tssi(struct net_device *dev,
						bool bInCH14)
{}

static void _rtl92e_dm_cck_tx_power_adjust_thermal_meter(struct net_device *dev,
							 bool bInCH14)
{}

void rtl92e_dm_cck_txpower_adjust(struct net_device *dev, bool binch14)
{}

static void _rtl92e_dm_dig_init(struct net_device *dev)
{}

/*-----------------------------------------------------------------------------
 * Function:	dm_CtrlInitGainBeforeConnectByRssiAndFalseAlarm()
 *
 * Overview:	Driver monitor RSSI and False Alarm to change initial gain.
			Only change initial gain during link in progress.
 *
 * Input:		IN	PADAPTER	pAdapter
 *
 * Output:		NONE
 *
 * Return:		NONE
 *
 * Revised History:
 *	When		Who		Remark
 *	03/04/2009	hpfan	Create Version 0.
 *
 ******************************************************************************/

static void _rtl92e_dm_ctrl_initgain_byrssi(struct net_device *dev)
{}

static void _rtl92e_dm_initial_gain(struct net_device *dev)
{}

static void _rtl92e_dm_pd_th(struct net_device *dev)
{}

static void _rtl92e_dm_cs_ratio(struct net_device *dev)
{}

void rtl92e_dm_init_edca_turbo(struct net_device *dev)
{}

static void _rtl92e_dm_check_edca_turbo(struct net_device *dev)
{}

static void _rtl92e_dm_init_cts_to_self(struct net_device *dev)
{}

static void _rtl92e_dm_cts_to_self(struct net_device *dev)
{}

static void _rtl92e_dm_check_rf_ctrl_gpio(void *data)
{}

void rtl92e_dm_rf_pathcheck_wq(void *data)
{}

static void _rtl92e_dm_init_rx_path_selection(struct net_device *dev)
{}

#define PWDB_IN_RANGE

static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev)
{}

static void _rtl92e_dm_check_rx_path_selection(struct net_device *dev)
{}

static void _rtl92e_dm_init_fsync(struct net_device *dev)
{}

static void _rtl92e_dm_deinit_fsync(struct net_device *dev)
{}

static void _rtl92e_dm_fsync_timer_callback(struct timer_list *t)
{}

static void _rtl92e_dm_start_hw_fsync(struct net_device *dev)
{}

static void _rtl92e_dm_end_hw_fsync(struct net_device *dev)
{}

static void _rtl92e_dm_end_sw_fsync(struct net_device *dev)
{}

static void _rtl92e_dm_start_sw_fsync(struct net_device *dev)
{}

static void _rtl92e_dm_check_fsync(struct net_device *dev)
{}

/*---------------------------Define function prototype------------------------*/
static void _rtl92e_dm_init_dynamic_tx_power(struct net_device *dev)
{}

static void _rtl92e_dm_dynamic_tx_power(struct net_device *dev)
{}

static void _rtl92e_dm_check_txrateandretrycount(struct net_device *dev)
{}

static void _rtl92e_dm_send_rssi_to_fw(struct net_device *dev)
{}