xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/rtl8723ds/include/Hal8188FPhyCfg.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
3  *
4  * Copyright(c) 2007 - 2017 Realtek Corporation.
5  *
6  * This program is free software; you can redistribute it and/or modify it
7  * under the terms of version 2 of the GNU General Public License as
8  * published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13  * more details.
14  *
15  *****************************************************************************/
16 #ifndef __INC_HAL8188FPHYCFG_H__
17 #define __INC_HAL8188FPHYCFG_H__
18 
19 /*--------------------------Define Parameters-------------------------------*/
20 #define LOOP_LIMIT				5
21 #define MAX_STALL_TIME			50		/* us */
22 #define AntennaDiversityValue	0x80	/* (Adapter->bSoftwareAntennaDiversity ? 0x00 : 0x80) */
23 #define MAX_TXPWR_IDX_NMODE_92S	63
24 #define Reset_Cnt_Limit			3
25 
26 #ifdef CONFIG_PCI_HCI
27 	#define MAX_AGGR_NUM	0x0B
28 #else
29 	#define MAX_AGGR_NUM	0x07
30 #endif /* CONFIG_PCI_HCI */
31 
32 
33 /*--------------------------Define Parameters End-------------------------------*/
34 
35 
36 /*------------------------------Define structure----------------------------*/
37 
38 /*------------------------------Define structure End----------------------------*/
39 
40 /*--------------------------Exported Function prototype---------------------*/
41 u32
42 PHY_QueryBBReg_8188F(
43 		PADAPTER	Adapter,
44 		u32		RegAddr,
45 		u32		BitMask
46 );
47 
48 void
49 PHY_SetBBReg_8188F(
50 		PADAPTER	Adapter,
51 		u32		RegAddr,
52 		u32		BitMask,
53 		u32		Data
54 );
55 
56 u32
57 PHY_QueryRFReg_8188F(
58 		PADAPTER			Adapter,
59 		enum rf_path			eRFPath,
60 		u32				RegAddr,
61 		u32				BitMask
62 );
63 
64 void
65 PHY_SetRFReg_8188F(
66 		PADAPTER			Adapter,
67 		enum rf_path			eRFPath,
68 		u32				RegAddr,
69 		u32				BitMask,
70 		u32				Data
71 );
72 
73 /* MAC/BB/RF HAL config */
74 int PHY_BBConfig8188F(PADAPTER	Adapter);
75 
76 int PHY_RFConfig8188F(PADAPTER	Adapter);
77 
78 s32 PHY_MACConfig8188F(PADAPTER padapter);
79 
80 int
81 PHY_ConfigRFWithParaFile_8188F(
82 		PADAPTER			Adapter,
83 		u8					*pFileName,
84 	enum rf_path				eRFPath
85 );
86 
87 void
88 PHY_SetTxPowerIndex_8188F(
89 		PADAPTER			Adapter,
90 		u32					PowerIndex,
91 		enum rf_path			RFPath,
92 		u8					Rate
93 );
94 
95 void
96 PHY_SetTxPowerLevel8188F(
97 		PADAPTER		Adapter,
98 		u8			channel
99 );
100 
101 void rtl8188f_set_txpwr_done(_adapter *adapter);
102 
103 void
104 PHY_SetSwChnlBWMode8188F(
105 		PADAPTER			Adapter,
106 		u8					channel,
107 		enum channel_width	Bandwidth,
108 		u8					Offset40,
109 		u8					Offset80
110 );
111 
112 void phy_set_rf_path_switch_8188f(
113 		struct		dm_struct *phydm,
114 		bool		bMain
115 );
116 
117 void BBTurnOnBlock_8188F(_adapter *adapter);
118 
119 /*--------------------------Exported Function prototype End---------------------*/
120 
121 #endif
122