1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
4 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
6 ******************************************************************************/
7 #ifndef __INC_HAL8723BPHYCFG_H__
8 #define __INC_HAL8723BPHYCFG_H__
10 /*--------------------------Define Parameters-------------------------------*/
12 #define MAX_STALL_TIME 50 /* us */
13 #define AntennaDiversityValue 0x80 /* Adapter->bSoftwareAntennaDiversity ? 0x00:0x80) */
14 #define MAX_TXPWR_IDX_NMODE_92S 63
15 #define Reset_Cnt_Limit 3
17 #define MAX_AGGR_NUM 0x07
20 /*--------------------------Define Parameters End-------------------------------*/
23 /*------------------------------Define structure----------------------------*/
25 /*------------------------------Define structure End----------------------------*/
27 /*--------------------------Exported Function prototype---------------------*/
28 u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask);
30 void PHY_SetBBReg_8723B(struct adapter *Adapter, u32 RegAddr,
31 u32 BitMask, u32 Data);
33 u32 PHY_QueryRFReg_8723B(struct adapter *Adapter, u8 eRFPath,
34 u32 RegAddr, u32 BitMask);
36 void PHY_SetRFReg_8723B(struct adapter *Adapter, u8 eRFPath,
37 u32 RegAddr, u32 BitMask, u32 Data);
39 /* MAC/BB/RF HAL config */
40 int PHY_BBConfig8723B(struct adapter *Adapter);
42 int PHY_RFConfig8723B(struct adapter *Adapter);
44 s32 PHY_MACConfig8723B(struct adapter *padapter);
46 void PHY_SetTxPowerIndex(struct adapter *Adapter, u32 PowerIndex,
49 u8 PHY_GetTxPowerIndex(struct adapter *padapter, u8 RFPath, u8 Rate,
50 enum CHANNEL_WIDTH BandWidth, u8 Channel);
52 void PHY_GetTxPowerLevel8723B(struct adapter *Adapter, s32 *powerlevel);
54 void PHY_SetTxPowerLevel8723B(struct adapter *Adapter, u8 channel);
56 void PHY_SetBWMode8723B(struct adapter *Adapter, enum CHANNEL_WIDTH Bandwidth,
57 unsigned char Offset);
59 /* Call after initialization */
60 void PHY_SwChnl8723B(struct adapter *Adapter, u8 channel);
62 void PHY_SetSwChnlBWMode8723B(struct adapter *Adapter, u8 channel,
63 enum CHANNEL_WIDTH Bandwidth,
64 u8 Offset40, u8 Offset80);
66 /*--------------------------Exported Function prototype End---------------------*/