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