/******************************************************************************
 *
 * Copyright(c) 2007 - 2017 Realtek Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 *****************************************************************************/


#ifndef	__HALDMOUTSRC_H__
#define __HALDMOUTSRC_H__

/*============================================================*/
/*include files*/
/*============================================================*/
#include "phydm_pre_define.h"
#include "phydm_dig.h"
#include "phydm_pathdiv.h"
#include "phydm_antdiv.h"
#include "phydm_antdect.h"
#include "phydm_dynamicbbpowersaving.h"
#include "phydm_rainfo.h"
#include "phydm_dynamictxpower.h"
#include "phydm_cfotracking.h"
#include "phydm_acs.h"
#include "phydm_adaptivity.h"
#include "phydm_dfs.h"
#include "phydm_ccx.h"
#include "txbf/phydm_hal_txbf_api.h"

#include "phydm_adc_sampling.h"
#include "phydm_dynamic_rx_path.h"
#include "phydm_psd.h"
#include "halrf/halrf_iqk.h"
#include "halrf/halrf.h"


#if (DM_ODM_SUPPORT_TYPE & (ODM_CE | ODM_WIN))
	#include "phydm_beamforming.h"
#endif

#if (DM_ODM_SUPPORT_TYPE & (ODM_AP))
	#include "halrf/halphyrf_ap.h"
#endif

#if (DM_ODM_SUPPORT_TYPE & (ODM_CE))
	#include "phydm_noisemonitor.h"
	#include "halrf/halphyrf_ce.h"
#endif

#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN))
	#include "halrf/halphyrf_win.h"
	#include "phydm_noisemonitor.h"
#endif

extern const u16 phy_rate_table[28];

/*============================================================*/
/*Definition */
/*============================================================*/

/* Traffic load decision */
#define	TRAFFIC_ULTRA_LOW	1
#define	TRAFFIC_LOW			2
#define	TRAFFIC_MID			3
#define	TRAFFIC_HIGH			4

#define	NONE			0

/*NBI API------------------------------------*/
#define	NBI_ENABLE 1
#define	NBI_DISABLE 2

#define	NBI_TABLE_SIZE_128	27
#define	NBI_TABLE_SIZE_256	59

#define	NUM_START_CH_80M	7
#define	NUM_START_CH_40M	14

#define	CH_OFFSET_40M		2
#define	CH_OFFSET_80M		6

/*CSI MASK API------------------------------------*/
#define	CSI_MASK_ENABLE 1
#define	CSI_MASK_DISABLE 2

/*------------------------------------------------*/

#define	FFT_128_TYPE	1
#define	FFT_256_TYPE	2

#define	SET_SUCCESS	1
#define	SET_ERROR		2
#define	SET_NO_NEED	3

#define	FREQ_POSITIVE	1
#define	FREQ_NEGATIVE	2


#if (DM_ODM_SUPPORT_TYPE == ODM_AP)
	#define PHYDM_WATCH_DOG_PERIOD	1
#else
	#define PHYDM_WATCH_DOG_PERIOD	2
#endif

/*============================================================*/
/*structure and define*/
/*============================================================*/

struct _dynamic_primary_cca {
	u8	pri_cca_flag;
	u8	intf_flag;
	u8	intf_type;
	u8	dup_rts_flag;
	u8	monitor_flag;
	u8	ch_offset;
	u8	mf_state;
};

#define		dm_type_by_fw			0
#define		dm_type_by_driver		1

/*Declare for common info*/

#define IQK_THRESHOLD			8
#define DPK_THRESHOLD			4


#if (DM_ODM_SUPPORT_TYPE &  (ODM_AP))
__PACK struct _odm_phy_status_info_ {
	u8		rx_pwdb_all;
	u8		signal_quality;					/* in 0-100 index. */
	u8		rx_mimo_signal_strength[4];		/* in 0~100 index */
	u8		rx_mimo_evm_dbm[4];			/* per-path's original EVM (dbm) */
	s8		rx_mimo_signal_quality[4];		/* EVM */
	s8		rx_snr[4];					/* per-path's SNR */
#if (ODM_PHY_STATUS_NEW_TYPE_SUPPORT == 1)
	u8		rx_count:2;					/* RX path counter---*/
	u8		band_width:2;
	u8		rxsc:4;						/* sub-channel---*/
#else
	u8		band_width;
#endif
#if (ODM_PHY_STATUS_NEW_TYPE_SUPPORT == 1)
	u8		channel;						/* channel number---*/
	boolean	is_mu_packet;				/* is MU packet or not---*/
	boolean	is_beamformed;				/* BF packet---*/
#endif
};

struct _odm_phy_status_info_append_ {
	u8		MAC_CRC32;

};

#else

struct _odm_phy_status_info_ {
	/*  */
	/* Be care, if you want to add any element please both add at outer_driver & phydm */

	/*	WIN in _RT_RFD_STATUS*/
#if (DM_ODM_SUPPORT_TYPE &  (ODM_WIN))
	u32		rx_pwdb_all; /*in new Phy-status IC, represent the max PWDB among all path*/
#else
	u8		rx_pwdb_all;
#endif
	u8		signal_quality;				/* in 0-100 index. */
	s8		rx_mimo_signal_quality[4];	/* per-path's EVM translate to 0~100% */
	u8		rx_mimo_evm_dbm[4];		/* per-path's original EVM (dbm) */
	u8		rx_mimo_signal_strength[4];	/* RSSI in 0~100 index */
	s16		cfo_short[4];				/* per-path's cfo_short */
	s16		cfo_tail[4];					/* per-path's cfo_tail */
	s8		rx_power;					/* in dBm Translate from PWdB */
	s8		recv_signal_power;			/* Real power in dBm for this packet, no beautification and aggregation. Keep this raw info to be used for the other procedures. */
	u8		bt_rx_rssi_percentage;
	u8		signal_strength;				/* in 0-100 index. */
	s8		rx_pwr[4];					/* per-path's pwdb */
	s8		rx_snr[4];					/* per-path's SNR	*/
	/* s8      BB_Backup[13];                   backup reg. */
#if (ODM_PHY_STATUS_NEW_TYPE_SUPPORT == 1)
	u8		rx_count:2;					/* RX path counter---*/
	u8		band_width:2;
	u8		rxsc:4;						/* sub-channel---*/
#else
	u8		band_width;
#endif
#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN | ODM_CE))
	u8		bt_coex_pwr_adjust;
#endif
#if (ODM_PHY_STATUS_NEW_TYPE_SUPPORT == 1)
	u8		channel;					/* channel number---*/
	boolean	is_mu_packet;				/* is MU packet or not---*/
	boolean	is_beamformed;				/* BF packet---*/
#endif
};
#endif

