qcacmn: Modify refill buff pool enqueue to use max_bufq_len

Currently Refill buffer pool enqueue is using POOL_SIZE
macro, but there is possibility of dynamically configuring
max pool size less than that. So use max_bufq_len which will
be configured dynamically during refill pool init instead of
POOL_SIZE macro.

Change-Id: I610b5dff71861254aa8b6d30e2c562bd7316e120
CRs-Fixed: 3575599
This commit is contained in:
Karthik Kantamneni
2023-07-28 00:48:51 +05:30
committed by Rahul Choudhary
parent adb0ec3b16
commit a671ff2ee1
2 changed files with 5 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2020-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for
* any purpose with or without fee is hereby granted, provided that the
@@ -116,7 +116,7 @@ static inline void dp_rx_schedule_refill_thread(struct dp_soc *soc)
if (tail > head)
num_refill = (tail - head - 1);
else
num_refill = (DP_RX_REFILL_BUFF_POOL_SIZE - head + tail - 1);
num_refill = (buff_pool->max_bufq_len - head + tail - 1);
if (soc->cdp_soc.ol_ops->dp_rx_sched_refill_thread &&
num_refill >= DP_RX_REFILL_THRD_THRESHOLD)