Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2554303iob; Fri, 6 May 2022 05:39:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFTnZEWQIbfJPH1S5iAEeLO2cAQJQRPqUF6K8tJyp16gMGSu6mfEf/V2pDm86hGLZvl8nm X-Received: by 2002:a17:903:2287:b0:15e:99b4:9b0a with SMTP id b7-20020a170903228700b0015e99b49b0amr3454600plh.43.1651840766297; Fri, 06 May 2022 05:39:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651840766; cv=none; d=google.com; s=arc-20160816; b=BrXp11pk0OAxC6JAng8HF4Rk2FXAAb4joM7WYz4fTEtlQYa8lKZOVW+tRbCEQEi4Mr 3jLEVNw6eTQmJOvM7uvGK+tMFqHSk77NeakHYIbiZ+/xN6/PSL8+71ScJ5LzHND3YDym MaH0+OrRRPgeWH+YaO0TP+pknwWPDfxu4NB8stcD11rr7+ST9Mq5o4g575+Jul8qOj93 Mh2Tsn3q46VIIOoFJ6pJRPFkh8XBoZShFz9E++W1e7fRIadRTKVLtvu5wKFutNDkf84L UEs9uCahqPadRq+YE8KwnMYahW70Y47QKDISNoMa5oTrUGcGYVNo+qJMQ9ayNqMkE4rO l+mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pq9AoO2HdkTPAhbDQ8F6/vYfYQzav5wkkjwhVZBACzE=; b=yTqozAqiS4m8r7l/f9eP1vb321YCvJcLG5rYJLqIVpRTUTvrV7U83z0Eys4C4qzlzk C2Y8RCv2WtN3TSyV4jU7biKaHhBxaxaVdXhi/uQTLxIW4yIccRHpKIdF3P8AynGoHef2 ETnIvBtu1a59X03Rbk31XMmmXWV2N9+1ndpfO7LftR2fzZNBxd+JIDW8ZPUL2JcLOr1Z EXrF60FxsBCTshE5ZXs63QdeZET5nKisQQ73Dge/mdieGsvD51hMvh0Ut8iZe0T3tfE0 jaA38sdAJ1OkfS0U9SmADmCW9XKuc5hTFtbBCjslVV1uKNdOisIwnhOeeG9L/gu3Zocn q1Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=bjV0Of6v; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oj12-20020a17090b4d8c00b001cb7af1047esi5174450pjb.100.2022.05.06.05.39.12; Fri, 06 May 2022 05:39:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=bjV0Of6v; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1387960AbiEFBkL (ORCPT + 68 others); Thu, 5 May 2022 21:40:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59122 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1381611AbiEFBkJ (ORCPT ); Thu, 5 May 2022 21:40:09 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B29F75DBE3 for ; Thu, 5 May 2022 18:36:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1651800988; x=1683336988; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pq9AoO2HdkTPAhbDQ8F6/vYfYQzav5wkkjwhVZBACzE=; b=bjV0Of6vKcg/oFN/hXG79JoIOY4gkOXkR7RtfXbCwEYrX7no5Wkoc6U3 YtSHiaqupuB75k76h4ctbM28vSHgdbqY7oUAJ/WtHw7GxGVPP9tZWXFmi RHR2bBtg4ARWjeyyOY5wbOoIYuTc25VQSMHSOF3mDNbrq6Tf9dyvqBvgV g=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 05 May 2022 18:36:28 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 18:36:28 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 5 May 2022 18:36:28 -0700 Received: from bqiang-Celadon-RN.qca.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Thu, 5 May 2022 18:36:26 -0700 From: Baochen Qiang To: CC: Subject: [PATCH v2 2/3] ath11k: Don't check arvif->is_started before sending management frames Date: Fri, 6 May 2022 09:36:13 +0800 Message-ID: <20220506013614.1580274-3-quic_bqiang@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220506013614.1580274-1-quic_bqiang@quicinc.com> References: <20220506013614.1580274-1-quic_bqiang@quicinc.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Commit 66307ca04057 ("ath11k: fix mgmt_tx_wmi cmd sent to FW for deleted vdev") wants both of below two conditions are true before sending management frames: 1: ar->allocated_vdev_map & (1LL << arvif->vdev_id) 2: arvif->is_started Actually the second one is not necessary because with the first one we can make sure the vdev is present. Also use ar->conf_mutex to synchronize vdev delete and mgmt. TX. This issue is found in case of Passpoint scenario where ath11k needs to send action frames before vdev is started. Fix it by removing the second condition. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Fixes: 66307ca04057 ("ath11k: fix mgmt_tx_wmi cmd sent to FW for deleted vdev") Signed-off-by: Baochen Qiang --- v2: 1. s/cause/because in commit log drivers/net/wireless/ath/ath11k/mac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c index 6e6b8562b481..db6a38b98765 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -5551,8 +5551,8 @@ static void ath11k_mgmt_over_wmi_tx_work(struct work_struct *work) } arvif = ath11k_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 = ath11k_mac_mgmt_tx_wmi(ar, arvif, skb); if (ret) { ath11k_warn(ar->ab, "failed to tx mgmt frame, vdev_id %d :%d\n", @@ -5570,6 +5570,7 @@ static void ath11k_mgmt_over_wmi_tx_work(struct work_struct *work) arvif->is_started); ath11k_mgmt_over_wmi_tx_drop(ar, skb); } + mutex_unlock(&ar->conf_mutex); } } -- 2.25.1