struct _odm_per_pkt_info_ {
	u8		data_rate;
	u8		station_id;
	boolean	is_packet_match_bssid;
	boolean	is_packet_to_self;
	boolean	is_packet_beacon;
	boolean	is_to_self;
	u8		ppdu_cnt;
};


struct _odm_phy_dbg_info_ {
	/*ODM Write,debug info*/
	s8		rx_snr_db[4];
	u32		num_qry_phy_status;
	u32		num_qry_phy_status_cck;
	u32		num_qry_phy_status_ofdm;
#if (ODM_PHY_STATUS_NEW_TYPE_SUPPORT == 1)
	u32		num_qry_mu_pkt;
	u32		num_qry_bf_pkt;
	u32		num_qry_mu_vht_pkt[40];
	boolean	is_ldpc_pkt;
	boolean	is_stbc_pkt;
	u8		num_of_ppdu[4];
	u8		gid_num[4];
#endif
	u8		num_qry_beacon_pkt;
	/* Others */
	s32		rx_evm[4];

	u16		num_qry_legacy_pkt[12];
	u16		num_qry_ht_pkt[32];
	u8		ht_pkt_not_zero;
	#if	ODM_IC_11AC_SERIES_SUPPORT
	u16		num_qry_vht_pkt[40];
	u8		vht_pkt_not_zero;
	#endif
	
	u8		rssi_cck_avg;
	u32		rssi_cck_sum;
	u32		rssi_cck_cnt;
	u8		rssi_ofdm_avg;
	u32		rssi_ofdm_sum;
	u32		rssi_ofdm_cnt;
	u8		rssi_1ss_avg;
	u32		rssi_1ss_sum;
	u32		rssi_1ss_cnt;
	u8		rssi_2ss_avg[2];
	u32		rssi_2ss_sum[2];
	u32		rssi_2ss_cnt;
	u8		rssi_3ss_avg[3];
	u32		rssi_3ss_sum[3];
	u32		rssi_3ss_cnt;
	u8		rssi_4ss_avg[4];
	u32		rssi_4ss_sum[4];
	u32		rssi_4ss_cnt;

};

enum odm_cmninfo_e {
	/*Fixed value*/
	/*-----------HOOK BEFORE REG INIT-----------*/
	ODM_CMNINFO_PLATFORM = 0,
	ODM_CMNINFO_ABILITY,
	ODM_CMNINFO_INTERFACE,
	ODM_CMNINFO_MP_TEST_CHIP,
	ODM_CMNINFO_IC_TYPE,
	ODM_CMNINFO_CUT_VER,
	ODM_CMNINFO_FAB_VER,
	ODM_CMNINFO_RF_TYPE,
	ODM_CMNINFO_RFE_TYPE,
	ODM_CMNINFO_DPK_EN,
	ODM_CMNINFO_BOARD_TYPE,
	ODM_CMNINFO_PACKAGE_TYPE,
	ODM_CMNINFO_EXT_LNA,
	ODM_CMNINFO_5G_EXT_LNA,
	ODM_CMNINFO_EXT_PA,
	ODM_CMNINFO_5G_EXT_PA,
	ODM_CMNINFO_GPA,
	ODM_CMNINFO_APA,
	ODM_CMNINFO_GLNA,
	ODM_CMNINFO_ALNA,
	ODM_CMNINFO_EXT_TRSW,
	ODM_CMNINFO_EXT_LNA_GAIN,
	ODM_CMNINFO_PATCH_ID,
	ODM_CMNINFO_BINHCT_TEST,
	ODM_CMNINFO_BWIFI_TEST,
	ODM_CMNINFO_SMART_CONCURRENT,
	ODM_CMNINFO_CONFIG_BB_RF,
	ODM_CMNINFO_DOMAIN_CODE_2G,
	ODM_CMNINFO_DOMAIN_CODE_5G,
	ODM_CMNINFO_IQKFWOFFLOAD,
	ODM_CMNINFO_IQKPAOFF,
	ODM_CMNINFO_HUBUSBMODE,
	ODM_CMNINFO_FWDWRSVDPAGEINPROGRESS,
	ODM_CMNINFO_TX_TP,
	ODM_CMNINFO_RX_TP,
	ODM_CMNINFO_SOUNDING_SEQ,
	ODM_CMNINFO_REGRFKFREEENABLE,
	ODM_CMNINFO_RFKFREEENABLE,
	ODM_CMNINFO_NORMAL_RX_PATH_CHANGE,
	ODM_CMNINFO_EFUSE0X3D8,
	ODM_CMNINFO_EFUSE0X3D7,
	ODM_CMNINFO_SOFT_AP_SPECIAL_SETTING,
	ODM_CMNINFO_HP_HWID,
        ODM_CMNINFO_ADVANCE_OTA,
	/*-----------HOOK BEFORE REG INIT-----------*/

	/*Dynamic value:*/

	/*--------- POINTER REFERENCE-----------*/
	ODM_CMNINFO_MAC_PHY_MODE,
	ODM_CMNINFO_TX_UNI,
	ODM_CMNINFO_RX_UNI,
	ODM_CMNINFO_WM_MODE,
	ODM_CMNINFO_BAND,
	ODM_CMNINFO_SEC_CHNL_OFFSET,
	ODM_CMNINFO_SEC_MODE,
	ODM_CMNINFO_BW,
	ODM_CMNINFO_CHNL,
	ODM_CMNINFO_FORCED_RATE,
	ODM_CMNINFO_ANT_DIV,
	ODM_CMNINFO_ADAPTIVITY,
	ODM_CMNINFO_DMSP_GET_VALUE,
	ODM_CMNINFO_BUDDY_ADAPTOR,
	ODM_CMNINFO_DMSP_IS_MASTER,
	ODM_CMNINFO_SCAN,
	ODM_CMNINFO_POWER_SAVING,
	ODM_CMNINFO_ONE_PATH_CCA,
	ODM_CMNINFO_DRV_STOP,
	ODM_CMNINFO_PNP_IN,
	ODM_CMNINFO_INIT_ON,
	ODM_CMNINFO_ANT_TEST,
	ODM_CMNINFO_NET_CLOSED,
	ODM_CMNINFO_FORCED_IGI_LB,
	ODM_CMNINFO_P2P_LINK,
	ODM_CMNINFO_FCS_MODE,
	ODM_CMNINFO_IS1ANTENNA,
	ODM_CMNINFO_RFDEFAULTPATH,
	ODM_CMNINFO_DFS_MASTER_ENABLE,
	ODM_CMNINFO_FORCE_TX_ANT_BY_TXDESC,
	ODM_CMNINFO_SET_S0S1_DEFAULT_ANTENNA,
	ODM_CMNINFO_SOFT_AP_MODE,
	ODM_CMNINFO_MP_MODE,
	/*--------- POINTER REFERENCE-----------*/

