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_BUFFER_AP_H_ 17 #define _HALMAC_TX_DESC_BUFFER_AP_H_ 18 #if (HALMAC_8814B_SUPPORT) 19 20 /*TXDESC_WORD0*/ 21 22 #define SET_TX_DESC_BUFFER_RDG_EN(txdesc, value) \ 23 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \ 24 value, 0x1, 31) 25 #define SET_TX_DESC_BUFFER_RDG_EN_NO_CLR(txdesc, value) \ 26 HALMAC_SET_DESC_FIELD_NO_CLR( \ 27 ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 31) 28 #define GET_TX_DESC_BUFFER_RDG_EN(txdesc) \ 29 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \ 30 31) 31 #define SET_TX_DESC_BUFFER_BCNPKT_TSF_CTRL(txdesc, value) \ 32 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \ 33 value, 0x1, 30) 34 #define SET_TX_DESC_BUFFER_BCNPKT_TSF_CTRL_NO_CLR(txdesc, value) \ 35 HALMAC_SET_DESC_FIELD_NO_CLR( \ 36 ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 30) 37 #define GET_TX_DESC_BUFFER_BCNPKT_TSF_CTRL(txdesc) \ 38 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \ 39 30) 40 #define SET_TX_DESC_BUFFER_AGG_EN(txdesc, value) \ 41 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \ 42 value, 0x1, 29) 43 #define SET_TX_DESC_BUFFER_AGG_EN_NO_CLR(txdesc, value) \ 44 HALMAC_SET_DESC_FIELD_NO_CLR( \ 45 ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1, 29) 46 #define GET_TX_DESC_BUFFER_AGG_EN(txdesc) \ 47 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1, \ 48 29) 49 #define SET_TX_DESC_BUFFER_PKT_OFFSET(txdesc, value) \ 50 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \ 51 value, 0x1f, 24) 52 #define SET_TX_DESC_BUFFER_PKT_OFFSET_NO_CLR(txdesc, value) \ 53 HALMAC_SET_DESC_FIELD_NO_CLR( \ 54 ((struct halmac_tx_desc *)txdesc)->dword0, value, 0x1f, 24) 55 #define GET_TX_DESC_BUFFER_PKT_OFFSET(txdesc) \ 56 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0x1f, \ 57 24) 58 #define SET_TX_DESC_BUFFER_OFFSET(txdesc, value) \ 59 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \ 60 value, 0xff, 16) 61 #define SET_TX_DESC_BUFFER_OFFSET_NO_CLR(txdesc, value) \ 62 HALMAC_SET_DESC_FIELD_NO_CLR( \ 63 ((struct halmac_tx_desc *)txdesc)->dword0, value, 0xff, 16) 64 #define GET_TX_DESC_BUFFER_OFFSET(txdesc) \ 65 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, 0xff, \ 66 16) 67 #define SET_TX_DESC_BUFFER_TXPKTSIZE(txdesc, value) \ 68 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword0, \ 69 value, 0xffff, 0) 70 #define SET_TX_DESC_BUFFER_TXPKTSIZE_NO_CLR(txdesc, value) \ 71 HALMAC_SET_DESC_FIELD_NO_CLR( \ 72 ((struct halmac_tx_desc *)txdesc)->dword0, value, 0xffff, 0) 73 #define GET_TX_DESC_BUFFER_TXPKTSIZE(txdesc) \ 74 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword0, \ 75 0xffff, 0) 76 77 /*TXDESC_WORD1*/ 78 79 #define SET_TX_DESC_BUFFER_USERATE(txdesc, value) \ 80 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \ 81 value, 0x1, 31) 82 #define SET_TX_DESC_BUFFER_USERATE_NO_CLR(txdesc, value) \ 83 HALMAC_SET_DESC_FIELD_NO_CLR( \ 84 ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 31) 85 #define GET_TX_DESC_BUFFER_USERATE(txdesc) \ 86 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \ 87 31) 88 #define SET_TX_DESC_BUFFER_AMSDU(txdesc, value) \ 89 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \ 90 value, 0x1, 30) 91 #define SET_TX_DESC_BUFFER_AMSDU_NO_CLR(txdesc, value) \ 92 HALMAC_SET_DESC_FIELD_NO_CLR( \ 93 ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 30) 94 #define GET_TX_DESC_BUFFER_AMSDU(txdesc) \ 95 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \ 96 30) 97 #define SET_TX_DESC_BUFFER_EN_HWSEQ(txdesc, value) \ 98 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \ 99 value, 0x1, 29) 100 #define SET_TX_DESC_BUFFER_EN_HWSEQ_NO_CLR(txdesc, value) \ 101 HALMAC_SET_DESC_FIELD_NO_CLR( \ 102 ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 29) 103 #define GET_TX_DESC_BUFFER_EN_HWSEQ(txdesc) \ 104 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \ 105 29) 106 #define SET_TX_DESC_BUFFER_EN_HWEXSEQ(txdesc, value) \ 107 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \ 108 value, 0x1, 28) 109 #define SET_TX_DESC_BUFFER_EN_HWEXSEQ_NO_CLR(txdesc, value) \ 110 HALMAC_SET_DESC_FIELD_NO_CLR( \ 111 ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 28) 112 #define GET_TX_DESC_BUFFER_EN_HWEXSEQ(txdesc) \ 113 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \ 114 28) 115 #define SET_TX_DESC_BUFFER_SW_SEQ(txdesc, value) \ 116 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \ 117 value, 0xfff, 16) 118 #define SET_TX_DESC_BUFFER_SW_SEQ_NO_CLR(txdesc, value) \ 119 HALMAC_SET_DESC_FIELD_NO_CLR( \ 120 ((struct halmac_tx_desc *)txdesc)->dword1, value, 0xfff, 16) 121 #define GET_TX_DESC_BUFFER_SW_SEQ(txdesc) \ 122 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, \ 123 0xfff, 16) 124 #define SET_TX_DESC_BUFFER_DROP_ID(txdesc, value) \ 125 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \ 126 value, 0x3, 14) 127 #define SET_TX_DESC_BUFFER_DROP_ID_NO_CLR(txdesc, value) \ 128 HALMAC_SET_DESC_FIELD_NO_CLR( \ 129 ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x3, 14) 130 #define GET_TX_DESC_BUFFER_DROP_ID(txdesc) \ 131 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x3, \ 132 14) 133 #define SET_TX_DESC_BUFFER_MOREDATA(txdesc, value) \ 134 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \ 135 value, 0x1, 13) 136 #define SET_TX_DESC_BUFFER_MOREDATA_NO_CLR(txdesc, value) \ 137 HALMAC_SET_DESC_FIELD_NO_CLR( \ 138 ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1, 13) 139 #define GET_TX_DESC_BUFFER_MOREDATA(txdesc) \ 140 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1, \ 141 13) 142 #define SET_TX_DESC_BUFFER_QSEL(txdesc, value) \ 143 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \ 144 value, 0x1f, 8) 145 #define SET_TX_DESC_BUFFER_QSEL_NO_CLR(txdesc, value) \ 146 HALMAC_SET_DESC_FIELD_NO_CLR( \ 147 ((struct halmac_tx_desc *)txdesc)->dword1, value, 0x1f, 8) 148 #define GET_TX_DESC_BUFFER_QSEL(txdesc) \ 149 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0x1f, \ 150 8) 151 #define SET_TX_DESC_BUFFER_MACID(txdesc, value) \ 152 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword1, \ 153 value, 0xff, 0) 154 #define SET_TX_DESC_BUFFER_MACID_NO_CLR(txdesc, value) \ 155 HALMAC_SET_DESC_FIELD_NO_CLR( \ 156 ((struct halmac_tx_desc *)txdesc)->dword1, value, 0xff, 0) 157 #define GET_TX_DESC_BUFFER_MACID(txdesc) \ 158 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword1, 0xff, \ 159 0) 160 161 /*TXDESC_WORD2*/ 162 163 #define SET_TX_DESC_BUFFER_CHK_EN(txdesc, value) \ 164 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \ 165 value, 0x1, 31) 166 #define SET_TX_DESC_BUFFER_CHK_EN_NO_CLR(txdesc, value) \ 167 HALMAC_SET_DESC_FIELD_NO_CLR( \ 168 ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 31) 169 #define GET_TX_DESC_BUFFER_CHK_EN(txdesc) \ 170 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \ 171 31) 172 #define SET_TX_DESC_BUFFER_DISQSELSEQ(txdesc, value) \ 173 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \ 174 value, 0x1, 30) 175 #define SET_TX_DESC_BUFFER_DISQSELSEQ_NO_CLR(txdesc, value) \ 176 HALMAC_SET_DESC_FIELD_NO_CLR( \ 177 ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 30) 178 #define GET_TX_DESC_BUFFER_DISQSELSEQ(txdesc) \ 179 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \ 180 30) 181 #define SET_TX_DESC_BUFFER_SND_PKT_SEL(txdesc, value) \ 182 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \ 183 value, 0x3, 28) 184 #define SET_TX_DESC_BUFFER_SND_PKT_SEL_NO_CLR(txdesc, value) \ 185 HALMAC_SET_DESC_FIELD_NO_CLR( \ 186 ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x3, 28) 187 #define GET_TX_DESC_BUFFER_SND_PKT_SEL(txdesc) \ 188 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x3, \ 189 28) 190 #define SET_TX_DESC_BUFFER_DMA_PRI(txdesc, value) \ 191 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \ 192 value, 0x1, 27) 193 #define SET_TX_DESC_BUFFER_DMA_PRI_NO_CLR(txdesc, value) \ 194 HALMAC_SET_DESC_FIELD_NO_CLR( \ 195 ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x1, 27) 196 #define GET_TX_DESC_BUFFER_DMA_PRI(txdesc) \ 197 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x1, \ 198 27) 199 #define SET_TX_DESC_BUFFER_MAX_AMSDU_MODE(txdesc, value) \ 200 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \ 201 value, 0x7, 24) 202 #define SET_TX_DESC_BUFFER_MAX_AMSDU_MODE_NO_CLR(txdesc, value) \ 203 HALMAC_SET_DESC_FIELD_NO_CLR( \ 204 ((struct halmac_tx_desc *)txdesc)->dword2, value, 0x7, 24) 205 #define GET_TX_DESC_BUFFER_MAX_AMSDU_MODE(txdesc) \ 206 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0x7, \ 207 24) 208 #define SET_TX_DESC_BUFFER_DMA_TXAGG_NUM(txdesc, value) \ 209 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \ 210 value, 0xff, 16) 211 #define SET_TX_DESC_BUFFER_DMA_TXAGG_NUM_NO_CLR(txdesc, value) \ 212 HALMAC_SET_DESC_FIELD_NO_CLR( \ 213 ((struct halmac_tx_desc *)txdesc)->dword2, value, 0xff, 16) 214 #define GET_TX_DESC_BUFFER_DMA_TXAGG_NUM(txdesc) \ 215 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, 0xff, \ 216 16) 217 #define SET_TX_DESC_BUFFER_TXDESC_CHECKSUM(txdesc, value) \ 218 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword2, \ 219 value, 0xffff, 0) 220 #define SET_TX_DESC_BUFFER_TXDESC_CHECKSUM_NO_CLR(txdesc, value) \ 221 HALMAC_SET_DESC_FIELD_NO_CLR( \ 222 ((struct halmac_tx_desc *)txdesc)->dword2, value, 0xffff, 0) 223 #define GET_TX_DESC_BUFFER_TXDESC_CHECKSUM(txdesc) \ 224 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword2, \ 225 0xffff, 0) 226 227 /*TXDESC_WORD3*/ 228 229 #define SET_TX_DESC_BUFFER_OFFLOAD_SIZE(txdesc, value) \ 230 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \ 231 value, 0x7fff, 16) 232 #define SET_TX_DESC_BUFFER_OFFLOAD_SIZE_NO_CLR(txdesc, value) \ 233 HALMAC_SET_DESC_FIELD_NO_CLR( \ 234 ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x7fff, 16) 235 #define GET_TX_DESC_BUFFER_OFFLOAD_SIZE(txdesc) \ 236 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, \ 237 0x7fff, 16) 238 #define SET_TX_DESC_BUFFER_CHANNEL_DMA(txdesc, value) \ 239 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \ 240 value, 0x1f, 11) 241 #define SET_TX_DESC_BUFFER_CHANNEL_DMA_NO_CLR(txdesc, value) \ 242 HALMAC_SET_DESC_FIELD_NO_CLR( \ 243 ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1f, 11) 244 #define GET_TX_DESC_BUFFER_CHANNEL_DMA(txdesc) \ 245 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1f, \ 246 11) 247 #define SET_TX_DESC_BUFFER_MBSSID(txdesc, value) \ 248 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \ 249 value, 0xf, 7) 250 #define SET_TX_DESC_BUFFER_MBSSID_NO_CLR(txdesc, value) \ 251 HALMAC_SET_DESC_FIELD_NO_CLR( \ 252 ((struct halmac_tx_desc *)txdesc)->dword3, value, 0xf, 7) 253 #define GET_TX_DESC_BUFFER_MBSSID(txdesc) \ 254 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0xf, 7) 255 #define SET_TX_DESC_BUFFER_BK(txdesc, value) \ 256 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \ 257 value, 0x1, 6) 258 #define SET_TX_DESC_BUFFER_BK_NO_CLR(txdesc, value) \ 259 HALMAC_SET_DESC_FIELD_NO_CLR( \ 260 ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1, 6) 261 #define GET_TX_DESC_BUFFER_BK(txdesc) \ 262 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1, 6) 263 #define SET_TX_DESC_BUFFER_WHEADER_LEN(txdesc, value) \ 264 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword3, \ 265 value, 0x1f, 0) 266 #define SET_TX_DESC_BUFFER_WHEADER_LEN_NO_CLR(txdesc, value) \ 267 HALMAC_SET_DESC_FIELD_NO_CLR( \ 268 ((struct halmac_tx_desc *)txdesc)->dword3, value, 0x1f, 0) 269 #define GET_TX_DESC_BUFFER_WHEADER_LEN(txdesc) \ 270 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword3, 0x1f, \ 271 0) 272 273 /*TXDESC_WORD4*/ 274 275 #define SET_TX_DESC_BUFFER_TRY_RATE(txdesc, value) \ 276 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \ 277 value, 0x1, 26) 278 #define SET_TX_DESC_BUFFER_TRY_RATE_NO_CLR(txdesc, value) \ 279 HALMAC_SET_DESC_FIELD_NO_CLR( \ 280 ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1, 26) 281 #define GET_TX_DESC_BUFFER_TRY_RATE(txdesc) \ 282 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1, \ 283 26) 284 #define SET_TX_DESC_BUFFER_DATA_BW(txdesc, value) \ 285 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \ 286 value, 0x3, 24) 287 #define SET_TX_DESC_BUFFER_DATA_BW_NO_CLR(txdesc, value) \ 288 HALMAC_SET_DESC_FIELD_NO_CLR( \ 289 ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x3, 24) 290 #define GET_TX_DESC_BUFFER_DATA_BW(txdesc) \ 291 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x3, \ 292 24) 293 #define SET_TX_DESC_BUFFER_DATA_SHORT(txdesc, value) \ 294 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \ 295 value, 0x1, 23) 296 #define SET_TX_DESC_BUFFER_DATA_SHORT_NO_CLR(txdesc, value) \ 297 HALMAC_SET_DESC_FIELD_NO_CLR( \ 298 ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1, 23) 299 #define GET_TX_DESC_BUFFER_DATA_SHORT(txdesc) \ 300 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1, \ 301 23) 302 #define SET_TX_DESC_BUFFER_DATARATE(txdesc, value) \ 303 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \ 304 value, 0x7f, 16) 305 #define SET_TX_DESC_BUFFER_DATARATE_NO_CLR(txdesc, value) \ 306 HALMAC_SET_DESC_FIELD_NO_CLR( \ 307 ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x7f, 16) 308 #define GET_TX_DESC_BUFFER_DATARATE(txdesc) \ 309 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x7f, \ 310 16) 311 #define SET_TX_DESC_BUFFER_TXBF_PATH(txdesc, value) \ 312 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \ 313 value, 0x1, 11) 314 #define SET_TX_DESC_BUFFER_TXBF_PATH_NO_CLR(txdesc, value) \ 315 HALMAC_SET_DESC_FIELD_NO_CLR( \ 316 ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x1, 11) 317 #define GET_TX_DESC_BUFFER_TXBF_PATH(txdesc) \ 318 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, 0x1, \ 319 11) 320 #define SET_TX_DESC_BUFFER_GROUP_BIT_IE_OFFSET(txdesc, value) \ 321 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword4, \ 322 value, 0x7ff, 0) 323 #define SET_TX_DESC_BUFFER_GROUP_BIT_IE_OFFSET_NO_CLR(txdesc, value) \ 324 HALMAC_SET_DESC_FIELD_NO_CLR( \ 325 ((struct halmac_tx_desc *)txdesc)->dword4, value, 0x7ff, 0) 326 #define GET_TX_DESC_BUFFER_GROUP_BIT_IE_OFFSET(txdesc) \ 327 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword4, \ 328 0x7ff, 0) 329 330 /*TXDESC_WORD5*/ 331 332 #define SET_TX_DESC_BUFFER_RTY_LMT_EN(txdesc, value) \ 333 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \ 334 value, 0x1, 31) 335 #define SET_TX_DESC_BUFFER_RTY_LMT_EN_NO_CLR(txdesc, value) \ 336 HALMAC_SET_DESC_FIELD_NO_CLR( \ 337 ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 31) 338 #define GET_TX_DESC_BUFFER_RTY_LMT_EN(txdesc) \ 339 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \ 340 31) 341 #define SET_TX_DESC_BUFFER_HW_RTS_EN(txdesc, value) \ 342 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \ 343 value, 0x1, 30) 344 #define SET_TX_DESC_BUFFER_HW_RTS_EN_NO_CLR(txdesc, value) \ 345 HALMAC_SET_DESC_FIELD_NO_CLR( \ 346 ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 30) 347 #define GET_TX_DESC_BUFFER_HW_RTS_EN(txdesc) \ 348 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \ 349 30) 350 #define SET_TX_DESC_BUFFER_RTS_EN(txdesc, value) \ 351 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \ 352 value, 0x1, 29) 353 #define SET_TX_DESC_BUFFER_RTS_EN_NO_CLR(txdesc, value) \ 354 HALMAC_SET_DESC_FIELD_NO_CLR( \ 355 ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 29) 356 #define GET_TX_DESC_BUFFER_RTS_EN(txdesc) \ 357 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \ 358 29) 359 #define SET_TX_DESC_BUFFER_CTS2SELF(txdesc, value) \ 360 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \ 361 value, 0x1, 28) 362 #define SET_TX_DESC_BUFFER_CTS2SELF_NO_CLR(txdesc, value) \ 363 HALMAC_SET_DESC_FIELD_NO_CLR( \ 364 ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 28) 365 #define GET_TX_DESC_BUFFER_CTS2SELF(txdesc) \ 366 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \ 367 28) 368 #define SET_TX_DESC_BUFFER_TAILPAGE_H(txdesc, value) \ 369 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \ 370 value, 0xf, 24) 371 #define SET_TX_DESC_BUFFER_TAILPAGE_H_NO_CLR(txdesc, value) \ 372 HALMAC_SET_DESC_FIELD_NO_CLR( \ 373 ((struct halmac_tx_desc *)txdesc)->dword5, value, 0xf, 24) 374 #define GET_TX_DESC_BUFFER_TAILPAGE_H(txdesc) \ 375 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0xf, \ 376 24) 377 #define SET_TX_DESC_BUFFER_TAILPAGE_L(txdesc, value) \ 378 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \ 379 value, 0xff, 16) 380 #define SET_TX_DESC_BUFFER_TAILPAGE_L_NO_CLR(txdesc, value) \ 381 HALMAC_SET_DESC_FIELD_NO_CLR( \ 382 ((struct halmac_tx_desc *)txdesc)->dword5, value, 0xff, 16) 383 #define GET_TX_DESC_BUFFER_TAILPAGE_L(txdesc) \ 384 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0xff, \ 385 16) 386 #define SET_TX_DESC_BUFFER_NAVUSEHDR(txdesc, value) \ 387 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \ 388 value, 0x1, 15) 389 #define SET_TX_DESC_BUFFER_NAVUSEHDR_NO_CLR(txdesc, value) \ 390 HALMAC_SET_DESC_FIELD_NO_CLR( \ 391 ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 15) 392 #define GET_TX_DESC_BUFFER_NAVUSEHDR(txdesc) \ 393 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \ 394 15) 395 #define SET_TX_DESC_BUFFER_BMC(txdesc, value) \ 396 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \ 397 value, 0x1, 14) 398 #define SET_TX_DESC_BUFFER_BMC_NO_CLR(txdesc, value) \ 399 HALMAC_SET_DESC_FIELD_NO_CLR( \ 400 ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 14) 401 #define GET_TX_DESC_BUFFER_BMC(txdesc) \ 402 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, \ 403 14) 404 #define SET_TX_DESC_BUFFER_RTS_DATA_RTY_LMT(txdesc, value) \ 405 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \ 406 value, 0x3f, 8) 407 #define SET_TX_DESC_BUFFER_RTS_DATA_RTY_LMT_NO_CLR(txdesc, value) \ 408 HALMAC_SET_DESC_FIELD_NO_CLR( \ 409 ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3f, 8) 410 #define GET_TX_DESC_BUFFER_RTS_DATA_RTY_LMT(txdesc) \ 411 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3f, \ 412 8) 413 #define SET_TX_DESC_BUFFER_HW_AES_IV(txdesc, value) \ 414 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \ 415 value, 0x1, 7) 416 #define SET_TX_DESC_BUFFER_HW_AES_IV_NO_CLR(txdesc, value) \ 417 HALMAC_SET_DESC_FIELD_NO_CLR( \ 418 ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 7) 419 #define GET_TX_DESC_BUFFER_HW_AES_IV(txdesc) \ 420 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, 7) 421 #define SET_TX_DESC_BUFFER_BT_NULL(txdesc, value) \ 422 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \ 423 value, 0x1, 3) 424 #define SET_TX_DESC_BUFFER_BT_NULL_NO_CLR(txdesc, value) \ 425 HALMAC_SET_DESC_FIELD_NO_CLR( \ 426 ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 3) 427 #define GET_TX_DESC_BUFFER_BT_NULL(txdesc) \ 428 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, 3) 429 #define SET_TX_DESC_BUFFER_EN_DESC_ID(txdesc, value) \ 430 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \ 431 value, 0x1, 2) 432 #define SET_TX_DESC_BUFFER_EN_DESC_ID_NO_CLR(txdesc, value) \ 433 HALMAC_SET_DESC_FIELD_NO_CLR( \ 434 ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x1, 2) 435 #define GET_TX_DESC_BUFFER_EN_DESC_ID(txdesc) \ 436 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x1, 2) 437 #define SET_TX_DESC_BUFFER_SECTYPE(txdesc, value) \ 438 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword5, \ 439 value, 0x3, 0) 440 #define SET_TX_DESC_BUFFER_SECTYPE_NO_CLR(txdesc, value) \ 441 HALMAC_SET_DESC_FIELD_NO_CLR( \ 442 ((struct halmac_tx_desc *)txdesc)->dword5, value, 0x3, 0) 443 #define GET_TX_DESC_BUFFER_SECTYPE(txdesc) \ 444 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword5, 0x3, 0) 445 446 /*TXDESC_WORD6*/ 447 448 #define SET_TX_DESC_BUFFER_MULTIPLE_PORT(txdesc, value) \ 449 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \ 450 value, 0x7, 29) 451 #define SET_TX_DESC_BUFFER_MULTIPLE_PORT_NO_CLR(txdesc, value) \ 452 HALMAC_SET_DESC_FIELD_NO_CLR( \ 453 ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x7, 29) 454 #define GET_TX_DESC_BUFFER_MULTIPLE_PORT(txdesc) \ 455 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x7, \ 456 29) 457 #define SET_TX_DESC_BUFFER_POLLUTED(txdesc, value) \ 458 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \ 459 value, 0x1, 28) 460 #define SET_TX_DESC_BUFFER_POLLUTED_NO_CLR(txdesc, value) \ 461 HALMAC_SET_DESC_FIELD_NO_CLR( \ 462 ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x1, 28) 463 #define GET_TX_DESC_BUFFER_POLLUTED(txdesc) \ 464 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x1, \ 465 28) 466 #define SET_TX_DESC_BUFFER_NULL_1(txdesc, value) \ 467 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \ 468 value, 0x1, 27) 469 #define SET_TX_DESC_BUFFER_NULL_1_NO_CLR(txdesc, value) \ 470 HALMAC_SET_DESC_FIELD_NO_CLR( \ 471 ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x1, 27) 472 #define GET_TX_DESC_BUFFER_NULL_1(txdesc) \ 473 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x1, \ 474 27) 475 #define SET_TX_DESC_BUFFER_NULL_0(txdesc, value) \ 476 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \ 477 value, 0x1, 26) 478 #define SET_TX_DESC_BUFFER_NULL_0_NO_CLR(txdesc, value) \ 479 HALMAC_SET_DESC_FIELD_NO_CLR( \ 480 ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x1, 26) 481 #define GET_TX_DESC_BUFFER_NULL_0(txdesc) \ 482 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x1, \ 483 26) 484 #define SET_TX_DESC_BUFFER_TRI_FRAME(txdesc, value) \ 485 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \ 486 value, 0x1, 25) 487 #define SET_TX_DESC_BUFFER_TRI_FRAME_NO_CLR(txdesc, value) \ 488 HALMAC_SET_DESC_FIELD_NO_CLR( \ 489 ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x1, 25) 490 #define GET_TX_DESC_BUFFER_TRI_FRAME(txdesc) \ 491 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x1, \ 492 25) 493 #define SET_TX_DESC_BUFFER_SPE_RPT(txdesc, value) \ 494 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \ 495 value, 0x1, 24) 496 #define SET_TX_DESC_BUFFER_SPE_RPT_NO_CLR(txdesc, value) \ 497 HALMAC_SET_DESC_FIELD_NO_CLR( \ 498 ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x1, 24) 499 #define GET_TX_DESC_BUFFER_SPE_RPT(txdesc) \ 500 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x1, \ 501 24) 502 #define SET_TX_DESC_BUFFER_FTM_EN(txdesc, value) \ 503 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \ 504 value, 0x1, 23) 505 #define SET_TX_DESC_BUFFER_FTM_EN_NO_CLR(txdesc, value) \ 506 HALMAC_SET_DESC_FIELD_NO_CLR( \ 507 ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x1, 23) 508 #define GET_TX_DESC_BUFFER_FTM_EN(txdesc) \ 509 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x1, \ 510 23) 511 #define SET_TX_DESC_BUFFER_MU_DATARATE(txdesc, value) \ 512 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \ 513 value, 0x7f, 16) 514 #define SET_TX_DESC_BUFFER_MU_DATARATE_NO_CLR(txdesc, value) \ 515 HALMAC_SET_DESC_FIELD_NO_CLR( \ 516 ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x7f, 16) 517 #define GET_TX_DESC_BUFFER_MU_DATARATE(txdesc) \ 518 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x7f, \ 519 16) 520 #define SET_TX_DESC_BUFFER_CCA_RTS(txdesc, value) \ 521 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \ 522 value, 0x3, 14) 523 #define SET_TX_DESC_BUFFER_CCA_RTS_NO_CLR(txdesc, value) \ 524 HALMAC_SET_DESC_FIELD_NO_CLR( \ 525 ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 14) 526 #define GET_TX_DESC_BUFFER_CCA_RTS(txdesc) \ 527 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \ 528 14) 529 #define SET_TX_DESC_BUFFER_NDPA(txdesc, value) \ 530 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \ 531 value, 0x3, 12) 532 #define SET_TX_DESC_BUFFER_NDPA_NO_CLR(txdesc, value) \ 533 HALMAC_SET_DESC_FIELD_NO_CLR( \ 534 ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 12) 535 #define GET_TX_DESC_BUFFER_NDPA(txdesc) \ 536 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, \ 537 12) 538 #define SET_TX_DESC_BUFFER_TXPWR_OFSET_TYPE(txdesc, value) \ 539 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \ 540 value, 0x3, 9) 541 #define SET_TX_DESC_BUFFER_TXPWR_OFSET_TYPE_NO_CLR(txdesc, value) \ 542 HALMAC_SET_DESC_FIELD_NO_CLR( \ 543 ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x3, 9) 544 #define GET_TX_DESC_BUFFER_TXPWR_OFSET_TYPE(txdesc) \ 545 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, 0x3, 9) 546 #define SET_TX_DESC_BUFFER_P_AID(txdesc, value) \ 547 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword6, \ 548 value, 0x1ff, 0) 549 #define SET_TX_DESC_BUFFER_P_AID_NO_CLR(txdesc, value) \ 550 HALMAC_SET_DESC_FIELD_NO_CLR( \ 551 ((struct halmac_tx_desc *)txdesc)->dword6, value, 0x1ff, 0) 552 #define GET_TX_DESC_BUFFER_P_AID(txdesc) \ 553 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword6, \ 554 0x1ff, 0) 555 556 /*TXDESC_WORD7*/ 557 558 #define SET_TX_DESC_BUFFER_SW_DEFINE(txdesc, value) \ 559 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \ 560 value, 0xfff, 16) 561 #define SET_TX_DESC_BUFFER_SW_DEFINE_NO_CLR(txdesc, value) \ 562 HALMAC_SET_DESC_FIELD_NO_CLR( \ 563 ((struct halmac_tx_desc *)txdesc)->dword7, value, 0xfff, 16) 564 #define GET_TX_DESC_BUFFER_SW_DEFINE(txdesc) \ 565 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, \ 566 0xfff, 16) 567 #define SET_TX_DESC_BUFFER_CTRL_CNT_VALID(txdesc, value) \ 568 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \ 569 value, 0x1, 9) 570 #define SET_TX_DESC_BUFFER_CTRL_CNT_VALID_NO_CLR(txdesc, value) \ 571 HALMAC_SET_DESC_FIELD_NO_CLR( \ 572 ((struct halmac_tx_desc *)txdesc)->dword7, value, 0x1, 9) 573 #define GET_TX_DESC_BUFFER_CTRL_CNT_VALID(txdesc) \ 574 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0x1, 9) 575 #define SET_TX_DESC_BUFFER_CTRL_CNT(txdesc, value) \ 576 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \ 577 value, 0xf, 5) 578 #define SET_TX_DESC_BUFFER_CTRL_CNT_NO_CLR(txdesc, value) \ 579 HALMAC_SET_DESC_FIELD_NO_CLR( \ 580 ((struct halmac_tx_desc *)txdesc)->dword7, value, 0xf, 5) 581 #define GET_TX_DESC_BUFFER_CTRL_CNT(txdesc) \ 582 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0xf, 5) 583 #define SET_TX_DESC_BUFFER_DATA_RTY_LOWEST_RATE(txdesc, value) \ 584 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword7, \ 585 value, 0x1f, 0) 586 #define SET_TX_DESC_BUFFER_DATA_RTY_LOWEST_RATE_NO_CLR(txdesc, value) \ 587 HALMAC_SET_DESC_FIELD_NO_CLR( \ 588 ((struct halmac_tx_desc *)txdesc)->dword7, value, 0x1f, 0) 589 #define GET_TX_DESC_BUFFER_DATA_RTY_LOWEST_RATE(txdesc) \ 590 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword7, 0x1f, \ 591 0) 592 593 /*TXDESC_WORD8*/ 594 595 #define SET_TX_DESC_BUFFER_PATH_MAPA(txdesc, value) \ 596 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \ 597 value, 0x3, 30) 598 #define SET_TX_DESC_BUFFER_PATH_MAPA_NO_CLR(txdesc, value) \ 599 HALMAC_SET_DESC_FIELD_NO_CLR( \ 600 ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3, 30) 601 #define GET_TX_DESC_BUFFER_PATH_MAPA(txdesc) \ 602 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3, \ 603 30) 604 #define SET_TX_DESC_BUFFER_PATH_MAPB(txdesc, value) \ 605 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \ 606 value, 0x3, 28) 607 #define SET_TX_DESC_BUFFER_PATH_MAPB_NO_CLR(txdesc, value) \ 608 HALMAC_SET_DESC_FIELD_NO_CLR( \ 609 ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3, 28) 610 #define GET_TX_DESC_BUFFER_PATH_MAPB(txdesc) \ 611 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3, \ 612 28) 613 #define SET_TX_DESC_BUFFER_PATH_MAPC(txdesc, value) \ 614 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \ 615 value, 0x3, 26) 616 #define SET_TX_DESC_BUFFER_PATH_MAPC_NO_CLR(txdesc, value) \ 617 HALMAC_SET_DESC_FIELD_NO_CLR( \ 618 ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3, 26) 619 #define GET_TX_DESC_BUFFER_PATH_MAPC(txdesc) \ 620 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3, \ 621 26) 622 #define SET_TX_DESC_BUFFER_PATH_MAPD(txdesc, value) \ 623 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \ 624 value, 0x3, 24) 625 #define SET_TX_DESC_BUFFER_PATH_MAPD_NO_CLR(txdesc, value) \ 626 HALMAC_SET_DESC_FIELD_NO_CLR( \ 627 ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x3, 24) 628 #define GET_TX_DESC_BUFFER_PATH_MAPD(txdesc) \ 629 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x3, \ 630 24) 631 #define SET_TX_DESC_BUFFER_ANTSEL_A(txdesc, value) \ 632 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \ 633 value, 0xf, 20) 634 #define SET_TX_DESC_BUFFER_ANTSEL_A_NO_CLR(txdesc, value) \ 635 HALMAC_SET_DESC_FIELD_NO_CLR( \ 636 ((struct halmac_tx_desc *)txdesc)->dword8, value, 0xf, 20) 637 #define GET_TX_DESC_BUFFER_ANTSEL_A(txdesc) \ 638 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xf, \ 639 20) 640 #define SET_TX_DESC_BUFFER_ANTSEL_B(txdesc, value) \ 641 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \ 642 value, 0xf, 16) 643 #define SET_TX_DESC_BUFFER_ANTSEL_B_NO_CLR(txdesc, value) \ 644 HALMAC_SET_DESC_FIELD_NO_CLR( \ 645 ((struct halmac_tx_desc *)txdesc)->dword8, value, 0xf, 16) 646 #define GET_TX_DESC_BUFFER_ANTSEL_B(txdesc) \ 647 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xf, \ 648 16) 649 #define SET_TX_DESC_BUFFER_ANTSEL_C(txdesc, value) \ 650 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \ 651 value, 0xf, 12) 652 #define SET_TX_DESC_BUFFER_ANTSEL_C_NO_CLR(txdesc, value) \ 653 HALMAC_SET_DESC_FIELD_NO_CLR( \ 654 ((struct halmac_tx_desc *)txdesc)->dword8, value, 0xf, 12) 655 #define GET_TX_DESC_BUFFER_ANTSEL_C(txdesc) \ 656 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xf, \ 657 12) 658 #define SET_TX_DESC_BUFFER_ANTSEL_D(txdesc, value) \ 659 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \ 660 value, 0xf, 8) 661 #define SET_TX_DESC_BUFFER_ANTSEL_D_NO_CLR(txdesc, value) \ 662 HALMAC_SET_DESC_FIELD_NO_CLR( \ 663 ((struct halmac_tx_desc *)txdesc)->dword8, value, 0xf, 8) 664 #define GET_TX_DESC_BUFFER_ANTSEL_D(txdesc) \ 665 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xf, 8) 666 #define SET_TX_DESC_BUFFER_NTX_PATH_EN(txdesc, value) \ 667 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \ 668 value, 0xf, 4) 669 #define SET_TX_DESC_BUFFER_NTX_PATH_EN_NO_CLR(txdesc, value) \ 670 HALMAC_SET_DESC_FIELD_NO_CLR( \ 671 ((struct halmac_tx_desc *)txdesc)->dword8, value, 0xf, 4) 672 #define GET_TX_DESC_BUFFER_NTX_PATH_EN(txdesc) \ 673 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0xf, 4) 674 #define SET_TX_DESC_BUFFER_ANTLSEL_EN(txdesc, value) \ 675 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \ 676 value, 0x1, 3) 677 #define SET_TX_DESC_BUFFER_ANTLSEL_EN_NO_CLR(txdesc, value) \ 678 HALMAC_SET_DESC_FIELD_NO_CLR( \ 679 ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x1, 3) 680 #define GET_TX_DESC_BUFFER_ANTLSEL_EN(txdesc) \ 681 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x1, 3) 682 #define SET_TX_DESC_BUFFER_AMPDU_DENSITY(txdesc, value) \ 683 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword8, \ 684 value, 0x7, 0) 685 #define SET_TX_DESC_BUFFER_AMPDU_DENSITY_NO_CLR(txdesc, value) \ 686 HALMAC_SET_DESC_FIELD_NO_CLR( \ 687 ((struct halmac_tx_desc *)txdesc)->dword8, value, 0x7, 0) 688 #define GET_TX_DESC_BUFFER_AMPDU_DENSITY(txdesc) \ 689 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword8, 0x7, 0) 690 691 /*TXDESC_WORD9*/ 692 693 #define SET_TX_DESC_BUFFER_VCS_STBC(txdesc, value) \ 694 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 695 value, 0x3, 30) 696 #define SET_TX_DESC_BUFFER_VCS_STBC_NO_CLR(txdesc, value) \ 697 HALMAC_SET_DESC_FIELD_NO_CLR( \ 698 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x3, 30) 699 #define GET_TX_DESC_BUFFER_VCS_STBC(txdesc) \ 700 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x3, \ 701 30) 702 #define SET_TX_DESC_BUFFER_DATA_STBC(txdesc, value) \ 703 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 704 value, 0x3, 28) 705 #define SET_TX_DESC_BUFFER_DATA_STBC_NO_CLR(txdesc, value) \ 706 HALMAC_SET_DESC_FIELD_NO_CLR( \ 707 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x3, 28) 708 #define GET_TX_DESC_BUFFER_DATA_STBC(txdesc) \ 709 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x3, \ 710 28) 711 #define SET_TX_DESC_BUFFER_RTS_RTY_LOWEST_RATE(txdesc, value) \ 712 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 713 value, 0xf, 24) 714 #define SET_TX_DESC_BUFFER_RTS_RTY_LOWEST_RATE_NO_CLR(txdesc, value) \ 715 HALMAC_SET_DESC_FIELD_NO_CLR( \ 716 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0xf, 24) 717 #define GET_TX_DESC_BUFFER_RTS_RTY_LOWEST_RATE(txdesc) \ 718 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0xf, \ 719 24) 720 #define SET_TX_DESC_BUFFER_SIGNALING_TA_PKT_EN(txdesc, value) \ 721 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 722 value, 0x1, 23) 723 #define SET_TX_DESC_BUFFER_SIGNALING_TA_PKT_EN_NO_CLR(txdesc, value) \ 724 HALMAC_SET_DESC_FIELD_NO_CLR( \ 725 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 23) 726 #define GET_TX_DESC_BUFFER_SIGNALING_TA_PKT_EN(txdesc) \ 727 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, \ 728 23) 729 #define SET_TX_DESC_BUFFER_MHR_CP(txdesc, value) \ 730 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 731 value, 0x1, 22) 732 #define SET_TX_DESC_BUFFER_MHR_CP_NO_CLR(txdesc, value) \ 733 HALMAC_SET_DESC_FIELD_NO_CLR( \ 734 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 22) 735 #define GET_TX_DESC_BUFFER_MHR_CP(txdesc) \ 736 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, \ 737 22) 738 #define SET_TX_DESC_BUFFER_SMH_EN(txdesc, value) \ 739 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 740 value, 0x1, 21) 741 #define SET_TX_DESC_BUFFER_SMH_EN_NO_CLR(txdesc, value) \ 742 HALMAC_SET_DESC_FIELD_NO_CLR( \ 743 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 21) 744 #define GET_TX_DESC_BUFFER_SMH_EN(txdesc) \ 745 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, \ 746 21) 747 #define SET_TX_DESC_BUFFER_RTSRATE(txdesc, value) \ 748 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 749 value, 0x1f, 16) 750 #define SET_TX_DESC_BUFFER_RTSRATE_NO_CLR(txdesc, value) \ 751 HALMAC_SET_DESC_FIELD_NO_CLR( \ 752 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1f, 16) 753 #define GET_TX_DESC_BUFFER_RTSRATE(txdesc) \ 754 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1f, \ 755 16) 756 #define SET_TX_DESC_BUFFER_SMH_CAM(txdesc, value) \ 757 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 758 value, 0xff, 8) 759 #define SET_TX_DESC_BUFFER_SMH_CAM_NO_CLR(txdesc, value) \ 760 HALMAC_SET_DESC_FIELD_NO_CLR( \ 761 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0xff, 8) 762 #define GET_TX_DESC_BUFFER_SMH_CAM(txdesc) \ 763 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0xff, \ 764 8) 765 #define SET_TX_DESC_BUFFER_ARFR_TABLE_SEL(txdesc, value) \ 766 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 767 value, 0x1, 7) 768 #define SET_TX_DESC_BUFFER_ARFR_TABLE_SEL_NO_CLR(txdesc, value) \ 769 HALMAC_SET_DESC_FIELD_NO_CLR( \ 770 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 7) 771 #define GET_TX_DESC_BUFFER_ARFR_TABLE_SEL(txdesc) \ 772 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 7) 773 #define SET_TX_DESC_BUFFER_ARFR_HT_EN(txdesc, value) \ 774 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 775 value, 0x1, 6) 776 #define SET_TX_DESC_BUFFER_ARFR_HT_EN_NO_CLR(txdesc, value) \ 777 HALMAC_SET_DESC_FIELD_NO_CLR( \ 778 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 6) 779 #define GET_TX_DESC_BUFFER_ARFR_HT_EN(txdesc) \ 780 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 6) 781 #define SET_TX_DESC_BUFFER_ARFR_OFDM_EN(txdesc, value) \ 782 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 783 value, 0x1, 5) 784 #define SET_TX_DESC_BUFFER_ARFR_OFDM_EN_NO_CLR(txdesc, value) \ 785 HALMAC_SET_DESC_FIELD_NO_CLR( \ 786 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 5) 787 #define GET_TX_DESC_BUFFER_ARFR_OFDM_EN(txdesc) \ 788 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 5) 789 #define SET_TX_DESC_BUFFER_ARFR_CCK_EN(txdesc, value) \ 790 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 791 value, 0x1, 4) 792 #define SET_TX_DESC_BUFFER_ARFR_CCK_EN_NO_CLR(txdesc, value) \ 793 HALMAC_SET_DESC_FIELD_NO_CLR( \ 794 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 4) 795 #define GET_TX_DESC_BUFFER_ARFR_CCK_EN(txdesc) \ 796 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 4) 797 #define SET_TX_DESC_BUFFER_RTS_SHORT(txdesc, value) \ 798 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 799 value, 0x1, 3) 800 #define SET_TX_DESC_BUFFER_RTS_SHORT_NO_CLR(txdesc, value) \ 801 HALMAC_SET_DESC_FIELD_NO_CLR( \ 802 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 3) 803 #define GET_TX_DESC_BUFFER_RTS_SHORT(txdesc) \ 804 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 3) 805 #define SET_TX_DESC_BUFFER_DISDATAFB(txdesc, value) \ 806 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 807 value, 0x1, 2) 808 #define SET_TX_DESC_BUFFER_DISDATAFB_NO_CLR(txdesc, value) \ 809 HALMAC_SET_DESC_FIELD_NO_CLR( \ 810 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 2) 811 #define GET_TX_DESC_BUFFER_DISDATAFB(txdesc) \ 812 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 2) 813 #define SET_TX_DESC_BUFFER_DISRTSFB(txdesc, value) \ 814 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 815 value, 0x1, 1) 816 #define SET_TX_DESC_BUFFER_DISRTSFB_NO_CLR(txdesc, value) \ 817 HALMAC_SET_DESC_FIELD_NO_CLR( \ 818 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 1) 819 #define GET_TX_DESC_BUFFER_DISRTSFB(txdesc) \ 820 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 1) 821 #define SET_TX_DESC_BUFFER_EXT_EDCA(txdesc, value) \ 822 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword9, \ 823 value, 0x1, 0) 824 #define SET_TX_DESC_BUFFER_EXT_EDCA_NO_CLR(txdesc, value) \ 825 HALMAC_SET_DESC_FIELD_NO_CLR( \ 826 ((struct halmac_tx_desc *)txdesc)->dword9, value, 0x1, 0) 827 #define GET_TX_DESC_BUFFER_EXT_EDCA(txdesc) \ 828 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword9, 0x1, 0) 829 830 /*TXDESC_WORD10*/ 831 832 #define SET_TX_DESC_BUFFER_AMPDU_MAX_TIME(txdesc, value) \ 833 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \ 834 value, 0xff, 24) 835 #define SET_TX_DESC_BUFFER_AMPDU_MAX_TIME_NO_CLR(txdesc, value) \ 836 HALMAC_SET_DESC_FIELD_NO_CLR( \ 837 ((struct halmac_tx_desc *)txdesc)->dword10, value, 0xff, 24) 838 #define GET_TX_DESC_BUFFER_AMPDU_MAX_TIME(txdesc) \ 839 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, \ 840 0xff, 24) 841 #define SET_TX_DESC_BUFFER_SPECIAL_CW(txdesc, value) \ 842 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \ 843 value, 0x1, 23) 844 #define SET_TX_DESC_BUFFER_SPECIAL_CW_NO_CLR(txdesc, value) \ 845 HALMAC_SET_DESC_FIELD_NO_CLR( \ 846 ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 23) 847 #define GET_TX_DESC_BUFFER_SPECIAL_CW(txdesc) \ 848 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \ 849 23) 850 #define SET_TX_DESC_BUFFER_RDG_NAV_EXT(txdesc, value) \ 851 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \ 852 value, 0x1, 22) 853 #define SET_TX_DESC_BUFFER_RDG_NAV_EXT_NO_CLR(txdesc, value) \ 854 HALMAC_SET_DESC_FIELD_NO_CLR( \ 855 ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 22) 856 #define GET_TX_DESC_BUFFER_RDG_NAV_EXT(txdesc) \ 857 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \ 858 22) 859 #define SET_TX_DESC_BUFFER_RAW(txdesc, value) \ 860 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \ 861 value, 0x1, 21) 862 #define SET_TX_DESC_BUFFER_RAW_NO_CLR(txdesc, value) \ 863 HALMAC_SET_DESC_FIELD_NO_CLR( \ 864 ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 21) 865 #define GET_TX_DESC_BUFFER_RAW(txdesc) \ 866 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \ 867 21) 868 #define SET_TX_DESC_BUFFER_MAX_AGG_NUM(txdesc, value) \ 869 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \ 870 value, 0x1f, 16) 871 #define SET_TX_DESC_BUFFER_MAX_AGG_NUM_NO_CLR(txdesc, value) \ 872 HALMAC_SET_DESC_FIELD_NO_CLR( \ 873 ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1f, 16) 874 #define GET_TX_DESC_BUFFER_MAX_AGG_NUM(txdesc) \ 875 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, \ 876 0x1f, 16) 877 #define SET_TX_DESC_BUFFER_FINAL_DATA_RATE(txdesc, value) \ 878 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \ 879 value, 0xff, 8) 880 #define SET_TX_DESC_BUFFER_FINAL_DATA_RATE_NO_CLR(txdesc, value) \ 881 HALMAC_SET_DESC_FIELD_NO_CLR( \ 882 ((struct halmac_tx_desc *)txdesc)->dword10, value, 0xff, 8) 883 #define GET_TX_DESC_BUFFER_FINAL_DATA_RATE(txdesc) \ 884 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, \ 885 0xff, 8) 886 #define SET_TX_DESC_BUFFER_GF(txdesc, value) \ 887 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \ 888 value, 0x1, 7) 889 #define SET_TX_DESC_BUFFER_GF_NO_CLR(txdesc, value) \ 890 HALMAC_SET_DESC_FIELD_NO_CLR( \ 891 ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 7) 892 #define GET_TX_DESC_BUFFER_GF(txdesc) \ 893 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \ 894 7) 895 #define SET_TX_DESC_BUFFER_MOREFRAG(txdesc, value) \ 896 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \ 897 value, 0x1, 6) 898 #define SET_TX_DESC_BUFFER_MOREFRAG_NO_CLR(txdesc, value) \ 899 HALMAC_SET_DESC_FIELD_NO_CLR( \ 900 ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 6) 901 #define GET_TX_DESC_BUFFER_MOREFRAG(txdesc) \ 902 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \ 903 6) 904 #define SET_TX_DESC_BUFFER_NOACM(txdesc, value) \ 905 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \ 906 value, 0x1, 5) 907 #define SET_TX_DESC_BUFFER_NOACM_NO_CLR(txdesc, value) \ 908 HALMAC_SET_DESC_FIELD_NO_CLR( \ 909 ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 5) 910 #define GET_TX_DESC_BUFFER_NOACM(txdesc) \ 911 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \ 912 5) 913 #define SET_TX_DESC_BUFFER_HTC(txdesc, value) \ 914 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \ 915 value, 0x1, 4) 916 #define SET_TX_DESC_BUFFER_HTC_NO_CLR(txdesc, value) \ 917 HALMAC_SET_DESC_FIELD_NO_CLR( \ 918 ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 4) 919 #define GET_TX_DESC_BUFFER_HTC(txdesc) \ 920 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \ 921 4) 922 #define SET_TX_DESC_BUFFER_TX_PKT_AFTER_PIFS(txdesc, value) \ 923 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \ 924 value, 0x1, 3) 925 #define SET_TX_DESC_BUFFER_TX_PKT_AFTER_PIFS_NO_CLR(txdesc, value) \ 926 HALMAC_SET_DESC_FIELD_NO_CLR( \ 927 ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 3) 928 #define GET_TX_DESC_BUFFER_TX_PKT_AFTER_PIFS(txdesc) \ 929 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \ 930 3) 931 #define SET_TX_DESC_BUFFER_USE_MAX_TIME_EN(txdesc, value) \ 932 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \ 933 value, 0x1, 2) 934 #define SET_TX_DESC_BUFFER_USE_MAX_TIME_EN_NO_CLR(txdesc, value) \ 935 HALMAC_SET_DESC_FIELD_NO_CLR( \ 936 ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x1, 2) 937 #define GET_TX_DESC_BUFFER_USE_MAX_TIME_EN(txdesc) \ 938 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x1, \ 939 2) 940 #define SET_TX_DESC_BUFFER_HW_SSN_SEL(txdesc, value) \ 941 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword10, \ 942 value, 0x3, 0) 943 #define SET_TX_DESC_BUFFER_HW_SSN_SEL_NO_CLR(txdesc, value) \ 944 HALMAC_SET_DESC_FIELD_NO_CLR( \ 945 ((struct halmac_tx_desc *)txdesc)->dword10, value, 0x3, 0) 946 #define GET_TX_DESC_BUFFER_HW_SSN_SEL(txdesc) \ 947 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword10, 0x3, \ 948 0) 949 950 /*TXDESC_WORD11*/ 951 952 #define SET_TX_DESC_BUFFER_ADDR_CAM(txdesc, value) \ 953 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword11, \ 954 value, 0xff, 24) 955 #define SET_TX_DESC_BUFFER_ADDR_CAM_NO_CLR(txdesc, value) \ 956 HALMAC_SET_DESC_FIELD_NO_CLR( \ 957 ((struct halmac_tx_desc *)txdesc)->dword11, value, 0xff, 24) 958 #define GET_TX_DESC_BUFFER_ADDR_CAM(txdesc) \ 959 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword11, \ 960 0xff, 24) 961 #define SET_TX_DESC_BUFFER_SND_TARGET(txdesc, value) \ 962 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword11, \ 963 value, 0xff, 16) 964 #define SET_TX_DESC_BUFFER_SND_TARGET_NO_CLR(txdesc, value) \ 965 HALMAC_SET_DESC_FIELD_NO_CLR( \ 966 ((struct halmac_tx_desc *)txdesc)->dword11, value, 0xff, 16) 967 #define GET_TX_DESC_BUFFER_SND_TARGET(txdesc) \ 968 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword11, \ 969 0xff, 16) 970 #define SET_TX_DESC_BUFFER_DATA_LDPC(txdesc, value) \ 971 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword11, \ 972 value, 0x1, 15) 973 #define SET_TX_DESC_BUFFER_DATA_LDPC_NO_CLR(txdesc, value) \ 974 HALMAC_SET_DESC_FIELD_NO_CLR( \ 975 ((struct halmac_tx_desc *)txdesc)->dword11, value, 0x1, 15) 976 #define GET_TX_DESC_BUFFER_DATA_LDPC(txdesc) \ 977 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword11, 0x1, \ 978 15) 979 #define SET_TX_DESC_BUFFER_LSIG_TXOP_EN(txdesc, value) \ 980 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword11, \ 981 value, 0x1, 14) 982 #define SET_TX_DESC_BUFFER_LSIG_TXOP_EN_NO_CLR(txdesc, value) \ 983 HALMAC_SET_DESC_FIELD_NO_CLR( \ 984 ((struct halmac_tx_desc *)txdesc)->dword11, value, 0x1, 14) 985 #define GET_TX_DESC_BUFFER_LSIG_TXOP_EN(txdesc) \ 986 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword11, 0x1, \ 987 14) 988 #define SET_TX_DESC_BUFFER_G_ID(txdesc, value) \ 989 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword11, \ 990 value, 0x3f, 8) 991 #define SET_TX_DESC_BUFFER_G_ID_NO_CLR(txdesc, value) \ 992 HALMAC_SET_DESC_FIELD_NO_CLR( \ 993 ((struct halmac_tx_desc *)txdesc)->dword11, value, 0x3f, 8) 994 #define GET_TX_DESC_BUFFER_G_ID(txdesc) \ 995 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword11, \ 996 0x3f, 8) 997 #define SET_TX_DESC_BUFFER_SIGNALING_TA_PKT_SC(txdesc, value) \ 998 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword11, \ 999 value, 0xf, 4) 1000 #define SET_TX_DESC_BUFFER_SIGNALING_TA_PKT_SC_NO_CLR(txdesc, value) \ 1001 HALMAC_SET_DESC_FIELD_NO_CLR( \ 1002 ((struct halmac_tx_desc *)txdesc)->dword11, value, 0xf, 4) 1003 #define GET_TX_DESC_BUFFER_SIGNALING_TA_PKT_SC(txdesc) \ 1004 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword11, 0xf, \ 1005 4) 1006 #define SET_TX_DESC_BUFFER_DATA_SC(txdesc, value) \ 1007 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword11, \ 1008 value, 0xf, 0) 1009 #define SET_TX_DESC_BUFFER_DATA_SC_NO_CLR(txdesc, value) \ 1010 HALMAC_SET_DESC_FIELD_NO_CLR( \ 1011 ((struct halmac_tx_desc *)txdesc)->dword11, value, 0xf, 0) 1012 #define GET_TX_DESC_BUFFER_DATA_SC(txdesc) \ 1013 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword11, 0xf, \ 1014 0) 1015 1016 /*TXDESC_WORD12*/ 1017 1018 #define SET_TX_DESC_BUFFER_LEN1_L(txdesc, value) \ 1019 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword12, \ 1020 value, 0x7f, 17) 1021 #define SET_TX_DESC_BUFFER_LEN1_L_NO_CLR(txdesc, value) \ 1022 HALMAC_SET_DESC_FIELD_NO_CLR( \ 1023 ((struct halmac_tx_desc *)txdesc)->dword12, value, 0x7f, 17) 1024 #define GET_TX_DESC_BUFFER_LEN1_L(txdesc) \ 1025 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword12, \ 1026 0x7f, 17) 1027 #define SET_TX_DESC_BUFFER_LEN0(txdesc, value) \ 1028 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword12, \ 1029 value, 0x1fff, 4) 1030 #define SET_TX_DESC_BUFFER_LEN0_NO_CLR(txdesc, value) \ 1031 HALMAC_SET_DESC_FIELD_NO_CLR( \ 1032 ((struct halmac_tx_desc *)txdesc)->dword12, value, 0x1fff, 4) 1033 #define GET_TX_DESC_BUFFER_LEN0(txdesc) \ 1034 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword12, \ 1035 0x1fff, 4) 1036 #define SET_TX_DESC_BUFFER_PKT_NUM(txdesc, value) \ 1037 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword12, \ 1038 value, 0xf, 0) 1039 #define SET_TX_DESC_BUFFER_PKT_NUM_NO_CLR(txdesc, value) \ 1040 HALMAC_SET_DESC_FIELD_NO_CLR( \ 1041 ((struct halmac_tx_desc *)txdesc)->dword12, value, 0xf, 0) 1042 #define GET_TX_DESC_BUFFER_PKT_NUM(txdesc) \ 1043 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword12, 0xf, \ 1044 0) 1045 1046 /*TXDESC_WORD13*/ 1047 1048 #define SET_TX_DESC_BUFFER_LEN3(txdesc, value) \ 1049 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword13, \ 1050 value, 0x1fff, 19) 1051 #define SET_TX_DESC_BUFFER_LEN3_NO_CLR(txdesc, value) \ 1052 HALMAC_SET_DESC_FIELD_NO_CLR( \ 1053 ((struct halmac_tx_desc *)txdesc)->dword13, value, 0x1fff, 19) 1054 #define GET_TX_DESC_BUFFER_LEN3(txdesc) \ 1055 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword13, \ 1056 0x1fff, 19) 1057 #define SET_TX_DESC_BUFFER_LEN2(txdesc, value) \ 1058 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword13, \ 1059 value, 0x1fff, 6) 1060 #define SET_TX_DESC_BUFFER_LEN2_NO_CLR(txdesc, value) \ 1061 HALMAC_SET_DESC_FIELD_NO_CLR( \ 1062 ((struct halmac_tx_desc *)txdesc)->dword13, value, 0x1fff, 6) 1063 #define GET_TX_DESC_BUFFER_LEN2(txdesc) \ 1064 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword13, \ 1065 0x1fff, 6) 1066 #define SET_TX_DESC_BUFFER_LEN1_H(txdesc, value) \ 1067 HALMAC_SET_DESC_FIELD_CLR(((struct halmac_tx_desc *)txdesc)->dword13, \ 1068 value, 0x3f, 0) 1069 #define SET_TX_DESC_BUFFER_LEN1_H_NO_CLR(txdesc, value) \ 1070 HALMAC_SET_DESC_FIELD_NO_CLR( \ 1071 ((struct halmac_tx_desc *)txdesc)->dword13, value, 0x3f, 0) 1072 #define GET_TX_DESC_BUFFER_LEN1_H(txdesc) \ 1073 HALMAC_GET_DESC_FIELD(((struct halmac_tx_desc *)txdesc)->dword13, \ 1074 0x3f, 0) 1075 1076 #endif 1077 1078 #endif 1079