Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3663523pxb; Mon, 24 Jan 2022 14:47:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJ5Y1mmqZyFity5dYUVGhQMy0kS/T2gY5SHBp+QWlxxc/yCl3dti42iOUMcTxNucW1UyJ3 X-Received: by 2002:a17:902:ced2:b0:14b:528d:375a with SMTP id d18-20020a170902ced200b0014b528d375amr6249212plg.106.1643064468424; Mon, 24 Jan 2022 14:47:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643064468; cv=none; d=google.com; s=arc-20160816; b=eUZ2ly+qRpLsPZLikYFsO3+0aGuiFMJNViKS2Mjjb7wIj7b7XabRHVE2DkQH3U/3+P Hpsx8tiEMCJaQraABt1z+jiaafwb0UurnN2StQNSNZ+6fEdmOk+rPI2ItWRsrW8jtlm+ zEm9QUtQ9AlTcIaFPhKQl982JyKnd3ycSC7CGLyPViVdyiBZOVKdDL5K4HdcucwEdEaa vPuGNyZtqt2tADhbA9Z4ZR2hrqw3LdrhoT3gzFr3yqNb2umhqqN1UpHEs+UgJS+wA2V8 LErm06xgc3anBDRhoDVLHaOyUcudr5zQTpGHX+0IH3LA9aliAW93mEi4IOXAeiZIfJLb XVgg== 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=YL+/7duIVtjKfLRb80oRGOuJ5sHN1xHFby7Lo/G+Zj8=; b=Jz1qwcNkOETdcY4+WYo/Yn3CRgbhpdl14FYsZJCTSNh9AdR4zOCEZ35iKUz/fjbdC0 yxMOUy+qH5Kk1DbIwuf+CGqhf358hEj0pp/uKXJf+ghtDy9Oho25Z2ziYBsLhgOs8Ytf Gs9s6Kxl+HuNVZpJ6jWlcxjISQ82dMA9+TVRfqT8hgBZE+mq2GZmbBn+9pN1VM5ywvGI OiL1X59atr1hBUHGxf+EbQB34nEUpE/UYy0TBxHKdx2HC7kPqXilWfUCB+hO+ug7xy/2 uc9iyi33tO29jhZWlpt0RpOhlz6nTTHb4wh+Qg5oR/7LgGVzJk2UoHhpSdSgMUp7Q8ys pL5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Bti/cxbv"; 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 s29si15552136pfg.76.2022.01.24.14.47.29; Mon, 24 Jan 2022 14:47:48 -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="Bti/cxbv"; 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 S1837974AbiAXWpm (ORCPT + 99 others); Mon, 24 Jan 2022 17:45:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377400AbiAXVha (ORCPT ); Mon, 24 Jan 2022 16:37:30 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D766DC0BD11D; Mon, 24 Jan 2022 12:23:24 -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 ams.source.kernel.org (Postfix) with ESMTPS id 9665CB8122D; Mon, 24 Jan 2022 20:23:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9DF0C340E5; Mon, 24 Jan 2022 20:23:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055802; bh=SFpaN1Q+FQLxVudgmI3DnJry1PBPmM+zzf/zOsrDouM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bti/cxbvA0uOxw8Gt089m+vggJkFsy/aPwAW6jnldkg42U4ngJy5IzPO5Ib+f9GR3 j6BdtE78Us5vLIBiT3UsKiXN7QK4c3Sci6geX5RJrTWklTDXRoZOn6taLG2dXZ8alt mtlgPCgY4gb/Dzbwnh6Lmj2SIfcYg2syiDya7fg0= 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.15 271/846] iwlwifi: mvm: test roc running status bits before removing the sta Date: Mon, 24 Jan 2022 19:36:28 +0100 Message-Id: <20220124184110.278730882@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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 e91f8e889df70..f93f15357a3f8 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c @@ -49,14 +49,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(); @@ -82,9 +81,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