	/*------------CALL BY VALUE-------------*/
	ODM_CMNINFO_WIFI_DIRECT,
	ODM_CMNINFO_WIFI_DISPLAY,
	ODM_CMNINFO_LINK_IN_PROGRESS,
	ODM_CMNINFO_LINK,
	ODM_CMNINFO_CMW500LINK,
	ODM_CMNINFO_LPSPG,
	ODM_CMNINFO_STATION_STATE,
	ODM_CMNINFO_RSSI_MIN,
	ODM_CMNINFO_RSSI_MIN_BY_PATH,
	ODM_CMNINFO_DBG_COMP,
	ODM_CMNINFO_DBG_LEVEL,
	ODM_CMNINFO_RA_THRESHOLD_HIGH,
	ODM_CMNINFO_RA_THRESHOLD_LOW,
	ODM_CMNINFO_RF_ANTENNA_TYPE,
	ODM_CMNINFO_WITH_EXT_ANTENNA_SWITCH,
	ODM_CMNINFO_BE_FIX_TX_ANT,
	ODM_CMNINFO_BT_ENABLED,
	ODM_CMNINFO_BT_HS_CONNECT_PROCESS,
	ODM_CMNINFO_BT_HS_RSSI,
	ODM_CMNINFO_BT_OPERATION,
	ODM_CMNINFO_BT_LIMITED_DIG,
	ODM_CMNINFO_BT_DIG,
	ODM_CMNINFO_BT_BUSY,
	ODM_CMNINFO_BT_DISABLE_EDCA,
	ODM_CMNINFO_AP_TOTAL_NUM,
	ODM_CMNINFO_POWER_TRAINING,
	ODM_CMNINFO_DFS_REGION_DOMAIN,
	/*------------CALL BY VALUE-------------*/

	/*Dynamic ptr array hook itms.*/
	ODM_CMNINFO_STA_STATUS,
	ODM_CMNINFO_MAX,

};


enum phydm_info_query_e {
	PHYDM_INFO_FA_OFDM,
	PHYDM_INFO_FA_CCK,
	PHYDM_INFO_FA_TOTAL,
	PHYDM_INFO_CCA_OFDM,
	PHYDM_INFO_CCA_CCK,
	PHYDM_INFO_CCA_ALL,
	PHYDM_INFO_CRC32_OK_VHT,
	PHYDM_INFO_CRC32_OK_HT,
	PHYDM_INFO_CRC32_OK_LEGACY,
	PHYDM_INFO_CRC32_OK_CCK,
	PHYDM_INFO_CRC32_ERROR_VHT,
	PHYDM_INFO_CRC32_ERROR_HT,
	PHYDM_INFO_CRC32_ERROR_LEGACY,
	PHYDM_INFO_CRC32_ERROR_CCK,
	PHYDM_INFO_EDCCA_FLAG,
	PHYDM_INFO_OFDM_ENABLE,
	PHYDM_INFO_CCK_ENABLE,
	PHYDM_INFO_CRC32_OK_HT_AGG,
	PHYDM_INFO_CRC32_ERROR_HT_AGG,
	PHYDM_INFO_DBG_PORT_0
};

enum phydm_api_e {

	PHYDM_API_NBI			= 1,
	PHYDM_API_CSI_MASK,

};

enum odm_ability_e {

	ODM_BB_DIG					= BIT(0),
	ODM_BB_RA_MASK				= BIT(1),
	ODM_BB_DYNAMIC_TXPWR		= BIT(2),
	ODM_BB_FA_CNT					= BIT(3),
	ODM_BB_RSSI_MONITOR			= BIT(4),
	ODM_BB_CCK_PD					= BIT(5),
	ODM_BB_ANT_DIV				= BIT(6),
	/*BIT(7),*/
	ODM_BB_PWR_TRAIN				= BIT(8),
	ODM_BB_RATE_ADAPTIVE			= BIT(9),
	ODM_BB_PATH_DIV				= BIT(10),
	/*BIT(11),*/
	/*BIT(12),*/
	ODM_BB_ADAPTIVITY				= BIT(13),
	ODM_BB_CFO_TRACKING			= BIT(14),
	ODM_BB_NHM_CNT				= BIT(15),
	ODM_BB_PRIMARY_CCA			= BIT(16),
	ODM_BB_TXBF					= BIT(17),
	ODM_BB_DYNAMIC_ARFR			= BIT(18),
	ODM_BB_DYNAMIC_PSDTOOL		= BIT(19),
	ODM_MAC_EDCA_TURBO			= BIT(20),
	ODM_BB_DYNAMIC_RX_PATH		= BIT(21),
};

/*ODM_CMNINFO_ONE_PATH_CCA*/
enum odm_cca_path_e {
	ODM_CCA_2R		= 0,
	ODM_CCA_1R_A		= 1,
	ODM_CCA_1R_B		= 2,
};

enum cca_pathdiv_en_e {
	CCA_PATHDIV_DISABLE	= 0,
	CCA_PATHDIV_ENABLE	= 1,

};

enum phydm_offload_ability {
	PHYDM_PHY_PARAM_OFFLOAD = BIT(0),
	PHYDM_RF_IQK_OFFLOAD = BIT(1),
};


enum phy_reg_pg_type {
	PHY_REG_PG_RELATIVE_VALUE	= 0,
	PHY_REG_PG_EXACT_VALUE		= 1
};

