From: "Nicolas Escande" <nico.escande@gmail.com>
To: "Karthikeyan Periyasamy" <quic_periyasa@quicinc.com>,
<ath12k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>,
"P Praneesh" <quic_ppranees@quicinc.com>
Subject: Re: [PATCH 7/7] wifi: ath12k: add monitor interface support on QCN9274
Date: Fri, 17 Jan 2025 12:33:55 +0100 [thread overview]
Message-ID: <D74BE3ES4HZC.GJJ2MY3UH462@gmail.com> (raw)
In-Reply-To: <20250107021017.3857555-8-quic_periyasa@quicinc.com>
On Tue Jan 7, 2025 at 3:10 AM CET, Karthikeyan Periyasamy wrote:
> From: P Praneesh <quic_ppranees@quicinc.com>
>
> Currently, the monitor interface is not supported. To support the monitor
> interface, configure the monitor vdev state identifier, configure the HTT
> filter setup, subscribe the mac80211 WANT_MONITOR_VIF feature and prevent
> monitor interface to transmit packet. Therefore, add these procedures to
> add monitor interface support and enable the monitor interface support on
> the QCN9274 platform through the hardware parameter.
>
> Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-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: P Praneesh <quic_ppranees@quicinc.com>
> Signed-off-by: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
> ---
[...]
> diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c
> index b8f0df6f7a05..81d1ff918f48 100644
> --- a/drivers/net/wireless/ath/ath12k/dp_tx.c
> +++ b/drivers/net/wireless/ath/ath12k/dp_tx.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-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
> */
>
> #include "core.h"
> @@ -1277,6 +1277,8 @@ int ath12k_dp_tx_htt_rx_monitor_mode_ring_config(struct ath12k *ar, bool reset)
> HTT_RX_MON_MO_CTRL_FILTER_FLASG3 |
> HTT_RX_MON_FP_DATA_FILTER_FLASG3 |
> HTT_RX_MON_MO_DATA_FILTER_FLASG3;
> + } else {
> + tlv_filter.rxmon_disable = true;
Shouldn't this be
tlv_filter = ath12k_mac_mon_status_filter_default;
To match de default value ?
> }
>
> if (ab->hw_params->rxdma1_enable) {
> diff --git a/drivers/net/wireless/ath/ath12k/hw.c b/drivers/net/wireless/ath/ath12k/hw.c
> index a106ebed7870..021a4b565e8b 100644
> --- a/drivers/net/wireless/ath/ath12k/hw.c
> +++ b/drivers/net/wireless/ath/ath12k/hw.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-2024 Qualcomm Innovation Center, Inc. All rights reserved.
> + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
> */
>
> #include <linux/types.h>
> @@ -1049,7 +1049,7 @@ static const struct ath12k_hw_params ath12k_hw_params[] = {
> BIT(NL80211_IFTYPE_AP) |
> BIT(NL80211_IFTYPE_MESH_POINT) |
> BIT(NL80211_IFTYPE_AP_VLAN),
> - .supports_monitor = false,
> + .supports_monitor = true,
>
> .idle_ps = false,
> .download_calib = true,
> diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
> index abf7c7ed8967..27d44b508884 100644
> --- a/drivers/net/wireless/ath/ath12k/mac.c
> +++ b/drivers/net/wireless/ath/ath12k/mac.c
> @@ -1264,6 +1264,12 @@ static int ath12k_mac_monitor_start(struct ath12k *ar)
> return ret;
> }
>
> + ret = ath12k_dp_tx_htt_monitor_mode_ring_config(ar, false);
This is already done a few lines after. Shouldn't the one after be removed
> + if (ret) {
> + ath12k_warn(ar->ab, "fail to set monitor filter: %d\n", ret);
> + return ret;
> + }
> +
> ar->monitor_started = true;
> ar->num_started_vdevs++;
> ret = ath12k_dp_tx_htt_monitor_mode_ring_config(ar, false);
[...]
And this is probably out of the scope of this patch but the code in
ath12k_dp_tx_htt_rx_monitor_mode_ring_config could be simplified by returning
early if (!ab->hw_params->rxdma1_enable) like in
ath12k_mac_config_mon_status_default.
And that brings the question for me as shouldn't theese two functions should be
refactored to share more code
next prev parent reply other threads:[~2025-01-17 11:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-07 2:10 [PATCH 0/7] wifi: ath12k: Add monitor interface support on QCN9274 Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 1/7] wifi: ath12k: fix link valid field initialization in the monitor Rx Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 2/7] wifi: ath12k: Add extra TLV tag parsing support in monitor Rx path Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 3/7] wifi: ath12k: Avoid fetch Error bitmap and decap format from Rx TLV Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 4/7] wifi: ath12k: Replace band define G with GHZ where appropriate Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 5/7] wifi: ath12k: change the status update in the monitor Rx Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 6/7] wifi: ath12k: Avoid packet offset and FCS length from Rx TLV Karthikeyan Periyasamy
2025-01-07 2:10 ` [PATCH 7/7] wifi: ath12k: add monitor interface support on QCN9274 Karthikeyan Periyasamy
2025-01-17 11:33 ` Nicolas Escande [this message]
2025-01-17 13:06 ` Karthikeyan Periyasamy
2025-01-17 13:20 ` Nicolas Escande
2025-01-21 9:12 ` Karthikeyan Periyasamy
2025-01-21 9:49 ` Nicolas Escande
2025-01-15 17:55 ` [PATCH 0/7] wifi: ath12k: Add " Nicolas Escande
2025-01-15 19:56 ` Jeff Johnson
2025-01-16 13:51 ` Nicolas Escande
2025-01-17 4:37 ` Karthikeyan Periyasamy
2025-01-17 9:46 ` Nicolas Escande
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=D74BE3ES4HZC.GJJ2MY3UH462@gmail.com \
--to=nico.escande@gmail.com \
--cc=ath12k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_periyasa@quicinc.com \
--cc=quic_ppranees@quicinc.com \
/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).