Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1497851lqo; Sun, 12 May 2024 05:26:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXqkz/UVkwUfwFmj40j3uyKWvpJxHv/X2NxggJgYTOAnKvLlR5OkDjM2XSHrX49C6X50SMvJbdbJ3zLqIPHV7batTQz9Z+fqjvPksOx8g== X-Google-Smtp-Source: AGHT+IEk/6IoD6OXme3Y8334kCNuDIINp74ZVeP+q58nI5GXtf7wBtGJ7YoFxm3UlQPM8Mi7yCP4 X-Received: by 2002:a17:907:7b8a:b0:a59:9b8e:aa61 with SMTP id a640c23a62f3a-a5a2d5c9303mr578551366b.35.1715516781057; Sun, 12 May 2024 05:26:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715516781; cv=pass; d=google.com; s=arc-20160816; b=MNU7MbaM31eufULAxfeUwTmWGMQ0L5xprIHDZtDY2iW8P32WNZG/Bm3CxkWT2jG+HU qlM+xum2rTQslkdYUoclFSfoBo8Ef/U0fFeCgeIPTxdg8OuROankMxbCFUJclzyAHZvG kJZkTcvHgiHQq73maJWbn3pOq7ltaXRS9di2zWkYs1hANrpvFtIbA8Y9/a7Pjh2x/smb fmBE8m1UDy1GfX9ld4FXoCL9glq3vmVs0FggoCYr9GfKZqNNgmPdHrQb8+vfpWKOPkVN 2KU9aUJR7OQgEni5vHQP0xbHIQeJ7xQlQ4YzXEh3Equ5UyGQbn2wBVsYloVQM/jrniHr wUmA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=2l5Mw1XnJinorX5nu46RRI3avOxljJdOoM2SQZq0sjs=; fh=g+3Y9uv4pDRPkMKV6d1r8xi8IY9qiW75WcU571FAbLY=; b=HyC9rX3LHjrrkyJVyuOEgzVjhjn69i8Dwx7WNQbi3tTBsYnPaH97sRzmhfABQHn+AY TS9oH4VCeKQJXxy2OYBZEOGteig1/Qibhz73rGwfac7bHBzzD3HCP/U1zyQz4DzYhPfx yc8r8jQLhdls7zxfETOYZyYNfYWhcuMXZsccOGsIHjdsyUAooSMvaR3ljMc0hR4sBw8k 5Pf9h9AUKOncBZuB/j+xqxzBeXk0u/PPqHOhMKT3/kkDuPWJeMY5kN5rYBzBPAPJOWt/ uGxVfnkaA/1GIz8ypRM+frldqjuSLexj7dMQYLTA5EjpSMvpmWXWKSPSWSODMka96XHe FvFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OACJmeTL; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-7548-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7548-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a1797b9adsi405472966b.221.2024.05.12.05.26.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 05:26:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7548-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OACJmeTL; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-7548-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7548-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C6C841F2204E for ; Sun, 12 May 2024 12:26:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 472BA46521; Sun, 12 May 2024 12:25:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="OACJmeTL" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 AC02D4597A for ; Sun, 12 May 2024 12:25:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715516736; cv=none; b=ZO3tKAdDb6NbXdbVymr5BRK5fvQ2jQ8YBTYDYTrGJI9WoaKwoKoggFf4uYNm31SVw+tCXpsghXNFPeajzJ6cfl9auNzDGDofaH15d0+4HV2Y95sNOqDaJ/dT+tzU8stl4PRHm+Ej6Aa0DEbP2It3hnCZkYWDAc+59MeGnoL+Lnw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715516736; c=relaxed/simple; bh=Q4UZw9Zb52Y/ZVLrGrtXnh9o6xje+qFBOhfeohxmnoA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BRQH/FgErkoT537/ehlhU/C6vzl6TDwoHJku7HhWDBYEVCjOKPI/JfyubEkNaCqC/C01E4Ba+aWy8eBE/MhL/ja4PbJwF1vgJBmBUwuvMp3qWCbRZqRIa/5KLKRrDQ0GsLqdh8x7NAqxgZ4Fze8g5j750JvLATOKVF/TfcS+wvI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=OACJmeTL; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715516734; x=1747052734; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Q4UZw9Zb52Y/ZVLrGrtXnh9o6xje+qFBOhfeohxmnoA=; b=OACJmeTLCQrCnAByZklD7YAvEah1ngbuoHZBb3i5zG0t3QwMtvcSe3Kc qOEOqL//P85QVpKNjU3++deDsG+Ur0FVh8N441Uf8YpwELjsBEsBbZEOU jwoiS2aAWkFTwpH9Z0rEIXTGqfOlW1qva3FvV+gDYvDmrEPwHmJD/70YH TqWht4IE5qXL9CW8zFzeaEVRN1oLrnEe2UKYCTtOpKJNevk4GXFT+wNC8 9OvX5Uu+T+KomZ4J7j6h8pHK2p4KAzknBtgGQ/PHCw7XZ+v70HpbTM8c5 TXK1GKJ+VIa206Fw/BB8jO3/Me/3NwAXAhPc3RMcqTp+5WSoHZaGxgJST w==; X-CSE-ConnectionGUID: nki3l3AVQYS5YC/0vmeEtw== X-CSE-MsgGUID: CQGDY78rTI6sXX8LoF0R3g== X-IronPort-AV: E=McAfee;i="6600,9927,11071"; a="11397222" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11397222" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2024 05:25:34 -0700 X-CSE-ConnectionGUID: Q3jbceNVSiCvbl0jUW8kfw== X-CSE-MsgGUID: IeZt3YKLTAmpAiAHaDPFTA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34761353" Received: from weis0040.iil.intel.com ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2024 05:25:33 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer Subject: [PATCH 13/14] wifi: iwlwifi: mvm: Fix scan abort handling with HW rfkill Date: Sun, 12 May 2024 15:25:06 +0300 Message-Id: <20240512152312.64bd170ce624.Iffe235c12a919dafec88eef399eb1f7bae2c5bdb@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512122507.3812527-1-miriam.rachel.korenblit@intel.com> References: <20240512122507.3812527-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited Content-Transfer-Encoding: 8bit From: Ilan Peer 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 --- 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 9be812a40fd9..23a860055354 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c @@ -3322,10 +3322,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.34.1