#if (DM_ODM_SUPPORT_TYPE & ODM_WIN)
	#if (RT_PLATFORM != PLATFORM_LINUX)
		typedef
	#endif

	struct PHY_DM_STRUCT
#else/*for AP,ADSL,CE Team*/
	struct PHY_DM_STRUCT
#endif
{
	/*Add for different team use temporarily*/
	struct _ADAPTER		*adapter;		/*For CE/NIC team*/
	struct rtl8192cd_priv	*priv;			/*For AP/ADSL team*/
	/*WHen you use adapter or priv pointer, you must make sure the pointer is ready.*/
	boolean		odm_ready;
	enum phy_reg_pg_type	phy_reg_pg_value_type;
	u8			phy_reg_pg_version;
	u32			debug_components;
	u32			fw_debug_components;
	u32			debug_level;
	u32			num_qry_phy_status_all;		/*CCK + OFDM*/
	u32			last_num_qry_phy_status_all;
	u32			rx_pwdb_ave;
	u8			times_2g;
	boolean		is_init_hw_info_by_rfe;

	/*------ ODM HANDLE, DRIVER NEEDS NOT TO HOOK------*/
	boolean		is_cck_high_power;
	u8			rf_path_rx_enable;
	/*------ ODM HANDLE, DRIVER NEEDS NOT TO HOOK------*/

	/* COMMON INFORMATION */

	/*Init value*/
	/*-----------HOOK BEFORE REG INIT-----------*/

	u8			support_platform;/*PHYDM Platform info WIN/AP/CE = 1/2/3 */
	u8			normal_rx_path;
	u32			support_ability;	/*PHYDM function Supportability*/
	u8			support_interface;/*PHYDM PCIE/USB/SDIO = 1/2/3*/
	u32			support_ic_type;	/*PHYDM supported IC*/
	u8			cut_version;		/*cut version TestChip/A-cut/B-cut... = 0/1/2/3/...*/
	u8			fab_version;		/*Fab version TSMC/UMC = 0/1*/
	u8			rf_type;			/*RF type 4T4R/3T3R/2T2R/1T2R/1T1R/...*/
	u8			rfe_type;
	u8			board_type;
	u8			package_type;
	u16			type_glna;
	u16			type_gpa;
	u16			type_alna;
	u16			type_apa;
	u8			ext_lna;			/*with 2G external LNA  NO/Yes = 0/1*/
	u8			ext_lna_5g;		/*with 5G external LNA  NO/Yes = 0/1*/
	u8			ext_pa;			/*with 2G external PNA  NO/Yes = 0/1*/
	u8			ext_pa_5g;		/*with 5G external PNA  NO/Yes = 0/1*/
	u8 			efuse0x3d7;		/*with Efuse number*/
	u8 			efuse0x3d8;
	u8			ext_trsw;		/*with external TRSW  NO/Yes = 0/1*/
	u8			ext_lna_gain;	/*gain of external lna*/
	u8			patch_id;		/*Customer ID*/
	boolean		is_in_hct_test;
	u8			wifi_test;
	boolean		is_dual_mac_smart_concurrent;
    	u32			bk_support_ability; /*SD4 only*/
	u8			with_extenal_ant_switch;
	boolean		config_bbrf;
	u8			odm_regulation_2_4g;
	u8			odm_regulation_5g;
	u8			iqk_fw_offload;
	boolean		cck_new_agc;
	u8			phydm_period;
	u32			phydm_sys_up_time;
	u8			num_rf_path;
	u32			soft_ap_special_setting;
	u8			rfe_hwsetting_band;
	u8			p_advance_ota;
	u8			u1_byte_temp;
	boolean		is_hp_hw_id;
	boolean		BOOLEAN_temp;
	u8			is_nbi_enable;
	u16			fw_offload_ability;
/*-----------HOOK BEFORE REG INIT-----------*/
/*===========================================================*/	
/*====[ CALL BY Reference ]=========================================*/
/*===========================================================*/	
	
	struct _ADAPTER	*PADAPTER_temp;

	u8			*p_mac_phy_mode;			/*MAC PHY mode SMSP/DMSP/DMDP = 0/1/2*/
	u64			*p_num_tx_bytes_unicast;	/*TX Unicast byte count*/
	u64			*p_num_rx_bytes_unicast;	/*RX Unicast byte count*/
	u8			*p_wireless_mode;			/*Wireless mode B/G/A/N = BIT0/BIT1/BIT2/BIT3*/
	u8			*p_band_type;				/*Frequence band 2.4G/5G = 0/1*/
	u8			*p_sec_ch_offset;			/*Secondary channel offset don't_care/below/above = 0/1/2*/
	u8			*p_security;					/*security mode Open/WEP/AES/TKIP = 0/1/2/3*/
	u8			*p_band_width;				/*BW info 20M/40M/80M = 0/1/2*/
	u8			*p_channel;					/*central channel number*/
	boolean		*p_is_get_value_from_other_mac;	/*Common info for 92D DMSP*/
	struct _ADAPTER **p_buddy_adapter;
	boolean		*p_is_master_of_dmsp;		/* MAC0: master, MAC1: slave */
	boolean		*p_is_scan_in_process;		/*Common info for status*/
	boolean		*p_is_power_saving;
	u8			*p_one_path_cca;			/*CCA path 2-path/path-A/path-B = 0/1/2; using enum odm_cca_path_e.*/
	u8			*p_antenna_test;
	boolean		*p_is_net_closed;
	u8			*pu1_forced_igi_lb;
	boolean		*p_is_fcs_mode_enable;
	/*--------- For 8723B IQK-------------------------------------*/
	boolean		*p_is_1_antenna;
	u8			*p_rf_default_path;	/* 0:S1, 1:S0 */
	/*-----------------------------------------------------------*/

	u16			*p_forced_data_rate;
	u8			*p_enable_antdiv;
	u8			*p_enable_adaptivity;
	u8			*hub_usb_mode;		/*1: USB 2.0, 2: USB 3.0*/
	boolean		*p_is_fw_dw_rsvd_page_in_progress;
	u32			*p_current_tx_tp;
	u32			*p_current_rx_tp;
	u8			*p_sounding_seq;
	u32			*p_soft_ap_mode;
	u8			*p_mp_mode;

/*===========================================================*/	
/*====[ CALL BY VALUE ]===========================================*/
/*===========================================================*/	
	
	boolean		is_link_in_process;
	boolean		is_wifi_direct;
	boolean		is_wifi_display;
	boolean		is_linked;
	boolean		bLinkedcmw500;
	boolean		is_in_lps_pg;
	boolean		bsta_state;
	u8			rssi_min;
	u8			rssi_min_by_path;
	boolean		is_mp_chip;
	boolean		is_one_entry_only;
	u32			one_entry_macid;
	u32			one_entry_tp;
	u32			pre_one_entry_tp;
	u8			pre_number_linked_client;
	u8			number_linked_client;
	u8			pre_number_active_client;
	u8			number_active_client;
	
	/*---Common info for BTDM-------------------------------------*/
	boolean		is_bt_enabled;			/*BT is enabled*/
	boolean		is_bt_connect_process;	/*BT HS is under connection progress.*/
	u8			bt_hs_rssi;			/*BT HS mode wifi rssi value.*/
	boolean		is_bt_hs_operation;		/*BT HS mode is under progress*/
	u8			bt_hs_dig_val;			/*use BT rssi to decide the DIG value*/
	boolean		is_bt_disable_edca_turbo;	/*Under some condition, don't enable the EDCA Turbo*/
	boolean		is_bt_busy;			/*BT is busy.*/
	boolean		is_bt_limited_dig;		/*BT is busy.*/
	boolean		is_disable_phy_api;
	/*-----------------------------------------------------------*/
	u8			RSSI_A;
	u8			RSSI_B;
	u8			RSSI_C;
	u8			RSSI_D;
	u64			RSSI_TRSW;
	u64			RSSI_TRSW_H;
	u64			RSSI_TRSW_L;
	u64			RSSI_TRSW_iso;
	u8			tx_ant_status;
	u8			rx_ant_status;
	u8			cck_lna_idx;
	u8			cck_vga_idx;
	u8			curr_station_id;
	u8			ofdm_agc_idx[4];
	u8			rx_rate;
	u8			rate_ss;
	u8			tx_rate;
	u8			linked_interval;
	u8			pre_channel;
	u32			txagc_offset_value_a;
	boolean		is_txagc_offset_positive_a;
	u32			txagc_offset_value_b;
	boolean		is_txagc_offset_positive_b;
	/*[traffic]*/
	u8			traffic_load;
	u8			pre_traffic_load;
	u32			tx_tp;
	u32			rx_tp;
	u32			total_tp;
	u64			cur_tx_ok_cnt;
	u64			cur_rx_ok_cnt;
	u64			last_tx_ok_cnt;
	u64			last_rx_ok_cnt;
	u16			consecutive_idlel_time;	/*unit: second*/
	/*---------------------------*/
	u32			bb_swing_offset_a;
	boolean		is_bb_swing_offset_positive_a;
	u32			bb_swing_offset_b;
	boolean		is_bb_swing_offset_positive_b;

	/*[DIG]*/
	boolean		MPDIG_2G;				/*off MPDIG*/
	u8			igi_lower_bound;
	u8			igi_upper_bound;
	u8			dm_dig_max_TH;
	u8			dm_dig_min_TH;
	boolean		is_dm_initial_gain_enable;
	/*---------------------------*/

	/*[AntDiv]*/
	u8			ant_div_type;
	u8			antdiv_rssi;
	u8			fat_comb_a;
	u8			fat_comb_b;
	u8			antdiv_intvl;
	u8			ant_type;
	u8			pre_ant_type;
	u8			antdiv_period;
	u8			evm_antdiv_period;
	u8			antdiv_select;
	u8			antdiv_train_num;/*training time for each antenna in EVM method*/
	u8			stop_antdiv_rssi_th;
	u16			stop_antdiv_tp_diff_th;
	u16			stop_antdiv_tp_th;
	u8			antdiv_tp_period;
	u16			tp_active_th;
	u8			tp_active_occur;
	u8			path_select;
	u8			antdiv_evm_en;
	u8			bdc_holdstate;
	/*---------------------------*/
	
	u8			ndpa_period;
	boolean		h2c_rarpt_connect;
	boolean		cck_agc_report_type;
	u8			print_agc;
	u8			la_mode;
	/*---8821C Antenna and RF Set BTG/WLG/WLA Select---------------*/
	u8			current_rf_set_8821c;
	u8			default_rf_set_8821c;
	u8			current_ant_num_8821c;
	u8			default_ant_num_8821c;
	/*-----------------------------------------------------------*/
	/*---For Adaptivtiy---------------------------------------------*/
	u16			nhm_cnt_0;
	u16			nhm_cnt_1;
	s8			TH_L2H_default;
	s8			th_edcca_hl_diff_default;
	s8			th_l2h_ini;
	s8			th_edcca_hl_diff;
	s8			th_l2h_ini_mode2;
	s8			th_edcca_hl_diff_mode2;
	boolean		carrier_sense_enable;
	u8			adaptivity_igi_upper;
	boolean		adaptivity_flag;
	u8			dc_backoff;
	boolean		adaptivity_enable;
	u8			ap_total_num;
	boolean		edcca_enable;
	/*-----------------------------------------------------------*/
	
	u8			pre_dbg_priority;
	u8			nbi_set_result;
	u8			csi_set_result;
	u8			csi_set_result_2;

	u8			c2h_cmd_start;
	u8			fw_debug_trace[60];
	u8			pre_c2h_seq;
	boolean		fw_buff_is_enpty;
	u32			data_frame_num;

	/*--- for noise detection ---------------------------------------*/
	boolean		is_noisy_state;
	boolean		noisy_decision; /*b_noisy*/
	boolean		pre_b_noisy;
	u32			noisy_decision_smooth;
	/*-----------------------------------------------------------*/
	
	boolean		is_disable_dym_ecs;
	boolean		is_disable_dym_ant_weighting;
	struct sta_info	*p_odm_sta_info[ODM_ASSOCIATE_ENTRY_NUM];/*_ODM_STA_INFO, 2012/01/12 MH For MP, we need to reduce one array pointer for default port.??*/
	struct cmn_sta_info	*p_phydm_sta_info[ODM_ASSOCIATE_ENTRY_NUM];
	u16			platform2phydm_macid_table[ODM_ASSOCIATE_ENTRY_NUM];/* platform_macid_table[platform_macid] = phydm_macid */

#if (ODM_PHY_STATUS_NEW_TYPE_SUPPORT == 1)
	s32			accumulate_pwdb[ODM_ASSOCIATE_ENTRY_NUM];
#endif

#if (RATE_ADAPTIVE_SUPPORT == 1)
	u16			currmin_rpt_time;
	struct _odm_ra_info_   ra_info[ODM_ASSOCIATE_ENTRY_NUM];
	/*Use mac_id as array index. STA mac_id=0, VWiFi Client mac_id={1, ODM_ASSOCIATE_ENTRY_NUM-1} //YJ,add,120119*/
#endif
	boolean		ra_support88e;	/*2012/02/14 MH Add to share 88E ra with other SW team.We need to colelct all support abilit to a proper area.*/
	boolean		*p_is_driver_stopped;
	boolean		*p_is_driver_is_going_to_pnp_set_power_sleep;
	boolean		*pinit_adpt_in_progress;
	boolean		is_user_assign_level;
	u8			RSSI_BT;			/*come from BT*/

	/*---PSD Relative ---------------------------------------------*/
	boolean		is_psd_in_process;
	boolean		is_psd_active;
	/*-----------------------------------------------------------*/
	
	u8			is_use_ra_mask;	/*for rate adaptive, in fact,  88c/92c fw will handle this*/
	boolean		bsomlenabled;		/* for dynamic SoML control */
	boolean		bhtstfenabled;		/* for dynamic HTSTF gain control	*/
	u32			n_iqk_cnt;
	u32			n_iqk_ok_cnt;
	u32			n_iqk_fail_cnt;

#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN | ODM_CE))
	u8			force_power_training_state;	/*Power Training*/
	boolean		is_change_state;
	u32			PT_score;
	u64			ofdm_rx_cnt;
	u64			cck_rx_cnt;
#endif
	boolean		is_disable_power_training;
	u8			dynamic_tx_high_power_lvl;
	u8			last_dtp_lvl;
	u32			tx_agc_ofdm_18_6;
	u8			rx_pkt_type;

#ifdef CONFIG_PHYDM_DFS_MASTER
	u8			dfs_region_domain;
	u8			*dfs_master_enabled;
	/*---phydm_radar_detect_with_dbg_parm start --------------------*/
	u8			radar_detect_dbg_parm_en;
	u32			radar_detect_reg_918;
	u32			radar_detect_reg_91c;
	u32			radar_detect_reg_920;
	u32			radar_detect_reg_924;
	/*-----------------------------------------------------------*/
#endif

/*=== PHYDM Timer ========================================== (start)*/

	struct timer_list	mpt_dig_timer;	/*MPT DIG timer*/
	struct timer_list	path_div_switch_timer;
	struct timer_list	cck_path_diversity_timer;	/*2011.09.27 add for path Diversity*/
	struct timer_list	fast_ant_training_timer;
#ifdef ODM_EVM_ENHANCE_ANTDIV
	struct timer_list	evm_fast_ant_training_timer;
#endif
	struct timer_list	sbdcnt_timer;


/*=== PHYDM Workitem ======================================= (start)*/

#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
#if USE_WORKITEM
	RT_WORK_ITEM	path_div_switch_workitem;
	RT_WORK_ITEM	cck_path_diversity_workitem;
	RT_WORK_ITEM	fast_ant_training_workitem;
	RT_WORK_ITEM	mpt_dig_workitem;
	RT_WORK_ITEM	ra_rpt_workitem;
	RT_WORK_ITEM	sbdcnt_workitem;
#endif
#endif


/*=== PHYDM Structure ======================================== (start)*/
	struct _ADAPTIVITY_STATISTICS		adaptivity;
#if (DM_ODM_SUPPORT_TYPE & (ODM_CE | ODM_WIN))
	struct _ODM_NOISE_MONITOR_			noise_level;
#endif

	struct _odm_phy_dbg_info_				phy_dbg_info;
#if (defined(CONFIG_PHYDM_ANTENNA_DIVERSITY))
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP))
	struct _BF_DIV_COEX_					dm_bdc_table;
