1 /* 2 * Copyright (C) 1999-2019, Broadcom. 3 * 4 * Unless you and Broadcom execute a separate written software license 5 * agreement governing use of this software, this software is licensed to you 6 * under the terms of the GNU General Public License version 2 (the "GPL"), 7 * available at http://www.broadcom.com/licenses/GPLv2.php, with the 8 * following added to such license: 9 * 10 * As a special exception, the copyright holders of this software give you 11 * permission to link this software with independent modules, and to copy and 12 * distribute the resulting executable under terms of your choice, provided that 13 * you also meet, for each linked independent module, the terms and conditions 14 * of the license of that module. An independent module is a module which is 15 * not derived from this software. The special exception does not apply to any 16 * modifications of the software. 17 * 18 * Notwithstanding the above, under no circumstances may you combine this 19 * software in any way with any other Broadcom software provided under a license 20 * other than the GPL, without Broadcom's express prior written consent. 21 * 22 * 23 * <<Broadcom-WL-IPTag/Open:>> 24 * 25 * $Id: wlfc_proto.h 735303 2017-12-08 06:20:29Z $ 26 * 27 */ 28 29 /** WL flow control for PROP_TXSTATUS. Related to host AMPDU reordering. */ 30 31 #ifndef __wlfc_proto_definitions_h__ 32 #define __wlfc_proto_definitions_h__ 33 34 /* Use TLV to convey WLFC information. 35 --------------------------------------------------------------------------- 36 | Type | Len | value | Description 37 --------------------------------------------------------------------------- 38 | 1 | 1 | (handle) | MAC OPEN 39 --------------------------------------------------------------------------- 40 | 2 | 1 | (handle) | MAC CLOSE 41 --------------------------------------------------------------------------- 42 | 3 | 2 | (count, handle, prec_bmp)| Set the credit depth for a MAC dstn 43 --------------------------------------------------------------------------- 44 | 4 | 4+ | see pkttag comments | TXSTATUS 45 | | 12 | TX status & timestamps | Present only when pkt timestamp is 46 enabled 47 --------------------------------------------------------------------------- 48 | 5 | 4 | see pkttag comments | PKKTTAG [host->firmware] 49 --------------------------------------------------------------------------- 50 | 6 | 8 | (handle, ifid, MAC) | MAC ADD 51 --------------------------------------------------------------------------- 52 | 7 | 8 | (handle, ifid, MAC) | MAC DEL 53 --------------------------------------------------------------------------- 54 | 8 | 1 | (rssi) | RSSI - RSSI value for the packet. 55 --------------------------------------------------------------------------- 56 | 9 | 1 | (interface ID) | Interface OPEN 57 --------------------------------------------------------------------------- 58 | 10 | 1 | (interface ID) | Interface CLOSE 59 --------------------------------------------------------------------------- 60 | 11 | 8 | fifo credit returns map | FIFO credits back to the host 61 | | | | 62 | | | | 63 -------------------------------------- | | | | | ac0 | ac1 | ac2 | ac3 64 | bcmc | atim | | | | | 65 -------------------------------------- | | | | 66 --------------------------------------------------------------------------- 67 | 12 | 2 | MAC handle, | Host provides a bitmap of pending 68 | | | AC[0-3] traffic bitmap | unicast traffic for MAC-handle dstn. 69 | | | | [host->firmware] 70 --------------------------------------------------------------------------- 71 | 13 | 3 | (count, handle, prec_bmp)| One time request for packet to a 72 specific | | | | MAC destination. 73 --------------------------------------------------------------------------- 74 | 15 | 12 | (pkttag, timestamps) | Send TX timestamp at reception from 75 host 76 --------------------------------------------------------------------------- 77 | 16 | 12 | (pkttag, timestamps) | Send WLAN RX timestamp along with RX 78 frame 79 --------------------------------------------------------------------------- 80 | 255 | N/A | N/A | FILLER - This is a special type 81 | | | | that has no length or value. 82 | | | | Typically used for padding. 83 --------------------------------------------------------------------------- 84 */ 85 86 typedef enum { 87 WLFC_CTL_TYPE_MAC_OPEN = 1, 88 WLFC_CTL_TYPE_MAC_CLOSE = 2, 89 WLFC_CTL_TYPE_MAC_REQUEST_CREDIT = 3, 90 WLFC_CTL_TYPE_TXSTATUS = 4, 91 WLFC_CTL_TYPE_PKTTAG = 5, /** host<->dongle */ 92 93 WLFC_CTL_TYPE_MACDESC_ADD = 6, 94 WLFC_CTL_TYPE_MACDESC_DEL = 7, 95 WLFC_CTL_TYPE_RSSI = 8, 96 97 WLFC_CTL_TYPE_INTERFACE_OPEN = 9, 98 WLFC_CTL_TYPE_INTERFACE_CLOSE = 10, 99 100 WLFC_CTL_TYPE_FIFO_CREDITBACK = 11, 101 102 WLFC_CTL_TYPE_PENDING_TRAFFIC_BMP = 12, /** host->dongle */ 103 WLFC_CTL_TYPE_MAC_REQUEST_PACKET = 13, 104 WLFC_CTL_TYPE_HOST_REORDER_RXPKTS = 14, 105 106 WLFC_CTL_TYPE_TX_ENTRY_STAMP = 15, 107 WLFC_CTL_TYPE_RX_STAMP = 16, 108 WLFC_CTL_TYPE_TX_STATUS_STAMP = 17, /** obsolete */ 109 110 WLFC_CTL_TYPE_TRANS_ID = 18, 111 WLFC_CTL_TYPE_COMP_TXSTATUS = 19, 112 113 WLFC_CTL_TYPE_TID_OPEN = 20, 114 WLFC_CTL_TYPE_TID_CLOSE = 21, 115 WLFC_CTL_TYPE_UPD_FLR_WEIGHT = 22, 116 WLFC_CTL_TYPE_ENAB_FFSCH = 23, 117 WLFC_CTL_TYPE_UPDATE_FLAGS = 24, /* clear the flags set in flowring */ 118 WLFC_CTL_TYPE_CLEAR_SUPPR = 119 25, /* free the supression info in the flowring */ 120 121 WLFC_CTL_TYPE_FLOWID_OPEN = 26, 122 WLFC_CTL_TYPE_FLOWID_CLOSE = 27, 123 124 WLFC_CTL_TYPE_FILLER = 255 125 } wlfc_ctl_type_t; 126 127 #define WLFC_CTL_VALUE_LEN_FLOWID 2 128 129 #define WLFC_CTL_VALUE_LEN_MACDESC 8 /** handle, interface, MAC */ 130 131 #define WLFC_CTL_VALUE_LEN_MAC 1 /** MAC-handle */ 132 #define WLFC_CTL_VALUE_LEN_RSSI 1 133 134 #define WLFC_CTL_VALUE_LEN_INTERFACE 1 135 #define WLFC_CTL_VALUE_LEN_PENDING_TRAFFIC_BMP 2 136 137 #define WLFC_CTL_VALUE_LEN_TXSTATUS 4 138 #define WLFC_CTL_VALUE_LEN_PKTTAG 4 139 #define WLFC_CTL_VALUE_LEN_TIMESTAMP 12 /** 4-byte rate info + 2 TSF */ 140 141 #define WLFC_CTL_VALUE_LEN_SEQ 2 142 143 /* Reset the flags set for the corresponding flowring of the SCB which is 144 * de-inited */ 145 /* FLOW_RING_FLAG_LAST_TIM | FLOW_RING_FLAG_INFORM_PKTPEND | 146 * FLOW_RING_FLAG_PKT_REQ */ 147 #define WLFC_RESET_ALL_FLAGS 0 148 #define WLFC_CTL_VALUE_LEN_FLAGS 7 /** flags, MAC */ 149 150 /* free the data stored to be used for suppressed packets in future */ 151 #define WLFC_CTL_VALUE_LEN_SUPR 7 /** tid, MAC */ 152 153 /* The high bits of ratespec report in timestamp are used for various status */ 154 #define WLFC_TSFLAGS_RX_RETRY (1 << 31) 155 #define WLFC_TSFLAGS_PM_ENABLED (1 << 30) 156 #define WLFC_TSFLAGS_MASK (WLFC_TSFLAGS_RX_RETRY | WLFC_TSFLAGS_PM_ENABLED) 157 158 /* enough space to host all 4 ACs, bc/mc and atim fifo credit */ 159 #define WLFC_CTL_VALUE_LEN_FIFO_CREDITBACK 6 160 161 #define WLFC_CTL_VALUE_LEN_REQUEST_CREDIT \ 162 3 /* credit, MAC-handle, prec_bitmap */ 163 #define WLFC_CTL_VALUE_LEN_REQUEST_PACKET \ 164 3 /* credit, MAC-handle, prec_bitmap */ 165 166 #define WLFC_PKTFLAG_PKTFROMHOST 0x01 167 #define WLFC_PKTFLAG_PKT_REQUESTED 0x02 168 #define WLFC_PKTFLAG_PKT_SENDTOHOST 0x04 169 170 #define WL_TXSTATUS_STATUS_MASK 0xff /* allow 8 bits */ 171 #define WL_TXSTATUS_STATUS_SHIFT 24 172 173 #define WL_TXSTATUS_SET_STATUS(x, status) \ 174 ((x) = ((x) & ~(WL_TXSTATUS_STATUS_MASK << WL_TXSTATUS_STATUS_SHIFT)) | \ 175 (((status)&WL_TXSTATUS_STATUS_MASK) << WL_TXSTATUS_STATUS_SHIFT)) 176 #define WL_TXSTATUS_GET_STATUS(x) \ 177 (((x) >> WL_TXSTATUS_STATUS_SHIFT) & WL_TXSTATUS_STATUS_MASK) 178 179 /** 180 * Bit 31 of the 32-bit packet tag is defined as 'generation ID'. It is set by 181 * the host to the "current" generation, and by the firmware to the "expected" 182 * generation, toggling on suppress. The firmware accepts a packet when the 183 * generation matches; on reset (startup) both "current" and "expected" are set 184 * to 0. 185 */ 186 #define WL_TXSTATUS_GENERATION_MASK 1 /* allow 1 bit */ 187 #define WL_TXSTATUS_GENERATION_SHIFT 31 188 189 #define WL_TXSTATUS_SET_GENERATION(x, gen) \ 190 ((x) = ((x) & \ 191 ~(WL_TXSTATUS_GENERATION_MASK << WL_TXSTATUS_GENERATION_SHIFT)) | \ 192 (((gen)&WL_TXSTATUS_GENERATION_MASK) \ 193 << WL_TXSTATUS_GENERATION_SHIFT)) 194 195 #define WL_TXSTATUS_GET_GENERATION(x) \ 196 (((x) >> WL_TXSTATUS_GENERATION_SHIFT) & WL_TXSTATUS_GENERATION_MASK) 197 198 #define WL_TXSTATUS_FLAGS_MASK 0xf /* allow 4 bits only */ 199 #define WL_TXSTATUS_FLAGS_SHIFT 27 200 201 #define WL_TXSTATUS_SET_FLAGS(x, flags) \ 202 ((x) = ((x) & ~(WL_TXSTATUS_FLAGS_MASK << WL_TXSTATUS_FLAGS_SHIFT)) | \ 203 (((flags)&WL_TXSTATUS_FLAGS_MASK) << WL_TXSTATUS_FLAGS_SHIFT)) 204 #define WL_TXSTATUS_GET_FLAGS(x) \ 205 (((x) >> WL_TXSTATUS_FLAGS_SHIFT) & WL_TXSTATUS_FLAGS_MASK) 206 207 #define WL_TXSTATUS_FIFO_MASK 0x7 /* allow 3 bits for FIFO ID */ 208 #define WL_TXSTATUS_FIFO_SHIFT 24 209 210 #define WL_TXSTATUS_SET_FIFO(x, flags) \ 211 ((x) = ((x) & ~(WL_TXSTATUS_FIFO_MASK << WL_TXSTATUS_FIFO_SHIFT)) | \ 212 (((flags)&WL_TXSTATUS_FIFO_MASK) << WL_TXSTATUS_FIFO_SHIFT)) 213 #define WL_TXSTATUS_GET_FIFO(x) \ 214 (((x) >> WL_TXSTATUS_FIFO_SHIFT) & WL_TXSTATUS_FIFO_MASK) 215 216 #define WL_TXSTATUS_PKTID_MASK 0xffffff /* allow 24 bits */ 217 #define WL_TXSTATUS_SET_PKTID(x, num) \ 218 ((x) = ((x) & ~WL_TXSTATUS_PKTID_MASK) | (num)) 219 #define WL_TXSTATUS_GET_PKTID(x) ((x)&WL_TXSTATUS_PKTID_MASK) 220 221 #define WL_TXSTATUS_HSLOT_MASK 0xffff /* allow 16 bits */ 222 #define WL_TXSTATUS_HSLOT_SHIFT 8 223 224 #define WL_TXSTATUS_SET_HSLOT(x, hslot) \ 225 ((x) = ((x) & ~(WL_TXSTATUS_HSLOT_MASK << WL_TXSTATUS_HSLOT_SHIFT)) | \ 226 (((hslot)&WL_TXSTATUS_HSLOT_MASK) << WL_TXSTATUS_HSLOT_SHIFT)) 227 #define WL_TXSTATUS_GET_HSLOT(x) \ 228 (((x) >> WL_TXSTATUS_HSLOT_SHIFT) & WL_TXSTATUS_HSLOT_MASK) 229 230 #define WL_TXSTATUS_FREERUNCTR_MASK 0xff /* allow 8 bits */ 231 232 #define WL_TXSTATUS_SET_FREERUNCTR(x, ctr) \ 233 ((x) = ((x) & ~(WL_TXSTATUS_FREERUNCTR_MASK)) | \ 234 ((ctr)&WL_TXSTATUS_FREERUNCTR_MASK)) 235 #define WL_TXSTATUS_GET_FREERUNCTR(x) ((x)&WL_TXSTATUS_FREERUNCTR_MASK) 236 237 /* AMSDU part of d11 seq number */ 238 #define WL_SEQ_AMSDU_MASK 0x1 /* allow 1 bit */ 239 #define WL_SEQ_AMSDU_SHIFT 14 240 #define WL_SEQ_SET_AMSDU(x, val) \ 241 ((x) = ((x) & ~(WL_SEQ_AMSDU_MASK << WL_SEQ_AMSDU_SHIFT)) | \ 242 (((val)&WL_SEQ_AMSDU_MASK) \ 243 << WL_SEQ_AMSDU_SHIFT)) /**< sets a single AMSDU bit */ 244 /** returns TRUE if ring item is AMSDU (seq = d11 seq nr) */ 245 #define WL_SEQ_IS_AMSDU(x) (((x) >> WL_SEQ_AMSDU_SHIFT) & WL_SEQ_AMSDU_MASK) 246 247 /* indicates last_suppr_seq is valid */ 248 #define WL_SEQ_VALIDSUPPR_MASK 0x1 /* allow 1 bit */ 249 #define WL_SEQ_VALIDSUPPR_SHIFT 12 250 #define WL_SEQ_SET_VALIDSUPPR(x, val) \ 251 ((x) = ((x) & ~(WL_SEQ_VALIDSUPPR_MASK << WL_SEQ_VALIDSUPPR_SHIFT)) | \ 252 (((val)&WL_SEQ_VALIDSUPPR_MASK) << WL_SEQ_VALIDSUPPR_SHIFT)) 253 #define WL_SEQ_GET_VALIDSUPPR(x) \ 254 (((x) >> WL_SEQ_VALIDSUPPR_SHIFT) & WL_SEQ_VALIDSUPPR_MASK) 255 256 #define WL_SEQ_FROMFW_MASK 0x1 /* allow 1 bit */ 257 #define WL_SEQ_FROMFW_SHIFT 13 258 #define WL_SEQ_SET_FROMFW(x, val) \ 259 ((x) = ((x) & ~(WL_SEQ_FROMFW_MASK << WL_SEQ_FROMFW_SHIFT)) | \ 260 (((val)&WL_SEQ_FROMFW_MASK) << WL_SEQ_FROMFW_SHIFT)) 261 /** Set when firmware assigns D11 sequence number to packet */ 262 #define SET_WL_HAS_ASSIGNED_SEQ(x) WL_SEQ_SET_FROMFW((x), 1) 263 264 /** returns TRUE if packet has been assigned a d11 seq number by the WL firmware 265 * layer */ 266 #define GET_WL_HAS_ASSIGNED_SEQ(x) \ 267 (((x) >> WL_SEQ_FROMFW_SHIFT) & WL_SEQ_FROMFW_MASK) 268 269 /** 270 * Proptxstatus related. 271 * 272 * When a packet is suppressed by WL or the D11 core, the packet has to be 273 * retried. Assigning a new d11 sequence number for the packet when retrying 274 * would cause the peer to be unable to reorder the packets within an AMPDU. So, 275 * suppressed packet from bus layer (DHD for SDIO and pciedev for PCIE) is 276 * re-using d11 seq number, so FW should not assign a new one. 277 */ 278 #define WL_SEQ_FROMDRV_MASK 0x1 /* allow 1 bit */ 279 #define WL_SEQ_FROMDRV_SHIFT 12 280 281 /** 282 * Proptxstatus, host or fw PCIe layer requests WL layer to reuse d11 seq no. 283 * Bit is reset by WL subsystem when it reuses the seq number. 284 */ 285 #define WL_SEQ_SET_REUSE(x, val) \ 286 ((x) = ((x) & ~(WL_SEQ_FROMDRV_MASK << WL_SEQ_FROMDRV_SHIFT)) | \ 287 (((val)&WL_SEQ_FROMDRV_MASK) << WL_SEQ_FROMDRV_SHIFT)) 288 #define SET_WL_TO_REUSE_SEQ(x) WL_SEQ_SET_REUSE((x), 1) 289 #define RESET_WL_TO_REUSE_SEQ(x) WL_SEQ_SET_REUSE((x), 0) 290 291 /** Proptxstatus, related to reuse of d11 seq numbers when retransmitting */ 292 #define IS_WL_TO_REUSE_SEQ(x) \ 293 (((x) >> WL_SEQ_FROMDRV_SHIFT) & WL_SEQ_FROMDRV_MASK) 294 295 #define WL_SEQ_NUM_MASK 0xfff /* allow 12 bit */ 296 #define WL_SEQ_NUM_SHIFT 0 297 /** Proptxstatus, sets d11seq no in pkt tag, related to reuse of d11seq no when 298 * retransmitting */ 299 #define WL_SEQ_SET_NUM(x, val) \ 300 ((x) = ((x) & ~(WL_SEQ_NUM_MASK << WL_SEQ_NUM_SHIFT)) | \ 301 (((val)&WL_SEQ_NUM_MASK) << WL_SEQ_NUM_SHIFT)) 302 /** Proptxstatus, gets d11seq no from pkt tag, related to reuse of d11seq no 303 * when retransmitting */ 304 #define WL_SEQ_GET_NUM(x) (((x) >> WL_SEQ_NUM_SHIFT) & WL_SEQ_NUM_MASK) 305 306 #define WL_SEQ_AMSDU_SUPPR_MASK \ 307 ((WL_SEQ_FROMDRV_MASK << WL_SEQ_FROMDRV_SHIFT) | \ 308 (WL_SEQ_AMSDU_MASK << WL_SEQ_AMSDU_SHIFT) | \ 309 (WL_SEQ_NUM_MASK << WL_SEQ_NUM_SHIFT)) 310 311 /* 32 STA should be enough??, 6 bits; Must be power of 2 */ 312 #define WLFC_MAC_DESC_TABLE_SIZE 32 313 #define WLFC_MAX_IFNUM 16 314 #define WLFC_MAC_DESC_ID_INVALID 0xff 315 316 /* b[7:5] -reuse guard, b[4:0] -value */ 317 #define WLFC_MAC_DESC_GET_LOOKUP_INDEX(x) ((x)&0x1f) 318 319 #define WLFC_PKTFLAG_SET_PKTREQUESTED(x) \ 320 (x) |= (WLFC_PKTFLAG_PKT_REQUESTED << WL_TXSTATUS_FLAGS_SHIFT) 321 322 #define WLFC_PKTFLAG_CLR_PKTREQUESTED(x) \ 323 (x) &= ~(WLFC_PKTFLAG_PKT_REQUESTED << WL_TXSTATUS_FLAGS_SHIFT) 324 325 #define WLFC_MAX_PENDING_DATALEN 120 326 327 /* host is free to discard the packet */ 328 #define WLFC_CTL_PKTFLAG_DISCARD 0 329 /* D11 suppressed a packet */ 330 #define WLFC_CTL_PKTFLAG_D11SUPPRESS 1 331 /* WL firmware suppressed a packet because MAC is 332 already in PSMode (short time window) 333 */ 334 #define WLFC_CTL_PKTFLAG_WLSUPPRESS 2 335 /* Firmware tossed this packet */ 336 #define WLFC_CTL_PKTFLAG_TOSSED_BYWLC 3 337 /* Firmware tossed after retries */ 338 #define WLFC_CTL_PKTFLAG_DISCARD_NOACK 4 339 /* Firmware wrongly reported suppressed previously,now fixing to acked */ 340 #define WLFC_CTL_PKTFLAG_SUPPRESS_ACKED 5 341 /* Firmware send this packet expired, lifetime expiration */ 342 #define WLFC_CTL_PKTFLAG_EXPIRED 6 343 /* Firmware drop this packet for any other reason */ 344 #define WLFC_CTL_PKTFLAG_DROPPED 7 345 /* Firmware free this packet */ 346 #define WLFC_CTL_PKTFLAG_MKTFREE 8 347 #define WLFC_CTL_PKTFLAG_MASK (0x0f) /* For 4-bit mask with one extra bit */ 348 349 #ifdef PROP_TXSTATUS_DEBUG 350 #define WLFC_DBGMESG(x) printf x 351 /* wlfc-breadcrumb */ 352 #define WLFC_BREADCRUMB(x) \ 353 do { \ 354 if ((x) == NULL) { \ 355 printf("WLFC: %s():%d:caller:%p\n", __FUNCTION__, __LINE__, \ 356 CALL_SITE); \ 357 } \ 358 } while (0) 359 #define WLFC_WHEREIS(s) \ 360 printf("WLFC: at %s():%d, %s\n", __FUNCTION__, __LINE__, (s)) 361 #else 362 #define WLFC_DBGMESG(x) 363 #define WLFC_BREADCRUMB(x) 364 #define WLFC_WHEREIS(s) 365 #endif /* PROP_TXSTATUS_DEBUG */ 366 367 /* AMPDU host reorder packet flags */ 368 #define WLHOST_REORDERDATA_MAXFLOWS 256 369 #define WLHOST_REORDERDATA_LEN 10 370 #define WLHOST_REORDERDATA_TOTLEN \ 371 (WLHOST_REORDERDATA_LEN + 1 + 1) /* +tag +len */ 372 373 #define WLHOST_REORDERDATA_FLOWID_OFFSET 0 374 #define WLHOST_REORDERDATA_MAXIDX_OFFSET 2 375 #define WLHOST_REORDERDATA_FLAGS_OFFSET 4 376 #define WLHOST_REORDERDATA_CURIDX_OFFSET 6 377 #define WLHOST_REORDERDATA_EXPIDX_OFFSET 8 378 379 #define WLHOST_REORDERDATA_DEL_FLOW 0x01 380 #define WLHOST_REORDERDATA_FLUSH_ALL 0x02 381 #define WLHOST_REORDERDATA_CURIDX_VALID 0x04 382 #define WLHOST_REORDERDATA_EXPIDX_VALID 0x08 383 #define WLHOST_REORDERDATA_NEW_HOLE 0x10 384 385 /* transaction id data len byte 0: rsvd, byte 1: seqnumber, byte 2-5 will be 386 * used for timestampe */ 387 #define WLFC_CTL_TRANS_ID_LEN 6 388 #define WLFC_TYPE_TRANS_ID_LEN 6 389 390 #define WLFC_MODE_HANGER 1 /* use hanger */ 391 #define WLFC_MODE_AFQ 2 /* use afq (At Firmware Queue) */ 392 #define WLFC_IS_OLD_DEF(x) ((x & 1) || (x & 2)) 393 394 #define WLFC_MODE_AFQ_SHIFT 2 /* afq bit */ 395 #define WLFC_SET_AFQ(x, val) \ 396 ((x) = ((x) & ~(1 << WLFC_MODE_AFQ_SHIFT)) | \ 397 (((val)&1) << WLFC_MODE_AFQ_SHIFT)) 398 /** returns TRUE if firmware supports 'at firmware queue' feature */ 399 #define WLFC_GET_AFQ(x) (((x) >> WLFC_MODE_AFQ_SHIFT) & 1) 400 401 #define WLFC_MODE_REUSESEQ_SHIFT 3 /* seq reuse bit */ 402 #define WLFC_SET_REUSESEQ(x, val) \ 403 ((x) = ((x) & ~(1 << WLFC_MODE_REUSESEQ_SHIFT)) | \ 404 (((val)&1) << WLFC_MODE_REUSESEQ_SHIFT)) 405 406 /** returns TRUE if 'd11 sequence reuse' has been agreed upon between host and 407 * dongle */ 408 #if defined(BCMPCIEDEV_ENABLED) && !defined(ROM_ENAB_RUNTIME_CHECK) 409 /* GET_REUSESEQ is always TRUE in pciedev */ 410 #define WLFC_GET_REUSESEQ(x) (TRUE) 411 #else 412 #define WLFC_GET_REUSESEQ(x) (((x) >> WLFC_MODE_REUSESEQ_SHIFT) & 1) 413 #endif /* defined(BCMPCIEDEV_ENABLED) && !defined(ROM_ENAB_RUNTIME_CHECK) */ 414 415 #define WLFC_MODE_REORDERSUPP_SHIFT 4 /* host reorder suppress pkt bit */ 416 #define WLFC_SET_REORDERSUPP(x, val) \ 417 ((x) = ((x) & ~(1 << WLFC_MODE_REORDERSUPP_SHIFT)) | \ 418 (((val)&1) << WLFC_MODE_REORDERSUPP_SHIFT)) 419 /** returns TRUE if 'reorder suppress' has been agreed upon between host and 420 * dongle */ 421 #define WLFC_GET_REORDERSUPP(x) (((x) >> WLFC_MODE_REORDERSUPP_SHIFT) & 1) 422 423 #define FLOW_RING_CREATE 1 424 #define FLOW_RING_DELETE 2 425 #define FLOW_RING_FLUSH 3 426 #define FLOW_RING_OPEN 4 427 #define FLOW_RING_CLOSED 5 428 #define FLOW_RING_FLUSHED 6 429 #define FLOW_RING_TIM_SET 7 430 #define FLOW_RING_TIM_RESET 8 431 #define FLOW_RING_FLUSH_TXFIFO 9 432 #define FLOW_RING_GET_PKT_MAX 10 433 #define FLOW_RING_RESET_WEIGHT 11 434 #define FLOW_RING_UPD_PRIOMAP 12 435 436 /* bit 7, indicating if is TID(1) or AC(0) mapped info in tid field) */ 437 #define PCIEDEV_IS_AC_TID_MAP_MASK 0x80 438 439 #endif /* __wlfc_proto_definitions_h__ */ 440