aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723bs/hal/HalPhyRf_8723B.h
blob: ae4eca1446061eaaa55fe26be156d094916afbcc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/******************************************************************************
 *
 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
 *
 * 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 __HAL_PHY_RF_8723B_H__
#define __HAL_PHY_RF_8723B_H__

/*--------------------------Define Parameters-------------------------------*/
#define	IQK_DELAY_TIME_8723B		20		/* ms */
#define IQK_DEFERRED_TIME_8723B		4
#define	index_mapping_NUM_8723B		15
#define AVG_THERMAL_NUM_8723B		4
#define	RF_T_METER_8723B					0x42	/*  */


void ConfigureTxpowerTrack_8723B(PTXPWRTRACK_CFG	pConfig);

void DoIQK_8723B(
	PDM_ODM_T pDM_Odm,
	u8 DeltaThermalIndex,
	u8 ThermalValue,
	u8 Threshold
);

void ODM_TxPwrTrackSetPwr_8723B(
	PDM_ODM_T pDM_Odm,
	PWRTRACK_METHOD Method,
	u8 RFPath,
	u8 ChannelMappedIndex
);

/* 1 7. IQK */
void PHY_IQCalibrate_8723B(
	struct adapter *Adapter,
	bool bReCovery,
	bool bRestore,
	bool Is2ant,
	u8 RF_Path
);

void ODM_SetIQCbyRFpath(PDM_ODM_T pDM_Odm, u32 RFpath);

/*  */
/*  LC calibrate */
/*  */
void PHY_LCCalibrate_8723B(PDM_ODM_T pDM_Odm);

/*  */
/*  AP calibrate */
/*  */
void PHY_DigitalPredistortion_8723B(struct adapter *padapter);


void _PHY_SaveADDARegisters_8723B(
	struct adapter *padapter,
	u32 *ADDAReg,
	u32 *ADDABackup,
	u32 RegisterNum
);

void _PHY_PathADDAOn_8723B(
	struct adapter *padapter,
	u32 *ADDAReg,
	bool isPathAOn,
	bool is2T
);

void _PHY_MACSettingCalibration_8723B(
	struct adapter *padapter, u32 *MACReg, u32 *MACBackup
);

#endif /*  #ifndef __HAL_PHY_RF_8188E_H__ */