hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
/******************************************************************************
 *
 * Copyright(c) 2007 - 2020  Realtek Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * The full GNU General Public License is included in this distribution in the
 * file called LICENSE.
 *
 * Contact Information:
 * wlanfae <wlanfae@realtek.com>
 * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
 * Hsinchu 300, Taiwan.
 *
 * Larry Finger <Larry.Finger@lwfinger.net>
 *
 *****************************************************************************/
#ifndef __HALRF_IC_HW_INFO_H__
#define __HALRF_IC_HW_INFO_H__
 
enum halrf_ic {
   RF_RTL8852A    =    BIT(0),
   RF_RTL8852B    =    BIT(1),
   RF_RTL8834A    =    BIT(2),
   RF_RTL8852C    =    BIT(3),
   RF_RTL8832BR    =    BIT(4),
   RF_RTL8192XB    =    BIT(5),
   RF_RTL8852BP    =    BIT(6),
   RF_RTL8730A    =    BIT(7),
   RF_RTL8720E    =    BIT(8),
   RF_RTL8851B    =    BIT(9),
   RF_RTL8922A    =    BIT(10),
   RF_RTL8832CR_VU    =    BIT(11),    
   RF_RTL8832BR_VT    =    BIT(12),
   RF_RTL8852D =    BIT(13),
   RF_RTL8852BT    =    BIT(14),
};
 
enum halrf_subdid {
   RF_SUBDID_RTL8832CRVU = 0xc832,
   RF_SUBDID_RTL8832BRVT = 0xb83b,
};
 
#define RF_N_1SS        0
#define RF_N_2SS        0
#define RF_N_3SS        0
#define RF_N_4SS        0
 
#define RF_AC_1SS        0
#define RF_AC_2SS        0
#define RF_AC_3SS        0
#define RF_AC_4SS        0
 
#define RF_AX_1SS        (RF_RTL8851B)
#define RF_AX_2SS        (RF_RTL8852A | RF_RTL8852B | RF_RTL8852C |\
                RF_RTL8832BR | RF_RTL8192XB | RF_RTL8852BP | RF_RTL8852D | RF_RTL8852BT)
#define RF_AX_3SS        0
#define RF_AX_4SS        (RTL8834A)
 
/*@====the following macro DO NOT need to update when adding a new IC======= */
#define RF_1SS        (RF_N_1SS | RF_AC_1SS | RF_AX_1SS)
#define RF_2SS        (RF_N_2SS | RF_AC_2SS | RF_AX_2SS)
#define RF_3SS        (RF_N_3SS | RF_AC_3SS | RF_AX_3SS)
#define RF_4SS        (RF_N_4SS | RF_AC_4SS | RF_AX_4SS)
 
 
#define RF_N_SERIES        (RF_N_1SS | RF_N_2SS | RF_N_3SS |\
                RF_N_4SS)
#define RF_AC_SERIES    (RF_AC_1SS | RF_AC_2SS |\
                RF_AC_3SS | RF_AC_4SS)
#define RF_AX_SERIES    (RF_AX_1SS | RF_AX_2SS |\
                RF_AX_3SS | RF_AX_4SS)
/*@==========================================================================*/
#if (defined(RF_8852C_SUPPORT) || defined(RF_8852D_SUPPORT))
#define KIP_REG 3136
#elif (defined (RF_8852B_SUPPORT) || defined (RF_8852BT_SUPPORT))
#define KIP_REG 2048
#else
#define KIP_REG 2048
#endif
 
#if defined(RF_8834A_SUPPORT)
#define KPATH 4
#elif (defined(RF_8852A_SUPPORT) || defined(RF_8852B_SUPPORT) ||\
       defined(RF_8852C_SUPPORT) || defined(RF_8832BR_SUPPORT) ||\
       defined(RF_8192XB_SUPPORT) || defined(RF_8852BP_SUPPORT) || defined(RF_8852D_SUPPORT) || defined(RF_8852BT_SUPPORT))
#define KPATH 2
#else
#define KPATH 1
#endif
 
/*@==========================================================================*/
 
/*@==========================================================================*/
 
 
 
/*@==========================================================================*/
 
/****************************************************************
 * 1 ============================================================
 * 1  enumeration
 * 1 ============================================================
 ***************************************************************/
 
enum rf_path_bit {
   RF_A    = BIT(0),
   RF_B    = BIT(1),
   RF_C    = BIT(2),
   RF_D    = BIT(3),
 
   RF_AB    = (RF_A | RF_B),
   RF_AC    = (RF_A | RF_C),
   RF_AD    = (RF_A | RF_D),
   RF_BC    = (RF_B | RF_C),
   RF_BD    = (RF_B | RF_D),
   RF_CD    = (RF_C | RF_D),
 
   RF_ABC    = (RF_A | RF_B | RF_C),
   RF_ABD    = (RF_A | RF_B | RF_D),
   RF_ACD    = (RF_A | RF_C | RF_D),
   RF_BCD    = (RF_B | RF_C | RF_D),
 
   RF_ABCD    = (RF_A | RF_B | RF_C | RF_D),
};
 
enum halrf_ant {
   RF_MAIN_ANT    = 1,
   RF_AUX_ANT    = 2,
};
 
#endif