Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp655331rdb; Tue, 23 Jan 2024 10:27:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJ1hSB1VwRFqUK1uIsqGpmudp2kvM1hPQvOg69efua8iAALBCa8pFNyskEtUL8so2rpMkP X-Received: by 2002:a05:651c:b29:b0:2cc:e86c:7fc2 with SMTP id b41-20020a05651c0b2900b002cce86c7fc2mr75703ljr.153.1706034465965; Tue, 23 Jan 2024 10:27:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706034465; cv=pass; d=google.com; s=arc-20160816; b=U0O228m2z/8k4DXnWbo6U6wsUY/pycfnR5hX47FMq+xLA/JJL40ez2Zx/oBJFWP9SR cFetmg8UWjOSVf1gItyhuomg2C13fZg66N4rj9clghcGcUmoRNOJl43KvaL4Hur+9ccj vFyPVhsJxwGli4OWyHaVSHMVsNXqnMZr12t6NRNhD5+xFrweldX5nl9O4Jn95SCw5/aw LPfRcELIVwNCf01kZV7YNZwtvWQyf4h26yKJqpBguupjiXIHGazdoXfo3WmCd6xwsHgs Y8fICMiQrSK51IZp7/3vffUwHxGKLZ96b0ZSK6jTmQoRZsxjNfnjzZ1iTiq5RV/YhDp9 ncZw== 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=83QQcE1tlypBqwpQFgfGdH13nzjqhsmlOLHurx+X0fw=; fh=Y2IfAqdjkYQAx7XZcGq/8JceY1atOOwfX771vvMvH7o=; b=ANtf5dzZi4iSbaLN6mlQUobQNMn2Y/GxdTExdXRVG3ZDL6gz0uLgVCDHnWm3S2xNps H53a7aqLg/oPnEsrwW0x5x9VutTOwLRzmMyYD/Q3x6RRHpRNKgaCr4O5Ey8OtCBhf9E9 pMAeQbUxLA7eG1fPqUrJqT/U4Ld33uqPpeajQTqUz7XtpbHGTHVT9vo8y3S3MPTDuEmS w/UUPMuByNfqB/copc4B1dDekSB/xokoKacoyaLxkFDEB5AEQaS2x7UKCI9WIg+C24gn WOlsfQJGSGekZAGObK8ydXuF5I0MzCtrLM34gv8gvtkpyn4M5B3DLejPalBk31NwOsho vegQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fQpyFk3f; 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-2401-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2401-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. [147.75.80.249]) by mx.google.com with ESMTPS id h39-20020a0564020ea700b0054cc9a483easi12890166eda.328.2024.01.23.10.27.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 10:27:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-2401-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=fQpyFk3f; 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-2401-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-2401-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 04C4B1F2CB5F for ; Tue, 23 Jan 2024 18:09:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D882381AC7; Tue, 23 Jan 2024 18:09:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fQpyFk3f" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 3988661674 for ; Tue, 23 Jan 2024 18:08:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706033340; cv=none; b=CbGBxiFOF8WCtn/WdUu1zVY+NsJMjms1l7wl950rAG9InHPlNgeFXrUIXdsSblO0yadizXLA8FoSAlDs2irIvCPLb1ZlQPUrtL7jj+puJ77Z89K9K9DO2TNBDDP2WLGMT+56P1aFLvOfiURwVNTKxdv5bl3s2FH9+4WdxisF32U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706033340; c=relaxed/simple; bh=YOed2LS5Dvtgn5FV/bP2TztOlDu+WRV1nWaE/Eb3NgU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=g7GGuYl7A+uItIJaKlUGPk2fjnmSnJnWA5Kab8ljpIcLa6iaZPctxUzNrRws66644GmXomKWgdlkt3KyK3SyEr8a6HRkllik1a6Y15O+KhFLbvcQoSrNwcuupJZ+pUgwlR1Wi32htDwizdLpTVC+oCBXR1UnV23a6REUPi8yhGk= 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=fQpyFk3f; arc=none smtp.client-ip=192.198.163.13 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=1706033339; x=1737569339; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YOed2LS5Dvtgn5FV/bP2TztOlDu+WRV1nWaE/Eb3NgU=; b=fQpyFk3fQt+iZW1CDuUeoJnTR1ItPhVXU22Jl1h5vFwich6SWtY4Baq7 VYJgl+kRq4BLBCRzI7QEvlwGzIL3qZUhLWH9iqTQS5olD4sebm3eleBE+ TdMK0Ayiod+/mQkEQfmzNUwrT8r2u+TUCgNEGc4J9VzpjsvqS+J/Fq6kv fm6fqVOz5do7ywNjhBpB+m0fDhPhQ9RR2Nii+iu0pQmcpHEmr4zdEF+IG epNsQekclrWkarOFgNWpvGLswwzk0kKxOw37+AUh4Io3oFBaTs7ZI91Z4 cNP920QGnSYwMxJkJvLVdaCCjlkIOvhvcdG0rJjWbzHGm92ILgZwIDvZj A==; X-IronPort-AV: E=McAfee;i="6600,9927,10962"; a="501791" X-IronPort-AV: E=Sophos;i="6.05,215,1701158400"; d="scan'208";a="501791" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2024 10:08:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,215,1701158400"; d="scan'208";a="1666526" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by ORVIESA003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2024 10:08:57 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 06/15] wifi: iwlwifi: mvm: limit EHT 320 MHz MCS for STEP URM Date: Tue, 23 Jan 2024 20:08:14 +0200 Message-Id: <20240123200528.02bae683b7fc.Id5efbb71d45da02c8c4e211d20396637ddd44da8@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240123180823.2441162-1-miriam.rachel.korenblit@intel.com> References: <20240123180823.2441162-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 If the STEP (the interface between MAC and PHY) is in URM (a lower speed mode) then we cannot use 320 MHz MCS > 9. Therefore, limit the MCS in our capabilities in this case. Note that this also limits the TX/rate scaling since that takes both TX and RX capabilities into account. Signed-off-by: Johannes Berg Reviewed-by: Gregory Greenman Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 5 +++++ drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 3 +++ drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 4 +++- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index 67c7cda073e8..8e6ce484db87 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -1061,6 +1061,11 @@ iwl_nvm_fixup_sband_iftd(struct iwl_trans *trans, ~IEEE80211_HE_PHY_CAP7_STBC_RX_ABOVE_80MHZ; } + if (trans->step_urm) { + iftype_data->eht_cap.eht_mcs_nss_supp.bw._320.rx_tx_mcs11_max_nss = 0; + iftype_data->eht_cap.eht_mcs_nss_supp.bw._320.rx_tx_mcs13_max_nss = 0; + } + if (trans->no_160) iftype_data->he_cap.he_cap_elem.phy_cap_info[0] &= ~IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G; diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h index dd32c287b983..c1c7d44f421b 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h @@ -374,6 +374,9 @@ enum { #define CNVR_SCU_SD_REGS_SD_REG_ACTIVE_VDIG_MIRROR 0xA29938 #define CNVI_SCU_SEQ_DATA_DW9 0xA27488 +#define CNVI_PMU_STEP_FLOW 0xA2D588 +#define CNVI_PMU_STEP_FLOW_FORCE_URM BIT(2) + #define PREG_AUX_BUS_WPROT_0 0xA04CC0 /* device family 9000 WPROT register */ diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h index 9867e29a56ff..fccd05b46df5 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h @@ -1070,6 +1070,7 @@ struct iwl_trans_txqs { * @invalid_tx_cmd: invalid TX command buffer * @reduced_cap_sku: reduced capability supported SKU * @no_160: device not supporting 160Mhz + * @step_urm: STEP is in URM, no support for MCS>9 in 320 MHz */ struct iwl_trans { bool csme_own; @@ -1093,7 +1094,8 @@ struct iwl_trans { char hw_id_str[52]; u32 sku_id[3]; bool reduced_cap_sku; - u8 no_160; + u8 no_160:1, step_urm:1; + u8 rx_mpdu_cmd, rx_mpdu_cmd_hdr_size; bool pm_support; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 1252084662c6..b6acf4ade552 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -677,6 +677,11 @@ static int iwl_run_unified_mvm_ucode(struct iwl_mvm *mvm) iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_AFTER_ALIVE, NULL); + if (mvm->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_BZ) + mvm->trans->step_urm = !!(iwl_read_umac_prph(mvm->trans, + CNVI_PMU_STEP_FLOW) & + CNVI_PMU_STEP_FLOW_FORCE_URM); + /* Send init config command to mark that we are sending NVM access * commands */ -- 2.34.1