Skip to contentSkip to conversation

wifi: ath12k: Fix double budget decrement while reaping monitor ring

PATCH Applied P Praneesh 3 participants 3 messages Jun 3, 2025 – Jun 23, 2025 Qualcomm ATH12K wireless driver

lore
Share & tools
lore

P Praneesh

author
#0 lore raw

PATCH v3 1/1 wifi: ath12k: Fix double budget decrement while reaping monitor ring

Currently, the budget for monitor ring is reduced during each ring entry reaping and again when the end reason is HAL_MON_END_OF_PPDU, leading to inefficient budget use. The below mentioned commit intended to decrement the budget only for HAL_MON_END_OF_PPDU but did not remove the other decrement. Fix this by eliminating the budget decrement for each ring entry reaping, ensuring the driver always reaps one full PPDU worth of entries from the monitor destination ring.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Fixes 394a3fa7c538 ("wifi: ath12k: Optimize NAPI budget by adjusting PPDU processing")

---
v3:
- Subject updated to include 'ath-next' as the target branch.
v2:
- Corrected version log.

---
 drivers/net/wireless/ath/ath12k/dp_mon.c | 1 -
 1 file changed, 1 deletion(-)
drivers/net/wireless/ath/ath12k/dp_mon.c +0 -1
index 28cadc4167f7..91f4e3aff74c 100644
@@ -3761,7 +3761,6 @@ int ath12k_dp_mon_srng_process(struct ath12k *ar, int *budget,
 	ath12k_hal_srng_access_begin(ab, srng);
 
 	while (likely(*budget)) {
-		*budget -= 1;
 		mon_dst_desc = ath12k_hal_srng_dst_peek(ab, srng);
 		if (unlikely(!mon_dst_desc))
 			break;

base-commit: ea15e046263b19e91ffd827645ae5dfa44ebd044

Signature · 1 line
2.34.1
Reviewed-by on v3 1/1
#1 lore raw
Quoted 8 lines · P Praneesh

Currently, the budget for monitor ring is reduced during each ring entry reaping and again when the end reason is HAL_MON_END_OF_PPDU, leading to inefficient budget use. The below mentioned commit intended to decrement the budget only for HAL_MON_END_OF_PPDU but did not remove the other decrement. Fix this by eliminating the budget decrement for each ring entry reaping, ensuring the driver always reaps one full PPDU worth of entries from the monitor destination ring.

Quoted 5 lines

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.4.1-00199-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Fixes 394a3fa7c538 ("wifi: ath12k: Optimize NAPI budget by adjusting PPDU processing")
Applied
#2 lore raw
In reply to P Praneesh
Quoted 9 lines · P Praneesh

Currently, the budget for monitor ring is reduced during each ring entry reaping and again when the end reason is HAL_MON_END_OF_PPDU, leading to inefficient budget use. The below mentioned commit intended to decrement the budget only for HAL_MON_END_OF_PPDU but did not remove the other decrement. Fix this by eliminating the budget decrement for each ring entry reaping, ensuring the driver always reaps one full PPDU worth of entries from the monitor destination ring.

[...]

Applied, thanks!

[1/1] wifi: ath12k: Fix double budget decrement while reaping monitor ring

      commit: 54c350055b1da2767f18a49c11e4fcc42cf33ff8

Best regards,

Signature · 1 line
Jeff Johnson <[email protected]>