#endif

#if (defined(CONFIG_HL_SMART_ANTENNA_TYPE1)) || (defined(CONFIG_HL_SMART_ANTENNA_TYPE2))
	struct _SMART_ANTENNA_TRAINNING_	dm_sat_table;
#endif

#endif
	struct _FAST_ANTENNA_TRAINNING_		dm_fat_table;
	struct _dynamic_initial_gain_threshold_	dm_dig_table;
	
#if (defined(CONFIG_BB_POWER_SAVING))
	struct _dynamic_power_saving			dm_ps_table;
#endif

	struct _dynamic_primary_cca			dm_pri_cca;
	struct _rate_adaptive_table_			dm_ra_table;
	struct _FALSE_ALARM_STATISTICS		false_alm_cnt;
	struct _FALSE_ALARM_STATISTICS		flase_alm_cnt_buddy_adapter;
	struct _sw_antenna_switch_				dm_swat_table;
	struct _CFO_TRACKING_				dm_cfo_track;
	struct _ACS_							dm_acs;
	struct _CCX_INFO						dm_ccx_info;
	struct _hal_rf_						rf_table; 		/*for HALRF function*/
	struct _ODM_RATE_ADAPTIVE			rate_adaptive;
	struct odm_rf_calibration_structure		rf_calibrate_info;
	struct odm_power_trim_data			power_trim_data;	
