1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /****************************************************************************** 3 * 4 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. 5 * 6 ******************************************************************************/ 7 #ifndef __INC_HAL8723BPHYCFG_H__ 8 #define __INC_HAL8723BPHYCFG_H__ 9 10 /*--------------------------Define Parameters-------------------------------*/ 11 #define LOOP_LIMIT 5 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 16 17 #define MAX_AGGR_NUM 0x07 18 19 20 /*--------------------------Define Parameters End-------------------------------*/ 21 22 23 /*------------------------------Define structure----------------------------*/ 24 25 /*------------------------------Define structure End----------------------------*/ 26 27 /*--------------------------Exported Function prototype---------------------*/ 28 u32 PHY_QueryBBReg_8723B(struct adapter *Adapter, u32 RegAddr, u32 BitMask); 29 30 void PHY_SetBBReg_8723B(struct adapter *Adapter, u32 RegAddr, 31 u32 BitMask, u32 Data); 32 33 u32 PHY_QueryRFReg_8723B(struct adapter *Adapter, u8 eRFPath, 34 u32 RegAddr, u32 BitMask); 35 36 void PHY_SetRFReg_8723B(struct adapter *Adapter, u8 eRFPath, 37 u32 RegAddr, u32 BitMask, u32 Data); 38 39 /* MAC/BB/RF HAL config */ 40 int PHY_BBConfig8723B(struct adapter *Adapter); 41 42 int PHY_RFConfig8723B(struct adapter *Adapter); 43 44 s32 PHY_MACConfig8723B(struct adapter *padapter); 45 46 void PHY_SetTxPowerIndex(struct adapter *Adapter, u32 PowerIndex, 47 u8 RFPath, u8 Rate); 48 49 u8 PHY_GetTxPowerIndex(struct adapter *padapter, u8 RFPath, u8 Rate, 50 enum channel_width BandWidth, u8 Channel); 51 52 void PHY_GetTxPowerLevel8723B(struct adapter *Adapter, s32 *powerlevel); 53 54 void PHY_SetTxPowerLevel8723B(struct adapter *Adapter, u8 channel); 55 56 void PHY_SetBWMode8723B(struct adapter *Adapter, enum channel_width Bandwidth, 57 unsigned char Offset); 58 59 /* Call after initialization */ 60 void PHY_SwChnl8723B(struct adapter *Adapter, u8 channel); 61 62 void PHY_SetSwChnlBWMode8723B(struct adapter *Adapter, u8 channel, 63 enum channel_width Bandwidth, 64 u8 Offset40, u8 Offset80); 65 66 /*--------------------------Exported Function prototype End---------------------*/ 67 68 #endif 69