1 /****************************************************************************** 2 * 3 * Copyright(c) 2016 - 2019 Realtek Corporation. All rights reserved. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of version 2 of the GNU General Public License as 7 * published by the Free Software Foundation. 8 * 9 * This program is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 * more details. 13 * 14 ******************************************************************************/ 15 16 #ifndef _HALMAC_TX_DESC_NIC_H_ 17 #define _HALMAC_TX_DESC_NIC_H_ 18 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 19 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 20 HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 21 22 /*TXDESC_WORD0*/ 23 24 #define SET_TX_DESC_DISQSELSEQ(txdesc, value) \ 25 SET_BITS_TO_LE_4BYTE(txdesc + 0x00, 31, 1, value) 26 #define GET_TX_DESC_DISQSELSEQ(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x00, 31, 1) 27 28 #endif 29 30 #if (HALMAC_8814B_SUPPORT) 31 32 #define SET_TX_DESC_IE_END_BODY(txdesc, value) \ 33 SET_BITS_TO_LE_4BYTE(txdesc + 0x00, 31, 1, value) 34 #define GET_TX_DESC_IE_END_BODY(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x00, 31, 1) 35 36 #endif 37 38 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 39 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 40 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 41 42 #define SET_TX_DESC_GF(txdesc, value) \ 43 SET_BITS_TO_LE_4BYTE(txdesc + 0x00, 30, 1, value) 44 #define GET_TX_DESC_GF(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x00, 30, 1) 45 46 #endif 47 48 #if (HALMAC_8814B_SUPPORT) 49 50 #define SET_TX_DESC_AGG_EN_V1(txdesc, value) \ 51 SET_BITS_TO_LE_4BYTE(txdesc + 0x00, 30, 1, value) 52 #define GET_TX_DESC_AGG_EN_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x00, 30, 1) 53 54 #endif 55 56 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 57 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 58 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 59 60 #define SET_TX_DESC_NO_ACM(txdesc, value) \ 61 SET_BITS_TO_LE_4BYTE(txdesc + 0x00, 29, 1, value) 62 #define GET_TX_DESC_NO_ACM(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x00, 29, 1) 63 64 #endif 65 66 #if (HALMAC_8814B_SUPPORT) 67 68 #define SET_TX_DESC_BK_V1(txdesc, value) \ 69 SET_BITS_TO_LE_4BYTE(txdesc + 0x00, 29, 1, value) 70 #define GET_TX_DESC_BK_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x00, 29, 1) 71 72 #endif 73 74 #if (HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8821C_SUPPORT || \ 75 HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT || \ 76 HALMAC_8197G_SUPPORT) 77 78 #define SET_TX_DESC_BCNPKT_TSF_CTRL(txdesc, value) \ 79 SET_BITS_TO_LE_4BYTE(txdesc + 0x00, 28, 1, value) 80 #define GET_TX_DESC_BCNPKT_TSF_CTRL(txdesc) \ 81 LE_BITS_TO_4BYTE(txdesc + 0x00, 28, 1) 82 83 #endif 84 85 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 86 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 87 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 88 89 #define SET_TX_DESC_AMSDU_PAD_EN(txdesc, value) \ 90 SET_BITS_TO_LE_4BYTE(txdesc + 0x00, 27, 1, value) 91 #define GET_TX_DESC_AMSDU_PAD_EN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x00, 27, 1) 92 93 #endif 94 95 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 96 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 97 HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 98 99 #define SET_TX_DESC_LS(txdesc, value) \ 100 SET_BITS_TO_LE_4BYTE(txdesc + 0x00, 26, 1, value) 101 #define GET_TX_DESC_LS(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x00, 26, 1) 102 103 #endif 104 105 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 106 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 107 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 108 109 #define SET_TX_DESC_HTC(txdesc, value) \ 110 SET_BITS_TO_LE_4BYTE(txdesc + 0x00, 25, 1, value) 111 #define GET_TX_DESC_HTC(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x00, 25, 1) 112 #define SET_TX_DESC_BMC(txdesc, value) \ 113 SET_BITS_TO_LE_4BYTE(txdesc + 0x00, 24, 1, value) 114 #define GET_TX_DESC_BMC(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x00, 24, 1) 115 116 #endif 117 118 #if (HALMAC_8814B_SUPPORT) 119 120 #define SET_TX_DESC_PKT_OFFSET_V1(txdesc, value) \ 121 SET_BITS_TO_LE_4BYTE(txdesc + 0x00, 24, 5, value) 122 #define GET_TX_DESC_PKT_OFFSET_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x00, 24, 5) 123 124 #endif 125 126 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 127 HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT || \ 128 HALMAC_8822C_SUPPORT || HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || \ 129 HALMAC_8197G_SUPPORT) 130 131 #define SET_TX_DESC_OFFSET(txdesc, value) \ 132 SET_BITS_TO_LE_4BYTE(txdesc + 0x00, 16, 8, value) 133 #define GET_TX_DESC_OFFSET(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x00, 16, 8) 134 #define SET_TX_DESC_TXPKTSIZE(txdesc, value) \ 135 SET_BITS_TO_LE_4BYTE(txdesc + 0x00, 0, 16, value) 136 #define GET_TX_DESC_TXPKTSIZE(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x00, 0, 16) 137 138 #endif 139 140 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT) 141 142 /*WORD1*/ 143 144 #define SET_TX_DESC_HW_AES_IV_V2(txdesc, value) \ 145 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 31, 1, value) 146 #define GET_TX_DESC_HW_AES_IV_V2(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 31, 1) 147 148 #endif 149 150 #if (HALMAC_8814B_SUPPORT) 151 152 #define SET_TX_DESC_AMSDU(txdesc, value) \ 153 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 30, 1, value) 154 #define GET_TX_DESC_AMSDU(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 30, 1) 155 156 #endif 157 158 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT) 159 160 #define SET_TX_DESC_FTM_EN_V1(txdesc, value) \ 161 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 30, 1, value) 162 #define GET_TX_DESC_FTM_EN_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 30, 1) 163 164 #endif 165 166 #if (HALMAC_8192F_SUPPORT) 167 168 #define SET_TX_DESC_KEYID_SEL(txdesc, value) \ 169 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 30, 1, value) 170 #define GET_TX_DESC_KEYID_SEL(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 30, 1) 171 172 #endif 173 174 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 175 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 176 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 177 178 #define SET_TX_DESC_MOREDATA(txdesc, value) \ 179 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 29, 1, value) 180 #define GET_TX_DESC_MOREDATA(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 29, 1) 181 182 #endif 183 184 #if (HALMAC_8814B_SUPPORT) 185 186 #define SET_TX_DESC_HW_AES_IV_V1(txdesc, value) \ 187 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 29, 1, value) 188 #define GET_TX_DESC_HW_AES_IV_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 29, 1) 189 #define SET_TX_DESC_MHR_CP(txdesc, value) \ 190 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 25, 1, value) 191 #define GET_TX_DESC_MHR_CP(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 25, 1) 192 193 #endif 194 195 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 196 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 197 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 198 199 #define SET_TX_DESC_PKT_OFFSET(txdesc, value) \ 200 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 24, 5, value) 201 #define GET_TX_DESC_PKT_OFFSET(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 24, 5) 202 203 #endif 204 205 #if (HALMAC_8814B_SUPPORT) 206 207 #define SET_TX_DESC_SMH_EN_V1(txdesc, value) \ 208 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 24, 1, value) 209 #define GET_TX_DESC_SMH_EN_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 24, 1) 210 211 #endif 212 213 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 214 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 215 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 216 217 #define SET_TX_DESC_SEC_TYPE(txdesc, value) \ 218 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 22, 2, value) 219 #define GET_TX_DESC_SEC_TYPE(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 22, 2) 220 #define SET_TX_DESC_EN_DESC_ID(txdesc, value) \ 221 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 21, 1, value) 222 #define GET_TX_DESC_EN_DESC_ID(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 21, 1) 223 #define SET_TX_DESC_RATE_ID(txdesc, value) \ 224 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 16, 5, value) 225 #define GET_TX_DESC_RATE_ID(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 16, 5) 226 227 #endif 228 229 #if (HALMAC_8814B_SUPPORT) 230 231 #define SET_TX_DESC_SMH_CAM(txdesc, value) \ 232 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 16, 8, value) 233 #define GET_TX_DESC_SMH_CAM(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 16, 8) 234 235 #endif 236 237 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 238 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 239 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 240 241 #define SET_TX_DESC_PIFS(txdesc, value) \ 242 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 15, 1, value) 243 #define GET_TX_DESC_PIFS(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 15, 1) 244 #define SET_TX_DESC_LSIG_TXOP_EN(txdesc, value) \ 245 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 14, 1, value) 246 #define GET_TX_DESC_LSIG_TXOP_EN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 14, 1) 247 #define SET_TX_DESC_RD_NAV_EXT(txdesc, value) \ 248 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 13, 1, value) 249 #define GET_TX_DESC_RD_NAV_EXT(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 13, 1) 250 251 #endif 252 253 #if (HALMAC_8814B_SUPPORT) 254 255 #define SET_TX_DESC_EXT_EDCA(txdesc, value) \ 256 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 13, 1, value) 257 #define GET_TX_DESC_EXT_EDCA(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 13, 1) 258 259 #endif 260 261 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 262 HALMAC_8821C_SUPPORT || HALMAC_8814B_SUPPORT || HALMAC_8198F_SUPPORT || \ 263 HALMAC_8822C_SUPPORT || HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || \ 264 HALMAC_8197G_SUPPORT) 265 266 #define SET_TX_DESC_QSEL(txdesc, value) \ 267 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 8, 5, value) 268 #define GET_TX_DESC_QSEL(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 8, 5) 269 270 #endif 271 272 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT) 273 274 #define SET_TX_DESC_SPECIAL_CW(txdesc, value) \ 275 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 7, 1, value) 276 #define GET_TX_DESC_SPECIAL_CW(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 7, 1) 277 278 #endif 279 280 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 281 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 282 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 283 284 #define SET_TX_DESC_MACID(txdesc, value) \ 285 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 0, 7, value) 286 #define GET_TX_DESC_MACID(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 0, 7) 287 288 #endif 289 290 #if (HALMAC_8814B_SUPPORT) 291 292 #define SET_TX_DESC_MACID_V1(txdesc, value) \ 293 SET_BITS_TO_LE_4BYTE(txdesc + 0x04, 0, 7, value) 294 #define GET_TX_DESC_MACID_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x04, 0, 7) 295 296 #endif 297 298 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 299 HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT) 300 301 /*TXDESC_WORD2*/ 302 303 #define SET_TX_DESC_HW_AES_IV(txdesc, value) \ 304 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 31, 1, value) 305 #define GET_TX_DESC_HW_AES_IV(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 31, 1) 306 307 #endif 308 309 #if (HALMAC_8814B_SUPPORT) 310 311 #define SET_TX_DESC_CHK_EN_V1(txdesc, value) \ 312 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 31, 1, value) 313 #define GET_TX_DESC_CHK_EN_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 31, 1) 314 315 #endif 316 317 #if (HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8821C_SUPPORT || \ 318 HALMAC_8822C_SUPPORT || HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT) 319 320 #define SET_TX_DESC_FTM_EN(txdesc, value) \ 321 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 30, 1, value) 322 #define GET_TX_DESC_FTM_EN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 30, 1) 323 324 #endif 325 326 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT) 327 328 #define SET_TX_DESC_ANTCEL_D_V1(txdesc, value) \ 329 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 28, 4, value) 330 #define GET_TX_DESC_ANTCEL_D_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 28, 4) 331 332 #endif 333 334 #if (HALMAC_8814B_SUPPORT) 335 336 #define SET_TX_DESC_DMA_PRI(txdesc, value) \ 337 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 27, 1, value) 338 #define GET_TX_DESC_DMA_PRI(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 27, 1) 339 340 #endif 341 342 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 343 HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8192F_SUPPORT || \ 344 HALMAC_8812F_SUPPORT) 345 346 #define SET_TX_DESC_G_ID(txdesc, value) \ 347 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 24, 6, value) 348 #define GET_TX_DESC_G_ID(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 24, 6) 349 350 #endif 351 352 #if (HALMAC_8814B_SUPPORT) 353 354 #define SET_TX_DESC_MAX_AMSDU_MODE(txdesc, value) \ 355 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 24, 3, value) 356 #define GET_TX_DESC_MAX_AMSDU_MODE(txdesc) \ 357 LE_BITS_TO_4BYTE(txdesc + 0x08, 24, 3) 358 359 #endif 360 361 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT) 362 363 #define SET_TX_DESC_ANTSEL_C_V1(txdesc, value) \ 364 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 24, 4, value) 365 #define GET_TX_DESC_ANTSEL_C_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 24, 4) 366 367 #endif 368 369 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 370 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 371 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 372 373 #define SET_TX_DESC_BT_NULL(txdesc, value) \ 374 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 23, 1, value) 375 #define GET_TX_DESC_BT_NULL(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 23, 1) 376 #define SET_TX_DESC_AMPDU_DENSITY(txdesc, value) \ 377 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 20, 3, value) 378 #define GET_TX_DESC_AMPDU_DENSITY(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 20, 3) 379 #define SET_TX_DESC_SPE_RPT(txdesc, value) \ 380 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 19, 1, value) 381 #define GET_TX_DESC_SPE_RPT(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 19, 1) 382 #define SET_TX_DESC_RAW(txdesc, value) \ 383 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 18, 1, value) 384 #define GET_TX_DESC_RAW(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 18, 1) 385 #define SET_TX_DESC_MOREFRAG(txdesc, value) \ 386 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 17, 1, value) 387 #define GET_TX_DESC_MOREFRAG(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 17, 1) 388 #define SET_TX_DESC_BK(txdesc, value) \ 389 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 16, 1, value) 390 #define GET_TX_DESC_BK(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 16, 1) 391 392 #endif 393 394 #if (HALMAC_8814B_SUPPORT) 395 396 #define SET_TX_DESC_DMA_TXAGG_NUM_V1(txdesc, value) \ 397 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 16, 8, value) 398 #define GET_TX_DESC_DMA_TXAGG_NUM_V1(txdesc) \ 399 LE_BITS_TO_4BYTE(txdesc + 0x08, 16, 8) 400 401 #endif 402 403 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 404 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 405 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 406 407 #define SET_TX_DESC_NULL_1(txdesc, value) \ 408 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 15, 1, value) 409 #define GET_TX_DESC_NULL_1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 15, 1) 410 #define SET_TX_DESC_NULL_0(txdesc, value) \ 411 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 14, 1, value) 412 #define GET_TX_DESC_NULL_0(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 14, 1) 413 #define SET_TX_DESC_RDG_EN(txdesc, value) \ 414 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 13, 1, value) 415 #define GET_TX_DESC_RDG_EN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 13, 1) 416 #define SET_TX_DESC_AGG_EN(txdesc, value) \ 417 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 12, 1, value) 418 #define GET_TX_DESC_AGG_EN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 12, 1) 419 #define SET_TX_DESC_CCA_RTS(txdesc, value) \ 420 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 10, 2, value) 421 #define GET_TX_DESC_CCA_RTS(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 10, 2) 422 423 #endif 424 425 #if (HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8821C_SUPPORT || \ 426 HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8192F_SUPPORT || \ 427 HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 428 429 #define SET_TX_DESC_TRI_FRAME(txdesc, value) \ 430 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 9, 1, value) 431 #define GET_TX_DESC_TRI_FRAME(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 9, 1) 432 433 #endif 434 435 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 436 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 437 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 438 439 #define SET_TX_DESC_P_AID(txdesc, value) \ 440 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 0, 9, value) 441 #define GET_TX_DESC_P_AID(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x08, 0, 9) 442 443 #endif 444 445 #if (HALMAC_8814B_SUPPORT) 446 447 #define SET_TX_DESC_TXDESC_CHECKSUM_V1(txdesc, value) \ 448 SET_BITS_TO_LE_4BYTE(txdesc + 0x08, 0, 16, value) 449 #define GET_TX_DESC_TXDESC_CHECKSUM_V1(txdesc) \ 450 LE_BITS_TO_4BYTE(txdesc + 0x08, 0, 16) 451 452 #endif 453 454 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 455 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 456 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 457 458 /*TXDESC_WORD3*/ 459 460 #define SET_TX_DESC_AMPDU_MAX_TIME(txdesc, value) \ 461 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 24, 8, value) 462 #define GET_TX_DESC_AMPDU_MAX_TIME(txdesc) \ 463 LE_BITS_TO_4BYTE(txdesc + 0x0C, 24, 8) 464 #define SET_TX_DESC_NDPA(txdesc, value) \ 465 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 22, 2, value) 466 #define GET_TX_DESC_NDPA(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 22, 2) 467 #define SET_TX_DESC_MAX_AGG_NUM(txdesc, value) \ 468 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 17, 5, value) 469 #define GET_TX_DESC_MAX_AGG_NUM(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 17, 5) 470 #define SET_TX_DESC_USE_MAX_TIME_EN(txdesc, value) \ 471 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 16, 1, value) 472 #define GET_TX_DESC_USE_MAX_TIME_EN(txdesc) \ 473 LE_BITS_TO_4BYTE(txdesc + 0x0C, 16, 1) 474 475 #endif 476 477 #if (HALMAC_8814B_SUPPORT) 478 479 #define SET_TX_DESC_OFFLOAD_SIZE(txdesc, value) \ 480 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 16, 15, value) 481 #define GET_TX_DESC_OFFLOAD_SIZE(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 16, 15) 482 483 #endif 484 485 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 486 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 487 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 488 489 #define SET_TX_DESC_NAVUSEHDR(txdesc, value) \ 490 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 15, 1, value) 491 #define GET_TX_DESC_NAVUSEHDR(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 15, 1) 492 #define SET_TX_DESC_CHK_EN(txdesc, value) \ 493 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 14, 1, value) 494 #define GET_TX_DESC_CHK_EN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 14, 1) 495 #define SET_TX_DESC_HW_RTS_EN(txdesc, value) \ 496 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 13, 1, value) 497 #define GET_TX_DESC_HW_RTS_EN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 13, 1) 498 #define SET_TX_DESC_RTSEN(txdesc, value) \ 499 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 12, 1, value) 500 #define GET_TX_DESC_RTSEN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 12, 1) 501 #define SET_TX_DESC_CTS2SELF(txdesc, value) \ 502 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 11, 1, value) 503 #define GET_TX_DESC_CTS2SELF(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 11, 1) 504 505 #endif 506 507 #if (HALMAC_8814B_SUPPORT) 508 509 #define SET_TX_DESC_CHANNEL_DMA(txdesc, value) \ 510 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 11, 5, value) 511 #define GET_TX_DESC_CHANNEL_DMA(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 11, 5) 512 513 #endif 514 515 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 516 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 517 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 518 519 #define SET_TX_DESC_DISDATAFB(txdesc, value) \ 520 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 10, 1, value) 521 #define GET_TX_DESC_DISDATAFB(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 10, 1) 522 #define SET_TX_DESC_DISRTSFB(txdesc, value) \ 523 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 9, 1, value) 524 #define GET_TX_DESC_DISRTSFB(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 9, 1) 525 #define SET_TX_DESC_USE_RATE(txdesc, value) \ 526 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 8, 1, value) 527 #define GET_TX_DESC_USE_RATE(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 8, 1) 528 #define SET_TX_DESC_HW_SSN_SEL(txdesc, value) \ 529 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 6, 2, value) 530 #define GET_TX_DESC_HW_SSN_SEL(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 6, 2) 531 532 #endif 533 534 #if (HALMAC_8814B_SUPPORT) 535 536 #define SET_TX_DESC_IE_CNT(txdesc, value) \ 537 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 6, 3, value) 538 #define GET_TX_DESC_IE_CNT(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 6, 3) 539 #define SET_TX_DESC_IE_CNT_EN(txdesc, value) \ 540 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 5, 1, value) 541 #define GET_TX_DESC_IE_CNT_EN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 5, 1) 542 543 #endif 544 545 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 546 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 547 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 548 549 #define SET_TX_DESC_WHEADER_LEN(txdesc, value) \ 550 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 0, 5, value) 551 #define GET_TX_DESC_WHEADER_LEN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 0, 5) 552 553 #endif 554 555 #if (HALMAC_8814B_SUPPORT) 556 557 #define SET_TX_DESC_WHEADER_LEN_V1(txdesc, value) \ 558 SET_BITS_TO_LE_4BYTE(txdesc + 0x0C, 0, 5, value) 559 #define GET_TX_DESC_WHEADER_LEN_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x0C, 0, 5) 560 561 #endif 562 563 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 564 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 565 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 566 567 /*TXDESC_WORD4*/ 568 569 #define SET_TX_DESC_PCTS_MASK_IDX(txdesc, value) \ 570 SET_BITS_TO_LE_4BYTE(txdesc + 0x10, 30, 2, value) 571 #define GET_TX_DESC_PCTS_MASK_IDX(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x10, 30, 2) 572 #define SET_TX_DESC_PCTS_EN(txdesc, value) \ 573 SET_BITS_TO_LE_4BYTE(txdesc + 0x10, 29, 1, value) 574 #define GET_TX_DESC_PCTS_EN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x10, 29, 1) 575 #define SET_TX_DESC_RTSRATE(txdesc, value) \ 576 SET_BITS_TO_LE_4BYTE(txdesc + 0x10, 24, 5, value) 577 #define GET_TX_DESC_RTSRATE(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x10, 24, 5) 578 #define SET_TX_DESC_RTS_DATA_RTY_LMT(txdesc, value) \ 579 SET_BITS_TO_LE_4BYTE(txdesc + 0x10, 18, 6, value) 580 #define GET_TX_DESC_RTS_DATA_RTY_LMT(txdesc) \ 581 LE_BITS_TO_4BYTE(txdesc + 0x10, 18, 6) 582 #define SET_TX_DESC_RTY_LMT_EN(txdesc, value) \ 583 SET_BITS_TO_LE_4BYTE(txdesc + 0x10, 17, 1, value) 584 #define GET_TX_DESC_RTY_LMT_EN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x10, 17, 1) 585 #define SET_TX_DESC_RTS_RTY_LOWEST_RATE(txdesc, value) \ 586 SET_BITS_TO_LE_4BYTE(txdesc + 0x10, 13, 4, value) 587 #define GET_TX_DESC_RTS_RTY_LOWEST_RATE(txdesc) \ 588 LE_BITS_TO_4BYTE(txdesc + 0x10, 13, 4) 589 #define SET_TX_DESC_DATA_RTY_LOWEST_RATE(txdesc, value) \ 590 SET_BITS_TO_LE_4BYTE(txdesc + 0x10, 8, 5, value) 591 #define GET_TX_DESC_DATA_RTY_LOWEST_RATE(txdesc) \ 592 LE_BITS_TO_4BYTE(txdesc + 0x10, 8, 5) 593 #define SET_TX_DESC_TRY_RATE(txdesc, value) \ 594 SET_BITS_TO_LE_4BYTE(txdesc + 0x10, 7, 1, value) 595 #define GET_TX_DESC_TRY_RATE(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x10, 7, 1) 596 #define SET_TX_DESC_DATARATE(txdesc, value) \ 597 SET_BITS_TO_LE_4BYTE(txdesc + 0x10, 0, 7, value) 598 #define GET_TX_DESC_DATARATE(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x10, 0, 7) 599 600 /*TXDESC_WORD5*/ 601 602 #define SET_TX_DESC_POLLUTED(txdesc, value) \ 603 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 31, 1, value) 604 #define GET_TX_DESC_POLLUTED(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 31, 1) 605 606 #endif 607 608 #if (HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT) 609 610 #define SET_TX_DESC_ANTSEL_EN_V1(txdesc, value) \ 611 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 30, 1, value) 612 #define GET_TX_DESC_ANTSEL_EN_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 30, 1) 613 614 #endif 615 616 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 617 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT) 618 619 #define SET_TX_DESC_TXPWR_OFSET(txdesc, value) \ 620 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 28, 3, value) 621 #define GET_TX_DESC_TXPWR_OFSET(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 28, 3) 622 623 #endif 624 625 #if (HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT) 626 627 #define SET_TX_DESC_TXPWR_OFSET_TYPE(txdesc, value) \ 628 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 28, 2, value) 629 #define GET_TX_DESC_TXPWR_OFSET_TYPE(txdesc) \ 630 LE_BITS_TO_4BYTE(txdesc + 0x14, 28, 2) 631 632 #endif 633 634 #if (HALMAC_8192F_SUPPORT) 635 636 #define SET_TX_DESC_TXPWR_OFSET_TYPE_V1(txdesc, value) \ 637 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 28, 3, value) 638 #define GET_TX_DESC_TXPWR_OFSET_TYPE_V1(txdesc) \ 639 LE_BITS_TO_4BYTE(txdesc + 0x14, 28, 3) 640 641 #endif 642 643 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 644 HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8192F_SUPPORT || \ 645 HALMAC_8812F_SUPPORT) 646 647 #define SET_TX_DESC_TX_ANT(txdesc, value) \ 648 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 24, 4, value) 649 #define GET_TX_DESC_TX_ANT(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 24, 4) 650 651 #endif 652 653 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT) 654 655 #define SET_TX_DESC_DROP_ID(txdesc, value) \ 656 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 24, 2, value) 657 #define GET_TX_DESC_DROP_ID(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 24, 2) 658 659 #endif 660 661 #if (HALMAC_8192F_SUPPORT) 662 663 #define SET_TX_DESC_DROP_ID_V1(txdesc, value) \ 664 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 22, 2, value) 665 #define GET_TX_DESC_DROP_ID_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 22, 2) 666 667 #endif 668 669 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 670 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 671 HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 672 673 #define SET_TX_DESC_PORT_ID(txdesc, value) \ 674 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 21, 3, value) 675 #define GET_TX_DESC_PORT_ID(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 21, 3) 676 677 #endif 678 679 #if (HALMAC_8192F_SUPPORT) 680 681 #define SET_TX_DESC_PORT_ID_V1(txdesc, value) \ 682 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 21, 1, value) 683 #define GET_TX_DESC_PORT_ID_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 21, 1) 684 685 #endif 686 687 #if (HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8821C_SUPPORT || \ 688 HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT || \ 689 HALMAC_8197G_SUPPORT) 690 691 #define SET_TX_DESC_MULTIPLE_PORT(txdesc, value) \ 692 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 18, 3, value) 693 #define GET_TX_DESC_MULTIPLE_PORT(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 18, 3) 694 695 #endif 696 697 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 698 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 699 HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 700 701 #define SET_TX_DESC_SIGNALING_TAPKT_EN(txdesc, value) \ 702 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 17, 1, value) 703 #define GET_TX_DESC_SIGNALING_TAPKT_EN(txdesc) \ 704 LE_BITS_TO_4BYTE(txdesc + 0x14, 17, 1) 705 706 #endif 707 708 #if (HALMAC_8814A_SUPPORT || HALMAC_8197F_SUPPORT || HALMAC_8198F_SUPPORT || \ 709 HALMAC_8192F_SUPPORT || HALMAC_8197G_SUPPORT) 710 711 #define SET_TX_DESC_RTS_SC(txdesc, value) \ 712 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 13, 4, value) 713 #define GET_TX_DESC_RTS_SC(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 13, 4) 714 715 #endif 716 717 #if (HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || \ 718 HALMAC_8812F_SUPPORT) 719 720 #define SET_TX_DESC_SIGNALING_TA_PKT_SC(txdesc, value) \ 721 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 13, 4, value) 722 #define GET_TX_DESC_SIGNALING_TA_PKT_SC(txdesc) \ 723 LE_BITS_TO_4BYTE(txdesc + 0x14, 13, 4) 724 725 #endif 726 727 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 728 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 729 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 730 731 #define SET_TX_DESC_RTS_SHORT(txdesc, value) \ 732 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 12, 1, value) 733 #define GET_TX_DESC_RTS_SHORT(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 12, 1) 734 #define SET_TX_DESC_VCS_STBC(txdesc, value) \ 735 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 10, 2, value) 736 #define GET_TX_DESC_VCS_STBC(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 10, 2) 737 #define SET_TX_DESC_DATA_STBC(txdesc, value) \ 738 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 8, 2, value) 739 #define GET_TX_DESC_DATA_STBC(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 8, 2) 740 #define SET_TX_DESC_DATA_LDPC(txdesc, value) \ 741 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 7, 1, value) 742 #define GET_TX_DESC_DATA_LDPC(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 7, 1) 743 #define SET_TX_DESC_DATA_BW(txdesc, value) \ 744 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 5, 2, value) 745 #define GET_TX_DESC_DATA_BW(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 5, 2) 746 #define SET_TX_DESC_DATA_SHORT(txdesc, value) \ 747 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 4, 1, value) 748 #define GET_TX_DESC_DATA_SHORT(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 4, 1) 749 #define SET_TX_DESC_DATA_SC(txdesc, value) \ 750 SET_BITS_TO_LE_4BYTE(txdesc + 0x14, 0, 4, value) 751 #define GET_TX_DESC_DATA_SC(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x14, 0, 4) 752 753 #endif 754 755 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 756 HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT) 757 758 /*TXDESC_WORD6*/ 759 760 #define SET_TX_DESC_ANTSEL_D(txdesc, value) \ 761 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 30, 2, value) 762 #define GET_TX_DESC_ANTSEL_D(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 30, 2) 763 764 #endif 765 766 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT) 767 768 #define SET_TX_DESC_ANT_MAPD_V1(txdesc, value) \ 769 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 30, 2, value) 770 #define GET_TX_DESC_ANT_MAPD_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 30, 2) 771 772 #endif 773 774 #if (HALMAC_8192F_SUPPORT) 775 776 #define SET_TX_DESC_ANT_MAPC_V2(txdesc, value) \ 777 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 30, 2, value) 778 #define GET_TX_DESC_ANT_MAPC_V2(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 30, 2) 779 780 #endif 781 782 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 783 HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT) 784 785 #define SET_TX_DESC_ANT_MAPD(txdesc, value) \ 786 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 28, 2, value) 787 #define GET_TX_DESC_ANT_MAPD(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 28, 2) 788 789 #endif 790 791 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT) 792 793 #define SET_TX_DESC_ANT_MAPC_V1(txdesc, value) \ 794 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 28, 2, value) 795 #define GET_TX_DESC_ANT_MAPC_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 28, 2) 796 797 #endif 798 799 #if (HALMAC_8192F_SUPPORT) 800 801 #define SET_TX_DESC_ANT_MAPB_V2(txdesc, value) \ 802 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 28, 2, value) 803 #define GET_TX_DESC_ANT_MAPB_V2(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 28, 2) 804 805 #endif 806 807 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 808 HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT) 809 810 #define SET_TX_DESC_ANT_MAPC(txdesc, value) \ 811 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 26, 2, value) 812 #define GET_TX_DESC_ANT_MAPC(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 26, 2) 813 814 #endif 815 816 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT) 817 818 #define SET_TX_DESC_ANT_MAPB_V1(txdesc, value) \ 819 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 26, 2, value) 820 #define GET_TX_DESC_ANT_MAPB_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 26, 2) 821 822 #endif 823 824 #if (HALMAC_8192F_SUPPORT) 825 826 #define SET_TX_DESC_ANT_MAPA_V2(txdesc, value) \ 827 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 26, 2, value) 828 #define GET_TX_DESC_ANT_MAPA_V2(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 26, 2) 829 830 #endif 831 832 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 833 HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT) 834 835 #define SET_TX_DESC_ANT_MAPB(txdesc, value) \ 836 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 24, 2, value) 837 #define GET_TX_DESC_ANT_MAPB(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 24, 2) 838 839 #endif 840 841 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT) 842 843 #define SET_TX_DESC_ANT_MAPA_V1(txdesc, value) \ 844 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 24, 2, value) 845 #define GET_TX_DESC_ANT_MAPA_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 24, 2) 846 847 #endif 848 849 #if (HALMAC_8192F_SUPPORT) 850 851 #define SET_TX_DESC_ANTSEL_D_V1(txdesc, value) \ 852 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 24, 2, value) 853 #define GET_TX_DESC_ANTSEL_D_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 24, 2) 854 855 #endif 856 857 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 858 HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT) 859 860 #define SET_TX_DESC_ANT_MAPA(txdesc, value) \ 861 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 22, 2, value) 862 #define GET_TX_DESC_ANT_MAPA(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 22, 2) 863 864 #endif 865 866 #if (HALMAC_8192F_SUPPORT) 867 868 #define SET_TX_DESC_ANTSEL_C_V2(txdesc, value) \ 869 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 22, 2, value) 870 #define GET_TX_DESC_ANTSEL_C_V2(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 22, 2) 871 872 #endif 873 874 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 875 HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT) 876 877 #define SET_TX_DESC_ANTSEL_C(txdesc, value) \ 878 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 20, 2, value) 879 #define GET_TX_DESC_ANTSEL_C(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 20, 2) 880 881 #endif 882 883 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT) 884 885 #define SET_TX_DESC_ANTSEL_B_V1(txdesc, value) \ 886 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 20, 4, value) 887 #define GET_TX_DESC_ANTSEL_B_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 20, 4) 888 889 #endif 890 891 #if (HALMAC_8192F_SUPPORT) 892 893 #define SET_TX_DESC_ANTSEL_B_V2(txdesc, value) \ 894 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 19, 3, value) 895 #define GET_TX_DESC_ANTSEL_B_V2(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 19, 3) 896 897 #endif 898 899 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 900 HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT) 901 902 #define SET_TX_DESC_ANTSEL_B(txdesc, value) \ 903 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 18, 2, value) 904 #define GET_TX_DESC_ANTSEL_B(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 18, 2) 905 #define SET_TX_DESC_ANTSEL_A(txdesc, value) \ 906 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 16, 2, value) 907 #define GET_TX_DESC_ANTSEL_A(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 16, 2) 908 909 #endif 910 911 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT) 912 913 #define SET_TX_DESC_ANTSEL_A_V1(txdesc, value) \ 914 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 16, 4, value) 915 #define GET_TX_DESC_ANTSEL_A_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 16, 4) 916 917 #endif 918 919 #if (HALMAC_8192F_SUPPORT) 920 921 #define SET_TX_DESC_ANTSEL_A_V2(txdesc, value) \ 922 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 16, 3, value) 923 #define GET_TX_DESC_ANTSEL_A_V2(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 16, 3) 924 925 #endif 926 927 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 928 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 929 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 930 931 #define SET_TX_DESC_MBSSID(txdesc, value) \ 932 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 12, 4, value) 933 #define GET_TX_DESC_MBSSID(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 12, 4) 934 935 #endif 936 937 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 938 HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || HALMAC_8812F_SUPPORT) 939 940 #define SET_TX_DESC_SW_DEFINE(txdesc, value) \ 941 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 0, 12, value) 942 #define GET_TX_DESC_SW_DEFINE(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 0, 12) 943 944 #endif 945 946 #if (HALMAC_8198F_SUPPORT || HALMAC_8192F_SUPPORT || HALMAC_8197G_SUPPORT) 947 948 #define SET_TX_DESC_SWPS_SEQ(txdesc, value) \ 949 SET_BITS_TO_LE_4BYTE(txdesc + 0x18, 0, 12, value) 950 #define GET_TX_DESC_SWPS_SEQ(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x18, 0, 12) 951 952 #endif 953 954 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 955 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 956 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 957 958 /*TXDESC_WORD7*/ 959 960 #define SET_TX_DESC_DMA_TXAGG_NUM(txdesc, value) \ 961 SET_BITS_TO_LE_4BYTE(txdesc + 0x1C, 24, 8, value) 962 #define GET_TX_DESC_DMA_TXAGG_NUM(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x1C, 24, 8) 963 964 #endif 965 966 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 967 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 968 HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 969 970 #define SET_TX_DESC_FINAL_DATA_RATE(txdesc, value) \ 971 SET_BITS_TO_LE_4BYTE(txdesc + 0x1C, 24, 8, value) 972 #define GET_TX_DESC_FINAL_DATA_RATE(txdesc) \ 973 LE_BITS_TO_4BYTE(txdesc + 0x1C, 24, 8) 974 975 #endif 976 977 #if (HALMAC_8192F_SUPPORT) 978 979 #define SET_TX_DESC_ANT_MAPD_V2(txdesc, value) \ 980 SET_BITS_TO_LE_4BYTE(txdesc + 0x1C, 22, 2, value) 981 #define GET_TX_DESC_ANT_MAPD_V2(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x1C, 22, 2) 982 #define SET_TX_DESC_ANTSEL_EN_V2(txdesc, value) \ 983 SET_BITS_TO_LE_4BYTE(txdesc + 0x1C, 21, 1, value) 984 #define GET_TX_DESC_ANTSEL_EN_V2(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x1C, 21, 1) 985 986 #endif 987 988 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 989 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 990 HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 991 992 #define SET_TX_DESC_NTX_MAP(txdesc, value) \ 993 SET_BITS_TO_LE_4BYTE(txdesc + 0x1C, 20, 4, value) 994 #define GET_TX_DESC_NTX_MAP(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x1C, 20, 4) 995 996 #endif 997 998 #if (HALMAC_8198F_SUPPORT || HALMAC_8197G_SUPPORT) 999 1000 #define SET_TX_DESC_ANTSEL_EN(txdesc, value) \ 1001 SET_BITS_TO_LE_4BYTE(txdesc + 0x1C, 19, 1, value) 1002 #define GET_TX_DESC_ANTSEL_EN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x1C, 19, 1) 1003 #define SET_TX_DESC_MBSSID_EX(txdesc, value) \ 1004 SET_BITS_TO_LE_4BYTE(txdesc + 0x1C, 16, 3, value) 1005 #define GET_TX_DESC_MBSSID_EX(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x1C, 16, 3) 1006 1007 #endif 1008 1009 #if (HALMAC_8192F_SUPPORT) 1010 1011 #define SET_TX_DESC_MBSSID_EX_V1(txdesc, value) \ 1012 SET_BITS_TO_LE_4BYTE(txdesc + 0x1C, 16, 1, value) 1013 #define GET_TX_DESC_MBSSID_EX_V1(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x1C, 16, 1) 1014 1015 #endif 1016 1017 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 1018 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 1019 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 1020 1021 #define SET_TX_DESC_TX_BUFF_SIZE(txdesc, value) \ 1022 SET_BITS_TO_LE_4BYTE(txdesc + 0x1C, 0, 16, value) 1023 #define GET_TX_DESC_TX_BUFF_SIZE(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x1C, 0, 16) 1024 #define SET_TX_DESC_TXDESC_CHECKSUM(txdesc, value) \ 1025 SET_BITS_TO_LE_4BYTE(txdesc + 0x1C, 0, 16, value) 1026 #define GET_TX_DESC_TXDESC_CHECKSUM(txdesc) \ 1027 LE_BITS_TO_4BYTE(txdesc + 0x1C, 0, 16) 1028 #define SET_TX_DESC_TIMESTAMP(txdesc, value) \ 1029 SET_BITS_TO_LE_4BYTE(txdesc + 0x1C, 0, 16, value) 1030 #define GET_TX_DESC_TIMESTAMP(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x1C, 0, 16) 1031 1032 #endif 1033 1034 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 1035 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 1036 HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 1037 1038 /*TXDESC_WORD8*/ 1039 1040 #define SET_TX_DESC_TXWIFI_CP(txdesc, value) \ 1041 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 31, 1, value) 1042 #define GET_TX_DESC_TXWIFI_CP(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 31, 1) 1043 #define SET_TX_DESC_MAC_CP(txdesc, value) \ 1044 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 30, 1, value) 1045 #define GET_TX_DESC_MAC_CP(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 30, 1) 1046 #define SET_TX_DESC_STW_PKTRE_DIS(txdesc, value) \ 1047 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 29, 1, value) 1048 #define GET_TX_DESC_STW_PKTRE_DIS(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 29, 1) 1049 #define SET_TX_DESC_STW_RB_DIS(txdesc, value) \ 1050 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 28, 1, value) 1051 #define GET_TX_DESC_STW_RB_DIS(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 28, 1) 1052 #define SET_TX_DESC_STW_RATE_DIS(txdesc, value) \ 1053 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 27, 1, value) 1054 #define GET_TX_DESC_STW_RATE_DIS(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 27, 1) 1055 #define SET_TX_DESC_STW_ANT_DIS(txdesc, value) \ 1056 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 26, 1, value) 1057 #define GET_TX_DESC_STW_ANT_DIS(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 26, 1) 1058 #define SET_TX_DESC_STW_EN(txdesc, value) \ 1059 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 25, 1, value) 1060 #define GET_TX_DESC_STW_EN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 25, 1) 1061 #define SET_TX_DESC_SMH_EN(txdesc, value) \ 1062 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 24, 1, value) 1063 #define GET_TX_DESC_SMH_EN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 24, 1) 1064 1065 #endif 1066 1067 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 1068 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 1069 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 1070 1071 #define SET_TX_DESC_TAILPAGE_L(txdesc, value) \ 1072 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 24, 8, value) 1073 #define GET_TX_DESC_TAILPAGE_L(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 24, 8) 1074 #define SET_TX_DESC_SDIO_DMASEQ(txdesc, value) \ 1075 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 16, 8, value) 1076 #define GET_TX_DESC_SDIO_DMASEQ(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 16, 8) 1077 #define SET_TX_DESC_NEXTHEADPAGE_L(txdesc, value) \ 1078 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 16, 8, value) 1079 #define GET_TX_DESC_NEXTHEADPAGE_L(txdesc) \ 1080 LE_BITS_TO_4BYTE(txdesc + 0x20, 16, 8) 1081 1082 #endif 1083 1084 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 1085 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 1086 HALMAC_8192F_SUPPORT) 1087 1088 #define SET_TX_DESC_EN_HWSEQ(txdesc, value) \ 1089 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 15, 1, value) 1090 #define GET_TX_DESC_EN_HWSEQ(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 15, 1) 1091 1092 #endif 1093 1094 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 1095 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT) 1096 1097 #define SET_TX_DESC_EN_HWEXSEQ(txdesc, value) \ 1098 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 14, 1, value) 1099 #define GET_TX_DESC_EN_HWEXSEQ(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 14, 1) 1100 1101 #endif 1102 1103 #if (HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 1104 1105 #define SET_TX_DESC_EN_HWSEQ_MODE(txdesc, value) \ 1106 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 14, 2, value) 1107 #define GET_TX_DESC_EN_HWSEQ_MODE(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 14, 2) 1108 1109 #endif 1110 1111 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 1112 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 1113 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 1114 1115 #define SET_TX_DESC_DATA_RC(txdesc, value) \ 1116 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 8, 6, value) 1117 #define GET_TX_DESC_DATA_RC(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 8, 6) 1118 #define SET_TX_DESC_BAR_RTY_TH(txdesc, value) \ 1119 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 6, 2, value) 1120 #define GET_TX_DESC_BAR_RTY_TH(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 6, 2) 1121 #define SET_TX_DESC_RTS_RC(txdesc, value) \ 1122 SET_BITS_TO_LE_4BYTE(txdesc + 0x20, 0, 6, value) 1123 #define GET_TX_DESC_RTS_RC(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x20, 0, 6) 1124 1125 #endif 1126 1127 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 1128 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 1129 HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 1130 1131 /*TXDESC_WORD9*/ 1132 1133 #define SET_TX_DESC_TAILPAGE_H(txdesc, value) \ 1134 SET_BITS_TO_LE_4BYTE(txdesc + 0x24, 28, 4, value) 1135 #define GET_TX_DESC_TAILPAGE_H(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x24, 28, 4) 1136 #define SET_TX_DESC_NEXTHEADPAGE_H(txdesc, value) \ 1137 SET_BITS_TO_LE_4BYTE(txdesc + 0x24, 24, 4, value) 1138 #define GET_TX_DESC_NEXTHEADPAGE_H(txdesc) \ 1139 LE_BITS_TO_4BYTE(txdesc + 0x24, 24, 4) 1140 1141 #endif 1142 1143 #if (HALMAC_8192F_SUPPORT) 1144 1145 #define SET_TX_DESC_FINAL_DATA_RATE_V1(txdesc, value) \ 1146 SET_BITS_TO_LE_4BYTE(txdesc + 0x24, 24, 8, value) 1147 #define GET_TX_DESC_FINAL_DATA_RATE_V1(txdesc) \ 1148 LE_BITS_TO_4BYTE(txdesc + 0x24, 24, 8) 1149 1150 #endif 1151 1152 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 1153 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 1154 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 1155 1156 #define SET_TX_DESC_SW_SEQ(txdesc, value) \ 1157 SET_BITS_TO_LE_4BYTE(txdesc + 0x24, 12, 12, value) 1158 #define GET_TX_DESC_SW_SEQ(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x24, 12, 12) 1159 1160 #endif 1161 1162 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 1163 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 1164 HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 1165 1166 #define SET_TX_DESC_TXBF_PATH(txdesc, value) \ 1167 SET_BITS_TO_LE_4BYTE(txdesc + 0x24, 11, 1, value) 1168 #define GET_TX_DESC_TXBF_PATH(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x24, 11, 1) 1169 1170 #endif 1171 1172 #if (HALMAC_8814A_SUPPORT || HALMAC_8822B_SUPPORT || HALMAC_8197F_SUPPORT || \ 1173 HALMAC_8821C_SUPPORT || HALMAC_8198F_SUPPORT || HALMAC_8822C_SUPPORT || \ 1174 HALMAC_8192F_SUPPORT || HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 1175 1176 #define SET_TX_DESC_PADDING_LEN(txdesc, value) \ 1177 SET_BITS_TO_LE_4BYTE(txdesc + 0x24, 0, 11, value) 1178 #define GET_TX_DESC_PADDING_LEN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x24, 0, 11) 1179 #define SET_TX_DESC_GROUP_BIT_IE_OFFSET(txdesc, value) \ 1180 SET_BITS_TO_LE_4BYTE(txdesc + 0x24, 0, 8, value) 1181 #define GET_TX_DESC_GROUP_BIT_IE_OFFSET(txdesc) \ 1182 LE_BITS_TO_4BYTE(txdesc + 0x24, 0, 8) 1183 1184 #endif 1185 1186 #if (HALMAC_8812F_SUPPORT) 1187 1188 /*WORD10*/ 1189 1190 #define SET_TX_DESC_HT_DATA_SND(txdesc, value) \ 1191 SET_BITS_TO_LE_4BYTE(txdesc + 0x28, 31, 1, value) 1192 #define GET_TX_DESC_HT_DATA_SND(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x28, 31, 1) 1193 1194 #endif 1195 1196 #if (HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 1197 1198 #define SET_TX_DESC_SHCUT_CAM(txdesc, value) \ 1199 SET_BITS_TO_LE_4BYTE(txdesc + 0x28, 16, 6, value) 1200 #define GET_TX_DESC_SHCUT_CAM(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x28, 16, 6) 1201 1202 #endif 1203 1204 #if (HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || \ 1205 HALMAC_8812F_SUPPORT) 1206 1207 #define SET_TX_DESC_MU_DATARATE(txdesc, value) \ 1208 SET_BITS_TO_LE_4BYTE(txdesc + 0x28, 8, 8, value) 1209 #define GET_TX_DESC_MU_DATARATE(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x28, 8, 8) 1210 #define SET_TX_DESC_MU_RC(txdesc, value) \ 1211 SET_BITS_TO_LE_4BYTE(txdesc + 0x28, 4, 4, value) 1212 #define GET_TX_DESC_MU_RC(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x28, 4, 4) 1213 1214 #endif 1215 1216 #if (HALMAC_8812F_SUPPORT) 1217 1218 #define SET_TX_DESC_NDPA_RATE_SEL(txdesc, value) \ 1219 SET_BITS_TO_LE_4BYTE(txdesc + 0x28, 3, 1, value) 1220 #define GET_TX_DESC_NDPA_RATE_SEL(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x28, 3, 1) 1221 #define SET_TX_DESC_HW_NDPA_EN(txdesc, value) \ 1222 SET_BITS_TO_LE_4BYTE(txdesc + 0x28, 2, 1, value) 1223 #define GET_TX_DESC_HW_NDPA_EN(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x28, 2, 1) 1224 1225 #endif 1226 1227 #if (HALMAC_8822B_SUPPORT || HALMAC_8821C_SUPPORT || HALMAC_8822C_SUPPORT || \ 1228 HALMAC_8812F_SUPPORT || HALMAC_8197G_SUPPORT) 1229 1230 #define SET_TX_DESC_SND_PKT_SEL(txdesc, value) \ 1231 SET_BITS_TO_LE_4BYTE(txdesc + 0x28, 0, 2, value) 1232 #define GET_TX_DESC_SND_PKT_SEL(txdesc) LE_BITS_TO_4BYTE(txdesc + 0x28, 0, 2) 1233 1234 #endif 1235 1236 #endif 1237