Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1305170lqp; Mon, 15 Apr 2024 02:14:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUvQ/c2kUOJ60hiSb4+0PDPDW9MYpwRze/UW63aJJwkfLejKwxlL01FOoWOISZhm8iX26Pm1HzG3YiYCeo6iTlqFUy2/OwZXNkYLBhjKA== X-Google-Smtp-Source: AGHT+IHL4HUDoVR+1cJGt6LSswhMWC34pacrhhGuuBMMa0By48gCHP7b9PPDbUUVsU4DTnrK6nxg X-Received: by 2002:a05:6a20:814:b0:1a8:367c:9b73 with SMTP id z20-20020a056a20081400b001a8367c9b73mr8375598pza.59.1713172478135; Mon, 15 Apr 2024 02:14:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713172478; cv=pass; d=google.com; s=arc-20160816; b=aMjPdQPJMjlOJMdNa34x3LUiqIx12VCs1AANjhwtnl8lccCNOKLKMKAIH3IaorTWyt 8zJ6ZrAeEpex1dOdf3v3V3zqwCsj6JaHJOu+zu0/xZhjg2yJIavB7J3udqoeRPT3QcnJ s79oE0yFtWcTk894GbirSfRNcgyyoALo4p154IvxM3smO2Y5n4+QZDZbs/3+ePgFj3RZ AluWXVbQYEyUx7lFIJFhkZI+8I+a0qT32kiwV8NlP+FGsoWmuJpFPquOfnfq5kv0no4b dEG/wEni4kQWWNGby+6Zi5CIQq0ppMsg77+YfeziNOAq+yr66odvr7N9UCGZaW7JfS2r b4oA== 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=IzMMqATnqmUxStk8q1x2gJGFQQOKQLbeZRnP3ZoI2oE=; fh=g+3Y9uv4pDRPkMKV6d1r8xi8IY9qiW75WcU571FAbLY=; b=Um/7UDl6r6XixYIlEj/9knYu5O7sA0tNg0MgYbRxtpR8mpDnajhJdbk0LVd5ER3EoR PRkdH943fj2TrHzFrcWeRSWhIffHlDg6U1ZHVz7Q5XcNElipxFeBpGgSZF2O8y5Wcf/c D+xIAIfUuAfgl+9ZjWBRwCDcaCbsWGET9poK2gacFBReY03OKMmN7zXAPHNtSDST2Q+T Q9d+5PrdypVrKVFUS+2Jj7EVPFFPYmBmgQ31NZck7/A4yLYUNSYebLCBhbW4CuhjcxSD ew80gDnFZgk3MUDuwkNqx5hDGmKAbNfPXBpOzZe+gYaAr8DNciQf5mlnXla1vYjtKSi+ xbvg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Gw5rqJz0; 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-6319-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6319-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id a5-20020a17090ad80500b002a5dfde771csi7455500pjv.65.2024.04.15.02.14.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 02:14:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-6319-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Gw5rqJz0; 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-6319-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-6319-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 9B8A7B2585F for ; Mon, 15 Apr 2024 08:55:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 18C923A1B9; Mon, 15 Apr 2024 08:55:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Gw5rqJz0" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (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 9CD534EB39 for ; Mon, 15 Apr 2024 08:55:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713171318; cv=none; b=BpQ5qdCSNCPVGYEEs0B6JnBzpImEL/1riantL5TVnTtP9j/Kpqgp2oXNYJaFHiRpM5H4R9yc/DUP50AUaXRhS1GD6cbwIdJbQm+mrcPYRez2yUxB7hoPVf6yek8EdUt22xI4Rsbz9KguNmhh4AVO74vTBOCnvvRYjIzQ98uc9l4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713171318; c=relaxed/simple; bh=hOtVHfKT997P8Yr7sfmjjIjRzTT93brS+LNASc7QOXQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=MurcIHUhL1+6B4F9p3qC18dToPlkyA/JVS43qSIYyyC/3QeKUd3OCjZvKFrBP2i5xHW5lfWfnpHTKDn13w8lOhqCijiRqsIDwJoP6WQIpAL67MqlA+6Ny9nRQh61iYJeacL2phLJrkZuqGWaFy+rLPlWAFEbDs7GQ1RoFHjFMkc= 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=Gw5rqJz0; arc=none smtp.client-ip=192.198.163.16 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=1713171317; x=1744707317; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hOtVHfKT997P8Yr7sfmjjIjRzTT93brS+LNASc7QOXQ=; b=Gw5rqJz094P638uuRimNiP8jhoy1XmBG+GbTZf33TVdgJVuTYX8KHpuq R5UrKWtfnwU1Zf4H3gNn0BHbTCAbPjDnPnkDUBMqc1UqWtqzEQy/LP7DK tNlVTMq1PKhywVYdYaZpBXEdwV7OTCqU903PddQ8lXacV7wtX4MzRw/p5 UliYyhZrLzoBDJx/RFYBmHIPHsDozZm9sK2DuyS+F6bnUti9FOaMWhsZ5 YvI4uOND2AagnoV4jLIYzX5ykCwXNnCBDpRCPsUNtUk4stUt/FPodmLI+ QVdqmrHIlrylFadjRtf4keyxVXHoQ/llmERyL2NFcb/J/e3AU6KeboS8s g==; X-CSE-ConnectionGUID: pTqVmpyoRwKi2DDTnBJUUw== X-CSE-MsgGUID: Ycnzm8pqQ2KpQW06gSD/XA== X-IronPort-AV: E=McAfee;i="6600,9927,11044"; a="9100632" X-IronPort-AV: E=Sophos;i="6.07,202,1708416000"; d="scan'208";a="9100632" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2024 01:55:17 -0700 X-CSE-ConnectionGUID: wLgx1ELfQ5eaKeIbYV8uBw== X-CSE-MsgGUID: zp4d6z5qQw6vt08t65DBHQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,202,1708416000"; d="scan'208";a="21768096" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2024 01:55:15 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer Subject: [PATCH 11/11] wifi: iwlwifi: mvm: return uid from iwl_mvm_build_scan_cmd Date: Mon, 15 Apr 2024 11:54:44 +0300 Message-Id: <20240415114847.5e2d602b3190.I4c4931021be74a67a869384c8f8ee7463e0c7857@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240415085444.3840884-1-miriam.rachel.korenblit@intel.com> References: <20240415085444.3840884-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 This function is supposed to return a uid on success, and an errno in failure. But it currently returns the return value of the specific cmd version handler, which in turn returns 0 on success and errno otherwise. This means that on success, iwl_mvm_build_scan_cmd will return 0 regardless if the actual uid. Fix this by returning the uid if the handler succeeded. Fixes: 687db6ff5b70 ("iwlwifi: scan: make new scan req versioning flow") Signed-off-by: Miri Korenblit Reviewed-by: Ilan Peer --- 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 f2fe9ee83d68..2f55de11cd52 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c @@ -2831,7 +2831,8 @@ static int iwl_mvm_build_scan_cmd(struct iwl_mvm *mvm, if (ver_handler->version != scan_ver) continue; - return ver_handler->handler(mvm, vif, params, type, uid); + err = ver_handler->handler(mvm, vif, params, type, uid); + return err ? : uid; } err = iwl_mvm_scan_umac(mvm, vif, params, type, uid); -- 2.34.1