#if (RTL8822B_SUPPORT == 1)
	struct phydm_rtl8822b_struct			phydm_rtl8822b;
#endif	
#if (CONFIG_PSD_TOOL == 1)
	struct _PHYDM_PSD_					dm_psd_table;
#endif

#if (PHYDM_LA_MODE_SUPPORT == 1)
	struct _RT_ADCSMP					adcsmp;
#endif

#if (CONFIG_DYNAMIC_RX_PATH == 1)
	struct _DYNAMIC_RX_PATH_			dm_drp_table;
#endif

#if (RTL8814A_SUPPORT == 1 || RTL8822B_SUPPORT == 1 || RTL8821C_SUPPORT == 1)
	struct _IQK_INFORMATION				IQK_info;
#endif

#if (DM_ODM_SUPPORT_TYPE & ODM_WIN)
	struct _path_div_parameter_define_		path_iqk;
#endif

#if (defined(CONFIG_PATH_DIVERSITY))
	struct _ODM_PATH_DIVERSITY_			dm_path_div;
#endif

#if (defined(CONFIG_ANT_DETECTION))
	struct _ANT_DETECTED_INFO			ant_detected_info;	/* Antenna detected information for RSSI tool*/
#endif

#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN | ODM_CE))
#if (BEAMFORMING_SUPPORT == 1)
	struct _RT_BEAMFORMING_INFO 		beamforming_info;
