| .. | .. |
|---|
| 1 | | -/* SPDX-License-Identifier: GPL-2.0 */ |
|---|
| 2 | 1 | /* |
|---|
| 3 | | - * Copyright (C) 1999-2019, Broadcom Corporation |
|---|
| 4 | | - * |
|---|
| 2 | + * Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation |
|---|
| 3 | + * |
|---|
| 4 | + * Copyright (C) 1999-2017, Broadcom Corporation |
|---|
| 5 | + * |
|---|
| 5 | 6 | * Unless you and Broadcom execute a separate written software license |
|---|
| 6 | 7 | * agreement governing use of this software, this software is licensed to you |
|---|
| 7 | 8 | * under the terms of the GNU General Public License version 2 (the "GPL"), |
|---|
| 8 | 9 | * available at http://www.broadcom.com/licenses/GPLv2.php, with the |
|---|
| 9 | 10 | * following added to such license: |
|---|
| 10 | | - * |
|---|
| 11 | + * |
|---|
| 11 | 12 | * As a special exception, the copyright holders of this software give you |
|---|
| 12 | 13 | * permission to link this software with independent modules, and to copy and |
|---|
| 13 | 14 | * distribute the resulting executable under terms of your choice, provided that |
|---|
| .. | .. |
|---|
| 15 | 16 | * the license of that module. An independent module is a module which is not |
|---|
| 16 | 17 | * derived from this software. The special exception does not apply to any |
|---|
| 17 | 18 | * modifications of the software. |
|---|
| 18 | | - * |
|---|
| 19 | + * |
|---|
| 19 | 20 | * Notwithstanding the above, under no circumstances may you combine this |
|---|
| 20 | 21 | * software in any way with any other Broadcom software provided under a license |
|---|
| 21 | 22 | * other than the GPL, without Broadcom's express prior written consent. |
|---|
| .. | .. |
|---|
| 23 | 24 | * |
|---|
| 24 | 25 | * <<Broadcom-WL-IPTag/Open:>> |
|---|
| 25 | 26 | * |
|---|
| 26 | | - * $Id: dhd_wlfc.h 606400 2015-12-15 09:59:42Z $ |
|---|
| 27 | + * $Id: dhd_wlfc.h 690477 2017-03-16 10:17:17Z $ |
|---|
| 27 | 28 | * |
|---|
| 28 | 29 | */ |
|---|
| 29 | 30 | #ifndef __wlfc_host_driver_definitions_h__ |
|---|
| 30 | 31 | #define __wlfc_host_driver_definitions_h__ |
|---|
| 31 | | - |
|---|
| 32 | 32 | |
|---|
| 33 | 33 | /* #define OOO_DEBUG */ |
|---|
| 34 | 34 | |
|---|
| .. | .. |
|---|
| 85 | 85 | void* pkt; |
|---|
| 86 | 86 | #ifdef PROP_TXSTATUS_DEBUG |
|---|
| 87 | 87 | uint32 push_time; |
|---|
| 88 | | -#endif |
|---|
| 88 | +#endif // endif |
|---|
| 89 | 89 | struct wlfc_hanger_item *next; |
|---|
| 90 | 90 | } wlfc_hanger_item_t; |
|---|
| 91 | 91 | |
|---|
| .. | .. |
|---|
| 110 | 110 | #define WLFC_PSQ_PREC_COUNT ((AC_COUNT + 1) * 2) /**< 2 for each AC traffic and bc/mc */ |
|---|
| 111 | 111 | #define WLFC_AFQ_PREC_COUNT (AC_COUNT + 1) |
|---|
| 112 | 112 | |
|---|
| 113 | | -#define WLFC_PSQ_LEN 2048 |
|---|
| 113 | +#define WLFC_PSQ_LEN (4096 * 8) |
|---|
| 114 | 114 | |
|---|
| 115 | | -#ifdef BCMDBUS |
|---|
| 116 | | -#define WLFC_FLOWCONTROL_HIWATER 512 |
|---|
| 117 | | -#define WLFC_FLOWCONTROL_LOWATER (WLFC_FLOWCONTROL_HIWATER / 4) |
|---|
| 118 | | -#else |
|---|
| 119 | | -#define WLFC_FLOWCONTROL_HIWATER (2048 - 256) |
|---|
| 115 | +#define WLFC_FLOWCONTROL_HIWATER ((4096 * 8) - 256) |
|---|
| 120 | 116 | #define WLFC_FLOWCONTROL_LOWATER 256 |
|---|
| 121 | | -#endif |
|---|
| 122 | 117 | |
|---|
| 123 | 118 | #if (WLFC_FLOWCONTROL_HIWATER >= (WLFC_PSQ_LEN - 256)) |
|---|
| 124 | 119 | #undef WLFC_FLOWCONTROL_HIWATER |
|---|
| 125 | 120 | #define WLFC_FLOWCONTROL_HIWATER (WLFC_PSQ_LEN - 256) |
|---|
| 126 | 121 | #undef WLFC_FLOWCONTROL_LOWATER |
|---|
| 127 | 122 | #define WLFC_FLOWCONTROL_LOWATER (WLFC_FLOWCONTROL_HIWATER / 4) |
|---|
| 128 | | -#endif |
|---|
| 123 | +#endif // endif |
|---|
| 129 | 124 | |
|---|
| 130 | 125 | #define WLFC_LOG_BUF_SIZE (1024*1024) |
|---|
| 131 | 126 | |
|---|
| .. | .. |
|---|
| 162 | 157 | /** flag. TRUE when remote MAC is in suppressed state */ |
|---|
| 163 | 158 | uint8 suppressed; |
|---|
| 164 | 159 | |
|---|
| 165 | | - |
|---|
| 166 | 160 | #ifdef PROP_TXSTATUS_DEBUG |
|---|
| 167 | 161 | uint32 dstncredit_sent_packets; |
|---|
| 168 | 162 | uint32 dstncredit_acks; |
|---|
| 169 | 163 | uint32 opened_ct; |
|---|
| 170 | 164 | uint32 closed_ct; |
|---|
| 171 | | -#endif |
|---|
| 165 | +#endif // endif |
|---|
| 172 | 166 | struct wlfc_mac_descriptor* prev; |
|---|
| 173 | 167 | struct wlfc_mac_descriptor* next; |
|---|
| 174 | 168 | } wlfc_mac_descriptor_t; |
|---|
| .. | .. |
|---|
| 207 | 201 | uint32 d11_suppress; |
|---|
| 208 | 202 | uint32 wl_suppress; |
|---|
| 209 | 203 | uint32 bad_suppress; |
|---|
| 204 | + uint32 pkt_dropped; |
|---|
| 205 | + uint32 pkt_exptime; |
|---|
| 210 | 206 | uint32 pkt_freed; |
|---|
| 211 | 207 | uint32 pkt_free_err; |
|---|
| 212 | 208 | uint32 psq_wlsup_retx; |
|---|
| .. | .. |
|---|
| 235 | 231 | uint32 dropped_qfull[6]; |
|---|
| 236 | 232 | uint32 signal_only_pkts_sent; |
|---|
| 237 | 233 | uint32 signal_only_pkts_freed; |
|---|
| 238 | | -#endif |
|---|
| 234 | +#endif // endif |
|---|
| 239 | 235 | uint32 cleanup_txq_cnt; |
|---|
| 240 | 236 | uint32 cleanup_psq_cnt; |
|---|
| 241 | 237 | uint32 cleanup_fw_cnt; |
|---|
| .. | .. |
|---|
| 252 | 248 | #define WLFC_HOST_FIFO_CREDIT_INC_SENTCTRS(ctx, ac) do {} while (0) |
|---|
| 253 | 249 | #define WLFC_HOST_FIFO_CREDIT_INC_BACKCTRS(ctx, ac) do {} while (0) |
|---|
| 254 | 250 | #define WLFC_HOST_FIFO_DROPPEDCTR_INC(ctx, ac) do {} while (0) |
|---|
| 255 | | -#endif |
|---|
| 256 | | - |
|---|
| 251 | +#endif // endif |
|---|
| 252 | +#define WLFC_PACKET_BOUND 10 |
|---|
| 257 | 253 | #define WLFC_FCMODE_NONE 0 |
|---|
| 258 | 254 | #define WLFC_FCMODE_IMPLIED_CREDIT 1 |
|---|
| 259 | 255 | #define WLFC_FCMODE_EXPLICIT_CREDIT 2 |
|---|
| .. | .. |
|---|
| 379 | 375 | /** This 32-bit goes from host to device for every packet. */ |
|---|
| 380 | 376 | uint32 htod_tag; |
|---|
| 381 | 377 | |
|---|
| 382 | | - /** This 16-bit is original seq number for every suppress packet. */ |
|---|
| 378 | + /** This 16-bit is original d11seq number for every suppressed packet. */ |
|---|
| 383 | 379 | uint16 htod_seq; |
|---|
| 384 | 380 | |
|---|
| 385 | 381 | /** This address is mac entry for every packet. */ |
|---|
| .. | .. |
|---|
| 510 | 506 | #else |
|---|
| 511 | 507 | #define DHD_WLFC_CTRINC_MAC_CLOSE(entry) do {} while (0) |
|---|
| 512 | 508 | #define DHD_WLFC_CTRINC_MAC_OPEN(entry) do {} while (0) |
|---|
| 513 | | -#endif |
|---|
| 509 | +#endif // endif |
|---|
| 514 | 510 | |
|---|
| 515 | 511 | #ifdef BCM_OBJECT_TRACE |
|---|
| 516 | 512 | #define DHD_PKTTAG_SET_SN(tag, val) ((dhd_pkttag_t*)(tag))->sn = (val) |
|---|