1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /****************************************************************************** 3 * 4 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. 5 * 6 ******************************************************************************/ 7 #ifndef __HAL_PHY_H__ 8 #define __HAL_PHY_H__ 9 10 11 #if DISABLE_BB_RF 12 #define HAL_FW_ENABLE 0 13 #define HAL_MAC_ENABLE 0 14 #define HAL_BB_ENABLE 0 15 #define HAL_RF_ENABLE 0 16 #else /* FPGA_PHY and ASIC */ 17 #define HAL_FW_ENABLE 1 18 #define HAL_MAC_ENABLE 1 19 #define HAL_BB_ENABLE 1 20 #define HAL_RF_ENABLE 1 21 #endif 22 23 /* */ 24 /* Antenna detection method, i.e., using single tone detection or RSSI reported from each antenna detected. */ 25 /* Added by Roger, 2013.05.22. */ 26 /* */ 27 #define ANT_DETECT_BY_SINGLE_TONE BIT0 28 #define ANT_DETECT_BY_RSSI BIT1 29 #define IS_ANT_DETECT_SUPPORT_SINGLE_TONE(__Adapter) ((GET_HAL_DATA(__Adapter)->AntDetection) & ANT_DETECT_BY_SINGLE_TONE) 30 #define IS_ANT_DETECT_SUPPORT_RSSI(__Adapter) ((GET_HAL_DATA(__Adapter)->AntDetection) & ANT_DETECT_BY_RSSI) 31 32 33 /*--------------------------Define Parameters-------------------------------*/ 34 enum band_type { 35 BAND_ON_2_4G = 0, 36 BAND_ON_5G, 37 BAND_ON_BOTH, 38 BANDMAX 39 }; 40 41 enum { 42 RF_TYPE_MIN = 0, /* 0 */ 43 RF_8225 = 1, /* 1 11b/g RF for verification only */ 44 RF_8256 = 2, /* 2 11b/g/n */ 45 RF_8258 = 3, /* 3 11a/b/g/n RF */ 46 RF_6052 = 4, /* 4 11b/g/n RF */ 47 RF_PSEUDO_11N = 5, /* 5, It is a temporality RF. */ 48 RF_TYPE_MAX 49 }; 50 51 enum rf_path { 52 RF_PATH_A = 0, 53 RF_PATH_B, 54 RF_PATH_C, 55 RF_PATH_D 56 }; 57 58 #define TX_1S 0 59 #define TX_2S 1 60 #define TX_3S 2 61 #define TX_4S 3 62 63 #define RF_PATH_MAX_92C_88E 2 64 #define RF_PATH_MAX_90_8812 4 /* Max RF number 90 support */ 65 66 enum wireless_mode { 67 WIRELESS_MODE_UNKNOWN = 0x00, 68 WIRELESS_MODE_A = 0x01, 69 WIRELESS_MODE_B = 0x02, 70 WIRELESS_MODE_G = 0x04, 71 WIRELESS_MODE_AUTO = 0x08, 72 WIRELESS_MODE_N_24G = 0x10, 73 WIRELESS_MODE_N_5G = 0x20, 74 WIRELESS_MODE_AC_5G = 0x40, 75 WIRELESS_MODE_AC_24G = 0x80, 76 WIRELESS_MODE_AC_ONLY = 0x100, 77 }; 78 79 enum SwChnlCmdID { 80 CmdID_End, 81 CmdID_SetTxPowerLevel, 82 CmdID_BBRegWrite10, 83 CmdID_WritePortUlong, 84 CmdID_WritePortUshort, 85 CmdID_WritePortUchar, 86 CmdID_RF_WriteReg, 87 }; 88 89 struct SwChnlCmd { 90 enum SwChnlCmdID CmdID; 91 u32 Para1; 92 u32 Para2; 93 u32 msDelay; 94 }; 95 96 /*--------------------------Exported Function prototype---------------------*/ 97 98 #endif /* __HAL_COMMON_H__ */ 99