Linux wireless drivers development
 help / color / mirror / Atom feed
From: Karthikeyan Periyasamy <quic_periyasa@quicinc.com>
To: Vasanthakumar Thiagarajan
	<vasanthakumar.thiagarajan@oss.qualcomm.com>,
	<ath12k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>, P Praneesh <quic_ppranees@quicinc.com>
Subject: Re: [PATCH v7 9/9] wifi: ath12k: add monitor interface support on QCN9274
Date: Sat, 22 Feb 2025 20:20:44 +0530	[thread overview]
Message-ID: <1d231399-eb23-c82b-d18a-9203cca93862@quicinc.com> (raw)
In-Reply-To: <8385965d-1be7-12e7-b636-1a0750ee8762@oss.qualcomm.com>



On 2/22/2025 7:44 PM, Vasanthakumar Thiagarajan wrote:
> 
> 
> On 2/22/2025 9:00 AM, 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 NO_VIRTUAL_MONITOR 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>
>> ---
>>   drivers/net/wireless/ath/ath12k/core.c  |  5 +++++
>>   drivers/net/wireless/ath/ath12k/dp_tx.c |  6 +++++
>>   drivers/net/wireless/ath/ath12k/hw.c    |  4 ++--
>>   drivers/net/wireless/ath/ath12k/mac.c   | 30 ++++++++++++++++++++++++-
>>   4 files changed, 42 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath12k/core.c 
>> b/drivers/net/wireless/ath/ath12k/core.c
>> index 0b2dec081c6e..ed7365ce7f95 100644
>> --- a/drivers/net/wireless/ath/ath12k/core.c
>> +++ b/drivers/net/wireless/ath/ath12k/core.c
>> @@ -1306,6 +1306,11 @@ static void 
>> ath12k_core_pre_reconfigure_recovery(struct ath12k_base *ab)
>>                        ath12k_mac_tx_mgmt_pending_free, ar);
>>               idr_destroy(&ar->txmgmt_idr);
>>               wake_up(&ar->txmgmt_empty_waitq);
>> +
>> +            ar->monitor_vdev_id = -1;
>> +            ar->monitor_conf_enabled = false;
>> +            ar->monitor_vdev_created = false;
>> +            ar->monitor_started = false;
>>           }
>>       }
>> diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c 
>> b/drivers/net/wireless/ath/ath12k/dp_tx.c
>> index 46a55554c19c..a74afa8b2236 100644
>> --- a/drivers/net/wireless/ath/ath12k/dp_tx.c
>> +++ b/drivers/net/wireless/ath/ath12k/dp_tx.c
>> @@ -7,6 +7,7 @@
>>   #include "core.h"
>>   #include "dp_tx.h"
>>   #include "debug.h"
>> +#include "debugfs.h"
>>   #include "hw.h"
>>   #include "peer.h"
>>   #include "mac.h"
>> @@ -1431,6 +1432,11 @@ 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 = ath12k_mac_mon_status_filter_default;
>> +
>> +        if (ath12k_debugfs_is_extd_rx_stats_enabled(ar))
>> +            tlv_filter.rx_filter = ath12k_debugfs_rx_filter(ar);
>>       }
>>       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 54af9cbbf7cb..b90dad5cb2e0 100644
>> --- a/drivers/net/wireless/ath/ath12k/mac.c
>> +++ b/drivers/net/wireless/ath/ath12k/mac.c
>> @@ -1349,9 +1349,15 @@ static int ath12k_mac_monitor_start(struct 
>> ath12k *ar)
>>           return ret;
>>       }
>> +    ret = ath12k_dp_tx_htt_monitor_mode_ring_config(ar, false);
>> +    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);
>> +
>>       ath12k_dbg(ar->ab, ATH12K_DBG_MAC, "mac monitor started ret 
>> %d\n", ret);
>>       return ret;
>> @@ -7334,6 +7340,11 @@ static void ath12k_mac_op_tx(struct 
>> ieee80211_hw *hw,
>>       u8 link_id;
>>       int ret;
>> +    if (ahvif->vdev_type == WMI_VDEV_TYPE_MONITOR) {
>> +        ieee80211_free_txskb(hw, skb);
>> +        return;
>> +    }
>> +
>>       link_id = u32_get_bits(info->control.flags, 
>> IEEE80211_TX_CTRL_MLO_LINK);
>>       memset(skb_cb, 0, sizeof(*skb_cb));
>>       skb_cb->vif = vif;
>> @@ -8083,6 +8094,9 @@ int ath12k_mac_vdev_create(struct ath12k *ar, 
>> struct ath12k_link_vif *arvif)
>>       lockdep_assert_wiphy(hw->wiphy);
>> +    if (vif->type == NL80211_IFTYPE_MONITOR && ar->monitor_vdev_created)
>> +        return -EINVAL;
>> +
> 
> Some comment on the scenario that is being handled here might be helpful?
> 

sure, will address this comment in the next version of the patch.

-- 
Karthikeyan Periyasamy
--
கார்த்திகேயன் பெரியசாமி

      reply	other threads:[~2025-02-22 14:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-22  3:29 [PATCH v7 0/9] wifi: ath12k: Add monitor interface support on QCN9274 Karthikeyan Periyasamy
2025-02-22  3:29 ` [PATCH v7 1/9] wifi: ath12k: fix link valid field initialization in the monitor Rx Karthikeyan Periyasamy
2025-02-22  3:29 ` [PATCH v7 2/9] wifi: ath12k: Add extra TLV tag parsing support in monitor Rx path Karthikeyan Periyasamy
2025-02-22  3:29 ` [PATCH v7 3/9] wifi: ath12k: Avoid fetch Error bitmap and decap format from Rx TLV Karthikeyan Periyasamy
2025-02-22  3:29 ` [PATCH v7 4/9] wifi: ath12k: Replace band define G with GHZ where appropriate Karthikeyan Periyasamy
2025-02-22  3:29 ` [PATCH v7 5/9] wifi: ath12k: change the status update in the monitor Rx Karthikeyan Periyasamy
2025-02-22  3:29 ` [PATCH v7 6/9] wifi: ath12k: Avoid packet offset and FCS length from Rx TLV Karthikeyan Periyasamy
2025-02-22  3:30 ` [PATCH v7 7/9] wifi: ath12k: fix NULL access in assign channel context handler Karthikeyan Periyasamy
2025-02-22  6:21   ` Vasanthakumar Thiagarajan
2025-02-22  3:30 ` [PATCH v7 8/9] wifi: ath12k: Refactor the monitor channel context procedure Karthikeyan Periyasamy
2025-02-22  6:23   ` Vasanthakumar Thiagarajan
2025-02-22  3:30 ` [PATCH v7 9/9] wifi: ath12k: add monitor interface support on QCN9274 Karthikeyan Periyasamy
2025-02-22 14:14   ` Vasanthakumar Thiagarajan
2025-02-22 14:50     ` Karthikeyan Periyasamy [this message]

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=1d231399-eb23-c82b-d18a-9203cca93862@quicinc.com \
    --to=quic_periyasa@quicinc.com \
    --cc=ath12k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_ppranees@quicinc.com \
    --cc=vasanthakumar.thiagarajan@oss.qualcomm.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