Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3609634pxb; Mon, 24 Jan 2022 13:27:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJzHxN1WbHa3/kLpjnkIyEnxJL3mCBJXw3v9r4TYQONesIbDlK9RX0YVvRyLoZJGe4Fsyxus X-Received: by 2002:a05:6a00:1798:b0:4c8:df86:9e15 with SMTP id s24-20020a056a00179800b004c8df869e15mr7733552pfg.72.1643059655133; Mon, 24 Jan 2022 13:27:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643059655; cv=none; d=google.com; s=arc-20160816; b=W6IGClF6mG9AFpzn3zB6MGT01pk8K4tioVJi2YrmMjaTmdTmsHhG3dwYL5FodfDpQB sC4M2Q0luXn+bVSaj6DMybqiOBVW/UV0AyVeXEzGbq7l2Vs8A29yn4i/fJ8QverUPI45 t/VjKaPnqeP9uRm2YDUOfo+n/HV90oSzIgeDkwuAdf2v8UQsJ9vNxdQbAO8JRpP0YVt5 US1oamPVwXh49u+T1TX/2vYs3vBY+qRO4aGBPsZCGQOgjoRqQUzI2g+w8Od1QBXFBlAh pSAZT1QrGOYSoGI2rcPBBm7a37oJo7evLDA6vhnnH0WCmZTzgkux8Vmf96TRIkOhBdzD 6FgA== 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=ervdQhysFXWguFoEUl8kV8xwGpuY5a7oaqlA1wVDRIk=; b=S1GuBcrrix7AJnn5SjNX3Mh6SNDcyAh0Qjt/x7dC7Vwe2GivI1kRa904ELMbaitaxl xc9L/onpOxDGsLU1uclyX0OF+qoiTaUOBpl8aWQANnGNmvhO9pCf3UG5UelSLbC+F1OE kc5ou2FGjm8eFGKoymSdNZNdkY+Jhwmh3FeD/napVeF4m7x1beTgF8O1QmVPcbnEF1Xt KyyLV8b64dKdjlPzKqWwyW/2dCFZM7yd3AaUQIUPKcRbbirHpCDHURp+UAMrmnEIHKBO ihZS7LAmIBXzb8bwG8Uhwd+ZJt+76ByH8bbvh6UePN3rm4CCRsV17nfYjy4CTM11Ue3f 9Tpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FUsTsqmS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si4396374plh.225.2022.01.24.13.27.21; Mon, 24 Jan 2022 13:27:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FUsTsqmS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.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: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1445411AbiAXVDV (ORCPT + 99 others); Mon, 24 Jan 2022 16:03:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1389064AbiAXUkY (ORCPT ); Mon, 24 Jan 2022 15:40:24 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17CF0C04591E; Mon, 24 Jan 2022 11:51:43 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id AC1B86090B; Mon, 24 Jan 2022 19:51:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FE95C340E7; Mon, 24 Jan 2022 19:51:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643053902; bh=0dTjDPuPh42l9Elb2mTzWgKjEFKlEsgebhqLwC16fN0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FUsTsqmSS7Tv98W3Yh3dLaOrqvtE5c70fB3YjCTN6UcIlffoAGAm0y5BJfjwuoHGt w41hBTOQr6wt0TZ15VUeZshlzVYz7o4UZ5W3OTR6pQcrghDU+CyDhQxgSjtAMnBM7n WC4zcAz9t1DR8/rgRlYLfbHnHn6xikI6VX9DauHo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Errera , Luca Coelho , Sasha Levin Subject: [PATCH 5.10 181/563] iwlwifi: mvm: test roc running status bits before removing the sta Date: Mon, 24 Jan 2022 19:39:06 +0100 Message-Id: <20220124184030.678301912@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184024.407936072@linuxfoundation.org> References: <20220124184024.407936072@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Errera [ Upstream commit 998e1aba6e5eb35370eaf30ccc1823426ec11f90 ] In some cases the sta is being removed twice since we do not test the roc aux running before removing it. Start looking at the bit before removing the sta. Signed-off-by: Nathan Errera Fixes: 2c2c3647cde4 ("iwlwifi: mvm: support ADD_STA_CMD_API_S ver 12") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20211219121514.d5376ac6bcb0.Ic5f8470ea60c072bde9d1503e5f528b65e301e20@changeid Signed-off-by: Luca Coelho Signed-off-by: Sasha Levin --- .../net/wireless/intel/iwlwifi/mvm/time-event.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c index 394598b14a173..a633ad5f8ca4e 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c @@ -98,14 +98,13 @@ void iwl_mvm_roc_done_wk(struct work_struct *wk) struct iwl_mvm *mvm = container_of(wk, struct iwl_mvm, roc_done_wk); /* - * Clear the ROC_RUNNING /ROC_AUX_RUNNING status bit. + * Clear the ROC_RUNNING status bit. * This will cause the TX path to drop offchannel transmissions. * That would also be done by mac80211, but it is racy, in particular * in the case that the time event actually completed in the firmware * (which is handled in iwl_mvm_te_handle_notif). */ clear_bit(IWL_MVM_STATUS_ROC_RUNNING, &mvm->status); - clear_bit(IWL_MVM_STATUS_ROC_AUX_RUNNING, &mvm->status); synchronize_net(); @@ -131,9 +130,19 @@ void iwl_mvm_roc_done_wk(struct work_struct *wk) mvmvif = iwl_mvm_vif_from_mac80211(mvm->p2p_device_vif); iwl_mvm_flush_sta(mvm, &mvmvif->bcast_sta, true); } - } else { + } + + /* + * Clear the ROC_AUX_RUNNING status bit. + * This will cause the TX path to drop offchannel transmissions. + * That would also be done by mac80211, but it is racy, in particular + * in the case that the time event actually completed in the firmware + * (which is handled in iwl_mvm_te_handle_notif). + */ + if (test_and_clear_bit(IWL_MVM_STATUS_ROC_AUX_RUNNING, &mvm->status)) { /* do the same in case of hot spot 2.0 */ iwl_mvm_flush_sta(mvm, &mvm->aux_sta, true); + /* In newer version of this command an aux station is added only * in cases of dedicated tx queue and need to be removed in end * of use */ -- 2.34.1