Commit db2ecf9f authored by P Praneesh's avatar P Praneesh Committed by Kalle Valo

ath11k: remove usage quota while processing rx packets

The usage of quota variable inside ath11k_dp_rx_process_received_packets()
is redundant. Since we would queue only max packets to the list before
calling this function so it would never exceed quota. Hence removing
usage of quota variable.

Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.4.0.1.r2-00012-QCAHKSWPL_SILICONZ-1
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01695-QCAHKSWPL_SILICONZ-1
Co-developed-by: default avatarSriram R <srirrama@codeaurora.org>
Signed-off-by: default avatarSriram R <srirrama@codeaurora.org>
Signed-off-by: default avatarJouni Malinen <jouni@codeaurora.org>
Signed-off-by: default avatarP Praneesh <ppranees@codeaurora.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1630560820-21905-7-git-send-email-ppranees@codeaurora.org
parent c4d12cb3
...@@ -2600,7 +2600,7 @@ static int ath11k_dp_rx_process_msdu(struct ath11k *ar, ...@@ -2600,7 +2600,7 @@ static int ath11k_dp_rx_process_msdu(struct ath11k *ar,
static void ath11k_dp_rx_process_received_packets(struct ath11k_base *ab, static void ath11k_dp_rx_process_received_packets(struct ath11k_base *ab,
struct napi_struct *napi, struct napi_struct *napi,
struct sk_buff_head *msdu_list, struct sk_buff_head *msdu_list,
int *quota, int mac_id) int mac_id)
{ {
struct sk_buff *msdu; struct sk_buff *msdu;
struct ath11k *ar; struct ath11k *ar;
...@@ -2635,7 +2635,6 @@ static void ath11k_dp_rx_process_received_packets(struct ath11k_base *ab, ...@@ -2635,7 +2635,6 @@ static void ath11k_dp_rx_process_received_packets(struct ath11k_base *ab,
} }
ath11k_dp_rx_deliver_msdu(ar, napi, msdu, &rx_status); ath11k_dp_rx_deliver_msdu(ar, napi, msdu, &rx_status);
(*quota)--;
} }
rcu_read_unlock(); rcu_read_unlock();
...@@ -2652,7 +2651,6 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id, ...@@ -2652,7 +2651,6 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id,
int total_msdu_reaped = 0; int total_msdu_reaped = 0;
struct hal_srng *srng; struct hal_srng *srng;
struct sk_buff *msdu; struct sk_buff *msdu;
int quota = budget;
bool done = false; bool done = false;
int buf_id, mac_id; int buf_id, mac_id;
struct ath11k *ar; struct ath11k *ar;
...@@ -2759,8 +2757,7 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id, ...@@ -2759,8 +2757,7 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id,
if (!num_buffs_reaped[i]) if (!num_buffs_reaped[i])
continue; continue;
ath11k_dp_rx_process_received_packets(ab, napi, &msdu_list[i], ath11k_dp_rx_process_received_packets(ab, napi, &msdu_list[i], i);
&quota, i);
ar = ab->pdevs[i].ar; ar = ab->pdevs[i].ar;
rx_ring = &ar->dp.rx_refill_buf_ring; rx_ring = &ar->dp.rx_refill_buf_ring;
...@@ -2769,7 +2766,7 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id, ...@@ -2769,7 +2766,7 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id,
ab->hw_params.hal_params->rx_buf_rbm); ab->hw_params.hal_params->rx_buf_rbm);
} }
exit: exit:
return budget - quota; return total_msdu_reaped;
} }
static void ath11k_dp_rx_update_peer_stats(struct ath11k_sta *arsta, static void ath11k_dp_rx_update_peer_stats(struct ath11k_sta *arsta,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment