Skip to content

Commit d281a57

Browse files
Karthikeyan Periyasamykvalo
authored andcommitted
wifi: ath12k: avoid explicit mac id argument in Rxdma replenish
Currently all Rxdma replenish callers pass zero for the mac id argument, so make it as zero 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 898d8b3 commit d281a57

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: BSD-3-Clause-Clear
22
/*
33
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
4-
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
4+
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
55
*/
66

77
#include <crypto/hash.h>
@@ -961,7 +961,7 @@ int ath12k_dp_service_srng(struct ath12k_base *ab,
961961
struct ath12k_dp *dp = &ab->dp;
962962
struct dp_rxdma_ring *rx_ring = &dp->rx_refill_buf_ring;
963963

964-
ath12k_dp_rx_bufs_replenish(ab, 0, rx_ring, 0,
964+
ath12k_dp_rx_bufs_replenish(ab, rx_ring, 0,
965965
ab->hw_params->hal_params->rx_buf_rbm,
966966
true);
967967
}

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: BSD-3-Clause-Clear
22
/*
33
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
4-
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
4+
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
55
*/
66

77
#include <linux/ieee80211.h>
@@ -256,7 +256,7 @@ static int ath12k_dp_purge_mon_ring(struct ath12k_base *ab)
256256
}
257257

258258
/* Returns number of Rx buffers replenished */
259-
int ath12k_dp_rx_bufs_replenish(struct ath12k_base *ab, int mac_id,
259+
int ath12k_dp_rx_bufs_replenish(struct ath12k_base *ab,
260260
struct dp_rxdma_ring *rx_ring,
261261
int req_entries,
262262
enum hal_rx_buf_return_buf_manager mgr,
@@ -337,9 +337,7 @@ int ath12k_dp_rx_bufs_replenish(struct ath12k_base *ab, int mac_id,
337337
spin_unlock_bh(&rx_ring->idr_lock);
338338
if (buf_id < 0)
339339
goto fail_dma_unmap;
340-
cookie = u32_encode_bits(mac_id,
341-
DP_RXDMA_BUF_COOKIE_PDEV_ID) |
342-
u32_encode_bits(buf_id,
340+
cookie = u32_encode_bits(buf_id,
343341
DP_RXDMA_BUF_COOKIE_BUF_ID);
344342
}
345343

@@ -437,7 +435,7 @@ static int ath12k_dp_rxdma_ring_buf_setup(struct ath12k_base *ab,
437435
if ((ringtype == HAL_RXDMA_MONITOR_BUF) || (ringtype == HAL_TX_MONITOR_BUF))
438436
ath12k_dp_mon_buf_replenish(ab, rx_ring, num_entries);
439437
else
440-
ath12k_dp_rx_bufs_replenish(ab, 0, rx_ring, num_entries,
438+
ath12k_dp_rx_bufs_replenish(ab, rx_ring, num_entries,
441439
ab->hw_params->hal_params->rx_buf_rbm,
442440
ringtype == HAL_RXDMA_BUF);
443441
return 0;
@@ -2712,7 +2710,7 @@ int ath12k_dp_rx_process(struct ath12k_base *ab, int ring_id,
27122710
goto exit;
27132711

27142712
/* TODO: Move to implicit BM? */
2715-
ath12k_dp_rx_bufs_replenish(ab, 0, rx_ring, num_buffs_reaped,
2713+
ath12k_dp_rx_bufs_replenish(ab, rx_ring, num_buffs_reaped,
27162714
ab->hw_params->hal_params->rx_buf_rbm, true);
27172715

27182716
ath12k_dp_rx_process_received_packets(ab, napi, &msdu_list,
@@ -3491,7 +3489,7 @@ int ath12k_dp_rx_process_err(struct ath12k_base *ab, struct napi_struct *napi,
34913489

34923490
rx_ring = &dp->rx_refill_buf_ring;
34933491

3494-
ath12k_dp_rx_bufs_replenish(ab, 0, rx_ring, tot_n_bufs_reaped,
3492+
ath12k_dp_rx_bufs_replenish(ab, rx_ring, tot_n_bufs_reaped,
34953493
ab->hw_params->hal_params->rx_buf_rbm, true);
34963494

34973495
return tot_n_bufs_reaped;
@@ -3805,7 +3803,7 @@ int ath12k_dp_rx_process_wbm_err(struct ath12k_base *ab,
38053803
if (!num_buffs_reaped)
38063804
goto done;
38073805

3808-
ath12k_dp_rx_bufs_replenish(ab, 0, rx_ring, num_buffs_reaped,
3806+
ath12k_dp_rx_bufs_replenish(ab, rx_ring, num_buffs_reaped,
38093807
ab->hw_params->hal_params->rx_buf_rbm, true);
38103808

38113809
rcu_read_lock();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
22
/*
33
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
4-
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
4+
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
55
*/
66
#ifndef ATH12K_DP_RX_H
77
#define ATH12K_DP_RX_H
@@ -116,7 +116,7 @@ int ath12k_dp_rx_process_err(struct ath12k_base *ab, struct napi_struct *napi,
116116
int ath12k_dp_rx_process(struct ath12k_base *ab, int mac_id,
117117
struct napi_struct *napi,
118118
int budget);
119-
int ath12k_dp_rx_bufs_replenish(struct ath12k_base *ab, int mac_id,
119+
int ath12k_dp_rx_bufs_replenish(struct ath12k_base *ab,
120120
struct dp_rxdma_ring *rx_ring,
121121
int req_entries,
122122
enum hal_rx_buf_return_buf_manager mgr,

0 commit comments

Comments
 (0)