From: Kalle Valo <kvalo@kernel.org>
To: ath12k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 09/11] wifi: ath12k: update ath12k_mac_op_conf_tx() for MLO
Date: Tue, 15 Oct 2024 20:14:14 +0300 [thread overview]
Message-ID: <20241015171416.518022-10-kvalo@kernel.org> (raw)
In-Reply-To: <20241015171416.518022-1-kvalo@kernel.org>
From: Sriram R <quic_srirrama@quicinc.com>
Refactor ath12k_mac_op_conf_tx() to apply and cache the TX parameters based on
the link id provided by mac80211.
While at it, the link id argument of ath12k_mac_conf_tx() is not used so remove
it.
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.0.1-00029-QCAHKSWPL_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Co-developed-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Signed-off-by: Rameshkumar Sundaram <quic_ramess@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 7185cffe7dd4..8771d9738ffb 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -5127,8 +5127,7 @@ static int ath12k_conf_tx_uapsd(struct ath12k_link_vif *arvif,
return ret;
}
-static int ath12k_mac_conf_tx(struct ath12k_link_vif *arvif,
- unsigned int link_id, u16 ac,
+static int ath12k_mac_conf_tx(struct ath12k_link_vif *arvif, u16 ac,
const struct ieee80211_tx_queue_params *params)
{
struct wmi_wmm_params_arg *p = NULL;
@@ -5188,16 +5187,16 @@ static int ath12k_mac_op_conf_tx(struct ieee80211_hw *hw,
struct ath12k_vif *ahvif = ath12k_vif_to_ahvif(vif);
struct ath12k_link_vif *arvif;
struct ath12k_vif_cache *cache;
- struct ath12k *ar;
int ret;
lockdep_assert_wiphy(hw->wiphy);
- arvif = &ahvif->deflink;
- ar = ath12k_get_ar_by_vif(hw, vif);
- if (!ar) {
- /* cache the info and apply after vdev is created */
- cache = ath12k_ahvif_get_link_cache(ahvif, ATH12K_DEFAULT_LINK_ID);
+ if (link_id >= IEEE80211_MLD_MAX_NUM_LINKS)
+ return -EINVAL;
+
+ arvif = wiphy_dereference(hw->wiphy, ahvif->link[link_id]);
+ if (!arvif || !arvif->is_created) {
+ cache = ath12k_ahvif_get_link_cache(ahvif, link_id);
if (!cache)
return -ENOSPC;
@@ -5208,7 +5207,7 @@ static int ath12k_mac_op_conf_tx(struct ieee80211_hw *hw,
return 0;
}
- ret = ath12k_mac_conf_tx(arvif, link_id, ac, params);
+ ret = ath12k_mac_conf_tx(arvif, ac, params);
return ret;
}
@@ -6962,7 +6961,7 @@ static void ath12k_mac_vif_cache_flush(struct ath12k *ar, struct ath12k_link_vif
return;
if (cache->tx_conf.changed) {
- ret = ath12k_mac_conf_tx(arvif, 0, cache->tx_conf.ac,
+ ret = ath12k_mac_conf_tx(arvif, cache->tx_conf.ac,
&cache->tx_conf.tx_queue_params);
if (ret)
ath12k_warn(ab,
--
2.39.5
next prev parent reply other threads:[~2024-10-15 17:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 17:14 [PATCH 00/11] wifi: ath12k: MLO support part 1 Kalle Valo
2024-10-15 17:14 ` [PATCH 01/11] wifi: ath12k: prepare vif data structure for MLO handling Kalle Valo
2024-10-15 17:14 ` [PATCH 02/11] wifi: ath12k: pass ath12k_link_vif instead of vif/ahvif Kalle Valo
2024-10-15 17:14 ` [PATCH 03/11] wifi: ath12k: prepare sta data structure for MLO handling Kalle Valo
2024-10-15 17:14 ` [PATCH 04/11] wifi: ath12k: prepare vif config caching for MLO Kalle Valo
2024-10-15 17:14 ` [PATCH 05/11] wifi: ath12k: modify ath12k_mac_vif_chan() " Kalle Valo
2024-10-15 17:14 ` [PATCH 06/11] wifi: ath12k: modify ath12k_get_arvif_iter() " Kalle Valo
2024-10-15 17:14 ` [PATCH 07/11] wifi: ath12k: modify ath12k_mac_op_bss_info_changed() " Kalle Valo
2024-10-15 17:14 ` [PATCH 08/11] wifi: ath12k: modify ath12k_mac_op_set_key() " Kalle Valo
2024-10-15 17:14 ` Kalle Valo [this message]
2024-10-15 17:14 ` [PATCH 10/11] wifi: ath12k: update ath12k_mac_op_update_vif_offload() " Kalle Valo
2024-10-15 17:14 ` [PATCH 11/11] wifi: ath12k: modify link arvif creation and removal " Kalle Valo
2024-10-16 15:39 ` [PATCH 00/11] wifi: ath12k: MLO support part 1 Jeff Johnson
2024-10-17 2:55 ` Kang Yang
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=20241015171416.518022-10-kvalo@kernel.org \
--to=kvalo@kernel.org \
--cc=ath12k@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