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 D155D13D8AE; Tue, 18 Jun 2024 12:37:09 +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=1718714229; cv=none; b=GEPl1grhrsyZl6EKo91FrEaJacNOJ7VGLnMwTLVWKB6maQWYNW1LyY8Ngy12tpgSQ+s4tu4i3TADMu6CTAPVhcATHtpoLT44URGETmjY26/ZkNa8krD5Yi44bI61IZsNuulkWxg1sJq/3Y4hJWYtAhU+iSfrGAg5gECNBmQ4d4w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718714229; c=relaxed/simple; bh=hwZ3R3SPegwPwUTe/ADMl7SrIfy2lOfsuYBzv72WSvI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZGv+/jmp1s/QR8pE5edgoUTs7wyRM7O2KASKknqTJcP9Q0hHOPmADIePGqDb38iZ2rTeZL6IDETzeVwEK6whqL00Ar/Lp+1t+lfH8T8yZ0vGYcUzyD/iIuvX6crxD2TrZdnp/uIE57sktZeuRXJNjPgyh6UOxFM+/IzFrk9u7tE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Bf5AbcW2; 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="Bf5AbcW2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8AB9FC32786; Tue, 18 Jun 2024 12:37:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718714229; bh=hwZ3R3SPegwPwUTe/ADMl7SrIfy2lOfsuYBzv72WSvI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bf5AbcW2wIIWAUxqHN08Borh8SnL+4xQhGG9Q4g6INt6ykaCOjb3ikidKdjiJI0FF ChWyyGeMBk5Z/P2ZbFUHoFTTJhG7OBmhj3G7g71DEIbNK085wuxUzBErBWfillKee2 gaEJlkUDPAxo1COHiFeI8RcnAhe6AtQg6WuAUZbFU6VbpMbBvSqUYC5scEGwnhH5n3 SgPgjqFXEoaPhZbbGFzw8+tEPKMPPXjRylZcWIfmmHat01F7QN4PMpuJQFMJKj1EBV pDt1/fLDXhU1IoUh/ZMoDmIqjMSnkjQMHI+i4y2ede5khAoYl4XL5PaAIwUXa4rI0f DFlF2OIqR02Jg== 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: Tue, 18 Jun 2024 08:35:04 -0400 Message-ID: <20240618123611.3301370-23-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240618123611.3301370-1-sashal@kernel.org> References: <20240618123611.3301370-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