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 D1D9B1AB900; Mon, 17 Jun 2024 13:21:44 +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=1718630504; cv=none; b=QIskNNlu6SD8irw1UNeY9D3IY2b0Yn+arDG9tpB4IAwUQiP7d9HJIG9NV/NqQmkZ9ZWR72ogLMLaUFo6jDFj9LOmGzY2owZnEk72tkHWEV5Qhgwmp45w6IJAvPjzpZS7XVa7ZzjTh74pwhUOrgnRnya6hss+8WihqZwdykVFFhI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718630504; c=relaxed/simple; bh=hwZ3R3SPegwPwUTe/ADMl7SrIfy2lOfsuYBzv72WSvI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qkx2+8XNvpCd82hDMEowVxgId2SQ5XazxuCCR8s8kNmml8IywvfkJaJZylqR/HlEbkrmnSyIXWE8cKKnU/jA7pe6JLnFBFwNhIp03293EFw3n2RGVuMlKJ8z3+xieCwQ++wK19Tf/UXx7JW+sHsiGzAoZw6cBQAos9O9PrRT7E8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H25nMBWn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H25nMBWn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8023DC2BD10; Mon, 17 Jun 2024 13:21:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718630504; bh=hwZ3R3SPegwPwUTe/ADMl7SrIfy2lOfsuYBzv72WSvI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H25nMBWn4B7g01DZFwTxnKgkt6nZkqJjP440sprWBix8BoIlm/BJivU4RkC6iU8J2 ZQzjVsz+M6uC+z+nNlxR8yVvBQ9CflVQoFU1G7PVe9XiKs1TRE66+6t3DdnJAfkRWA bzqQ4ks5YiNPXwaaLIRaY30JaLFigVQGxb8vgHIxvgI9lbvbmYMc6HlH8g4OqX6fPD V/BO92ArHSAzUhdN+2mV/EsxZ0ENC81S+9fycV58kT35dN0dY36Gg48LmeVrD8m3Qr Z41TRN24HtaB8duBKhmQ8gLD/dNsEOEb3UGWeolIW8/82j6tWiGB276e8yzlWy9eov 8zE/jPkdDIsPw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Ilan Peer , Miri Korenblit , Johannes Berg , Sasha Levin , kvalo@kernel.org, ayala.beker@intel.com, gregory.greenman@intel.com, benjamin.berg@intel.com, linux-wireless@vger.kernel.org Subject: [PATCH AUTOSEL 6.9 23/44] wifi: iwlwifi: mvm: Fix scan abort handling with HW rfkill Date: Mon, 17 Jun 2024 09:19:36 -0400 Message-ID: <20240617132046.2587008-23-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240617132046.2587008-1-sashal@kernel.org> References: <20240617132046.2587008-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore X-stable-base: Linux 6.9.5 Content-Transfer-Encoding: 8bit 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 81d4a96a1c2c3..4a1bd626a150b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c @@ -3254,10 +3254,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