* [PATCH 01/10] wifi: ath12k: Refactor mac callback of config
2024-01-03 6:37 [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions Karthikeyan Periyasamy
@ 2024-01-03 6:37 ` Karthikeyan Periyasamy
2024-01-03 17:19 ` Jeff Johnson
2024-01-16 12:22 ` Kalle Valo
2024-01-03 6:37 ` [PATCH 02/10] wifi: ath12k: Refactor mac callback of bss info changed Karthikeyan Periyasamy
` (9 subsequent siblings)
10 siblings, 2 replies; 24+ messages in thread
From: Karthikeyan Periyasamy @ 2024-01-03 6:37 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
To support single wiphy abstraction, introduce link/radio specific helper
function in the mac80211 callback config(). This way, the callback can be
extended to handle multiple link/radio in the future.
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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 88cec54c6c2e..7b02a107ab38 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <net/mac80211.h>
@@ -1083,9 +1083,9 @@ static int ath12k_mac_monitor_stop(struct ath12k *ar)
return ret;
}
-static int ath12k_mac_op_config(struct ieee80211_hw *hw, u32 changed)
+static int ath12k_mac_config(struct ath12k *ar, u32 changed)
{
- struct ath12k *ar = hw->priv;
+ struct ieee80211_hw *hw = ar->hw;
struct ieee80211_conf *conf = &hw->conf;
int ret = 0;
@@ -1122,6 +1122,19 @@ static int ath12k_mac_op_config(struct ieee80211_hw *hw, u32 changed)
return ret;
}
+static int ath12k_mac_op_config(struct ieee80211_hw *hw, u32 changed)
+{
+ struct ath12k *ar = hw->priv;
+ int ret;
+
+ ret = ath12k_mac_config(ar, changed);
+ if (ret)
+ ath12k_warn(ar->ab, "failed to update config pdev idx %d: %d\n",
+ ar->pdev_idx, ret);
+
+ return ret;
+}
+
static int ath12k_mac_setup_bcn_tmpl(struct ath12k_vif *arvif)
{
struct ath12k *ar = arvif->ar;
--
2.34.1
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 01/10] wifi: ath12k: Refactor mac callback of config
2024-01-03 6:37 ` [PATCH 01/10] wifi: ath12k: Refactor mac callback of config Karthikeyan Periyasamy
@ 2024-01-03 17:19 ` Jeff Johnson
2024-01-16 12:22 ` Kalle Valo
1 sibling, 0 replies; 24+ messages in thread
From: Jeff Johnson @ 2024-01-03 17:19 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless
On 1/2/2024 10:37 PM, Karthikeyan Periyasamy wrote:
> To support single wiphy abstraction, introduce link/radio specific helper
> function in the mac80211 callback config(). This way, the callback can be
> extended to handle multiple link/radio in the future.
>
> 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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 01/10] wifi: ath12k: Refactor mac callback of config
2024-01-03 6:37 ` [PATCH 01/10] wifi: ath12k: Refactor mac callback of config Karthikeyan Periyasamy
2024-01-03 17:19 ` Jeff Johnson
@ 2024-01-16 12:22 ` Kalle Valo
1 sibling, 0 replies; 24+ messages in thread
From: Kalle Valo @ 2024-01-16 12:22 UTC (permalink / raw)
To: Karthikeyan Periyasamy; +Cc: ath12k, linux-wireless, Karthikeyan Periyasamy
Karthikeyan Periyasamy <quic_periyasa@quicinc.com> wrote:
> To support single wiphy abstraction, introduce link/radio specific helper
> function in the mac80211 callback config(). This way, the callback can be
> extended to handle multiple link/radio in the future.
>
> 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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
> Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
> Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
10 patches applied to ath-next branch of ath.git, thanks.
3e141f0034d5 wifi: ath12k: refactor ath12k_mac_op_config()
ce20a10fdff4 wifi: ath12k: refactor ath12k_bss_assoc()
00c9b1a6d21d wifi: ath12k: refactor ath12k_mac_op_conf_tx()
e1e275a69906 wifi: ath12k: refactor ath12k_mac_op_start()
3bbc9c7429ff wifi: ath12k: refactor ath12k_mac_op_stop()
92b30bb39786 wifi: ath12k: refactor ath12k_mac_op_update_vif_offload()
d629b0c149c9 wifi: ath12k: refactor ath12k_mac_op_configure_filter()
5b1b5dbfd6a6 wifi: ath12k: refactor ath12k_mac_op_ampdu_action()
b33dcbe8d53d wifi: ath12k: refactor ath12k_mac_op_flush()
5bdfb8c9db22 wifi: ath12k: ath12k_start_vdev_delay(): convert to use ar
--
https://patchwork.kernel.org/project/linux-wireless/patch/20240103063731.3356060-2-quic_periyasa@quicinc.com/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 02/10] wifi: ath12k: Refactor mac callback of bss info changed
2024-01-03 6:37 [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions Karthikeyan Periyasamy
2024-01-03 6:37 ` [PATCH 01/10] wifi: ath12k: Refactor mac callback of config Karthikeyan Periyasamy
@ 2024-01-03 6:37 ` Karthikeyan Periyasamy
2024-01-03 17:25 ` Jeff Johnson
2024-01-03 6:37 ` [PATCH 03/10] wifi: ath12k: Refactor mac callback of conf tx Karthikeyan Periyasamy
` (8 subsequent siblings)
10 siblings, 1 reply; 24+ messages in thread
From: Karthikeyan Periyasamy @ 2024-01-03 6:37 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
To support single wiphy abstraction, introduce link/radio specific helper
function in the mac80211 callback bss_info_change(). This way, the
callback can be extended to handle multiple link/radio in the future.
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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 43 ++++++++++++++++-----------
1 file changed, 26 insertions(+), 17 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 7b02a107ab38..bbd57b73fa63 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -2279,12 +2279,11 @@ static int ath12k_setup_peer_smps(struct ath12k *ar, struct ath12k_vif *arvif,
ath12k_smps_map[smps]);
}
-static void ath12k_bss_assoc(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
+static void ath12k_bss_assoc(struct ath12k *ar,
+ struct ath12k_vif *arvif,
struct ieee80211_bss_conf *bss_conf)
{
- struct ath12k *ar = hw->priv;
- struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
+ struct ieee80211_vif *vif = arvif->vif;
struct ath12k_wmi_peer_assoc_arg peer_arg;
struct ieee80211_sta *ap_sta;
struct ath12k_peer *peer;
@@ -2374,11 +2373,9 @@ static void ath12k_bss_assoc(struct ieee80211_hw *hw,
arvif->vdev_id, ret);
}
-static void ath12k_bss_disassoc(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif)
+static void ath12k_bss_disassoc(struct ath12k *ar,
+ struct ath12k_vif *arvif)
{
- struct ath12k *ar = hw->priv;
- struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
int ret;
lockdep_assert_held(&ar->conf_mutex);
@@ -2504,13 +2501,12 @@ static int ath12k_mac_fils_discovery(struct ath12k_vif *arvif,
return ret;
}
-static void ath12k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
- struct ieee80211_bss_conf *info,
- u64 changed)
+static void ath12k_mac_bss_info_changed(struct ath12k *ar,
+ struct ath12k_vif *arvif,
+ struct ieee80211_bss_conf *info,
+ u64 changed)
{
- struct ath12k *ar = hw->priv;
- struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
+ struct ieee80211_vif *vif = arvif->vif;
struct cfg80211_chan_def def;
u32 param_id, param_value;
enum nl80211_band band;
@@ -2523,7 +2519,7 @@ static void ath12k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
u8 rateidx;
u32 rate;
- mutex_lock(&ar->conf_mutex);
+ lockdep_assert_held(&ar->conf_mutex);
if (changed & BSS_CHANGED_BEACON_INT) {
arvif->beacon_interval = info->beacon_int;
@@ -2679,9 +2675,9 @@ static void ath12k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
if (changed & BSS_CHANGED_ASSOC) {
if (vif->cfg.assoc)
- ath12k_bss_assoc(hw, vif, info);
+ ath12k_bss_assoc(ar, arvif, info);
else
- ath12k_bss_disassoc(hw, vif);
+ ath12k_bss_disassoc(ar, arvif);
}
if (changed & BSS_CHANGED_TXPOWER) {
@@ -2783,6 +2779,19 @@ static void ath12k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
if (changed & BSS_CHANGED_EHT_PUNCTURING)
arvif->punct_bitmap = info->eht_puncturing;
+}
+
+static void ath12k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif,
+ struct ieee80211_bss_conf *info,
+ u64 changed)
+{
+ struct ath12k *ar = hw->priv;
+ struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
+
+ mutex_lock(&ar->conf_mutex);
+
+ ath12k_mac_bss_info_changed(ar, arvif, info, changed);
mutex_unlock(&ar->conf_mutex);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 02/10] wifi: ath12k: Refactor mac callback of bss info changed
2024-01-03 6:37 ` [PATCH 02/10] wifi: ath12k: Refactor mac callback of bss info changed Karthikeyan Periyasamy
@ 2024-01-03 17:25 ` Jeff Johnson
0 siblings, 0 replies; 24+ messages in thread
From: Jeff Johnson @ 2024-01-03 17:25 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless
On 1/2/2024 10:37 PM, Karthikeyan Periyasamy wrote:
> To support single wiphy abstraction, introduce link/radio specific helper
> function in the mac80211 callback bss_info_change(). This way, the
> callback can be extended to handle multiple link/radio in the future.
>
> 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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 03/10] wifi: ath12k: Refactor mac callback of conf tx
2024-01-03 6:37 [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions Karthikeyan Periyasamy
2024-01-03 6:37 ` [PATCH 01/10] wifi: ath12k: Refactor mac callback of config Karthikeyan Periyasamy
2024-01-03 6:37 ` [PATCH 02/10] wifi: ath12k: Refactor mac callback of bss info changed Karthikeyan Periyasamy
@ 2024-01-03 6:37 ` Karthikeyan Periyasamy
2024-01-03 17:25 ` Jeff Johnson
2024-01-03 6:37 ` [PATCH 04/10] wifi: ath12k: Refactor mac callback of start Karthikeyan Periyasamy
` (7 subsequent siblings)
10 siblings, 1 reply; 24+ messages in thread
From: Karthikeyan Periyasamy @ 2024-01-03 6:37 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
To support single wiphy abstraction, introduce link/radio specific helper
function in the mac80211 callback conf_tx(). This way, the callback can
be extended to handle multiple link/radio in the future.
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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 41 ++++++++++++++++++---------
1 file changed, 28 insertions(+), 13 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index bbd57b73fa63..66c758bddf48 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -3986,10 +3986,10 @@ static void ath12k_mac_op_sta_rc_update(struct ieee80211_hw *hw,
ieee80211_queue_work(hw, &arsta->update_wk);
}
-static int ath12k_conf_tx_uapsd(struct ath12k *ar, struct ieee80211_vif *vif,
+static int ath12k_conf_tx_uapsd(struct ath12k_vif *arvif,
u16 ac, bool enable)
{
- struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
+ struct ath12k *ar = arvif->ar;
u32 value;
int ret;
@@ -4043,17 +4043,16 @@ static int ath12k_conf_tx_uapsd(struct ath12k *ar, struct ieee80211_vif *vif,
return ret;
}
-static int ath12k_mac_op_conf_tx(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
- unsigned int link_id, u16 ac,
- const struct ieee80211_tx_queue_params *params)
+static int ath12k_mac_conf_tx(struct ath12k_vif *arvif,
+ unsigned int link_id, u16 ac,
+ const struct ieee80211_tx_queue_params *params)
{
- struct ath12k *ar = hw->priv;
- struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
struct wmi_wmm_params_arg *p = NULL;
+ struct ath12k *ar = arvif->ar;
+ struct ath12k_base *ab = ar->ab;
int ret;
- mutex_lock(&ar->conf_mutex);
+ lockdep_assert_held(&ar->conf_mutex);
switch (ac) {
case IEEE80211_AC_VO:
@@ -4083,17 +4082,33 @@ static int ath12k_mac_op_conf_tx(struct ieee80211_hw *hw,
ret = ath12k_wmi_send_wmm_update_cmd(ar, arvif->vdev_id,
&arvif->wmm_params);
if (ret) {
- ath12k_warn(ar->ab, "failed to set wmm params: %d\n", ret);
+ ath12k_warn(ab, "pdev idx %d failed to set wmm params: %d\n",
+ ar->pdev_idx, ret);
goto exit;
}
- ret = ath12k_conf_tx_uapsd(ar, vif, ac, params->uapsd);
-
+ ret = ath12k_conf_tx_uapsd(arvif, ac, params->uapsd);
if (ret)
- ath12k_warn(ar->ab, "failed to set sta uapsd: %d\n", ret);
+ ath12k_warn(ab, "pdev idx %d failed to set sta uapsd: %d\n",
+ ar->pdev_idx, ret);
exit:
+ return ret;
+}
+
+static int ath12k_mac_op_conf_tx(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif,
+ unsigned int link_id, u16 ac,
+ const struct ieee80211_tx_queue_params *params)
+{
+ struct ath12k *ar = hw->priv;
+ struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
+ int ret;
+
+ mutex_lock(&ar->conf_mutex);
+ ret = ath12k_mac_conf_tx(arvif, link_id, ac, params);
mutex_unlock(&ar->conf_mutex);
+
return ret;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 03/10] wifi: ath12k: Refactor mac callback of conf tx
2024-01-03 6:37 ` [PATCH 03/10] wifi: ath12k: Refactor mac callback of conf tx Karthikeyan Periyasamy
@ 2024-01-03 17:25 ` Jeff Johnson
0 siblings, 0 replies; 24+ messages in thread
From: Jeff Johnson @ 2024-01-03 17:25 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless
On 1/2/2024 10:37 PM, Karthikeyan Periyasamy wrote:
> To support single wiphy abstraction, introduce link/radio specific helper
> function in the mac80211 callback conf_tx(). This way, the callback can
> be extended to handle multiple link/radio in the future.
>
> 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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 04/10] wifi: ath12k: Refactor mac callback of start
2024-01-03 6:37 [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions Karthikeyan Periyasamy
` (2 preceding siblings ...)
2024-01-03 6:37 ` [PATCH 03/10] wifi: ath12k: Refactor mac callback of conf tx Karthikeyan Periyasamy
@ 2024-01-03 6:37 ` Karthikeyan Periyasamy
2024-01-03 17:31 ` Jeff Johnson
2024-01-03 6:37 ` [PATCH 05/10] wifi: ath12k: Refactor mac callback of stop Karthikeyan Periyasamy
` (6 subsequent siblings)
10 siblings, 1 reply; 24+ messages in thread
From: Karthikeyan Periyasamy @ 2024-01-03 6:37 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
To support single wiphy abstraction, introduce link/radio specific helper
function in the mac80211 callback start(). This way, the callback can be
extended to handle multiple link/radio in the future.
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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 31 ++++++++++++++++++++-------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 66c758bddf48..31ed3d342741 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -5081,14 +5081,12 @@ static void ath12k_mac_wait_reconfigure(struct ath12k_base *ab)
ATH12K_RECONFIGURE_TIMEOUT_HZ);
}
-static int ath12k_mac_op_start(struct ieee80211_hw *hw)
+static int ath12k_mac_start(struct ath12k *ar)
{
- struct ath12k *ar = hw->priv;
struct ath12k_base *ab = ar->ab;
struct ath12k_pdev *pdev = ar->pdev;
int ret;
- ath12k_mac_drain_tx(ar);
mutex_lock(&ar->conf_mutex);
switch (ar->state) {
@@ -5111,14 +5109,14 @@ static int ath12k_mac_op_start(struct ieee80211_hw *hw)
1, pdev->pdev_id);
if (ret) {
- ath12k_err(ar->ab, "failed to enable PMF QOS: (%d\n", ret);
+ ath12k_err(ab, "failed to enable PMF QOS: (%d\n", ret);
goto err;
}
ret = ath12k_wmi_pdev_set_param(ar, WMI_PDEV_PARAM_DYNAMIC_BW, 1,
pdev->pdev_id);
if (ret) {
- ath12k_err(ar->ab, "failed to enable dynamic bw: %d\n", ret);
+ ath12k_err(ab, "failed to enable dynamic bw: %d\n", ret);
goto err;
}
@@ -5148,7 +5146,7 @@ static int ath12k_mac_op_start(struct ieee80211_hw *hw)
1, pdev->pdev_id);
if (ret) {
- ath12k_err(ar->ab, "failed to enable MESH MCAST ENABLE: (%d\n", ret);
+ ath12k_err(ab, "failed to enable MESH MCAST ENABLE: (%d\n", ret);
goto err;
}
@@ -5174,7 +5172,7 @@ static int ath12k_mac_op_start(struct ieee80211_hw *hw)
}
if (ret == -ENOTSUPP)
- ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
+ ath12k_dbg(ab, ATH12K_DBG_MAC,
"monitor status config is not yet supported");
/* Configure the hash seed for hash based reo dest ring selection */
@@ -5196,7 +5194,6 @@ static int ath12k_mac_op_start(struct ieee80211_hw *hw)
&ab->pdevs[ar->pdev_idx]);
return 0;
-
err:
ar->state = ATH12K_STATE_OFF;
mutex_unlock(&ar->conf_mutex);
@@ -5204,6 +5201,24 @@ static int ath12k_mac_op_start(struct ieee80211_hw *hw)
return ret;
}
+static int ath12k_mac_op_start(struct ieee80211_hw *hw)
+{
+ struct ath12k *ar = hw->priv;
+ struct ath12k_base *ab = ar->ab;
+ int ret;
+
+ ath12k_mac_drain_tx(ar);
+
+ ret = ath12k_mac_start(ar);
+ if (ret) {
+ ath12k_err(ab, "fail to start mac operations in pdev idx %d ret %d\n",
+ ar->pdev_idx, ret);
+ return ret;
+ }
+
+ return 0;
+}
+
int ath12k_mac_rfkill_config(struct ath12k *ar)
{
struct ath12k_base *ab = ar->ab;
--
2.34.1
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 04/10] wifi: ath12k: Refactor mac callback of start
2024-01-03 6:37 ` [PATCH 04/10] wifi: ath12k: Refactor mac callback of start Karthikeyan Periyasamy
@ 2024-01-03 17:31 ` Jeff Johnson
0 siblings, 0 replies; 24+ messages in thread
From: Jeff Johnson @ 2024-01-03 17:31 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless
On 1/2/2024 10:37 PM, Karthikeyan Periyasamy wrote:
> To support single wiphy abstraction, introduce link/radio specific helper
> function in the mac80211 callback start(). This way, the callback can be
> extended to handle multiple link/radio in the future.
>
> 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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 05/10] wifi: ath12k: Refactor mac callback of stop
2024-01-03 6:37 [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions Karthikeyan Periyasamy
` (3 preceding siblings ...)
2024-01-03 6:37 ` [PATCH 04/10] wifi: ath12k: Refactor mac callback of start Karthikeyan Periyasamy
@ 2024-01-03 6:37 ` Karthikeyan Periyasamy
2024-01-03 17:32 ` Jeff Johnson
2024-01-03 6:37 ` [PATCH 06/10] wifi: ath12k: Refactor mac callback of update vif offload Karthikeyan Periyasamy
` (5 subsequent siblings)
10 siblings, 1 reply; 24+ messages in thread
From: Karthikeyan Periyasamy @ 2024-01-03 6:37 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
To support single wiphy abstraction, introduce link/radio specific helper
function in the mac80211 callback stop(). This way, the callback can be
extended to handle multiple link/radio in the future.
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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 31ed3d342741..0b72b32e25d4 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -5276,14 +5276,11 @@ int ath12k_mac_rfkill_enable_radio(struct ath12k *ar, bool enable)
return 0;
}
-static void ath12k_mac_op_stop(struct ieee80211_hw *hw)
+static void ath12k_mac_stop(struct ath12k *ar)
{
- struct ath12k *ar = hw->priv;
struct htt_ppdu_stats_info *ppdu_stats, *tmp;
int ret;
- ath12k_mac_drain_tx(ar);
-
mutex_lock(&ar->conf_mutex);
ret = ath12k_mac_config_mon_status_default(ar, false);
if (ret && (ret != -ENOTSUPP))
@@ -5312,6 +5309,15 @@ static void ath12k_mac_op_stop(struct ieee80211_hw *hw)
atomic_set(&ar->num_pending_mgmt_tx, 0);
}
+static void ath12k_mac_op_stop(struct ieee80211_hw *hw)
+{
+ struct ath12k *ar = hw->priv;
+
+ ath12k_mac_drain_tx(ar);
+
+ ath12k_mac_stop(ar);
+}
+
static u8
ath12k_mac_get_vdev_stats_id(struct ath12k_vif *arvif)
{
--
2.34.1
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 05/10] wifi: ath12k: Refactor mac callback of stop
2024-01-03 6:37 ` [PATCH 05/10] wifi: ath12k: Refactor mac callback of stop Karthikeyan Periyasamy
@ 2024-01-03 17:32 ` Jeff Johnson
0 siblings, 0 replies; 24+ messages in thread
From: Jeff Johnson @ 2024-01-03 17:32 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless
On 1/2/2024 10:37 PM, Karthikeyan Periyasamy wrote:
> To support single wiphy abstraction, introduce link/radio specific helper
> function in the mac80211 callback stop(). This way, the callback can be
> extended to handle multiple link/radio in the future.
>
> 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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 06/10] wifi: ath12k: Refactor mac callback of update vif offload
2024-01-03 6:37 [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions Karthikeyan Periyasamy
` (4 preceding siblings ...)
2024-01-03 6:37 ` [PATCH 05/10] wifi: ath12k: Refactor mac callback of stop Karthikeyan Periyasamy
@ 2024-01-03 6:37 ` Karthikeyan Periyasamy
2024-01-03 17:34 ` Jeff Johnson
2024-01-03 6:37 ` [PATCH 07/10] wifi: ath12k: Refactor mac callback of configure filter Karthikeyan Periyasamy
` (4 subsequent siblings)
10 siblings, 1 reply; 24+ messages in thread
From: Karthikeyan Periyasamy @ 2024-01-03 6:37 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
To support single wiphy abstraction, introduce link/radio specific helper
function in the mac80211 callback update_vif_offload(). This way, the
callback can be extended to handle multiple link/radio in the future.
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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 0b72b32e25d4..5c7b747addda 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -5434,12 +5434,11 @@ static int ath12k_set_he_mu_sounding_mode(struct ath12k *ar,
return ret;
}
-static void ath12k_mac_op_update_vif_offload(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif)
+static void ath12k_mac_update_vif_offload(struct ath12k_vif *arvif)
{
- struct ath12k *ar = hw->priv;
+ struct ieee80211_vif *vif = arvif->vif;
+ struct ath12k *ar = arvif->ar;
struct ath12k_base *ab = ar->ab;
- struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
u32 param_id, param_value;
int ret;
@@ -5481,6 +5480,14 @@ static void ath12k_mac_op_update_vif_offload(struct ieee80211_hw *hw,
}
}
+static void ath12k_mac_op_update_vif_offload(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif)
+{
+ struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
+
+ ath12k_mac_update_vif_offload(arvif);
+}
+
static int ath12k_mac_op_add_interface(struct ieee80211_hw *hw,
struct ieee80211_vif *vif)
{
@@ -5584,7 +5591,7 @@ static int ath12k_mac_op_add_interface(struct ieee80211_hw *hw,
list_add(&arvif->list, &ar->arvifs);
spin_unlock_bh(&ar->data_lock);
- ath12k_mac_op_update_vif_offload(hw, vif);
+ ath12k_mac_update_vif_offload(arvif);
nss = hweight32(ar->cfg_tx_chainmask) ? : 1;
ret = ath12k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id,
--
2.34.1
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 06/10] wifi: ath12k: Refactor mac callback of update vif offload
2024-01-03 6:37 ` [PATCH 06/10] wifi: ath12k: Refactor mac callback of update vif offload Karthikeyan Periyasamy
@ 2024-01-03 17:34 ` Jeff Johnson
0 siblings, 0 replies; 24+ messages in thread
From: Jeff Johnson @ 2024-01-03 17:34 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless
On 1/2/2024 10:37 PM, Karthikeyan Periyasamy wrote:
> To support single wiphy abstraction, introduce link/radio specific helper
> function in the mac80211 callback update_vif_offload(). This way, the
> callback can be extended to handle multiple link/radio in the future.
>
> 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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 07/10] wifi: ath12k: Refactor mac callback of configure filter
2024-01-03 6:37 [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions Karthikeyan Periyasamy
` (5 preceding siblings ...)
2024-01-03 6:37 ` [PATCH 06/10] wifi: ath12k: Refactor mac callback of update vif offload Karthikeyan Periyasamy
@ 2024-01-03 6:37 ` Karthikeyan Periyasamy
2024-01-03 17:35 ` Jeff Johnson
2024-01-03 6:37 ` [PATCH 08/10] wifi: ath12k: Refactor mac callback of ampdu action Karthikeyan Periyasamy
` (3 subsequent siblings)
10 siblings, 1 reply; 24+ messages in thread
From: Karthikeyan Periyasamy @ 2024-01-03 6:37 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
To support single wiphy abstraction, introduce link/radio specific helper
function in the mac80211 callback configure_filter(). This way, the
callback can be extended to handle multiple link/radio in the future.
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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 28 ++++++++++++++++++---------
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 5c7b747addda..1566b43029cd 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -5831,19 +5831,15 @@ static void ath12k_mac_op_remove_interface(struct ieee80211_hw *hw,
FIF_PROBE_REQ | \
FIF_FCSFAIL)
-static void ath12k_mac_op_configure_filter(struct ieee80211_hw *hw,
- unsigned int changed_flags,
- unsigned int *total_flags,
- u64 multicast)
+static void ath12k_mac_configure_filter(struct ath12k *ar,
+ unsigned int total_flags)
{
- struct ath12k *ar = hw->priv;
bool reset_flag;
int ret;
- mutex_lock(&ar->conf_mutex);
+ lockdep_assert_held(&ar->conf_mutex);
- *total_flags &= SUPPORTED_FILTERS;
- ar->filter_flags = *total_flags;
+ ar->filter_flags = total_flags;
/* For monitor mode */
reset_flag = !(ar->filter_flags & FIF_BCN_PRBRESP_PROMISC);
@@ -5858,9 +5854,23 @@ static void ath12k_mac_op_configure_filter(struct ieee80211_hw *hw,
ath12k_warn(ar->ab,
"fail to set monitor filter: %d\n", ret);
}
+
ath12k_dbg(ar->ab, ATH12K_DBG_MAC,
"total_flags:0x%x, reset_flag:%d\n",
- *total_flags, reset_flag);
+ total_flags, reset_flag);
+}
+
+static void ath12k_mac_op_configure_filter(struct ieee80211_hw *hw,
+ unsigned int changed_flags,
+ unsigned int *total_flags,
+ u64 multicast)
+{
+ struct ath12k *ar = hw->priv;
+
+ mutex_lock(&ar->conf_mutex);
+
+ *total_flags &= SUPPORTED_FILTERS;
+ ath12k_mac_configure_filter(ar, *total_flags);
mutex_unlock(&ar->conf_mutex);
}
--
2.34.1
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 07/10] wifi: ath12k: Refactor mac callback of configure filter
2024-01-03 6:37 ` [PATCH 07/10] wifi: ath12k: Refactor mac callback of configure filter Karthikeyan Periyasamy
@ 2024-01-03 17:35 ` Jeff Johnson
0 siblings, 0 replies; 24+ messages in thread
From: Jeff Johnson @ 2024-01-03 17:35 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless
On 1/2/2024 10:37 PM, Karthikeyan Periyasamy wrote:
> To support single wiphy abstraction, introduce link/radio specific helper
> function in the mac80211 callback configure_filter(). This way, the
> callback can be extended to handle multiple link/radio in the future.
>
> 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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 08/10] wifi: ath12k: Refactor mac callback of ampdu action
2024-01-03 6:37 [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions Karthikeyan Periyasamy
` (6 preceding siblings ...)
2024-01-03 6:37 ` [PATCH 07/10] wifi: ath12k: Refactor mac callback of configure filter Karthikeyan Periyasamy
@ 2024-01-03 6:37 ` Karthikeyan Periyasamy
2024-01-03 17:36 ` Jeff Johnson
2024-01-03 6:37 ` [PATCH 09/10] wifi: ath12k: Refactor mac callback of flush Karthikeyan Periyasamy
` (2 subsequent siblings)
10 siblings, 1 reply; 24+ messages in thread
From: Karthikeyan Periyasamy @ 2024-01-03 6:37 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
To support single wiphy abstraction, introduce link/radio specific helper
function in the mac80211 callback ampdu_action(). This way, the callback
can be extended to handle multiple link/radio in the future.
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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 1566b43029cd..c505bac365f6 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -5901,14 +5901,13 @@ static int ath12k_mac_op_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx
return ret;
}
-static int ath12k_mac_op_ampdu_action(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif,
- struct ieee80211_ampdu_params *params)
+static int ath12k_mac_ampdu_action(struct ath12k_vif *arvif,
+ struct ieee80211_ampdu_params *params)
{
- struct ath12k *ar = hw->priv;
+ struct ath12k *ar = arvif->ar;
int ret = -EINVAL;
- mutex_lock(&ar->conf_mutex);
+ lockdep_assert_held(&ar->conf_mutex);
switch (params->action) {
case IEEE80211_AMPDU_RX_START:
@@ -5929,8 +5928,25 @@ static int ath12k_mac_op_ampdu_action(struct ieee80211_hw *hw,
break;
}
+ return ret;
+}
+
+static int ath12k_mac_op_ampdu_action(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif,
+ struct ieee80211_ampdu_params *params)
+{
+ struct ath12k *ar = hw->priv;
+ struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
+ int ret = -EINVAL;
+
+ mutex_lock(&ar->conf_mutex);
+ ret = ath12k_mac_ampdu_action(arvif, params);
mutex_unlock(&ar->conf_mutex);
+ if (ret)
+ ath12k_warn(ar->ab, "pdev idx %d unable to perform ampdu action %d ret %d\n",
+ ar->pdev_idx, params->action, ret);
+
return ret;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 08/10] wifi: ath12k: Refactor mac callback of ampdu action
2024-01-03 6:37 ` [PATCH 08/10] wifi: ath12k: Refactor mac callback of ampdu action Karthikeyan Periyasamy
@ 2024-01-03 17:36 ` Jeff Johnson
0 siblings, 0 replies; 24+ messages in thread
From: Jeff Johnson @ 2024-01-03 17:36 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless
On 1/2/2024 10:37 PM, Karthikeyan Periyasamy wrote:
> To support single wiphy abstraction, introduce link/radio specific helper
> function in the mac80211 callback ampdu_action(). This way, the callback
> can be extended to handle multiple link/radio in the future.
>
> 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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 09/10] wifi: ath12k: Refactor mac callback of flush
2024-01-03 6:37 [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions Karthikeyan Periyasamy
` (7 preceding siblings ...)
2024-01-03 6:37 ` [PATCH 08/10] wifi: ath12k: Refactor mac callback of ampdu action Karthikeyan Periyasamy
@ 2024-01-03 6:37 ` Karthikeyan Periyasamy
2024-01-03 17:38 ` Jeff Johnson
2024-01-03 6:37 ` [PATCH 10/10] wifi: ath12k: Refactor start vdev delay function Karthikeyan Periyasamy
2024-01-15 15:35 ` [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions Kalle Valo
10 siblings, 1 reply; 24+ messages in thread
From: Karthikeyan Periyasamy @ 2024-01-03 6:37 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
To support single wiphy abstraction, introduce link/radio specific helper
function in the mac80211 callback flush(). This way, the callback can be
extended to handle multiple link/radio in the future.
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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index c505bac365f6..84587c5782e6 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -6644,15 +6644,10 @@ static int ath12k_mac_op_set_frag_threshold(struct ieee80211_hw *hw, u32 value)
return -EOPNOTSUPP;
}
-static void ath12k_mac_op_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
- u32 queues, bool drop)
+static void ath12k_mac_flush(struct ath12k *ar)
{
- struct ath12k *ar = hw->priv;
long time_left;
- if (drop)
- return;
-
time_left = wait_event_timeout(ar->dp.tx_empty_waitq,
(atomic_read(&ar->dp.num_tx_pending) == 0),
ATH12K_FLUSH_TIMEOUT);
@@ -6667,6 +6662,17 @@ static void ath12k_mac_op_flush(struct ieee80211_hw *hw, struct ieee80211_vif *v
time_left);
}
+static void ath12k_mac_op_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ u32 queues, bool drop)
+{
+ struct ath12k *ar = hw->priv;
+
+ if (drop)
+ return;
+
+ ath12k_mac_flush(ar);
+}
+
static int
ath12k_mac_bitrate_mask_num_ht_rates(struct ath12k *ar,
enum nl80211_band band,
--
2.34.1
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 09/10] wifi: ath12k: Refactor mac callback of flush
2024-01-03 6:37 ` [PATCH 09/10] wifi: ath12k: Refactor mac callback of flush Karthikeyan Periyasamy
@ 2024-01-03 17:38 ` Jeff Johnson
0 siblings, 0 replies; 24+ messages in thread
From: Jeff Johnson @ 2024-01-03 17:38 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless
On 1/2/2024 10:37 PM, Karthikeyan Periyasamy wrote:
> To support single wiphy abstraction, introduce link/radio specific helper
> function in the mac80211 callback flush(). This way, the callback can be
> extended to handle multiple link/radio in the future.
>
> 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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* [PATCH 10/10] wifi: ath12k: Refactor start vdev delay function
2024-01-03 6:37 [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions Karthikeyan Periyasamy
` (8 preceding siblings ...)
2024-01-03 6:37 ` [PATCH 09/10] wifi: ath12k: Refactor mac callback of flush Karthikeyan Periyasamy
@ 2024-01-03 6:37 ` Karthikeyan Periyasamy
2024-01-03 17:39 ` Jeff Johnson
2024-01-15 15:35 ` [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions Kalle Valo
10 siblings, 1 reply; 24+ messages in thread
From: Karthikeyan Periyasamy @ 2024-01-03 6:37 UTC (permalink / raw)
To: ath12k; +Cc: linux-wireless, Karthikeyan Periyasamy
To support single wiphy abstraction, remove the mac80211 hw data
dependency from the start vdev delay function. This way, this
function can be extended to handle multiple link/radio in the future.
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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 84587c5782e6..d328f37dac92 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -241,8 +241,8 @@ static const u32 ath12k_smps_map[] = {
[WLAN_HT_CAP_SM_PS_DISABLED] = WMI_PEER_SMPS_PS_NONE,
};
-static int ath12k_start_vdev_delay(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif);
+static int ath12k_start_vdev_delay(struct ath12k *ar,
+ struct ath12k_vif *arvif);
static const char *ath12k_mac_phymode_str(enum wmi_phy_mode mode)
{
@@ -3718,7 +3718,7 @@ static int ath12k_mac_station_add(struct ath12k *ar,
if (ab->hw_params->vdev_start_delay &&
!arvif->is_started &&
arvif->vdev_type != WMI_VDEV_TYPE_AP) {
- ret = ath12k_start_vdev_delay(ar->hw, vif);
+ ret = ath12k_start_vdev_delay(ar, arvif);
if (ret) {
ath12k_warn(ab, "failed to delay vdev start: %d\n", ret);
goto free_peer;
@@ -6411,12 +6411,11 @@ static void ath12k_mac_op_change_chanctx(struct ieee80211_hw *hw,
mutex_unlock(&ar->conf_mutex);
}
-static int ath12k_start_vdev_delay(struct ieee80211_hw *hw,
- struct ieee80211_vif *vif)
+static int ath12k_start_vdev_delay(struct ath12k *ar,
+ struct ath12k_vif *arvif)
{
- struct ath12k *ar = hw->priv;
struct ath12k_base *ab = ar->ab;
- struct ath12k_vif *arvif = ath12k_vif_to_arvif(vif);
+ struct ieee80211_vif *vif = arvif->vif;
int ret;
if (WARN_ON(arvif->is_started))
--
2.34.1
^ permalink raw reply related [flat|nested] 24+ messages in thread* Re: [PATCH 10/10] wifi: ath12k: Refactor start vdev delay function
2024-01-03 6:37 ` [PATCH 10/10] wifi: ath12k: Refactor start vdev delay function Karthikeyan Periyasamy
@ 2024-01-03 17:39 ` Jeff Johnson
0 siblings, 0 replies; 24+ messages in thread
From: Jeff Johnson @ 2024-01-03 17:39 UTC (permalink / raw)
To: Karthikeyan Periyasamy, ath12k; +Cc: linux-wireless
On 1/2/2024 10:37 PM, Karthikeyan Periyasamy wrote:
> To support single wiphy abstraction, remove the mac80211 hw data
> dependency from the start vdev delay function. This way, this
> function can be extended to handle multiple link/radio in the future.
>
> 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-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4
>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions
2024-01-03 6:37 [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions Karthikeyan Periyasamy
` (9 preceding siblings ...)
2024-01-03 6:37 ` [PATCH 10/10] wifi: ath12k: Refactor start vdev delay function Karthikeyan Periyasamy
@ 2024-01-15 15:35 ` Kalle Valo
2024-01-16 4:50 ` Karthikeyan Periyasamy
10 siblings, 1 reply; 24+ messages in thread
From: Kalle Valo @ 2024-01-15 15:35 UTC (permalink / raw)
To: Karthikeyan Periyasamy; +Cc: ath12k, linux-wireless
Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
> Currently, the existing mac80211 callback functions are defined assuming
> each link/radio is represented by a single mac80211 hw. In order to
> support multi link operation (MLO), need to move from the multi wiphy
> model to a single wiphy model. However, the single wiphy model allows
> multiple link/radio to be exposed by the same mac80211 hw. Therefore, we
> need to separate the link/radio specific handling within the mac80211
> callback operations. This way, the callback can be extended to support
> multiple link/radio in the future.
>
> Current Multi wiphy Model
>
> +---------------+ +---------------+ +-------------+
> | Mac80211 hw | | Mac80211 hw | |Mac80211 hw |
> | private data | | private data | |private data |
> | | | | | |
> | | | | | |
> | | | | | |
> | ar (2GHz) | | ar (5GHz) | | ar (6GHz) |
> | | | | | |
> | | | | | |
> | | | | | |
> +---------------+ +---------------+ +-------------+
>
>
>
>
> Single wiphy Model
>
> +--------------+
> | Mac80211 hw |
> | private data |
> | |
> |ath12k hw (ah)|
> | +----------+ |
> | |ar (2GHz) | |
> | +----------+ |
> | | | |
> | |ar (5GHz) | |
> | +----------+ |
> | | | |
> | |ar (6GHz) | |
> | | | |
> | +----------+ |
> +--------------+
>
>
> Karthikeyan Periyasamy (10):
> wifi: ath12k: Refactor mac callback of config
> wifi: ath12k: Refactor mac callback of bss info changed
> wifi: ath12k: Refactor mac callback of conf tx
> wifi: ath12k: Refactor mac callback of start
> wifi: ath12k: Refactor mac callback of stop
> wifi: ath12k: Refactor mac callback of update vif offload
> wifi: ath12k: Refactor mac callback of configure filter
> wifi: ath12k: Refactor mac callback of ampdu action
> wifi: ath12k: Refactor mac callback of flush
> wifi: ath12k: Refactor start vdev delay function
In the pending branch I renamed the patch titles like this, an example:
wifi: ath12k: refactor ath12k_mac_op_conf_tx()
https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=bdb399b467daacabdc0e2127e03874d399f17a38
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 24+ messages in thread* Re: [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions
2024-01-15 15:35 ` [PATCH 00/10] wifi: ath12k: Refactor mac80211 callback operation functions Kalle Valo
@ 2024-01-16 4:50 ` Karthikeyan Periyasamy
0 siblings, 0 replies; 24+ messages in thread
From: Karthikeyan Periyasamy @ 2024-01-16 4:50 UTC (permalink / raw)
To: Kalle Valo; +Cc: ath12k, linux-wireless
On 1/15/2024 9:05 PM, Kalle Valo wrote:
> Karthikeyan Periyasamy <quic_periyasa@quicinc.com> writes:
>
>> Currently, the existing mac80211 callback functions are defined assuming
>> each link/radio is represented by a single mac80211 hw. In order to
>> support multi link operation (MLO), need to move from the multi wiphy
>> model to a single wiphy model. However, the single wiphy model allows
>> multiple link/radio to be exposed by the same mac80211 hw. Therefore, we
>> need to separate the link/radio specific handling within the mac80211
>> callback operations. This way, the callback can be extended to support
>> multiple link/radio in the future.
>>
>> Current Multi wiphy Model
>>
>> +---------------+ +---------------+ +-------------+
>> | Mac80211 hw | | Mac80211 hw | |Mac80211 hw |
>> | private data | | private data | |private data |
>> | | | | | |
>> | | | | | |
>> | | | | | |
>> | ar (2GHz) | | ar (5GHz) | | ar (6GHz) |
>> | | | | | |
>> | | | | | |
>> | | | | | |
>> +---------------+ +---------------+ +-------------+
>>
>>
>>
>>
>> Single wiphy Model
>>
>> +--------------+
>> | Mac80211 hw |
>> | private data |
>> | |
>> |ath12k hw (ah)|
>> | +----------+ |
>> | |ar (2GHz) | |
>> | +----------+ |
>> | | | |
>> | |ar (5GHz) | |
>> | +----------+ |
>> | | | |
>> | |ar (6GHz) | |
>> | | | |
>> | +----------+ |
>> +--------------+
>>
>>
>> Karthikeyan Periyasamy (10):
>> wifi: ath12k: Refactor mac callback of config
>> wifi: ath12k: Refactor mac callback of bss info changed
>> wifi: ath12k: Refactor mac callback of conf tx
>> wifi: ath12k: Refactor mac callback of start
>> wifi: ath12k: Refactor mac callback of stop
>> wifi: ath12k: Refactor mac callback of update vif offload
>> wifi: ath12k: Refactor mac callback of configure filter
>> wifi: ath12k: Refactor mac callback of ampdu action
>> wifi: ath12k: Refactor mac callback of flush
>> wifi: ath12k: Refactor start vdev delay function
> In the pending branch I renamed the patch titles like this, an example:
>
> wifi: ath12k: refactor ath12k_mac_op_conf_tx()
>
> https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=bdb399b467daacabdc0e2127e03874d399f17a38
Looks fine to me.
Thanks,
Karthikeyan
^ permalink raw reply [flat|nested] 24+ messages in thread