#endif
#endif

/*==========================================================*/

#if (DM_ODM_SUPPORT_TYPE & ODM_WIN)

#if (RT_PLATFORM != PLATFORM_LINUX)
}PHY_DM_STRUCT;		/*DM_Dynamic_Mechanism_Structure*/
#else
};
#endif

#else	/*for AP,CE Team*/
};
#endif


enum phydm_adv_ota {
	PHYDM_PATHB_1RCCA = BIT(0),
	PHYDM_HP_OTA_SETTING_A = BIT(1),
	PHYDM_HP_OTA_SETTING_B = BIT(2),
	PHYDM_ASUS_OTA_SETTING = BIT(3),
	PHYDM_ASUS_OTA_SETTING_CCK_PATH = BIT(4),

};

enum phydm_structure_type {
	PHYDM_FALSEALMCNT,
	PHYDM_CFOTRACK,
	PHYDM_ADAPTIVITY,
	PHYDM_ROMINFO,

};

enum odm_rf_content {
	odm_radioa_txt = 0x1000,
	odm_radiob_txt = 0x1001,
	odm_radioc_txt = 0x1002,
	odm_radiod_txt = 0x1003
};

enum odm_bb_config_type {
	CONFIG_BB_PHY_REG,
	CONFIG_BB_AGC_TAB,
	CONFIG_BB_AGC_TAB_2G,
	CONFIG_BB_AGC_TAB_5G,
	CONFIG_BB_PHY_REG_PG,
	CONFIG_BB_PHY_REG_MP,
	CONFIG_BB_AGC_TAB_DIFF,
};

enum odm_rf_config_type {
	CONFIG_RF_RADIO,
	CONFIG_RF_TXPWR_LMT,
};

enum odm_fw_config_type {
	CONFIG_FW_NIC,
	CONFIG_FW_NIC_2,
	CONFIG_FW_AP,
	CONFIG_FW_AP_2,
	CONFIG_FW_MP,
	CONFIG_FW_WOWLAN,
	CONFIG_FW_WOWLAN_2,
	CONFIG_FW_AP_WOWLAN,
	CONFIG_FW_BT,
};

/*status code*/
#if (DM_ODM_SUPPORT_TYPE != ODM_WIN)
enum rt_status {
	RT_STATUS_SUCCESS,
	RT_STATUS_FAILURE,
	RT_STATUS_PENDING,
	RT_STATUS_RESOURCE,
	RT_STATUS_INVALID_CONTEXT,
	RT_STATUS_INVALID_PARAMETER,
	RT_STATUS_NOT_SUPPORT,
	RT_STATUS_OS_API_FAILED,
};
#endif	/*end of enum rt_status definition*/

#ifdef REMOVE_PACK
	#pragma pack()
#endif

/*===========================================================*/
/*AGC RX High Power mode*/
/*===========================================================*/
#define	lna_low_gain_1		0x64
#define	lna_low_gain_2		0x5A
#define	lna_low_gain_3		0x58

#define	FA_RXHP_TH1		5000
#define	FA_RXHP_TH2		1500
#define	FA_RXHP_TH3		800
#define	FA_RXHP_TH4		600
#define	FA_RXHP_TH5		500

enum dm_1r_cca_e {
	CCA_1R		= 0,
	CCA_2R		= 1,
	CCA_MAX	= 2,
};

enum dm_rf_e {
	rf_save		= 0,
	rf_normal	= 1,
	RF_MAX		= 2,
};

/*check Sta pointer valid or not*/
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP))
	#define IS_STA_VALID(p_sta)		(p_sta && p_sta->expire_to)
#elif (DM_ODM_SUPPORT_TYPE & ODM_WIN)
	#define IS_STA_VALID(p_sta)		(p_sta && p_sta->bUsed)
#else
	#define IS_STA_VALID(p_sta)		(p_sta)
#endif


#if (DM_ODM_SUPPORT_TYPE & (ODM_WIN | ODM_AP))
boolean
odm_check_power_status(
	struct _ADAPTER		*adapter
);
#endif

u32 odm_convert_to_db(u32 value);

u32 odm_convert_to_linear(u32 value);

#if (DM_ODM_SUPPORT_TYPE & ODM_WIN)
void
odm_dm_watchdog_lps(
	struct PHY_DM_STRUCT		*p_dm_odm
);
#endif

s32
odm_pwdb_conversion(
	s32 X,
	u32 total_bit,
	u32 decimal_bit
);

s32
odm_sign_conversion(
	s32 value,
	u32 total_bit
);

void
phydm_txcurrentcalibration(
	struct PHY_DM_STRUCT	*p_dm_odm
);	

void
phydm_seq_sorting(
	void	*p_dm_void,
	u32	*p_value,
	u32	*rank_idx,
	u32	*p_idx_out,
	u8	seq_length
);

void
phydm_dm_early_init(
	struct PHY_DM_STRUCT	*p_dm_odm
);

void
odm_dm_init(
	struct PHY_DM_STRUCT	*p_dm_odm
);

void
odm_dm_reset(
	struct PHY_DM_STRUCT	*p_dm_odm
);

void
phydm_fwoffload_ability_init(
	struct PHY_DM_STRUCT		*p_dm_odm,
	enum phydm_offload_ability	offload_ability
);

void
phydm_fwoffload_ability_clear(
	struct PHY_DM_STRUCT		*p_dm_odm,
	enum phydm_offload_ability	offload_ability
);


void
phydm_support_ability_debug(
	void		*p_dm_void,
	u32		*const dm_value,
	u32		*_used,
	char		*output,
	u32		*_out_len
);

