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 29 PHY_QueryBBReg_8723B( 30 struct adapter *Adapter, 31 u32 RegAddr, 32 u32 BitMask 33 ); 34 35 void 36 PHY_SetBBReg_8723B( 37 struct adapter *Adapter, 38 u32 RegAddr, 39 u32 BitMask, 40 u32 Data 41 ); 42 43 u32 44 PHY_QueryRFReg_8723B( 45 struct adapter * Adapter, 46 u8 eRFPath, 47 u32 RegAddr, 48 u32 BitMask 49 ); 50 51 void 52 PHY_SetRFReg_8723B( 53 struct adapter * Adapter, 54 u8 eRFPath, 55 u32 RegAddr, 56 u32 BitMask, 57 u32 Data 58 ); 59 60 /* MAC/BB/RF HAL config */ 61 int PHY_BBConfig8723B(struct adapter *Adapter ); 62 63 int PHY_RFConfig8723B(struct adapter *Adapter ); 64 65 s32 PHY_MACConfig8723B(struct adapter *padapter); 66 67 void 68 PHY_SetTxPowerIndex_8723B( 69 struct adapter * Adapter, 70 u32 PowerIndex, 71 u8 RFPath, 72 u8 Rate 73 ); 74 75 u8 76 PHY_GetTxPowerIndex_8723B( 77 struct adapter * padapter, 78 u8 RFPath, 79 u8 Rate, 80 enum CHANNEL_WIDTH BandWidth, 81 u8 Channel 82 ); 83 84 void 85 PHY_GetTxPowerLevel8723B( 86 struct adapter * Adapter, 87 s32* powerlevel 88 ); 89 90 void 91 PHY_SetTxPowerLevel8723B( 92 struct adapter * Adapter, 93 u8 channel 94 ); 95 96 void 97 PHY_SetBWMode8723B( 98 struct adapter * Adapter, 99 enum CHANNEL_WIDTH Bandwidth, /* 20M or 40M */ 100 unsigned char Offset /* Upper, Lower, or Don't care */ 101 ); 102 103 void 104 PHY_SwChnl8723B(/* Call after initialization */ 105 struct adapter *Adapter, 106 u8 channel 107 ); 108 109 void 110 PHY_SetSwChnlBWMode8723B( 111 struct adapter * Adapter, 112 u8 channel, 113 enum CHANNEL_WIDTH Bandwidth, 114 u8 Offset40, 115 u8 Offset80 116 ); 117 118 /*--------------------------Exported Function prototype End---------------------*/ 119 120 #endif 121