ath12k.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Kang Yang <quic_kangyang@quicinc.com>
To: <ath12k@lists.infradead.org>
Cc: <linux-wireless@vger.kernel.org>, <quic_kangyang@quicinc.com>
Subject: [PATCH 06/10] wifi: ath12k: allow specific mgmt frame tx while vdev is not up
Date: Mon, 8 Jan 2024 16:25:48 +0800	[thread overview]
Message-ID: <20240108082552.7227-7-quic_kangyang@quicinc.com> (raw)
In-Reply-To: <20240108082552.7227-1-quic_kangyang@quicinc.com>

In current code, the management frames must be sent after vdev is started.
But for P2P device, vdev won't start until P2P negotiation is done. So
this logic doesn't make sense for P2P device.

Also use ar->conf_mutex to synchronize vdev delete and mgmt, TX.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/mac.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index a77fb786bc0a..6632d5266c1a 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -4995,8 +4995,8 @@ static void ath12k_mgmt_over_wmi_tx_work(struct work_struct *work)
 		}
 
 		arvif = ath12k_vif_to_arvif(skb_cb->vif);
-		if (ar->allocated_vdev_map & (1LL << arvif->vdev_id) &&
-		    arvif->is_started) {
+		mutex_lock(&ar->conf_mutex);
+		if (ar->allocated_vdev_map & (1LL << arvif->vdev_id)) {
 			ret = ath12k_mac_mgmt_tx_wmi(ar, arvif, skb);
 			if (ret) {
 				ath12k_warn(ar->ab, "failed to tx mgmt frame, vdev_id %d :%d\n",
@@ -5010,6 +5010,7 @@ static void ath12k_mgmt_over_wmi_tx_work(struct work_struct *work)
 				    arvif->is_started);
 			ath12k_mgmt_over_wmi_tx_drop(ar, skb);
 		}
+		mutex_unlock(&ar->conf_mutex);
 	}
 }
 
-- 
2.34.1



  parent reply	other threads:[~2024-01-08  8:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-08  8:25 [PATCH 00/10] wifi: ath12k: P2P support for WCN7850 Kang Yang
2024-01-08  8:25 ` [PATCH 01/10] wifi: ath12k: change interface combination for P2P mode Kang Yang
2024-01-08 17:59   ` Jeff Johnson
2024-01-08  8:25 ` [PATCH 02/10] wifi: ath12k: add P2P IE in beacon template Kang Yang
2024-01-08 18:01   ` Jeff Johnson
2024-01-08  8:25 ` [PATCH 03/10] wifi: ath12k: implement handling of P2P NoA event Kang Yang
2024-01-08  8:25 ` [PATCH 04/10] wifi: ath12k: implement remain on channel for P2P mode Kang Yang
2024-01-08 18:10   ` Jeff Johnson
2024-01-08  8:25 ` [PATCH 05/10] wifi: ath12k: change WLAN_SCAN_PARAMS_MAX_IE_LEN from 256 to 512 Kang Yang
2024-01-08  8:25 ` Kang Yang [this message]
2024-01-08  8:25 ` [PATCH 07/10] wifi: ath12k: fix broken structure wmi_vdev_create_cmd Kang Yang
2024-01-08  8:25 ` [PATCH 08/10] wifi: ath12k: move peer delete after vdev stop of station for WCN7850 Kang Yang
2024-01-08  8:25 ` [PATCH 09/10] wifi: ath12k: designating channel frequency for ROC scan Kang Yang
2024-01-08  8:25 ` [PATCH 10/10] wifi: ath12k: advertise P2P dev support for WCN7850 Kang Yang
2024-01-08 18:03   ` Jeff Johnson

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=20240108082552.7227-7-quic_kangyang@quicinc.com \
    --to=quic_kangyang@quicinc.com \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).