void
phydm_config_ofdm_rx_path(
	struct PHY_DM_STRUCT	*p_dm_odm,
	u32			path
);

void
phydm_config_trx_path(
	void		*p_dm_void,
	u32		*const dm_value,
	u32		*_used,
	char		*output,
	u32		*_out_len
);

void
odm_dm_watchdog(
	struct PHY_DM_STRUCT	*p_dm_odm
);

void
phydm_watchdog_mp(
	struct PHY_DM_STRUCT	*p_dm_odm
);

void
odm_cmn_info_init(
	struct PHY_DM_STRUCT	*p_dm_odm,
	enum odm_cmninfo_e		cmn_info,
	u32						value
);

void
odm_cmn_info_hook(
	struct PHY_DM_STRUCT	*p_dm_odm,
	enum odm_cmninfo_e		cmn_info,
	void						*p_value
);

void
odm_cmn_info_update(
	struct PHY_DM_STRUCT	*p_dm_odm,
	u32						cmn_info,
	u64						value
);

u32
phydm_cmn_info_query(
	struct PHY_DM_STRUCT	*p_dm_odm,
	enum phydm_info_query_e	info_type
);

#if (DM_ODM_SUPPORT_TYPE == ODM_AP)
void
odm_init_all_threads(
	struct PHY_DM_STRUCT	*p_dm_odm
);

void
odm_stop_all_threads(
	struct PHY_DM_STRUCT	*p_dm_odm
);
#endif

void
odm_init_all_timers(
	struct PHY_DM_STRUCT	*p_dm_odm
);

void
odm_cancel_all_timers(
	struct PHY_DM_STRUCT	*p_dm_odm
);

void
odm_release_all_timers(
	struct PHY_DM_STRUCT	*p_dm_odm
);


#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
void odm_init_all_work_items(struct PHY_DM_STRUCT	*p_dm_odm);
void odm_free_all_work_items(struct PHY_DM_STRUCT	*p_dm_odm);

u64
platform_division64(
	u64	x,
	u64	y
);

#define dm_change_dynamic_init_gain_thresh		odm_change_dynamic_init_gain_thresh

enum dm_dig_connect_e {
	DIG_STA_DISCONNECT			= 0,
	DIG_STA_CONNECT				= 1,
	DIG_STA_BEFORE_CONNECT		= 2,
	DIG_MULTI_STA_DISCONNECT		= 3,
	DIG_MULTI_STA_CONNECT		= 4,
	DIG_CONNECT_MAX
};

/*2012/01/12 MH Check afapter status. Temp fix BSOD.*/

#define	HAL_ADAPTER_STS_CHK(p_dm_odm) do {\
		if (p_dm_odm->adapter == NULL) { \
			\
			return;\
		} \
	} while (0)

#endif	/*#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)*/

void *
phydm_get_structure(
	struct PHY_DM_STRUCT		*p_dm_odm,
	u8			structure_type
);

#if (DM_ODM_SUPPORT_TYPE == ODM_WIN) || (DM_ODM_SUPPORT_TYPE == ODM_CE)
	/*===========================================================*/
	/* The following is for compile only*/
	/*===========================================================*/

	#if (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211)
		#define IS_HARDWARE_TYPE_8188E(_adapter)		false
		#define IS_HARDWARE_TYPE_8188F(_adapter)		false
		#define IS_HARDWARE_TYPE_8703B(_adapter)		false
		#define IS_HARDWARE_TYPE_8723D(_adapter)		false
		#define IS_HARDWARE_TYPE_8821C(_adapter)		false
		#define IS_HARDWARE_TYPE_8812AU(_adapter)	false
		#define IS_HARDWARE_TYPE_8814A(_adapter)		false
		#define IS_HARDWARE_TYPE_8814AU(_adapter)	false
		#define IS_HARDWARE_TYPE_8814AE(_adapter)	false
		#define IS_HARDWARE_TYPE_8814AS(_adapter)	false
		#define IS_HARDWARE_TYPE_8723BU(_adapter)	false
		#define IS_HARDWARE_TYPE_8822BU(_adapter)	false
		#define IS_HARDWARE_TYPE_8822BS(_adapter)		false
		#define IS_HARDWARE_TYPE_JAGUAR(_Adapter)		\
			(IS_HARDWARE_TYPE_8812(_Adapter) || IS_HARDWARE_TYPE_8821(_Adapter))
	#else
		#define	IS_HARDWARE_TYPE_8723A(_adapter)	false
	#endif
	#define	IS_HARDWARE_TYPE_8723AE(_adapter)		false
	#define	IS_HARDWARE_TYPE_8192C(_adapter)			false
	#define	IS_HARDWARE_TYPE_8192D(_adapter)		false
	#define	RF_T_METER_92D	0x42


	#define	GET_RX_STATUS_DESC_RX_MCS(__prx_status_desc)	LE_BITS_TO_1BYTE(__prx_status_desc+12, 0, 6)

	#define	REG_CONFIG_RAM64X16		0xb2c

	#define TARGET_CHNL_NUM_2G_5G	59

	#if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
		u8 get_right_chnl_place_for_iqk(u8 chnl);
	#endif

	/* *********************************************************** */
#endif

#if (DM_ODM_SUPPORT_TYPE == ODM_CE)
	void odm_dtc(struct PHY_DM_STRUCT *p_dm_odm);
#endif

void phydm_noisy_detection(
	struct	PHY_DM_STRUCT	*p_dm_odm
);

void
phydm_set_ext_switch(
	void		*p_dm_void,
	u32		*const dm_value,
	u32		*_used,
	char		*output,
	u32		*_out_len
);

void
phydm_api_debug(
	void		*p_dm_void,
	u32		function_map,
	u32		*const dm_value,
	u32		*_used,
	char		*output,
	u32		*_out_len
);

u8
phydm_csi_mask_setting(
	void		*p_dm_void,
	u32		enable,
	u32		channel,
	u32		bw,
	u32		f_interference,
	u32		Second_ch
);

u8
phydm_nbi_setting(
	void		*p_dm_void,
	u32		enable,
	u32		channel,
	u32		bw,
	u32		f_interference,
	u32		second_ch
);

void
phydm_dc_cancellation(
	struct	PHY_DM_STRUCT	*p_dm_odm
);

void
phydm_receiver_blocking(
	void *p_dm_void
);
#endif
