From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3DBD713D24D; Tue, 23 Jul 2024 18:31:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721759468; cv=none; b=RwkGoVHi2KRM79yObVkqM5ch7KSha4YKMPuTxud9s9fBSC8xxWOVEVQ0Ks8s+Mgmgvm73JCch651WkHJMlFC5SVVMG9YnpRQw6tPHRCo/ptFNSuRU404dEqxh0vpmVxgQkHcfoB2g+ztB/RQYfnK0Vc/dV1Yg9J1EASFuv6kL7M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721759468; c=relaxed/simple; bh=hFkor73tMVIUKvjU0am2wt2GZeLMOd0oPpbXNfLpO88=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qCMIMVT/AQMZA2knFTN74En7oUF+CvyvRdh0OMZEJR51EoXYiOza/Z+9t5GuICbI/KtgnGArYUd5t4TJWNr/+Rny/QiGQDKg8bejftlpOjMnd09npZe3rnMdYpv27NRT+ZlJwBBP2JIWdj1f0Fd1crreekGoiiEO92WFxie4sHE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jDU87J1s; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="jDU87J1s" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD050C4AF0A; Tue, 23 Jul 2024 18:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1721759468; bh=hFkor73tMVIUKvjU0am2wt2GZeLMOd0oPpbXNfLpO88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jDU87J1s5E48jnBZUvPpvQnMXGvzQj6bnutieGN/hqIJkIuB4q0XZ8oVVmXT1eqyX PChqRee7z2/w0QVeT1F7hLRpjIe2wW0rSCTqksgax+2IMZeqmRJB/SyaAPpbFlA0hQ 4zLnmqjnrDFr8zkIAdKHnwP0SanyEZIYqRgTdU48= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ilan Peer , Miri Korenblit , Johannes Berg , Sasha Levin Subject: [PATCH 6.6 020/129] wifi: iwlwifi: mvm: Fix scan abort handling with HW rfkill Date: Tue, 23 Jul 2024 20:22:48 +0200 Message-ID: <20240723180405.566552887@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240723180404.759900207@linuxfoundation.org> References: <20240723180404.759900207@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ilan Peer [ Upstream commit e6dd2936ce7ce94a1915b799f8af8193ec628e87 ] When HW rfkill is toggled to disable the RF, the flow to stop scan is called. When trying to send the command to abort the scan, since HW rfkill is toggled, the command is not sent due to rfkill being asserted, and -ERFKILL is returned from iwl_trans_send_cmd(), but this is silently ignored in iwl_mvm_send_cmd() and thus the scan abort flow continues to wait for scan complete notification and fails. Since it fails, the UID to type mapping is not cleared, and thus a warning is later fired when trying to stop the interface. To fix this, modify the UMAC scan abort flow to force sending the scan abort command even when in rfkill, so stop the FW from accessing the radio etc. Signed-off-by: Ilan Peer Signed-off-by: Miri Korenblit Link: https://msgid.link/20240513132416.8cbe2f8c1a97.Iffe235c12a919dafec88eef399eb1f7bae2c5bdb@changeid Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c index 150beeb9df117..6ef932e6299da 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c @@ -3242,10 +3242,11 @@ static int iwl_mvm_umac_scan_abort(struct iwl_mvm *mvm, int type) ret = iwl_mvm_send_cmd_pdu(mvm, WIDE_ID(IWL_ALWAYS_LONG_GROUP, SCAN_ABORT_UMAC), - 0, sizeof(cmd), &cmd); + CMD_SEND_IN_RFKILL, sizeof(cmd), &cmd); if (!ret) mvm->scan_uid_status[uid] = type << IWL_MVM_SCAN_STOPPING_SHIFT; + IWL_DEBUG_SCAN(mvm, "Scan abort: ret=%d\n", ret); return ret; } -- 2.43.0