Go to the documentation of this file.
30 #ifndef __RTL92D_DEF_H__
31 #define __RTL92D_DEF_H__
34 #define MAX_MSS_DENSITY_2T 0x13
35 #define MAX_MSS_DENSITY_1T 0x0A
37 #define RF6052_MAX_TX_PWR 0x3F
38 #define RF6052_MAX_REG 0x3F
39 #define RF6052_MAX_PATH 2
41 #define HAL_RETRY_LIMIT_INFRA 48
42 #define HAL_RETRY_LIMIT_AP_ADHOC 7
44 #define PHY_RSSI_SLID_WIN_MAX 100
45 #define PHY_LINKQUALITY_SLID_WIN_MAX 20
46 #define PHY_BEACON_RSSI_SLID_WIN_MAX 10
48 #define RESET_DELAY_8185 20
50 #define RT_IBSS_INT_MASKS (IMR_BCNINT | IMR_TBDOK | IMR_TBDER)
51 #define RT_AC_INT_MASKS (IMR_VIDOK | IMR_VODOK | IMR_BEDOK|IMR_BKDOK)
53 #define NUM_OF_FIRMWARE_QUEUE 10
54 #define NUM_OF_PAGES_IN_FW 0x100
55 #define NUM_OF_PAGE_IN_FW_QUEUE_BK 0x07
56 #define NUM_OF_PAGE_IN_FW_QUEUE_BE 0x07
57 #define NUM_OF_PAGE_IN_FW_QUEUE_VI 0x07
58 #define NUM_OF_PAGE_IN_FW_QUEUE_VO 0x07
59 #define NUM_OF_PAGE_IN_FW_QUEUE_HCCA 0x0
60 #define NUM_OF_PAGE_IN_FW_QUEUE_CMD 0x0
61 #define NUM_OF_PAGE_IN_FW_QUEUE_MGNT 0x02
62 #define NUM_OF_PAGE_IN_FW_QUEUE_HIGH 0x02
63 #define NUM_OF_PAGE_IN_FW_QUEUE_BCN 0x2
64 #define NUM_OF_PAGE_IN_FW_QUEUE_PUB 0xA1
66 #define NUM_OF_PAGE_IN_FW_QUEUE_BK_DTM 0x026
67 #define NUM_OF_PAGE_IN_FW_QUEUE_BE_DTM 0x048
68 #define NUM_OF_PAGE_IN_FW_QUEUE_VI_DTM 0x048
69 #define NUM_OF_PAGE_IN_FW_QUEUE_VO_DTM 0x026
70 #define NUM_OF_PAGE_IN_FW_QUEUE_PUB_DTM 0x00
72 #define MAX_LINES_HWCONFIG_TXT 1000
73 #define MAX_BYTES_LINE_HWCONFIG_TXT 256
75 #define SW_THREE_WIRE 0
76 #define HW_THREE_WIRE 2
78 #define BT_DEMO_BOARD 0
82 #define RX_SMOOTH_FACTOR 20
84 #define HAL_PRIME_CHNL_OFFSET_DONT_CARE 0
85 #define HAL_PRIME_CHNL_OFFSET_LOWER 1
86 #define HAL_PRIME_CHNL_OFFSET_UPPER 2
88 #define MAX_H2C_QUEUE_NUM 10
90 #define RX_MPDU_QUEUE 0
91 #define RX_CMD_QUEUE 1
92 #define RX_MAX_QUEUE 2
94 #define C2H_RX_CMD_HDR_LEN 8
95 #define GET_C2H_CMD_CMD_LEN(__prxhdr) \
96 LE_BITS_TO_4BYTE((__prxhdr), 0, 16)
97 #define GET_C2H_CMD_ELEMENT_ID(__prxhdr) \
98 LE_BITS_TO_4BYTE((__prxhdr), 16, 8)
99 #define GET_C2H_CMD_CMD_SEQ(__prxhdr) \
100 LE_BITS_TO_4BYTE((__prxhdr), 24, 7)
101 #define GET_C2H_CMD_CONTINUE(__prxhdr) \
102 LE_BITS_TO_4BYTE((__prxhdr), 31, 1)
103 #define GET_C2H_CMD_CONTENT(__prxhdr) \
104 ((u8 *)(__prxhdr) + C2H_RX_CMD_HDR_LEN)
106 #define GET_C2H_CMD_FEEDBACK_ELEMENT_ID(__pcmdfbhdr) \
107 LE_BITS_TO_4BYTE((__pcmdfbhdr), 0, 8)
108 #define GET_C2H_CMD_FEEDBACK_CCX_LEN(__pcmdfbhdr) \
109 LE_BITS_TO_4BYTE((__pcmdfbhdr), 8, 8)
110 #define GET_C2H_CMD_FEEDBACK_CCX_CMD_CNT(__pcmdfbhdr) \
111 LE_BITS_TO_4BYTE((__pcmdfbhdr), 16, 16)
112 #define GET_C2H_CMD_FEEDBACK_CCX_MAC_ID(__pcmdfbhdr) \
113 LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 0, 5)
114 #define GET_C2H_CMD_FEEDBACK_CCX_VALID(__pcmdfbhdr) \
115 LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 7, 1)
116 #define GET_C2H_CMD_FEEDBACK_CCX_RETRY_CNT(__pcmdfbhdr) \
117 LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 8, 5)
118 #define GET_C2H_CMD_FEEDBACK_CCX_TOK(__pcmdfbhdr) \
119 LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 15, 1)
120 #define GET_C2H_CMD_FEEDBACK_CCX_QSEL(__pcmdfbhdr) \
121 LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 16, 4)
122 #define GET_C2H_CMD_FEEDBACK_CCX_SEQ(__pcmdfbhdr) \
123 LE_BITS_TO_4BYTE(((__pcmdfbhdr) + 4), 20, 12)
153 #define CHIP_92D_SINGLEPHY BIT(9)
156 #define CHIP_BONDING_IDENTIFIER(_value) (((_value)>>22)&0x3)
157 #define CHIP_BONDING_92C_1T2R 0x1
158 #define CHIP_BONDING_88C_USB_MCARD 0x2
159 #define CHIP_BONDING_88C_USB_HP 0x1
166 #define CHIP_8723 BIT(0)
167 #define CHIP_92D BIT(1)
168 #define NORMAL_CHIP BIT(3)
169 #define RF_TYPE_1T1R (~(BIT(4)|BIT(5)|BIT(6)))
170 #define RF_TYPE_1T2R BIT(4)
171 #define RF_TYPE_2T2R BIT(5)
172 #define CHIP_VENDOR_UMC BIT(7)
173 #define CHIP_92D_B_CUT BIT(12)
174 #define CHIP_92D_C_CUT BIT(13)
175 #define CHIP_92D_D_CUT (BIT(13)|BIT(12))
176 #define CHIP_92D_E_CUT BIT(14)
179 #define IC_TYPE_MASK (BIT(0)|BIT(1)|BIT(2))
180 #define CHIP_TYPE_MASK BIT(3)
181 #define RF_TYPE_MASK (BIT(4)|BIT(5)|BIT(6))
182 #define MANUFACTUER_MASK BIT(7)
183 #define ROM_VERSION_MASK (BIT(11)|BIT(10)|BIT(9)|BIT(8))
184 #define CUT_VERSION_MASK (BIT(15)|BIT(14)|BIT(13)|BIT(12))
188 #define GET_CVID_IC_TYPE(version) ((version) & IC_TYPE_MASK)
189 #define GET_CVID_CHIP_TYPE(version) ((version) & CHIP_TYPE_MASK)
190 #define GET_CVID_RF_TYPE(version) ((version) & RF_TYPE_MASK)
191 #define GET_CVID_MANUFACTUER(version) ((version) & MANUFACTUER_MASK)
192 #define GET_CVID_ROM_VERSION(version) ((version) & ROM_VERSION_MASK)
193 #define GET_CVID_CUT_VERSION(version) ((version) & CUT_VERSION_MASK)
195 #define IS_1T1R(version) ((GET_CVID_RF_TYPE(version)) ? \
197 #define IS_1T2R(version) ((GET_CVID_RF_TYPE(version) == \
198 RF_TYPE_1T2R) ? true : false)
199 #define IS_2T2R(version) ((GET_CVID_RF_TYPE(version) == \
200 RF_TYPE_2T2R) ? true : false)
202 #define IS_92D_SINGLEPHY(version) ((IS_92D(version)) ? \
203 (IS_2T2R(version) ? true : false) : false)
204 #define IS_92D(version) ((GET_CVID_IC_TYPE(version) == \
205 CHIP_92D) ? true : false)
206 #define IS_92D_C_CUT(version) ((IS_92D(version)) ? \
207 ((GET_CVID_CUT_VERSION(version) == \
208 CHIP_92D_C_CUT) ? true : false) : false)
209 #define IS_92D_D_CUT(version) ((IS_92D(version)) ? \
210 ((GET_CVID_CUT_VERSION(version) == \
211 CHIP_92D_D_CUT) ? true : false) : false)
212 #define IS_92D_E_CUT(version) ((IS_92D(version)) ? \
213 ((GET_CVID_CUT_VERSION(version) == \
214 CHIP_92D_E_CUT) ? true : false) : false)