net: wireless: rockchip_wlan: add rtl8723cs support
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8723cs / include / Hal8188FPhyCfg.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
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  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
17  *
18  *
19  ******************************************************************************/
20 #ifndef __INC_HAL8188FPHYCFG_H__
21 #define __INC_HAL8188FPHYCFG_H__
22
23 /*--------------------------Define Parameters-------------------------------*/
24 #define LOOP_LIMIT                              5
25 #define MAX_STALL_TIME                  50              /* us */
26 #define AntennaDiversityValue   0x80    /* (Adapter->bSoftwareAntennaDiversity ? 0x00 : 0x80) */
27 #define MAX_TXPWR_IDX_NMODE_92S 63
28 #define Reset_Cnt_Limit                 3
29
30 #ifdef CONFIG_PCI_HCI
31         #define MAX_AGGR_NUM    0x0B
32 #else
33         #define MAX_AGGR_NUM    0x07
34 #endif /* CONFIG_PCI_HCI */
35
36
37 /*--------------------------Define Parameters End-------------------------------*/
38
39
40 /*------------------------------Define structure----------------------------*/
41
42 /*------------------------------Define structure End----------------------------*/
43
44 /*--------------------------Exported Function prototype---------------------*/
45 u32
46 PHY_QueryBBReg_8188F(
47         IN      PADAPTER        Adapter,
48         IN      u32             RegAddr,
49         IN      u32             BitMask
50 );
51
52 VOID
53 PHY_SetBBReg_8188F(
54         IN      PADAPTER        Adapter,
55         IN      u32             RegAddr,
56         IN      u32             BitMask,
57         IN      u32             Data
58 );
59
60 u32
61 PHY_QueryRFReg_8188F(
62         IN      PADAPTER                        Adapter,
63         IN      u8                              eRFPath,
64         IN      u32                             RegAddr,
65         IN      u32                             BitMask
66 );
67
68 VOID
69 PHY_SetRFReg_8188F(
70         IN      PADAPTER                        Adapter,
71         IN      u8                              eRFPath,
72         IN      u32                             RegAddr,
73         IN      u32                             BitMask,
74         IN      u32                             Data
75 );
76
77 /* MAC/BB/RF HAL config */
78 int PHY_BBConfig8188F(PADAPTER  Adapter);
79
80 int PHY_RFConfig8188F(PADAPTER  Adapter);
81
82 s32 PHY_MACConfig8188F(PADAPTER padapter);
83
84 int
85 PHY_ConfigRFWithParaFile_8188F(
86         IN      PADAPTER                        Adapter,
87         IN      u8                              *pFileName,
88         RF_PATH                         eRFPath
89 );
90
91 VOID
92 PHY_SetTxPowerIndex_8188F(
93         IN      PADAPTER                        Adapter,
94         IN      u32                                     PowerIndex,
95         IN      u8                                      RFPath,
96         IN      u8                                      Rate
97 );
98
99 u8
100 PHY_GetTxPowerIndex_8188F(
101         IN      PADAPTER                        pAdapter,
102         IN      u8                                      RFPath,
103         IN      u8                                      Rate,
104         IN      u8              BandWidth,
105         IN      u8                                      Channel,
106         struct txpwr_idx_comp *tic
107 );
108
109 VOID
110 PHY_GetTxPowerLevel8188F(
111         IN      PADAPTER                Adapter,
112         OUT s32                         *powerlevel
113 );
114
115 VOID
116 PHY_SetTxPowerLevel8188F(
117         IN      PADAPTER                Adapter,
118         IN      u8                      channel
119 );
120
121 VOID
122 PHY_SetSwChnlBWMode8188F(
123         IN      PADAPTER                        Adapter,
124         IN      u8                                      channel,
125         IN      CHANNEL_WIDTH           Bandwidth,
126         IN      u8                                      Offset40,
127         IN      u8                                      Offset80
128 );
129
130 VOID phy_set_rf_path_switch_8188f(
131         IN      PADAPTER        pAdapter,
132         IN      bool            bMain
133 );
134
135 void BBTurnOnBlock_8188F(_adapter *adapter);
136
137 /*--------------------------Exported Function prototype End---------------------*/
138
139 #endif