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