From: Kalle Valo <kvalo@codeaurora.org>
To: Jouni Malinen <jouni@codeaurora.org>
Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org,
Seevalamuthu Mariappan <seevalam@codeaurora.org>,
Miles Hu <milehu@codeaurora.org>,
Vasanthakumar Thiagarajan <vthiagar@codeaurora.org>
Subject: Re: [PATCH 3/3] ath11k: monitor mode clean up to use separate APIs
Date: Tue, 21 Sep 2021 16:42:05 +0300 [thread overview]
Message-ID: <8735pyujte.fsf@codeaurora.org> (raw)
In-Reply-To: <87ilyuunvh.fsf@codeaurora.org> (Kalle Valo's message of "Tue, 21 Sep 2021 15:14:26 +0300")
Kalle Valo <kvalo@codeaurora.org> writes:
> Jouni Malinen <jouni@codeaurora.org> writes:
>
>> From: Seevalamuthu Mariappan <seevalam@codeaurora.org>
>>
>> If monitor interface is enabled in co-exist mode, only local traffic are
>> captured. It's caused by missing monitor vdev in co-exist mode. So,
>> monitor mode clean up is done with separate Monitor APIs. For this,
>> introduce monitor_started and monitor_vdev_created boolean flags.
>>
>> Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01725-QCAHKSWPL_SILICONZ-1
>>
>> Co-developed-by: Miles Hu <milehu@codeaurora.org>
>> Signed-off-by: Miles Hu <milehu@codeaurora.org>
>> Co-developed-by: Vasanthakumar Thiagarajan <vthiagar@codeaurora.org>
>> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@codeaurora.org>
>> Signed-off-by: Seevalamuthu Mariappan <seevalam@codeaurora.org>
>> Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
>> ---
>> drivers/net/wireless/ath/ath11k/core.h | 5 --
>> drivers/net/wireless/ath/ath11k/dp_rx.c | 2 +-
>> drivers/net/wireless/ath/ath11k/dp_tx.c | 9 +-
>> drivers/net/wireless/ath/ath11k/mac.c | 112 ++++++++++++++----------
>> 4 files changed, 73 insertions(+), 55 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
>> index 3cddab695031..0ad5a935b52b 100644
>> --- a/drivers/net/wireless/ath/ath11k/core.h
>> +++ b/drivers/net/wireless/ath/ath11k/core.h
>> @@ -192,10 +192,6 @@ enum ath11k_dev_flags {
>> ATH11K_FLAG_HTC_SUSPEND_COMPLETE,
>> };
>>
>> -enum ath11k_monitor_flags {
>> - ATH11K_FLAG_MONITOR_ENABLED,
>> -};
>> -
>> struct ath11k_vif {
>> u32 vdev_id;
>> enum wmi_vdev_type vdev_type;
>> @@ -478,7 +474,6 @@ struct ath11k {
>>
>> unsigned long dev_flags;
>> unsigned int filter_flags;
>> - unsigned long monitor_flags;
>> u32 min_tx_power;
>> u32 max_tx_power;
>> u32 txpower_limit_2g;
>> diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
>> index 9a224817630a..6fde70914e1a 100644
>> --- a/drivers/net/wireless/ath/ath11k/dp_rx.c
>> +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
>> @@ -5029,7 +5029,7 @@ int ath11k_dp_rx_process_mon_rings(struct ath11k_base *ab, int mac_id,
>> struct ath11k *ar = ath11k_ab_to_ar(ab, mac_id);
>> int ret = 0;
>>
>> - if (test_bit(ATH11K_FLAG_MONITOR_ENABLED, &ar->monitor_flags))
>> + if (ar->monitor_started)
>> ret = ath11k_dp_mon_process_rx(ab, mac_id, napi, budget);
>> else
>> ret = ath11k_dp_rx_process_mon_status(ab, mac_id, napi, budget);
>
> Moving from test_bit() to a boolean looks racy to me, I don't see how
> monitor_started is serialised.
>
> And why move away from monitor_flags and having separate booleans
> anyway? I would monitor_conf_enabled and monitor_started from patch 2 to
> use monitor_flags.
In the pending branch I changed back to monitor_flags.
>> @@ -1076,11 +1076,16 @@ int ath11k_dp_tx_htt_monitor_mode_ring_config(struct ath11k *ar, bool reset)
>>
>> for (i = 0; i < ab->hw_params.num_rxmda_per_pdev; i++) {
>> ring_id = dp->rx_mon_status_refill_ring[i].refill_buf_ring.ring_id;
>> - if (!reset)
>> + if (!reset) {
>> tlv_filter.rx_filter =
>> HTT_RX_MON_FILTER_TLV_FLAGS_MON_STATUS_RING;
>> - else
>> + } else {
>> tlv_filter = ath11k_mac_mon_status_filter_default;
>> +#ifdef CONFIG_ATH11K_DEBUGFS
>> + if (ar->debug.extd_rx_stats)
>> + tlv_filter.rx_filter = ar->debug.rx_filter;
>> +#endif
>
> This should use ath11k_debugfs_is_extd_rx_stats_enabled and
> ath11k_debugfs_rx_filter(), then the ifdef is not needed.
I also fixed this in the pending branch.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
--
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k
WARNING: multiple messages have this Message-ID (diff)
From: Kalle Valo <kvalo@codeaurora.org>
To: Jouni Malinen <jouni@codeaurora.org>
Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org,
Seevalamuthu Mariappan <seevalam@codeaurora.org>,
Miles Hu <milehu@codeaurora.org>,
Vasanthakumar Thiagarajan <vthiagar@codeaurora.org>
Subject: Re: [PATCH 3/3] ath11k: monitor mode clean up to use separate APIs
Date: Tue, 21 Sep 2021 16:42:05 +0300 [thread overview]
Message-ID: <8735pyujte.fsf@codeaurora.org> (raw)
In-Reply-To: <87ilyuunvh.fsf@codeaurora.org> (Kalle Valo's message of "Tue, 21 Sep 2021 15:14:26 +0300")
Kalle Valo <kvalo@codeaurora.org> writes:
> Jouni Malinen <jouni@codeaurora.org> writes:
>
>> From: Seevalamuthu Mariappan <seevalam@codeaurora.org>
>>
>> If monitor interface is enabled in co-exist mode, only local traffic are
>> captured. It's caused by missing monitor vdev in co-exist mode. So,
>> monitor mode clean up is done with separate Monitor APIs. For this,
>> introduce monitor_started and monitor_vdev_created boolean flags.
>>
>> Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.4.0.1-01725-QCAHKSWPL_SILICONZ-1
>>
>> Co-developed-by: Miles Hu <milehu@codeaurora.org>
>> Signed-off-by: Miles Hu <milehu@codeaurora.org>
>> Co-developed-by: Vasanthakumar Thiagarajan <vthiagar@codeaurora.org>
>> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@codeaurora.org>
>> Signed-off-by: Seevalamuthu Mariappan <seevalam@codeaurora.org>
>> Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
>> ---
>> drivers/net/wireless/ath/ath11k/core.h | 5 --
>> drivers/net/wireless/ath/ath11k/dp_rx.c | 2 +-
>> drivers/net/wireless/ath/ath11k/dp_tx.c | 9 +-
>> drivers/net/wireless/ath/ath11k/mac.c | 112 ++++++++++++++----------
>> 4 files changed, 73 insertions(+), 55 deletions(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h
>> index 3cddab695031..0ad5a935b52b 100644
>> --- a/drivers/net/wireless/ath/ath11k/core.h
>> +++ b/drivers/net/wireless/ath/ath11k/core.h
>> @@ -192,10 +192,6 @@ enum ath11k_dev_flags {
>> ATH11K_FLAG_HTC_SUSPEND_COMPLETE,
>> };
>>
>> -enum ath11k_monitor_flags {
>> - ATH11K_FLAG_MONITOR_ENABLED,
>> -};
>> -
>> struct ath11k_vif {
>> u32 vdev_id;
>> enum wmi_vdev_type vdev_type;
>> @@ -478,7 +474,6 @@ struct ath11k {
>>
>> unsigned long dev_flags;
>> unsigned int filter_flags;
>> - unsigned long monitor_flags;
>> u32 min_tx_power;
>> u32 max_tx_power;
>> u32 txpower_limit_2g;
>> diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
>> index 9a224817630a..6fde70914e1a 100644
>> --- a/drivers/net/wireless/ath/ath11k/dp_rx.c
>> +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
>> @@ -5029,7 +5029,7 @@ int ath11k_dp_rx_process_mon_rings(struct ath11k_base *ab, int mac_id,
>> struct ath11k *ar = ath11k_ab_to_ar(ab, mac_id);
>> int ret = 0;
>>
>> - if (test_bit(ATH11K_FLAG_MONITOR_ENABLED, &ar->monitor_flags))
>> + if (ar->monitor_started)
>> ret = ath11k_dp_mon_process_rx(ab, mac_id, napi, budget);
>> else
>> ret = ath11k_dp_rx_process_mon_status(ab, mac_id, napi, budget);
>
> Moving from test_bit() to a boolean looks racy to me, I don't see how
> monitor_started is serialised.
>
> And why move away from monitor_flags and having separate booleans
> anyway? I would monitor_conf_enabled and monitor_started from patch 2 to
> use monitor_flags.
In the pending branch I changed back to monitor_flags.
>> @@ -1076,11 +1076,16 @@ int ath11k_dp_tx_htt_monitor_mode_ring_config(struct ath11k *ar, bool reset)
>>
>> for (i = 0; i < ab->hw_params.num_rxmda_per_pdev; i++) {
>> ring_id = dp->rx_mon_status_refill_ring[i].refill_buf_ring.ring_id;
>> - if (!reset)
>> + if (!reset) {
>> tlv_filter.rx_filter =
>> HTT_RX_MON_FILTER_TLV_FLAGS_MON_STATUS_RING;
>> - else
>> + } else {
>> tlv_filter = ath11k_mac_mon_status_filter_default;
>> +#ifdef CONFIG_ATH11K_DEBUGFS
>> + if (ar->debug.extd_rx_stats)
>> + tlv_filter.rx_filter = ar->debug.rx_filter;
>> +#endif
>
> This should use ath11k_debugfs_is_extd_rx_stats_enabled and
> ath11k_debugfs_rx_filter(), then the ifdef is not needed.
I also fixed this in the pending branch.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2021-09-21 13:48 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-21 16:20 [PATCH 0/3] ath11k: Fix no data captured in monitor co-exist mode Jouni Malinen
2021-07-21 16:20 ` Jouni Malinen
2021-07-21 16:20 ` [PATCH 1/3] ath11k: move static function ath11k_mac_vdev_setup_sync to top Jouni Malinen
2021-07-21 16:20 ` Jouni Malinen
2021-09-24 11:34 ` Kalle Valo
2021-09-24 11:34 ` Kalle Valo
2021-07-21 16:20 ` [PATCH 2/3] ath11k: add separate APIs for monitor mode Jouni Malinen
2021-07-21 16:20 ` Jouni Malinen
2021-09-21 13:26 ` Kalle Valo
2021-09-21 13:26 ` Kalle Valo
2021-09-21 15:55 ` Kalle Valo
2021-09-21 15:55 ` Kalle Valo
2021-09-22 15:53 ` Seevalamuthu Mariappan
2021-09-22 15:53 ` Seevalamuthu Mariappan
2021-07-21 16:20 ` [PATCH 3/3] ath11k: monitor mode clean up to use separate APIs Jouni Malinen
2021-07-21 16:20 ` Jouni Malinen
2021-09-16 9:35 ` Kalle Valo
2021-09-16 9:35 ` Kalle Valo
2021-09-16 9:38 ` Kalle Valo
2021-09-16 9:38 ` Kalle Valo
2021-09-21 12:14 ` Kalle Valo
2021-09-21 12:14 ` Kalle Valo
2021-09-21 13:42 ` Kalle Valo [this message]
2021-09-21 13:42 ` 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=8735pyujte.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=ath11k@lists.infradead.org \
--cc=jouni@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=milehu@codeaurora.org \
--cc=seevalam@codeaurora.org \
--cc=vthiagar@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.