Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1219280lqh; Mon, 6 May 2024 00:05:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVwFoT4EEVQNtJhULWmU0yg6raG+fTh7NSNwMWyoG+NAyJsI/7LjpYlVa5sf4BZe9AUuYiQHgWkp4Q4B4o+jNoue7CkbSgJ+n8H4RIx6A== X-Google-Smtp-Source: AGHT+IFsKRgECIdzbRY61BMZOOl/OazjPzXnXvDhboKqzIzoy9UNHTOuFczu5/s1MVj2LvMG8rw6 X-Received: by 2002:a17:902:dac7:b0:1ec:c9e0:c749 with SMTP id q7-20020a170902dac700b001ecc9e0c749mr13441214plx.48.1714979121497; Mon, 06 May 2024 00:05:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714979121; cv=pass; d=google.com; s=arc-20160816; b=TMLEQD7rqG+js0fftDJDG8Ic8XTWqEHUNFtvAsQWwRv1whZDIOIH1pnWUe9+DKHH2b fwysncXz70CCqN1wHMtR9yZ7aiRRaUtBBjlUCvr1LIcgk/LNRq5nrgPgqjk23OWPRmL1 b7QlWP7lfdcTyLLOpw7ZZQD9EkCxpO/gI0WpdtDhgzYvC0ftWVI7CMbDZ36uxc4LnjDt yeji78EJovr5Zp9XomqspsSEAAkq8uD1nQzHsRx0OyvOH7Mf2baS6n9s/E4Bj4rvUDaz HiIjTsHd7b6gqBxf6/QKJpgYTd3hFP/9JfZ4Og4uqfy+ezus5gdSMV3o0UtLT84UqWrp +ZhQ== 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=lcqLRIcOFS1GiyMEYynfZ0WpaPgHxxvl2WLI4hxf2O8=; fh=TquNsOiV+zNY1csTpltVB6A9QFW5SbuNs6JlqcKCQkw=; b=H5qfgDHLd0fMsvefHm4LlDlaLWTK5joGOU6UoaF/L3S2XwTtGl9nh1+StmGpTGol5G h+Cj/1ibpNAVeLKKgOZ+QWXYyhANf8ZutANFwcttoU8J1USpz19Do7GlX+f3rT09Z9am YvQW5Sa47HJBwzDwfCvcgyg+Dl/Nq1z7LbgIRCKRGCrFTzW/7T38Qekw6k7tKKkFzTg3 P9YJLob7Dh+AbP8Swp5XG5/jR46K0nJU6fDHHHIW4Oeh/xcIy1lfuVRsuKNb0HVRCmVI LtzI/xWE7XrP2blDlNd81kKtHcsGOPjQhPSHq+cNvTS+CqfJR7zCqYO9hvIiRK2UDfQI F17Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BEnuNCKP; 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-7198-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7198-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. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id k2-20020a170902d58200b001e215883ff4si7959592plh.516.2024.05.06.00.05.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 00:05:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7198-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BEnuNCKP; 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-7198-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7198-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 4D414B2127D for ; Mon, 6 May 2024 07:04:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1FEBC4F20E; Mon, 6 May 2024 07:04:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BEnuNCKP" 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 2698D4F88E for ; Mon, 6 May 2024 07:04:29 +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=1714979072; cv=none; b=CriG9jHhk5InVgw0PwjHBgjnveXYDRroAlO+UJlzuDtHbFDyGOh5GgMP6V/30BCssgcARg3ire5aDZvfWjJnT6MFuTJ21yiYgbtH1ASZb10oKvKp0E0UwifpXpH64nOkHPmkRF2UulORUj9X7STLpCo11rTj9MAc9ua8uCxy2v0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714979072; c=relaxed/simple; bh=ZLoTURKTxY74alA2+UqptR0K2hc7FGiSBgbZayJb6aA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Tw9mlqZhFShjZ9KAD8dfrN14j8OuOI8WhBcN23KcEUL2FxqUtT8fwSL8Gp3lhGul8ZURv1TxIeQ5BW/bXZ2Pjmn4yBFaAtRv9zW3iu9zrSxrDVYtEhIyiMMh+BLZ9ovP1QBVSEfxa4ZmRGQ9Hd7drkWr6w671x6weINxWa/GX24= 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=BEnuNCKP; 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=1714979071; x=1746515071; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZLoTURKTxY74alA2+UqptR0K2hc7FGiSBgbZayJb6aA=; b=BEnuNCKPISwHQgFufbUOnLYF7Q76yOwqX6SCJIa9RrKOc1qzrA+xbGds ZYFU4XYGdckyInHA6EZHast9X1PBVpIOLgnMOjZZRDmFRlXxWc95WmlS+ DBjIOcsWwhtVQu1dXbj3/eIKWP9hqPRQiLSGCJRGmHcWDVOEUf4iwrNHW Ke+8FT0cGslfKx4YPJme4b3lrxNXBLtkeFKNOOZHN/8v2yQPFVd1esVnL J7OtArEpeRKbHogCpXQis27jhaLwNdIFTPtXxep2R8CD01MaO9utKIWsE hG5vfO5LvFA48Ial/f9fyqv2JGJUFsmTXzQLcGpHoknF3qN9DmnZGUrfZ A==; X-CSE-ConnectionGUID: +J7JuTGkQNWo3v6ee119Kg== X-CSE-MsgGUID: dFJKzMLnTFa2XLExJWWMjA== X-IronPort-AV: E=McAfee;i="6600,9927,11064"; a="10638136" X-IronPort-AV: E=Sophos;i="6.07,257,1708416000"; d="scan'208";a="10638136" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2024 00:04:30 -0700 X-CSE-ConnectionGUID: pJU3m0HMS9SQfkX+1PQmZg== X-CSE-MsgGUID: UpRc3/37TxuJu8U2MK6AOw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,257,1708416000"; d="scan'208";a="59264837" Received: from weis0040.iil.intel.com ([10.12.217.108]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2024 00:04:28 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 01/15] wifi: iwlwifi: mvm: use already determined cmd_id Date: Mon, 6 May 2024 10:04:05 +0300 Message-Id: <20240506095953.f894ede03b26.I18f03c272b1c0807767f2713f3ffbb2941c57d9b@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240506070419.1821330-1-miriam.rachel.korenblit@intel.com> References: <20240506070419.1821330-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: Johannes Berg In iwl_mvm_rs_fw_rate_init() we have a variable cmd_id that holds the command ID, so we can just use that instead of the various calculations of it. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c index 00860feefa7a..3ba62fb2c85e 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c @@ -654,10 +654,7 @@ void iwl_mvm_rs_fw_rate_init(struct iwl_mvm *mvm, */ sta->deflink.agg.max_amsdu_len = max_amsdu_len; - cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, - WIDE_ID(DATA_PATH_GROUP, - TLC_MNG_CONFIG_CMD), - 0); + cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, 0); IWL_DEBUG_RATE(mvm, "TLC CONFIG CMD, sta_id=%d, max_ch_width=%d, mode=%d\n", cfg_cmd.sta_id, cfg_cmd.max_ch_width, cfg_cmd.mode); IWL_DEBUG_RATE(mvm, "TLC CONFIG CMD, chains=0x%X, ch_wid_supp=%d, flags=0x%X\n", @@ -693,9 +690,7 @@ void iwl_mvm_rs_fw_rate_init(struct iwl_mvm *mvm, u16 cmd_size = sizeof(cfg_cmd_v3); /* In old versions of the API the struct is 4 bytes smaller */ - if (iwl_fw_lookup_cmd_ver(mvm->fw, - WIDE_ID(DATA_PATH_GROUP, - TLC_MNG_CONFIG_CMD), 0) < 3) + if (iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, 0) < 3) cmd_size -= 4; ret = iwl_mvm_send_cmd_pdu(mvm, cmd_id, CMD_ASYNC, cmd_size, -- 2.34.1