]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/staging/rtl8723bs/include/Hal8723BPhyCfg.h
staging: Add rtl8723bs sdio wifi driver
[karo-tx-linux.git] / drivers / staging / rtl8723bs / include / Hal8723BPhyCfg.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  ******************************************************************************/
15 #ifndef __INC_HAL8723BPHYCFG_H__
16 #define __INC_HAL8723BPHYCFG_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 #define MAX_AGGR_NUM    0x07
26
27
28 /*--------------------------Define Parameters End-------------------------------*/
29
30
31 /*------------------------------Define structure----------------------------*/
32
33 /*------------------------------Define structure End----------------------------*/
34
35 /*--------------------------Exported Function prototype---------------------*/
36 u32
37 PHY_QueryBBReg_8723B(
38 struct adapter *Adapter,
39 u32     RegAddr,
40 u32     BitMask
41         );
42
43 void
44 PHY_SetBBReg_8723B(
45 struct adapter *Adapter,
46 u32     RegAddr,
47 u32     BitMask,
48 u32     Data
49         );
50
51 u32
52 PHY_QueryRFReg_8723B(
53 struct adapter *                Adapter,
54 u8              eRFPath,
55 u32                     RegAddr,
56 u32                     BitMask
57         );
58
59 void
60 PHY_SetRFReg_8723B(
61 struct adapter *                Adapter,
62 u8              eRFPath,
63 u32                     RegAddr,
64 u32                     BitMask,
65 u32                     Data
66         );
67
68 /* MAC/BB/RF HAL config */
69 int PHY_BBConfig8723B(struct adapter *Adapter   );
70
71 int PHY_RFConfig8723B(struct adapter *Adapter   );
72
73 s32 PHY_MACConfig8723B(struct adapter *padapter);
74
75 void
76 PHY_SetTxPowerIndex_8723B(
77 struct adapter *                Adapter,
78 u32                             PowerIndex,
79 u8                      RFPath,
80 u8                      Rate
81         );
82
83 u8
84 PHY_GetTxPowerIndex_8723B(
85 struct adapter *                padapter,
86 u8                      RFPath,
87 u8                      Rate,
88 enum CHANNEL_WIDTH              BandWidth,
89 u8                      Channel
90         );
91
92 void
93 PHY_GetTxPowerLevel8723B(
94 struct adapter *        Adapter,
95         s32*                    powerlevel
96         );
97
98 void
99 PHY_SetTxPowerLevel8723B(
100 struct adapter *        Adapter,
101 u8      channel
102         );
103
104 void
105 PHY_SetBWMode8723B(
106 struct adapter *                        Adapter,
107 enum CHANNEL_WIDTH                      Bandwidth,      /*  20M or 40M */
108 unsigned char                   Offset          /*  Upper, Lower, or Don't care */
109 );
110
111 void
112 PHY_SwChnl8723B(/*  Call after initialization */
113 struct adapter *Adapter,
114 u8 channel
115         );
116
117 void
118 PHY_SetSwChnlBWMode8723B(
119 struct adapter *                Adapter,
120 u8                      channel,
121 enum CHANNEL_WIDTH              Bandwidth,
122 u8                      Offset40,
123 u8                      Offset80
124 );
125
126 /*--------------------------Exported Function prototype End---------------------*/
127
128 #endif