Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2155802iof; Tue, 7 Jun 2022 21:37:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwc3ab0jU4G/vkan8CqpPmO1/CPamo0A3aOLW7OsIRnDEiqLiwBqHDL/GFRHwTJ6mvEWwAR X-Received: by 2002:a63:2364:0:b0:3fd:a62d:4033 with SMTP id u36-20020a632364000000b003fda62d4033mr13453675pgm.20.1654663046642; Tue, 07 Jun 2022 21:37:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654663046; cv=none; d=google.com; s=arc-20160816; b=G+VmtHsbM0z0tEvNE6E4Vhjy15dzgqR2iu4LnIvsxnmaVC4j8/Qjeykn5RMvtx+K1B HI3F4bKKXa2TAi6IWr1hyQKSJM3LoJR/DKfLGXaSuaqxMhfUBKxIni5tw5ubpoya9rXz P/iwI5f5PGOMHRmF9ds0BMB6ZWusvfEheJIz5zoJQsFN/zX5Q2cqtQt/E2o6tCvcmxq+ kxsh0iXzMjWJ6Pjx5hhNZCUO7Yub3eE0B7KIPpFQtVxiFO5qo+w5MIfunvUFE03JTk95 qmf1YihpmvW58X3krk9t86Db3rygjPnaz7xg4fMbpWqTgHczROztUggTBUJ22mk/r4MS O5cg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=/iq3x3WwjQzflyze+aPh71J08nh443tVvdA8OwSChPs=; b=Fjgt1ldpdKJvtmvlBC4ujMA73ZirzTm9OsEv7dSMLnmJctColR1oSrdNdf8V+ZetD5 tu437sJGYFt6RDdO7LUS1W/wG0oX96I0O3mVJ6UhbvHsZhlgyBzxpImvLXGHj1tqlwnX 2QDhzaEwKvahByX9C7V8TacmwVGDcX10sKjs1L9KXaYkE8vu+tK+wFi97tkarIPI+8yp 8lImjUWjdchvI96ebMPr2xrOUfgwcULJd7EybvXBvVrr8yMAGlntumePIQO+6RavxaaR hvMJXPfzNO2KFeiET38xJV8rKuhz+OZZTjAkAQny/K8w2/+QRyJHtrcEcrnosQ3DTBhB Ahaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0Iwi3S0+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id v6-20020a62a506000000b0050a6c1711d7si14550175pfm.336.2022.06.07.21.37.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:37:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0Iwi3S0+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 14F30435191; Tue, 7 Jun 2022 21:08:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347963AbiFGRmR (ORCPT + 99 others); Tue, 7 Jun 2022 13:42:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347726AbiFGRa7 (ORCPT ); Tue, 7 Jun 2022 13:30:59 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1B4311AFEB; Tue, 7 Jun 2022 10:28:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 283C6CE0E13; Tue, 7 Jun 2022 17:28:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16F42C385A5; Tue, 7 Jun 2022 17:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654622885; bh=E8QtK/qtvY0B9iXnVuByMA1wdsq/LdsG42DXw/oRoLU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0Iwi3S0+vbZ5ChfLo8KnYHX8nEEbfDOw9ul65PRe+mcarQ1RyWlY0gMhTB2pOWdTW lYaY8BFYEt3D+L5lHE1Q0TSJ5+WU9V8ITghYOkLkgM5p4FsSXk0h17Ie76OiQZYic9 QVWbJiJr9tHtPYe+BIo3aIUUVFjWui5WWhB8B2Vw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Baochen Qiang , Kalle Valo , Sasha Levin Subject: [PATCH 5.10 201/452] ath11k: Dont check arvif->is_started before sending management frames Date: Tue, 7 Jun 2022 19:00:58 +0200 Message-Id: <20220607164914.552880447@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-kernel@vger.kernel.org From: Baochen Qiang [ Upstream commit 355333a217541916576351446b5832fec7930566 ] 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 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220506013614.1580274-3-quic_bqiang@quicinc.com Signed-off-by: Sasha Levin --- 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 b2928a5cf72e..44282aec069d 100644 --- a/drivers/net/wireless/ath/ath11k/mac.c +++ b/drivers/net/wireless/ath/ath11k/mac.c @@ -4008,8 +4008,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", @@ -4025,6 +4025,7 @@ static void ath11k_mgmt_over_wmi_tx_work(struct work_struct *work) arvif->is_started); ieee80211_free_txskb(ar->hw, skb); } + mutex_unlock(&ar->conf_mutex); } } -- 2.35.1