Skip to content

Commit d457f9f

Browse files
Karthikeyan Periyasamykvalo
authored andcommitted
wifi: ath12k: avoid explicit RBM id argument in Rxdma replenish
Currently all Rxdma replenish callers pass the same return buffer manager id argument, so make it implicitly. To optimize the rx data path per packet, avoid the explicit unnecessary argument in Rxdma replenish function. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00125-QCAHKSWPL_SILICONZ-1 Signed-off-by: Karthikeyan Periyasamy <[email protected]> Acked-by: Jeff Johnson <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent d281a57 commit d457f9f

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

drivers/net/wireless/ath/ath12k/dp.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,6 @@ int ath12k_dp_service_srng(struct ath12k_base *ab,
962962
struct dp_rxdma_ring *rx_ring = &dp->rx_refill_buf_ring;
963963

964964
ath12k_dp_rx_bufs_replenish(ab, rx_ring, 0,
965-
ab->hw_params->hal_params->rx_buf_rbm,
966965
true);
967966
}
968967

drivers/net/wireless/ath/ath12k/dp_rx.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ static int ath12k_dp_purge_mon_ring(struct ath12k_base *ab)
259259
int ath12k_dp_rx_bufs_replenish(struct ath12k_base *ab,
260260
struct dp_rxdma_ring *rx_ring,
261261
int req_entries,
262-
enum hal_rx_buf_return_buf_manager mgr,
263262
bool hw_cc)
264263
{
265264
struct ath12k_buffer_addr *desc;
@@ -272,6 +271,7 @@ int ath12k_dp_rx_bufs_replenish(struct ath12k_base *ab,
272271
dma_addr_t paddr;
273272
struct ath12k_dp *dp = &ab->dp;
274273
struct ath12k_rx_desc_info *rx_desc;
274+
enum hal_rx_buf_return_buf_manager mgr = ab->hw_params->hal_params->rx_buf_rbm;
275275

276276
req_entries = min(req_entries, rx_ring->bufs_max);
277277

@@ -436,7 +436,6 @@ static int ath12k_dp_rxdma_ring_buf_setup(struct ath12k_base *ab,
436436
ath12k_dp_mon_buf_replenish(ab, rx_ring, num_entries);
437437
else
438438
ath12k_dp_rx_bufs_replenish(ab, rx_ring, num_entries,
439-
ab->hw_params->hal_params->rx_buf_rbm,
440439
ringtype == HAL_RXDMA_BUF);
441440
return 0;
442441
}
@@ -2709,9 +2708,7 @@ int ath12k_dp_rx_process(struct ath12k_base *ab, int ring_id,
27092708
if (!total_msdu_reaped)
27102709
goto exit;
27112710

2712-
/* TODO: Move to implicit BM? */
2713-
ath12k_dp_rx_bufs_replenish(ab, rx_ring, num_buffs_reaped,
2714-
ab->hw_params->hal_params->rx_buf_rbm, true);
2711+
ath12k_dp_rx_bufs_replenish(ab, rx_ring, num_buffs_reaped, true);
27152712

27162713
ath12k_dp_rx_process_received_packets(ab, napi, &msdu_list,
27172714
ring_id);
@@ -3489,8 +3486,7 @@ int ath12k_dp_rx_process_err(struct ath12k_base *ab, struct napi_struct *napi,
34893486

34903487
rx_ring = &dp->rx_refill_buf_ring;
34913488

3492-
ath12k_dp_rx_bufs_replenish(ab, rx_ring, tot_n_bufs_reaped,
3493-
ab->hw_params->hal_params->rx_buf_rbm, true);
3489+
ath12k_dp_rx_bufs_replenish(ab, rx_ring, tot_n_bufs_reaped, true);
34943490

34953491
return tot_n_bufs_reaped;
34963492
}
@@ -3803,8 +3799,7 @@ int ath12k_dp_rx_process_wbm_err(struct ath12k_base *ab,
38033799
if (!num_buffs_reaped)
38043800
goto done;
38053801

3806-
ath12k_dp_rx_bufs_replenish(ab, rx_ring, num_buffs_reaped,
3807-
ab->hw_params->hal_params->rx_buf_rbm, true);
3802+
ath12k_dp_rx_bufs_replenish(ab, rx_ring, num_buffs_reaped, true);
38083803

38093804
rcu_read_lock();
38103805
for (i = 0; i < ab->num_radios; i++) {

drivers/net/wireless/ath/ath12k/dp_rx.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ int ath12k_dp_rx_process(struct ath12k_base *ab, int mac_id,
119119
int ath12k_dp_rx_bufs_replenish(struct ath12k_base *ab,
120120
struct dp_rxdma_ring *rx_ring,
121121
int req_entries,
122-
enum hal_rx_buf_return_buf_manager mgr,
123122
bool hw_cc);
124123
int ath12k_dp_rx_pdev_mon_attach(struct ath12k *ar);
125124
int ath12k_dp_rx_peer_frag_setup(struct ath12k *ar, const u8 *peer_mac, int vdev_id);

0 commit comments

Comments
 (0)