From: Kalle Valo <kvalo@codeaurora.org>
To: ath11k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 8/9] ath11k: use TCL_DATA_RING_0 for QCA6390
Date: Sun, 16 Aug 2020 08:31:30 +0300 [thread overview]
Message-ID: <1597555891-26112-9-git-send-email-kvalo@codeaurora.org> (raw)
In-Reply-To: <1597555891-26112-1-git-send-email-kvalo@codeaurora.org>
From: Carl Huang <cjhuang@codeaurora.org>
For QCA6390, wbm2sw1 is used for other purpose rather than
tx completion ring. So use TCL_DATA_RING 0 only for QCA6390.
Add MISC_CAPS_TCL_0_ONLY to control it.
Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01238-QCAHKSWPL_SILICONZ-2
Signed-off-by: Carl Huang <cjhuang@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/core.c | 2 ++
drivers/net/wireless/ath/ath11k/dp_tx.c | 10 ++++++++--
drivers/net/wireless/ath/ath11k/hw.h | 1 +
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
index a279450438bb..4e397664d1b9 100644
--- a/drivers/net/wireless/ath/ath11k/core.c
+++ b/drivers/net/wireless/ath/ath11k/core.c
@@ -42,6 +42,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.rx_mac_buf_ring = false,
.vdev_start_delay = false,
.htt_peer_map_v2 = true,
+ .tcl_0_only = false,
},
{
.name = "qca6390 hw2.0",
@@ -66,6 +67,7 @@ static const struct ath11k_hw_params ath11k_hw_params[] = {
.rx_mac_buf_ring = true,
.vdev_start_delay = true,
.htt_peer_map_v2 = false,
+ .tcl_0_only = true,
},
};
diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c
index 953c435ef3b3..a9632b774304 100644
--- a/drivers/net/wireless/ath/ath11k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_tx.c
@@ -110,7 +110,12 @@ int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
tcl_ring_sel:
tcl_ring_retry = false;
- ti.ring_id = ring_selector % DP_TCL_NUM_RING_MAX;
+ /* For some chip, it can only use tcl0 to tx */
+ if (ar->ab->hw_params.tcl_0_only)
+ ti.ring_id = 0;
+ else
+ ti.ring_id = ring_selector % DP_TCL_NUM_RING_MAX;
+
ring_map |= BIT(ti.ring_id);
tx_ring = &dp->tx_ring[ti.ring_id];
@@ -221,7 +226,8 @@ int ath11k_dp_tx(struct ath11k *ar, struct ath11k_vif *arvif,
* checking this ring earlier for each pkt tx.
* Restart ring selection if some rings are not checked yet.
*/
- if (ring_map != (BIT(DP_TCL_NUM_RING_MAX) - 1)) {
+ if (ring_map != (BIT(DP_TCL_NUM_RING_MAX) - 1) &&
+ !ar->ab->hw_params.tcl_0_only) {
tcl_ring_retry = true;
ring_selector++;
}
diff --git a/drivers/net/wireless/ath/ath11k/hw.h b/drivers/net/wireless/ath/ath11k/hw.h
index 500060b36fb4..d15fa7fd6d5d 100644
--- a/drivers/net/wireless/ath/ath11k/hw.h
+++ b/drivers/net/wireless/ath/ath11k/hw.h
@@ -151,6 +151,7 @@ struct ath11k_hw_params {
bool rx_mac_buf_ring;
bool vdev_start_delay;
bool htt_peer_map_v2;
+ bool tcl_0_only;
};
struct ath11k_hw_ops {
--
2.7.4
next prev parent reply other threads:[~2020-08-16 5:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-16 5:31 [PATCH 0/9] ath11k: last patches for QCA6390 support Kalle Valo
2020-08-16 5:31 ` [PATCH 1/9] ath11k: enable DP interrupt setup for QCA6390 Kalle Valo
2020-08-18 9:47 ` Kalle Valo
2020-08-16 5:31 ` [PATCH 2/9] ath11k: don't initialize rxdma1 related ring Kalle Valo
2020-08-16 5:31 ` [PATCH 3/9] ath11k: setup QCA6390 rings for both rxdmas Kalle Valo
2020-08-16 5:31 ` [PATCH 4/9] ath11k: refine the phy_id check in ath11k_reg_chan_list_event Kalle Valo
2020-08-16 5:31 ` [PATCH 5/9] ath11k: delay vdev_start for QCA6390 Kalle Valo
2020-08-16 5:31 ` [PATCH 6/9] ath11k: assign correct search flag and type " Kalle Valo
2020-08-16 5:31 ` [PATCH 7/9] ath11k: process both lmac rings " Kalle Valo
2020-08-16 5:31 ` Kalle Valo [this message]
2020-08-16 5:31 ` [PATCH 9/9] ath11k: reset MHI during power down and power up Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1597555891-26112-9-git-send-email-kvalo@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=ath11k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).