diff options
| -rw-r--r-- | core/dp/htt/htt.c | 8 | ||||
| -rw-r--r-- | core/dp/htt/htt_types.h | 6 |
2 files changed, 12 insertions, 2 deletions
diff --git a/core/dp/htt/htt.c b/core/dp/htt/htt.c index 45151cab134a..fefcc9f5eb12 100644 --- a/core/dp/htt/htt.c +++ b/core/dp/htt/htt.c @@ -148,6 +148,9 @@ htt_htc_misc_pkt_list_trim(struct htt_pdev_t *pdev, int level) void htt_htc_misc_pkt_list_add(struct htt_pdev_t *pdev, struct htt_htc_pkt *pkt) { struct htt_htc_pkt_union *u_pkt = (struct htt_htc_pkt_union *)pkt; + int misclist_trim_level = htc_get_tx_queue_depth(pdev->htc_pdev, + pkt->htc_pkt.Endpoint) + + HTT_HTC_PKT_MISCLIST_SIZE; HTT_TX_MUTEX_ACQUIRE(&pdev->htt_tx_mutex); if (pdev->htt_htc_pkt_misclist) { @@ -158,7 +161,10 @@ void htt_htc_misc_pkt_list_add(struct htt_pdev_t *pdev, struct htt_htc_pkt *pkt) } HTT_TX_MUTEX_RELEASE(&pdev->htt_tx_mutex); - htt_htc_misc_pkt_list_trim(pdev, HTT_HTC_PKT_MISCLIST_SIZE); + /* only ce pipe size + tx_queue_depth could possibly be in use + * free older packets in the msiclist + */ + htt_htc_misc_pkt_list_trim(pdev, misclist_trim_level); } void htt_htc_misc_pkt_pool_free(struct htt_pdev_t *pdev) diff --git a/core/dp/htt/htt_types.h b/core/dp/htt/htt_types.h index e60e07de543d..251be6c1fe0b 100644 --- a/core/dp/htt/htt_types.h +++ b/core/dp/htt/htt_types.h @@ -48,7 +48,11 @@ #endif #endif /* QCA_TX_HTT2_SUPPORT */ -#define HTT_HTC_PKT_MISCLIST_SIZE 32 +/* Set the base misclist size to the size of the htt tx copy engine + * to guarantee that a packet on the misclist wont be freed while it + * is sitting in the copy engine. + */ +#define HTT_HTC_PKT_MISCLIST_SIZE 2048 struct htt_htc_pkt { void *pdev_ctxt; |
