From patchwork Fri May 9 10:44:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889065 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 3E3FC21ADA3 for ; Fri, 9 May 2025 10:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787512; cv=none; b=KmfSlN2v3C9iruKgusuNfnSE9/znl06ymn+2jdwCWp83H+2UGehSCUGeythl7jMkrfrpesKZl00gw1N90DxlwkmNPN4AmE0dA2DhVSPEVmlozNx/oZ+RRZYMuPLps0u4DFRiiPgxPrSieabnbGS8txUTA1NN8N3T3Qzb1kAyUXM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787512; c=relaxed/simple; bh=6WVip0+aCcEFZBxFTAGC0i6HbWeAMuE8uPplTLJ019Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=a052aOAqWyein9WiAZuUJ/Wy3aKHugPvCwyw4CJ4jGVkArTYF4nasGatDvI6NhQaYsXtXK/QUlmwWaDv4v+WTmYTMquNuhS/0V8uHdQ4Xp9aDBIIexfGstzKlaTbve5Tx9zH8TKg66qLi6sjxtP7VAaMiEZUOTlJiLLHcgRRuSM= 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=aQS4YhUN; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="aQS4YhUN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787510; x=1778323510; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6WVip0+aCcEFZBxFTAGC0i6HbWeAMuE8uPplTLJ019Y=; b=aQS4YhUNl6zSVgzWS5br+VAcCiKeXgpSJ+EV6cxhGEeDPgX3G7V2HBlk 6dqg9myep4eppWD2JMwYltdDkDMB0tGyKqNZAPL8r3fuvXgIB1FhWNfC1 3QEMczREwg1oeRurYcMSI+gbNJAF+weCRcoCRphFaWY13lcgO4vUthlJ1 i9N9coQJQabsnzAOW45vxFhM0ehmZwCikodT4XBH0nxbO94JidudLiVUU a0o1H9zHVlcZ8AAiosK5aqcHypIsaEfOrSWXWieSPyZTjDmLXxMBSlOvX APOnqleZp1aFEX/ejrgXnmNyKBicU6dJg4gJa2jR0Zpd55y2iQD23oQD3 Q==; X-CSE-ConnectionGUID: KRYFjOANTjW2DISMr1YbOA== X-CSE-MsgGUID: wjBNSN1zTLOXqI2Ojoj9Yg== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239869" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239869" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:09 -0700 X-CSE-ConnectionGUID: HCRCWUn3QRujrPbiVZ7jEg== X-CSE-MsgGUID: pGpvuqm0Roq6fiy/5sjQcg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537008" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:08 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH iwlwifi-next 01/15] wifi: iwlwifi: cfg: add ucode API min/max to MAC config Date: Fri, 9 May 2025 13:44:40 +0300 Message-Id: <20250509104454.2582160-2-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Johannes Berg In some older devices, the min/max firmware API supported by the driver depends on the specific device, when sharing the the same MAC (config). For most newer devices, it really is dependent on the MAC instead, since the firmware was frozen for certain MAC types. However, in the future we expect also freezes for RF types there. To handle this most generally, add an API min/max to the MAC config and then use the narrowest range prescribed by both, if set. For the newer MACs since 9000, move the configuration, there was only a freeze on MAC+RF lines so far. Signed-off-by: Johannes Berg Message-Id: <20250509134302.23a88a8b57cf.I9ba14e8caa547a9cd0301e5ee7f0d40a8e99a2ba@changeid> Signed-off-by: Miri Korenblit --- .../net/wireless/intel/iwlwifi/cfg/22000.c | 4 +- drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 4 +- .../net/wireless/intel/iwlwifi/cfg/ax210.c | 4 +- drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 4 +- drivers/net/wireless/intel/iwlwifi/cfg/dr.c | 4 +- drivers/net/wireless/intel/iwlwifi/cfg/sc.c | 4 +- .../net/wireless/intel/iwlwifi/iwl-config.h | 4 ++ drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 44 +++++++++++++++---- 8 files changed, 51 insertions(+), 21 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c index 42f2e2ede774..92ae336405fd 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c @@ -83,11 +83,11 @@ static const struct iwl_family_base_params iwl_22000_base = { .mask = 0xffffffff, }, }, + .ucode_api_min = IWL_22000_UCODE_API_MIN, + .ucode_api_max = IWL_22000_UCODE_API_MAX, }; #define IWL_DEVICE_22500 \ - .ucode_api_min = IWL_22000_UCODE_API_MIN, \ - .ucode_api_max = IWL_22000_UCODE_API_MAX, \ .led_mode = IWL_LED_RF_STATE, \ .non_shared_ant = ANT_B, \ .vht_mu_mimo_supported = true, \ diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/9000.c b/drivers/net/wireless/intel/iwlwifi/cfg/9000.c index bc497abd07c1..5424133fae1d 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/9000.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/9000.c @@ -72,6 +72,8 @@ static const struct iwl_family_base_params iwl9000_base = { .mask = 0xffffffff, }, }, + .ucode_api_max = IWL9000_UCODE_API_MAX, + .ucode_api_min = IWL9000_UCODE_API_MIN, }; static const struct iwl_tt_params iwl9000_tt_params = { @@ -96,8 +98,6 @@ static const struct iwl_tt_params iwl9000_tt_params = { }; #define IWL_DEVICE_9000 \ - .ucode_api_max = IWL9000_UCODE_API_MAX, \ - .ucode_api_min = IWL9000_UCODE_API_MIN, \ .led_mode = IWL_LED_RF_STATE, \ .non_shared_ant = ANT_B, \ .dccm_offset = IWL9000_DCCM_OFFSET, \ diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c b/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c index 748c1f1f73a2..d0a8069196b2 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c @@ -87,11 +87,11 @@ static const struct iwl_family_base_params iwl_ax210_base = { .mask = DBGC_CUR_DBGBUF_STATUS_IDX_MSK, }, }, + .ucode_api_min = IWL_AX210_UCODE_API_MIN, + .ucode_api_max = IWL_AX210_UCODE_API_MAX, }; #define IWL_DEVICE_AX210 \ - .ucode_api_min = IWL_AX210_UCODE_API_MIN, \ - .ucode_api_max = IWL_AX210_UCODE_API_MAX, \ .led_mode = IWL_LED_RF_STATE, \ .non_shared_ant = ANT_B, \ .vht_mu_mimo_supported = true, \ diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c index 3c632b8c7650..86871b0431b1 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c @@ -89,11 +89,11 @@ static const struct iwl_family_base_params iwl_bz_base = { }, }, .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, + .ucode_api_max = IWL_BZ_UCODE_API_MAX, + .ucode_api_min = IWL_BZ_UCODE_API_MIN, }; #define IWL_DEVICE_BZ \ - .ucode_api_max = IWL_BZ_UCODE_API_MAX, \ - .ucode_api_min = IWL_BZ_UCODE_API_MIN, \ .ht_params = { \ .stbc = true, \ .ldpc = true, \ diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/dr.c b/drivers/net/wireless/intel/iwlwifi/cfg/dr.c index d7f0797c3231..6696c30ed7b6 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/dr.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/dr.c @@ -82,11 +82,11 @@ static const struct iwl_family_base_params iwl_dr_base = { }, }, .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, + .ucode_api_max = IWL_DR_UCODE_API_MAX, + .ucode_api_min = IWL_DR_UCODE_API_MIN, }; #define IWL_DEVICE_DR \ - .ucode_api_max = IWL_DR_UCODE_API_MAX, \ - .ucode_api_min = IWL_DR_UCODE_API_MIN, \ .led_mode = IWL_LED_RF_STATE, \ .non_shared_ant = ANT_B, \ .vht_mu_mimo_supported = true, \ diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/sc.c b/drivers/net/wireless/intel/iwlwifi/cfg/sc.c index e9a94d4c7d4d..6669dc316019 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/sc.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/sc.c @@ -89,11 +89,11 @@ static const struct iwl_family_base_params iwl_sc_base = { }, }, .features = IWL_TX_CSUM_NETIF_FLAGS | NETIF_F_RXCSUM, + .ucode_api_max = IWL_SC_UCODE_API_MAX, + .ucode_api_min = IWL_SC_UCODE_API_MIN, }; #define IWL_DEVICE_SC \ - .ucode_api_max = IWL_SC_UCODE_API_MAX, \ - .ucode_api_min = IWL_SC_UCODE_API_MIN, \ .led_mode = IWL_LED_RF_STATE, \ .non_shared_ant = ANT_B, \ .vht_mu_mimo_supported = true, \ diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index b5cfaad6a037..9e6c9650fbae 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h @@ -170,6 +170,8 @@ struct iwl_fw_mon_regs { * @mon_dbgi_regs: monitor DBGI registers * @mon_dram_regs: monitor DRAM registers * @mon_smem_regs: monitor SMEM registers + * @ucode_api_max: Highest version of uCode API supported by driver. + * @ucode_api_min: Lowest version of uCode API supported by driver. */ struct iwl_family_base_params { unsigned int wd_timeout; @@ -190,6 +192,8 @@ struct iwl_family_base_params { u8 max_ll_items; u8 led_compensation; + u8 ucode_api_max; + u8 ucode_api_min; u32 mac_addr_from_csr:10; u8 nvm_hw_section_num; netdev_features_t features; diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index d300b7a12ed7..8734c7913b2f 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c @@ -291,12 +291,37 @@ IWL_EXPORT_SYMBOL(iwl_drv_get_fwname_pre); static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context); +static void iwl_get_ucode_api_versions(struct iwl_trans *trans, + unsigned int *api_min, + unsigned int *api_max) +{ + const struct iwl_family_base_params *base = trans->mac_cfg->base; + const struct iwl_cfg *cfg = trans->cfg; + + if (!base->ucode_api_max) { + *api_min = cfg->ucode_api_min; + *api_max = cfg->ucode_api_max; + return; + } + + if (!cfg->ucode_api_max) { + *api_min = base->ucode_api_min; + *api_max = base->ucode_api_max; + return; + } + + *api_min = max(cfg->ucode_api_min, base->ucode_api_min); + *api_max = min(cfg->ucode_api_max, base->ucode_api_max); +} + static int iwl_request_firmware(struct iwl_drv *drv, bool first) { - const struct iwl_cfg *cfg = drv->trans->cfg; char _fw_name_pre[FW_NAME_PRE_BUFSIZE]; + unsigned int ucode_api_max, ucode_api_min; const char *fw_name_pre; + iwl_get_ucode_api_versions(drv->trans, &ucode_api_min, &ucode_api_max); + if (drv->trans->mac_cfg->device_family == IWL_DEVICE_FAMILY_9000 && (drv->trans->info.hw_rev_step != SILICON_B_STEP && drv->trans->info.hw_rev_step != SILICON_C_STEP)) { @@ -309,21 +334,21 @@ static int iwl_request_firmware(struct iwl_drv *drv, bool first) fw_name_pre = iwl_drv_get_fwname_pre(drv->trans, _fw_name_pre); if (first) - drv->fw_index = cfg->ucode_api_max; + drv->fw_index = ucode_api_max; else drv->fw_index--; - if (drv->fw_index < cfg->ucode_api_min) { + if (drv->fw_index < ucode_api_min) { IWL_ERR(drv, "no suitable firmware found!\n"); - if (cfg->ucode_api_min == cfg->ucode_api_max) { + if (ucode_api_min == ucode_api_max) { IWL_ERR(drv, "%s-%d is required\n", fw_name_pre, - cfg->ucode_api_max); + ucode_api_max); } else { IWL_ERR(drv, "minimum version required: %s-%d\n", - fw_name_pre, cfg->ucode_api_min); + fw_name_pre, ucode_api_min); IWL_ERR(drv, "maximum version supported: %s-%d\n", - fw_name_pre, cfg->ucode_api_max); + fw_name_pre, ucode_api_max); } IWL_ERR(drv, @@ -1554,14 +1579,15 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context) struct iwlwifi_opmode_table *op; int err; struct iwl_firmware_pieces *pieces; - const unsigned int api_max = drv->trans->cfg->ucode_api_max; - const unsigned int api_min = drv->trans->cfg->ucode_api_min; + unsigned int api_min, api_max; size_t trigger_tlv_sz[FW_DBG_TRIGGER_MAX]; u32 api_ver; int i; bool usniffer_images = false; bool failure = true; + iwl_get_ucode_api_versions(drv->trans, &api_min, &api_max); + fw->ucode_capa.max_probe_length = IWL_DEFAULT_MAX_PROBE_LENGTH; fw->ucode_capa.standard_phy_calibration_size = IWL_DEFAULT_STANDARD_PHY_CALIBRATE_TBL_SIZE; From patchwork Fri May 9 10:44:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889147 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 3949428F51B for ; Fri, 9 May 2025 10:45:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787513; cv=none; b=RvKk9tCu6WeDJqRP6us+bIBQ0VcAUn38RzZf0QtpmGaW3UPCd0tkfrc4ShDVBf5ki5fOuaZhQO4yegnxw+dJCrjjIC3ilVhBJNU//GSjRDij1rfFoTHsrRYDMYzonukK1UvhUWqziaNmf2Od5tWHoYWbOE4ddY0PMyV85yHaezg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787513; c=relaxed/simple; bh=bl1nkgXljoYzT629OL0iSsj6mGgkSPvaIJFYOz5fuBo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VsfApaf9DVyfoKPLbbj0/pFdX159ieBP3at8YE1L6mDsywRana3cqEeKZh6Oa3ea1jWRAmCvvM6sSvVvod0LDxhj6uvVMNkK64yw1ZzZS9FhvyuxVKxX0ARvXuax4Jqx4n3giLxHnqip654P/gPwTUdW3aqU8cwgXLH5xr53Ve8= 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=AyMGKcDK; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="AyMGKcDK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787511; x=1778323511; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bl1nkgXljoYzT629OL0iSsj6mGgkSPvaIJFYOz5fuBo=; b=AyMGKcDK1WfRGcFQfdTOhtF3+th9gHYtBMI226DxvTyU5WLaeJcAnAAj g4Ln/CXZnMAZQmGgRuvrtKTaByTLNeygOQDMZuNAlomuRNM+YSvhp+RwP leBXyBd5w1WYSNkImV1AQAE1166rVg8wnTym1aPoi9p6PUiORUpupDBjE lPB9BkneuFpUovd0I+zJLxE9LIorV9mzUVJU1cxtkJlT2qXcXwlivX0X5 FIr11LT2OJe+PX1cOBV/bS+NgoE0AHTdNUsGYIB0/eETbi2KpiAURr9Nz XZCa/pNmIaji6Ks9EjkBMhKEiEfw0L9zMGCZoGO1S4dzH6630E/ny9PQM Q==; X-CSE-ConnectionGUID: y4SDwg4IRK60nSIbzgoPhw== X-CSE-MsgGUID: HQb+C3hZRMKXdU9QCWGcmQ== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239878" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239878" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:11 -0700 X-CSE-ConnectionGUID: 1pdrNFvlRkG4364A9GUowA== X-CSE-MsgGUID: Nw75LIa+R1GKw0KqQKAX9w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537011" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:10 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH iwlwifi-next 02/15] wifi: iwlwifi: cfg: unify num_rbds config Date: Fri, 9 May 2025 13:44:41 +0300 Message-Id: <20250509104454.2582160-3-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Johannes Berg This should depend on both the RF (VHT/HE/EHT support) and the MAC (<=22000 can put multiple frames into one buffer), so unify the config in the struct iwl_cfg to just have it sized according to the RF, and then double it for all the MACs starting from AX210 (So/Ty). Signed-off-by: Johannes Berg Message-Id: <20250509134302.d7326eb49e10.I5e86b672f6e4dfe96c602a60166a5a75e1c2e2b8@changeid> Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/cfg/22000.c | 16 +++------------- drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/ax210.c | 16 +++------------- drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 10 ++-------- drivers/net/wireless/intel/iwlwifi/cfg/dr.c | 8 +------- drivers/net/wireless/intel/iwlwifi/cfg/sc.c | 8 +------- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 10 ++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 13 +++++++++++++ .../wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c | 2 +- .../net/wireless/intel/iwlwifi/pcie/ctxt-info.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 2 +- 12 files changed, 39 insertions(+), 54 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c index 92ae336405fd..0ae910828704 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c @@ -131,16 +131,6 @@ const struct iwl_mac_cfg iwl_qu_long_latency_mac_cfg = { .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US, }; -/* - * If the device doesn't support HE, no need to have that many buffers. - * 22000 devices can split multiple frames into a single RB, so fewer are - * needed; AX210 cannot (but use smaller RBs by default) - these sizes - * were picked according to 8 MSDUs inside 256 A-MSDUs in an A-MPDU, with - * additional overhead to account for processing time. - */ -#define IWL_NUM_RBDS_NON_HE 512 -#define IWL_NUM_RBDS_22000_HE 2048 - /* * All JF radio modules are part of the 9000 series, but the MAC part * looks more like 22000. That's why this device is here, but called @@ -182,17 +172,17 @@ const char iwl_ax201_killer_1650i_name[] = const struct iwl_cfg iwl_qu_hr1 = { IWL_DEVICE_22500, .tx_with_siso_diversity = true, - .num_rbds = IWL_NUM_RBDS_22000_HE, + .num_rbds = IWL_NUM_RBDS_HE, }; const struct iwl_cfg iwl_qu_hr = { IWL_DEVICE_22500, - .num_rbds = IWL_NUM_RBDS_22000_HE, + .num_rbds = IWL_NUM_RBDS_HE, }; const struct iwl_cfg iwl_qu_hr_80mhz = { IWL_DEVICE_22500, - .num_rbds = IWL_NUM_RBDS_22000_HE, + .num_rbds = IWL_NUM_RBDS_HE, .bw_limit = 80, }; diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/9000.c b/drivers/net/wireless/intel/iwlwifi/cfg/9000.c index 5424133fae1d..e4f99cef6d7a 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/9000.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/9000.c @@ -105,7 +105,7 @@ static const struct iwl_tt_params iwl9000_tt_params = { .dccm2_offset = IWL9000_DCCM2_OFFSET, \ .dccm2_len = IWL9000_DCCM2_LEN, \ .thermal_params = &iwl9000_tt_params, \ - .num_rbds = 512, \ + .num_rbds = IWL_NUM_RBDS_NON_HE, \ .vht_mu_mimo_supported = true, \ .nvm_type = IWL_NVM_EXT, \ .ht_params = { \ diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c b/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c index d0a8069196b2..6d3c1e032265 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c @@ -141,16 +141,6 @@ const struct iwl_mac_cfg iwl_so_long_latency_imr_mac_cfg = { .imr_enabled = true, }; -/* - * If the device doesn't support HE, no need to have that many buffers. - * AX210 devices can split multiple frames into a single RB, so fewer are - * needed; AX210 cannot (but use smaller RBs by default) - these sizes - * were picked according to 8 MSDUs inside 256 A-MSDUs in an A-MPDU, with - * additional overhead to account for processing time. - */ -#define IWL_NUM_RBDS_NON_HE 512 -#define IWL_NUM_RBDS_AX210_HE 4096 - const struct iwl_mac_cfg iwl_ma_mac_cfg = { .device_family = IWL_DEVICE_FAMILY_AX210, .base = &iwl_ax210_base, @@ -193,17 +183,17 @@ const char iwl_ax210_name[] = "Intel(R) Wi-Fi 6 AX210 160MHz"; const struct iwl_cfg iwl_cfg_ma = { .uhb_supported = true, IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, + .num_rbds = IWL_NUM_RBDS_HE, }; const struct iwl_cfg iwl_cfg_so_a0_hr_a0 = { IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, + .num_rbds = IWL_NUM_RBDS_HE, }; const struct iwl_cfg iwl_cfg_so_a0_hr_a0_80mhz = { IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_AX210_HE, + .num_rbds = IWL_NUM_RBDS_HE, .bw_limit = 80, }; diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c index 86871b0431b1..dc1b4930c24a 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c @@ -106,12 +106,6 @@ static const struct iwl_family_base_params iwl_bz_base = { .nvm_ver = IWL_BZ_NVM_VERSION, \ .nvm_type = IWL_NVM_EXT -/* - * This size was picked according to 8 MSDUs inside 512 A-MSDUs in an - * A-MPDU, with additional overhead to account for processing time. - */ -#define IWL_NUM_RBDS_BZ_EHT (512 * 16) - const struct iwl_mac_cfg iwl_bz_mac_cfg = { .device_family = IWL_DEVICE_FAMILY_BZ, .base = &iwl_bz_base, @@ -142,13 +136,13 @@ const char iwl_mtp_name[] = "Intel(R) Wi-Fi 7 BE202 160MHz"; const struct iwl_cfg iwl_cfg_bz = { .uhb_supported = true, IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_BZ_EHT, + .num_rbds = IWL_NUM_RBDS_EHT, }; const struct iwl_cfg iwl_cfg_bz_160mhz = { .uhb_supported = true, IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_BZ_EHT, + .num_rbds = IWL_NUM_RBDS_EHT, .bw_limit = 160, }; diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/dr.c b/drivers/net/wireless/intel/iwlwifi/cfg/dr.c index 6696c30ed7b6..91da09423158 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/dr.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/dr.c @@ -93,7 +93,7 @@ static const struct iwl_family_base_params iwl_dr_base = { .nvm_ver = IWL_DR_NVM_VERSION, \ .nvm_type = IWL_NVM_EXT, \ .uhb_supported = true, \ - .num_rbds = IWL_NUM_RBDS_DR_EHT, \ + .num_rbds = IWL_NUM_RBDS_EHT, \ .ht_params = { \ .stbc = true, \ .ldpc = true, \ @@ -101,12 +101,6 @@ static const struct iwl_family_base_params iwl_dr_base = { BIT(NL80211_BAND_5GHZ), \ } -/* - * This size was picked according to 8 MSDUs inside 512 A-MSDUs in an - * A-MPDU, with additional overhead to account for processing time. - */ -#define IWL_NUM_RBDS_DR_EHT (512 * 16) - const struct iwl_mac_cfg iwl_dr_mac_cfg = { .device_family = IWL_DEVICE_FAMILY_DR, .base = &iwl_dr_base, diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/sc.c b/drivers/net/wireless/intel/iwlwifi/cfg/sc.c index 6669dc316019..6db25355df42 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/sc.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/sc.c @@ -100,7 +100,7 @@ static const struct iwl_family_base_params iwl_sc_base = { .nvm_ver = IWL_SC_NVM_VERSION, \ .nvm_type = IWL_NVM_EXT, \ .uhb_supported = true, \ - .num_rbds = IWL_NUM_RBDS_SC_EHT, \ + .num_rbds = IWL_NUM_RBDS_EHT, \ .ht_params = { \ .stbc = true, \ .ldpc = true, \ @@ -108,12 +108,6 @@ static const struct iwl_family_base_params iwl_sc_base = { BIT(NL80211_BAND_5GHZ), \ } -/* - * This size was picked according to 8 MSDUs inside 512 A-MSDUs in an - * A-MPDU, with additional overhead to account for processing time. - */ -#define IWL_NUM_RBDS_SC_EHT (512 * 16) - const struct iwl_mac_cfg iwl_sc_mac_cfg = { .device_family = IWL_DEVICE_FAMILY_SC, .base = &iwl_sc_base, diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index 9e6c9650fbae..3593914793a5 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h @@ -342,6 +342,16 @@ struct iwl_mac_cfg { imr_enabled:1; }; +/* + * These sizes were picked according to 8 MSDUs inside 64/256/612 A-MSDUs + * in an A-MPDU, with additional overhead to account for processing time. + * They will be doubled for MACs starting from So/Ty that don't support + * putting multiple frames into a single buffer. + */ +#define IWL_NUM_RBDS_NON_HE (64 * 8) +#define IWL_NUM_RBDS_HE (256 * 8) +#define IWL_NUM_RBDS_EHT (512 * 8) + /** * struct iwl_cfg * @fw_name_pre: Firmware filename prefix. The api version and extension diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h index 904df78297f3..894436a65351 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h @@ -1214,6 +1214,19 @@ static inline bool iwl_trans_is_hw_error_value(u32 val) void iwl_trans_free_restart_list(void); +static inline u16 iwl_trans_get_num_rbds(struct iwl_trans *trans) +{ + u16 result = trans->cfg->num_rbds; + + /* + * Since AX210 family (So/Ty) the device cannot put mutliple + * frames into the same buffer, so double the value for them. + */ + if (trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) + return 2 * result; + return result; +} + /***************************************************** * PCIe handling *****************************************************/ diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c b/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c index dcc8edeb34ff..4759e570e807 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c @@ -256,7 +256,7 @@ int iwl_pcie_ctxt_info_gen3_alloc(struct iwl_trans *trans, ctxt_info_gen3->mtr_size = cpu_to_le16(TFD_QUEUE_CB_SIZE(cmdq_size)); ctxt_info_gen3->mcr_size = - cpu_to_le16(RX_QUEUE_CB_SIZE(trans->cfg->num_rbds)); + cpu_to_le16(RX_QUEUE_CB_SIZE(iwl_trans_get_num_rbds(trans))); trans_pcie->ctxt_info_gen3 = ctxt_info_gen3; trans_pcie->prph_info = prph_info; diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c b/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c index cc3e3d91b27f..cb36baac14da 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info.c @@ -202,10 +202,10 @@ int iwl_pcie_ctxt_info_init(struct iwl_trans *trans, rb_size = IWL_CTXT_INFO_RB_SIZE_4K; } - WARN_ON(RX_QUEUE_CB_SIZE(trans->cfg->num_rbds) > 12); + WARN_ON(RX_QUEUE_CB_SIZE(iwl_trans_get_num_rbds(trans)) > 12); control_flags = IWL_CTXT_INFO_TFD_FORMAT_LONG; control_flags |= - u32_encode_bits(RX_QUEUE_CB_SIZE(trans->cfg->num_rbds), + u32_encode_bits(RX_QUEUE_CB_SIZE(iwl_trans_get_num_rbds(trans)), IWL_CTXT_INFO_RB_CB_SIZE); control_flags |= u32_encode_bits(rb_size, IWL_CTXT_INFO_RB_SIZE); ctxt_info->control.control_flags = cpu_to_le32(control_flags); diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index 45a62733b28a..7db0ca1a59aa 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -1864,7 +1864,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ret = -EINVAL; goto out_free_trans; } - trans_pcie->num_rx_bufs = iwl_trans->cfg->num_rbds; + trans_pcie->num_rx_bufs = iwl_trans_get_num_rbds(iwl_trans); } else { trans_pcie->num_rx_bufs = RX_QUEUE_SIZE; } diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c index c283ceff0417..c5fdadf7de1f 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c @@ -722,7 +722,7 @@ static int iwl_pcie_alloc_rxq_dma(struct iwl_trans *trans, spin_lock_init(&rxq->lock); if (trans->mac_cfg->mq_rx_supported) - rxq->queue_size = trans->cfg->num_rbds; + rxq->queue_size = iwl_trans_get_num_rbds(trans); else rxq->queue_size = RX_QUEUE_SIZE; From patchwork Fri May 9 10:44:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889064 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 B09E528F524 for ; Fri, 9 May 2025 10:45:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787515; cv=none; b=gykSCrdaB6/4j/JKqFHnW7Cg1kkbD3InGR72qra8n9jPDYXGt75ev7gxjpNJOrqMPcuBWo8dV+lv55mHP06Ur9jUMSM6a8+gKaZXYVQp0ju2uQCYzJBzmQP3TVGu5qVjt9YKx5Rfwo1kyKVoQILxW7ysoNNqwI5XdEOu7kaWHZI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787515; c=relaxed/simple; bh=Jo4kUjta6aKTszev1TPzHq7FXI+EyzYRHZhiIJi48Xo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=azXR7UwvQ/JO5EbGTaav2myPwp5GbaLNgzUBoImdeuAu55wu8zBjO6ABqcI9iuIIoY9KDSY7MuUVzjicgxu2/t/ETxJlNtsZMfC2LL791zECw3K9AjUC1P23X259i4Z1Ti34rFN6EakkafxKRDed6Zaalfg/zbIyno4hhd7Nz/E= 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=alnd6JrY; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="alnd6JrY" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787513; x=1778323513; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Jo4kUjta6aKTszev1TPzHq7FXI+EyzYRHZhiIJi48Xo=; b=alnd6JrYCQgil41qqPsAN3Ju2SrcUxKZ9LJ1gWARBYTmoKlMSz4uIEjo UGIVtemRawTG3LrCc/6Q4xqqS4n6FFUTSCk6ws/sYcW4ZdJkEJ3yuiUTR JiFotT3K7hmzH9St3O4OyhAbpffZP01b0PwRwe9yp5ESxn7MGQRufgJ1r RUtMaj/uDzEWJtfnxUCKa5fEx45l1xHTo+JOr7Zj6aqq2ssoBAzJ7BQQK BMmZalQiUdiv10t7RL/d2GTLv+fXEeRzPPq8B/VjhKkmVqbT2KNjVq4oM BkmECMRS9U25pYt1dO00oThpLkyi7YUMqxicgIh7gXO2tSCKiW8OAtZ/k Q==; X-CSE-ConnectionGUID: FtEB2qa/RqqVoxnN9I2ZrQ== X-CSE-MsgGUID: REISrAKtTaWENuc2Ci0yTw== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239882" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239882" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:12 -0700 X-CSE-ConnectionGUID: 0dM/srdrSWCQNBK91ziQAQ== X-CSE-MsgGUID: zQ2wwX8xS4qEW6j75p6P4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537020" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:11 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH iwlwifi-next 03/15] wifi: iwlwifi: cfg: unify JF configs Date: Fri, 9 May 2025 13:44:42 +0300 Message-Id: <20250509104454.2582160-4-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Johannes Berg Unify the JF configs to just one JF RF config. This can be done because the differing fields (thermal and DCCM offsets) won't be used for Qu MACs (and up) due to firmware support. Signed-off-by: Johannes Berg Message-Id: <20250509134302.8c5631e498bb.I5fb8b2d2465f51a91dd2704805141f81918ca577@changeid> Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/Makefile | 11 +- .../net/wireless/intel/iwlwifi/cfg/22000.c | 16 --- drivers/net/wireless/intel/iwlwifi/cfg/9000.c | 56 -------- .../net/wireless/intel/iwlwifi/cfg/ax210.c | 11 -- .../net/wireless/intel/iwlwifi/cfg/rf-jf.c | 68 +++++++++ .../net/wireless/intel/iwlwifi/iwl-config.h | 8 +- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 132 +++++++++--------- 7 files changed, 145 insertions(+), 157 deletions(-) create mode 100644 drivers/net/wireless/intel/iwlwifi/cfg/rf-jf.c diff --git a/drivers/net/wireless/intel/iwlwifi/Makefile b/drivers/net/wireless/intel/iwlwifi/Makefile index 23b17e24b117..9d850d5a447b 100644 --- a/drivers/net/wireless/intel/iwlwifi/Makefile +++ b/drivers/net/wireless/intel/iwlwifi/Makefile @@ -13,10 +13,17 @@ iwlwifi-objs += pcie/trans-gen2.o pcie/tx-gen2.o CFLAGS_pcie/drv.o += -Wno-override-init -iwlwifi-$(CONFIG_IWLDVM) += cfg/1000.o cfg/2000.o cfg/5000.o cfg/6000.o -iwlwifi-$(CONFIG_IWLMVM) += cfg/7000.o cfg/8000.o cfg/9000.o cfg/22000.o +# combined MAC/RF configurations +iwlwifi-$(CONFIG_IWLDVM) += cfg/1000.o cfg/2000.o +iwlwifi-$(CONFIG_IWLDVM) += cfg/5000.o cfg/6000.o +iwlwifi-$(CONFIG_IWLMVM) += cfg/7000.o cfg/8000.o +# MAC configurations +iwlwifi-$(CONFIG_IWLMVM) += cfg/9000.o cfg/22000.o iwlwifi-$(CONFIG_IWLMVM) += cfg/ax210.o iwlwifi-$(CONFIG_IWLMLD) += cfg/bz.o cfg/sc.o cfg/dr.o +# RF configurations +iwlwifi-$(CONFIG_IWLMVM) += cfg/rf-jf.o + iwlwifi-objs += iwl-dbg-tlv.o iwlwifi-objs += iwl-trans.o diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c index 0ae910828704..4d49d0ab1604 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c @@ -131,22 +131,6 @@ const struct iwl_mac_cfg iwl_qu_long_latency_mac_cfg = { .ltr_delay = IWL_CFG_TRANS_LTR_DELAY_2500US, }; -/* - * All JF radio modules are part of the 9000 series, but the MAC part - * looks more like 22000. That's why this device is here, but called - * 9560 nevertheless. - */ -const struct iwl_cfg iwl9560_qu_jf_cfg = { - IWL_DEVICE_22500, - .num_rbds = IWL_NUM_RBDS_NON_HE, -}; - -const struct iwl_cfg iwl9560_qu_jf_cfg_80mhz = { - IWL_DEVICE_22500, - .num_rbds = IWL_NUM_RBDS_NON_HE, - .bw_limit = 80, -}; - const struct iwl_mac_cfg iwl_ax200_mac_cfg = { .device_family = IWL_DEVICE_FAMILY_22000, .base = &iwl_22000_base, diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/9000.c b/drivers/net/wireless/intel/iwlwifi/cfg/9000.c index e4f99cef6d7a..7bfe497bebb7 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/9000.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/9000.c @@ -15,14 +15,7 @@ /* Lowest firmware API version supported */ #define IWL9000_UCODE_API_MIN 30 -/* NVM versions */ -#define IWL9000_NVM_VERSION 0x0a1d - /* Memory offsets and lengths */ -#define IWL9000_DCCM_OFFSET 0x800000 -#define IWL9000_DCCM_LEN 0x18000 -#define IWL9000_DCCM2_OFFSET 0x880000 -#define IWL9000_DCCM2_LEN 0x8000 #define IWL9000_SMEM_OFFSET 0x400000 #define IWL9000_SMEM_LEN 0x68000 @@ -76,46 +69,6 @@ static const struct iwl_family_base_params iwl9000_base = { .ucode_api_min = IWL9000_UCODE_API_MIN, }; -static const struct iwl_tt_params iwl9000_tt_params = { - .ct_kill_entry = 115, - .ct_kill_exit = 93, - .ct_kill_duration = 5, - .dynamic_smps_entry = 111, - .dynamic_smps_exit = 107, - .tx_protection_entry = 112, - .tx_protection_exit = 105, - .tx_backoff = { - {.temperature = 110, .backoff = 200}, - {.temperature = 111, .backoff = 600}, - {.temperature = 112, .backoff = 1200}, - {.temperature = 113, .backoff = 2000}, - {.temperature = 114, .backoff = 4000}, - }, - .support_ct_kill = true, - .support_dynamic_smps = true, - .support_tx_protection = true, - .support_tx_backoff = true, -}; - -#define IWL_DEVICE_9000 \ - .led_mode = IWL_LED_RF_STATE, \ - .non_shared_ant = ANT_B, \ - .dccm_offset = IWL9000_DCCM_OFFSET, \ - .dccm_len = IWL9000_DCCM_LEN, \ - .dccm2_offset = IWL9000_DCCM2_OFFSET, \ - .dccm2_len = IWL9000_DCCM2_LEN, \ - .thermal_params = &iwl9000_tt_params, \ - .num_rbds = IWL_NUM_RBDS_NON_HE, \ - .vht_mu_mimo_supported = true, \ - .nvm_type = IWL_NVM_EXT, \ - .ht_params = { \ - .stbc = true, \ - .ldpc = true, \ - .ht40_bands = BIT(NL80211_BAND_2GHZ) | \ - BIT(NL80211_BAND_5GHZ), \ - }, \ - .nvm_ver = IWL9000_NVM_VERSION - const struct iwl_mac_cfg iwl9000_mac_cfg = { .device_family = IWL_DEVICE_FAMILY_9000, .base = &iwl9000_base, @@ -172,14 +125,5 @@ const char iwl9560_killer_1550s_name[] = const char iwl9560_killer_1550s_160_name[] = "Killer(R) Wireless-AC 1550s Wireless Network Adapter (9560D2W) 160MHz"; -const struct iwl_cfg iwl9000_2ac_cfg = { - IWL_DEVICE_9000, -}; - -const struct iwl_cfg iwl9000_2ac_cfg_80mhz = { - IWL_DEVICE_9000, - .bw_limit = 80, -}; - MODULE_FIRMWARE(IWL9000_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); MODULE_FIRMWARE(IWL9260_MODULE_FIRMWARE(IWL9000_UCODE_API_MAX)); diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c b/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c index 6d3c1e032265..6c15bdff7c34 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c @@ -167,17 +167,6 @@ const char iwl_ax411_killer_1690s_name[] = const char iwl_ax411_killer_1690i_name[] = "Killer(R) Wi-Fi 6E AX1690i 160MHz Wireless Network Adapter (411NGW)"; -const struct iwl_cfg iwlax210_2ax_cfg_so_jf_b0 = { - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_NON_HE, -}; - -const struct iwl_cfg iwlax210_2ax_cfg_so_jf_b0_80mhz = { - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_NON_HE, - .bw_limit = 80, -}; - const char iwl_ax210_name[] = "Intel(R) Wi-Fi 6 AX210 160MHz"; const struct iwl_cfg iwl_cfg_ma = { diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/rf-jf.c b/drivers/net/wireless/intel/iwlwifi/cfg/rf-jf.c new file mode 100644 index 000000000000..3f50f9df5145 --- /dev/null +++ b/drivers/net/wireless/intel/iwlwifi/cfg/rf-jf.c @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* + * Copyright (C) 2015-2017 Intel Deutschland GmbH + * Copyright (C) 2018-2021, 2023, 2025 Intel Corporation + */ +#include "iwl-config.h" + +/* NVM versions */ +#define IWL_JF_NVM_VERSION 0x0a1d + +/* Memory offsets and lengths */ +#define IWL9000_DCCM_OFFSET 0x800000 +#define IWL9000_DCCM_LEN 0x18000 +#define IWL9000_DCCM2_OFFSET 0x880000 +#define IWL9000_DCCM2_LEN 0x8000 + +static const struct iwl_tt_params iwl_jf_tt_params = { + .ct_kill_entry = 115, + .ct_kill_exit = 93, + .ct_kill_duration = 5, + .dynamic_smps_entry = 111, + .dynamic_smps_exit = 107, + .tx_protection_entry = 112, + .tx_protection_exit = 105, + .tx_backoff = { + {.temperature = 110, .backoff = 200}, + {.temperature = 111, .backoff = 600}, + {.temperature = 112, .backoff = 1200}, + {.temperature = 113, .backoff = 2000}, + {.temperature = 114, .backoff = 4000}, + }, + .support_ct_kill = true, + .support_dynamic_smps = true, + .support_tx_protection = true, + .support_tx_backoff = true, +}; + +/* these values are ignored if not with Pu/Th MAC firmware, due to offload */ +#define IWL_DEVICE_JF_PU \ + .dccm_offset = IWL9000_DCCM_OFFSET, \ + .dccm_len = IWL9000_DCCM_LEN, \ + .dccm2_offset = IWL9000_DCCM2_OFFSET, \ + .dccm2_len = IWL9000_DCCM2_LEN, \ + .thermal_params = &iwl_jf_tt_params + +#define IWL_DEVICE_JF \ + IWL_DEVICE_JF_PU, \ + .led_mode = IWL_LED_RF_STATE, \ + .non_shared_ant = ANT_B, \ + .num_rbds = IWL_NUM_RBDS_NON_HE, \ + .vht_mu_mimo_supported = true, \ + .ht_params = { \ + .stbc = true, \ + .ldpc = true, \ + .ht40_bands = BIT(NL80211_BAND_2GHZ) | \ + BIT(NL80211_BAND_5GHZ), \ + }, \ + .nvm_ver = IWL_JF_NVM_VERSION, \ + .nvm_type = IWL_NVM_EXT + +const struct iwl_cfg iwl_rf_jf = { + IWL_DEVICE_JF, +}; + +const struct iwl_cfg iwl_rf_jf_80mhz = { + IWL_DEVICE_JF, + .bw_limit = 80, +}; diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index 3593914793a5..4051800c8d77 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h @@ -684,15 +684,11 @@ extern const struct iwl_cfg iwl7265_cfg; extern const struct iwl_cfg iwl7265d_cfg; extern const struct iwl_cfg iwl8260_cfg; extern const struct iwl_cfg iwl8265_cfg; -extern const struct iwl_cfg iwl9000_2ac_cfg; -extern const struct iwl_cfg iwl9000_2ac_cfg_80mhz; -extern const struct iwl_cfg iwl9560_qu_jf_cfg; -extern const struct iwl_cfg iwl9560_qu_jf_cfg_80mhz; +extern const struct iwl_cfg iwl_rf_jf; +extern const struct iwl_cfg iwl_rf_jf_80mhz; extern const struct iwl_cfg iwl_qu_hr1; extern const struct iwl_cfg iwl_qu_hr; extern const struct iwl_cfg iwl_qu_hr_80mhz; -extern const struct iwl_cfg iwlax210_2ax_cfg_so_jf_b0; -extern const struct iwl_cfg iwlax210_2ax_cfg_so_jf_b0_80mhz; extern const struct iwl_cfg iwl_cfg_ma; diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index 7db0ca1a59aa..7dbac8a1446d 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -944,31 +944,31 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { IWL_DEV_INFO(iwl8265_cfg, iwl8275_2ac_name, DEVICE(0x24FD), SUBDEV(0x0012)), /* 9000 */ - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9260_killer_1550_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9260_killer_1550_name, DEVICE(0x2526), SUBDEV(0x1550)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550s_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550s_name, DEVICE(0x2526), SUBDEV(0x1551)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550i_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550i_name, DEVICE(0x2526), SUBDEV(0x1552)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550s_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550s_name, DEVICE(0x30DC), SUBDEV(0x1551)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550i_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550i_name, DEVICE(0x30DC), SUBDEV(0x1552)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550s_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550s_name, DEVICE(0x31DC), SUBDEV(0x1551)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550i_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550i_name, DEVICE(0x31DC), SUBDEV(0x1552)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550s_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550s_name, DEVICE(0xA370), SUBDEV(0x1551)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550i_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550i_name, DEVICE(0xA370), SUBDEV(0x1552)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550s_160_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550s_160_name, DEVICE(0x54F0), SUBDEV(0x1551)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550i_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550i_name, DEVICE(0x54F0), SUBDEV(0x1552)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550s_160_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550s_160_name, DEVICE(0x51F0), SUBDEV(0x1552)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550i_160_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550i_160_name, DEVICE(0x51F0), SUBDEV(0x1551)), IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_killer_1690s_name, DEVICE(0x51F0), SUBDEV(0x1691)), @@ -989,7 +989,7 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_killer_1690i_name, DEVICE(0x7AF0), SUBDEV(0x1692)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9260_1_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9260_1_name, DEVICE(0x271C), SUBDEV(0x0214)), IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_killer_1690s_name, DEVICE(0x7E40), SUBDEV(0x1691)), @@ -1193,13 +1193,13 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { DEVICE(0x7AF0), SUBDEV(0x0A10)), /* So with JF */ - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550s_160_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550s_160_name, DEVICE(0x7A70), SUBDEV(0x1551)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550i_160_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550i_160_name, DEVICE(0x7A70), SUBDEV(0x1552)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550s_160_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550s_160_name, DEVICE(0x7AF0), SUBDEV(0x1551)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_killer_1550i_160_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550i_160_name, DEVICE(0x7AF0), SUBDEV(0x1552)), /* SO with GF2 */ @@ -1234,125 +1234,125 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675i_name, DEVICE(0x7E40), SUBDEV(0x1672)), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9461_160_name, MAC_TYPE(PU), + IWL_DEV_INFO(iwl_rf_jf, iwl9461_160_name, MAC_TYPE(PU), RF_TYPE(JF1), RF_ID(JF1), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9000_2ac_cfg_80mhz, iwl9461_name, MAC_TYPE(PU), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9461_name, MAC_TYPE(PU), RF_TYPE(JF1), RF_ID(JF1), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9462_160_name, MAC_TYPE(PU), + IWL_DEV_INFO(iwl_rf_jf, iwl9462_160_name, MAC_TYPE(PU), RF_TYPE(JF1), RF_ID(JF1_DIV), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9000_2ac_cfg_80mhz, iwl9462_name, MAC_TYPE(PU), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9462_name, MAC_TYPE(PU), RF_TYPE(JF1), RF_ID(JF1_DIV), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9560_160_name, MAC_TYPE(PU), + IWL_DEV_INFO(iwl_rf_jf, iwl9560_160_name, MAC_TYPE(PU), RF_TYPE(JF2), RF_ID(JF), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9000_2ac_cfg_80mhz, iwl9560_name, MAC_TYPE(PU), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9560_name, MAC_TYPE(PU), RF_TYPE(JF2), RF_ID(JF), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9270_160_name, DEVICE(0x2526), + IWL_DEV_INFO(iwl_rf_jf, iwl9270_160_name, DEVICE(0x2526), MAC_TYPE(TH), RF_TYPE(JF2), BW_NOT_LIMITED, CORES(BT_GNSS), NO_CDB), - IWL_DEV_INFO(iwl9000_2ac_cfg_80mhz, iwl9270_name, DEVICE(0x2526), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9270_name, DEVICE(0x2526), MAC_TYPE(TH), RF_TYPE(JF2), BW_LIMITED, CORES(BT_GNSS), NO_CDB), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9162_160_name, DEVICE(0x271B), + IWL_DEV_INFO(iwl_rf_jf, iwl9162_160_name, DEVICE(0x271B), MAC_TYPE(TH), RF_TYPE(JF1), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9000_2ac_cfg_80mhz, iwl9162_name, DEVICE(0x271B), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9162_name, DEVICE(0x271B), MAC_TYPE(TH), RF_TYPE(JF1), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9000_2ac_cfg, iwl9260_160_name, DEVICE(0x2526), + IWL_DEV_INFO(iwl_rf_jf, iwl9260_160_name, DEVICE(0x2526), MAC_TYPE(TH), RF_TYPE(JF2), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9000_2ac_cfg_80mhz, iwl9260_name, DEVICE(0x2526), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9260_name, DEVICE(0x2526), MAC_TYPE(TH), RF_TYPE(JF2), BW_LIMITED, CORES(BT), NO_CDB), /* Qu with Jf */ /* Qu B step */ - IWL_DEV_INFO(iwl9560_qu_jf_cfg, iwl9461_160_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9461_160_name, MAC_TYPE(QU), MAC_STEP(B), RF_TYPE(JF1), RF_ID(JF1), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg_80mhz, iwl9461_name, + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9461_name, MAC_TYPE(QU), MAC_STEP(B), RF_TYPE(JF1), RF_ID(JF1), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg, iwl9462_160_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9462_160_name, MAC_TYPE(QU), MAC_STEP(B), RF_TYPE(JF1), RF_ID(JF1_DIV), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg_80mhz, iwl9462_name, + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9462_name, MAC_TYPE(QU), MAC_STEP(B), RF_TYPE(JF1), RF_ID(JF1_DIV), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg, iwl9560_160_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_160_name, MAC_TYPE(QU), MAC_STEP(B), RF_TYPE(JF2), RF_ID(JF), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg_80mhz, iwl9560_name, + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9560_name, MAC_TYPE(QU), MAC_STEP(B), RF_TYPE(JF2), RF_ID(JF), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg_80mhz, iwl9560_killer_1550s_name, + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9560_killer_1550s_name, SUBDEV(0x1551), MAC_TYPE(QU), MAC_STEP(B), RF_TYPE(JF2)), - IWL_DEV_INFO(iwl9560_qu_jf_cfg_80mhz, iwl9560_killer_1550i_name, + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9560_killer_1550i_name, SUBDEV(0x1552), MAC_TYPE(QU), MAC_STEP(B), RF_TYPE(JF2)), /* Qu C step */ - IWL_DEV_INFO(iwl9560_qu_jf_cfg, iwl9461_160_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9461_160_name, MAC_TYPE(QU), MAC_STEP(C), RF_TYPE(JF1), RF_ID(JF1), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg_80mhz, iwl9461_name, + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9461_name, MAC_TYPE(QU), MAC_STEP(C), RF_TYPE(JF1), RF_ID(JF1), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg, iwl9462_160_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9462_160_name, MAC_TYPE(QU), MAC_STEP(C), RF_TYPE(JF1), RF_ID(JF1_DIV), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg_80mhz, iwl9462_name, + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9462_name, MAC_TYPE(QU), MAC_STEP(C), RF_TYPE(JF1), RF_ID(JF1_DIV), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg, iwl9560_160_name, MAC_TYPE(QU), + IWL_DEV_INFO(iwl_rf_jf, iwl9560_160_name, MAC_TYPE(QU), MAC_STEP(C), RF_TYPE(JF2), RF_ID(JF), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg_80mhz, iwl9560_name, MAC_TYPE(QU), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9560_name, MAC_TYPE(QU), MAC_STEP(C), RF_TYPE(JF2), RF_ID(JF), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg, iwl9560_killer_1550s_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550s_name, SUBDEV(0x1551), MAC_TYPE(QU), MAC_STEP(C), RF_TYPE(JF2)), - IWL_DEV_INFO(iwl9560_qu_jf_cfg_80mhz, iwl9560_killer_1550i_name, + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9560_killer_1550i_name, SUBDEV(0x1552), MAC_TYPE(QU), MAC_STEP(C), RF_TYPE(JF2)), /* QuZ */ - IWL_DEV_INFO(iwl9560_qu_jf_cfg, iwl9461_160_name, MAC_TYPE(QUZ), + IWL_DEV_INFO(iwl_rf_jf, iwl9461_160_name, MAC_TYPE(QUZ), RF_TYPE(JF1), RF_ID(JF1), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg_80mhz, iwl9461_name, MAC_TYPE(QUZ), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9461_name, MAC_TYPE(QUZ), RF_TYPE(JF1), RF_ID(JF1), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg, iwl9462_160_name, MAC_TYPE(QUZ), + IWL_DEV_INFO(iwl_rf_jf, iwl9462_160_name, MAC_TYPE(QUZ), RF_TYPE(JF1), RF_ID(JF1_DIV), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg_80mhz, iwl9462_name, MAC_TYPE(QUZ), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9462_name, MAC_TYPE(QUZ), RF_TYPE(JF1), RF_ID(JF1_DIV), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg, iwl9560_160_name, MAC_TYPE(QUZ), + IWL_DEV_INFO(iwl_rf_jf, iwl9560_160_name, MAC_TYPE(QUZ), RF_TYPE(JF2), RF_ID(JF), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg_80mhz, iwl9560_name, MAC_TYPE(QUZ), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9560_name, MAC_TYPE(QUZ), RF_TYPE(JF2), RF_ID(JF), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwl9560_qu_jf_cfg, iwl9560_killer_1550s_name, + IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550s_name, SUBDEV(0x1551), MAC_TYPE(QUZ), RF_TYPE(JF2)), - IWL_DEV_INFO(iwl9560_qu_jf_cfg_80mhz, iwl9560_killer_1550i_name, + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9560_killer_1550i_name, SUBDEV(0x1552), MAC_TYPE(QUZ), RF_TYPE(JF2)), /* Qu with Hr */ @@ -1411,19 +1411,19 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { RF_TYPE(GF), BW_NOT_LIMITED, CDB), /* SoF with JF2 */ - IWL_DEV_INFO(iwlax210_2ax_cfg_so_jf_b0, iwl9560_160_name, MAC_TYPE(SOF), + IWL_DEV_INFO(iwl_rf_jf, iwl9560_160_name, MAC_TYPE(SOF), RF_TYPE(JF2), RF_ID(JF), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwlax210_2ax_cfg_so_jf_b0_80mhz, iwl9560_name, MAC_TYPE(SOF), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9560_name, MAC_TYPE(SOF), RF_TYPE(JF2), RF_ID(JF), BW_LIMITED, CORES(BT), NO_CDB), /* SoF with JF */ - IWL_DEV_INFO(iwlax210_2ax_cfg_so_jf_b0, iwl9461_160_name, MAC_TYPE(SOF), + IWL_DEV_INFO(iwl_rf_jf, iwl9461_160_name, MAC_TYPE(SOF), RF_TYPE(JF1), RF_ID(JF1), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwlax210_2ax_cfg_so_jf_b0, iwl9462_160_name, MAC_TYPE(SOF), + IWL_DEV_INFO(iwl_rf_jf, iwl9462_160_name, MAC_TYPE(SOF), RF_TYPE(JF1), RF_ID(JF1_DIV), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwlax210_2ax_cfg_so_jf_b0_80mhz, iwl9461_name, MAC_TYPE(SOF), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9461_name, MAC_TYPE(SOF), RF_TYPE(JF1), RF_ID(JF1), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwlax210_2ax_cfg_so_jf_b0_80mhz, iwl9462_name, MAC_TYPE(SOF), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9462_name, MAC_TYPE(SOF), RF_TYPE(JF1), RF_ID(JF1_DIV), BW_LIMITED, CORES(BT), NO_CDB), /* So with GF */ @@ -1433,19 +1433,19 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { RF_TYPE(GF), BW_NOT_LIMITED, CDB), /* So with JF2 */ - IWL_DEV_INFO(iwlax210_2ax_cfg_so_jf_b0, iwl9560_160_name, MAC_TYPE(SO), + IWL_DEV_INFO(iwl_rf_jf, iwl9560_160_name, MAC_TYPE(SO), RF_TYPE(JF2), RF_ID(JF), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwlax210_2ax_cfg_so_jf_b0_80mhz, iwl9560_name, MAC_TYPE(SO), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9560_name, MAC_TYPE(SO), RF_TYPE(JF2), RF_ID(JF), BW_LIMITED, CORES(BT), NO_CDB), /* So with JF */ - IWL_DEV_INFO(iwlax210_2ax_cfg_so_jf_b0, iwl9461_160_name, MAC_TYPE(SO), + IWL_DEV_INFO(iwl_rf_jf, iwl9461_160_name, MAC_TYPE(SO), RF_TYPE(JF1), RF_ID(JF1), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwlax210_2ax_cfg_so_jf_b0, iwl9462_160_name, MAC_TYPE(SO), + IWL_DEV_INFO(iwl_rf_jf, iwl9462_160_name, MAC_TYPE(SO), RF_TYPE(JF1), RF_ID(JF1_DIV), BW_NOT_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwlax210_2ax_cfg_so_jf_b0_80mhz, iwl9461_name, MAC_TYPE(SO), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9461_name, MAC_TYPE(SO), RF_TYPE(JF1), RF_ID(JF1), BW_LIMITED, CORES(BT), NO_CDB), - IWL_DEV_INFO(iwlax210_2ax_cfg_so_jf_b0_80mhz, iwl9462_name, MAC_TYPE(SO), + IWL_DEV_INFO(iwl_rf_jf_80mhz, iwl9462_name, MAC_TYPE(SO), RF_TYPE(JF1), RF_ID(JF1_DIV), BW_LIMITED, CORES(BT), NO_CDB), #endif /* CONFIG_IWLMVM */ From patchwork Fri May 9 10:44:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889146 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 F2F6E28F52A for ; Fri, 9 May 2025 10:45:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787516; cv=none; b=Q9YF1Q/l+IJnKK9JADPrFGyvrdx8Z7Xs3SF0hmcMPgZCCZj8z3yMJ4GUmGN2v5R5D0NO3IWqkaTPjWWXpfg70Ka+KkK7wHjpDGp3sazAoG9MiOG+pNRGNAM/Ec2ctJZUFZwtVsrp5YQyTUKPoaVjR3oAcAu30Bl270/6iPDnpD0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787516; c=relaxed/simple; bh=HGhN4TWCZw2GYET2LsrZwDdqlbsrgPvian0yNqF1UeY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=K2F+rDErgHsXA9+hTFneQ/KvTU05SpdnW4WooIGA9KKNExJKmsYOVpo60XIj2mPkOH+viVunyqhURG9jqKMKDHYlz+ttL9/LZmnjvPecF+pMWlM8rURGTbTKsn/Zm45+7HmjOBBwh9F64g/Y0f8chnVD/zM6iXKzzdgX61MqxLc= 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=oDTjZjZy; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="oDTjZjZy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787514; x=1778323514; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HGhN4TWCZw2GYET2LsrZwDdqlbsrgPvian0yNqF1UeY=; b=oDTjZjZydUhAmnyPE1rUUc4YPizJ12iHgGeutaDVIwD55t7Zg0qSa5lk fucJLixOFilRXn/NqIdghVkAoAGpJst1tgTlE87/PKsb+vn6ZXNwytXMH YyDWVM9I8XfjDRvvNlyxlaKnP7N81JB7E/mYTSSGArCrV7vqc2uRkNSYd 4fKzYRtdKwTCSLPFQnlVkRz4ZJRDCIpqLrJXTh1qTmR8BVUMhYjDunUR6 SpcVWSf0yqyXa0ZVkb4AAjbUUqiQD/q68F227ZErMGMeaoi/ZD1Sa2Tbm SA4OSDaXj6kIfSKf49/VLoW0Xs79VTYgxGUpA34uPID+XSAfg5cZiYxtH g==; X-CSE-ConnectionGUID: SlLFRm1YRWyBOGbopkxYRw== X-CSE-MsgGUID: zdZwfdE7S6GlWeSv8wI2UA== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239890" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239890" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:14 -0700 X-CSE-ConnectionGUID: yOkKnCY9SsasTYelEXFOOQ== X-CSE-MsgGUID: 67XXKwLCSQKRz4/k5iCm9w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537023" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:13 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH iwlwifi-next 04/15] wifi: iwlwifi: cfg: unify HR configs Date: Fri, 9 May 2025 13:44:43 +0300 Message-Id: <20250509104454.2582160-5-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Johannes Berg Unify the HR configs to just one HR RF config. All the fields were the same already, so this doesn't do anything. Signed-off-by: Johannes Berg Message-Id: <20250509134302.2c5464350327.I284d04c35ad75dcf6d333c84032094c179fa49b3@changeid> Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/Makefile | 2 +- .../net/wireless/intel/iwlwifi/cfg/22000.c | 33 ---- .../net/wireless/intel/iwlwifi/cfg/ax210.c | 11 -- .../net/wireless/intel/iwlwifi/cfg/rf-hr.c | 37 ++++ .../net/wireless/intel/iwlwifi/iwl-config.h | 9 +- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 166 +++++++++--------- 6 files changed, 124 insertions(+), 134 deletions(-) create mode 100644 drivers/net/wireless/intel/iwlwifi/cfg/rf-hr.c diff --git a/drivers/net/wireless/intel/iwlwifi/Makefile b/drivers/net/wireless/intel/iwlwifi/Makefile index 9d850d5a447b..e2f947230738 100644 --- a/drivers/net/wireless/intel/iwlwifi/Makefile +++ b/drivers/net/wireless/intel/iwlwifi/Makefile @@ -22,7 +22,7 @@ iwlwifi-$(CONFIG_IWLMVM) += cfg/9000.o cfg/22000.o iwlwifi-$(CONFIG_IWLMVM) += cfg/ax210.o iwlwifi-$(CONFIG_IWLMLD) += cfg/bz.o cfg/sc.o cfg/dr.o # RF configurations -iwlwifi-$(CONFIG_IWLMVM) += cfg/rf-jf.o +iwlwifi-$(CONFIG_IWLMVM) += cfg/rf-jf.o cfg/rf-hr.o iwlwifi-objs += iwl-dbg-tlv.o iwlwifi-objs += iwl-trans.o diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c index 4d49d0ab1604..5855cf430798 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/22000.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/22000.c @@ -15,9 +15,6 @@ /* Lowest firmware API version supported */ #define IWL_22000_UCODE_API_MIN 77 -/* NVM versions */ -#define IWL_22000_NVM_VERSION 0x0a1d - /* Memory offsets and lengths */ #define IWL_22000_SMEM_OFFSET 0x400000 #define IWL_22000_SMEM_LEN 0xD0000 @@ -87,19 +84,6 @@ static const struct iwl_family_base_params iwl_22000_base = { .ucode_api_max = IWL_22000_UCODE_API_MAX, }; -#define IWL_DEVICE_22500 \ - .led_mode = IWL_LED_RF_STATE, \ - .non_shared_ant = ANT_B, \ - .vht_mu_mimo_supported = true, \ - .ht_params = { \ - .stbc = true, \ - .ldpc = true, \ - .ht40_bands = BIT(NL80211_BAND_2GHZ) | \ - BIT(NL80211_BAND_5GHZ), \ - }, \ - .nvm_ver = IWL_22000_NVM_VERSION, \ - .nvm_type = IWL_NVM_EXT - const struct iwl_mac_cfg iwl_qu_mac_cfg = { .mq_rx_supported = true, .gen2 = true, @@ -153,23 +137,6 @@ const char iwl_ax201_killer_1650s_name[] = const char iwl_ax201_killer_1650i_name[] = "Killer(R) Wi-Fi 6 AX1650i 160MHz Wireless Network Adapter (201NGW)"; -const struct iwl_cfg iwl_qu_hr1 = { - IWL_DEVICE_22500, - .tx_with_siso_diversity = true, - .num_rbds = IWL_NUM_RBDS_HE, -}; - -const struct iwl_cfg iwl_qu_hr = { - IWL_DEVICE_22500, - .num_rbds = IWL_NUM_RBDS_HE, -}; - -const struct iwl_cfg iwl_qu_hr_80mhz = { - IWL_DEVICE_22500, - .num_rbds = IWL_NUM_RBDS_HE, - .bw_limit = 80, -}; - MODULE_FIRMWARE(IWL_QU_B_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); MODULE_FIRMWARE(IWL_QU_C_HR_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); MODULE_FIRMWARE(IWL_QU_B_JF_B_MODULE_FIRMWARE(IWL_22000_UCODE_API_MAX)); diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c b/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c index 6c15bdff7c34..f9fe7dca9739 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c @@ -175,17 +175,6 @@ const struct iwl_cfg iwl_cfg_ma = { .num_rbds = IWL_NUM_RBDS_HE, }; -const struct iwl_cfg iwl_cfg_so_a0_hr_a0 = { - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_HE, -}; - -const struct iwl_cfg iwl_cfg_so_a0_hr_a0_80mhz = { - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_HE, - .bw_limit = 80, -}; - MODULE_FIRMWARE(IWL_SO_A_JF_B_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX)); MODULE_FIRMWARE(IWL_SO_A_HR_B_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX)); IWL_FW_AND_PNVM(IWL_SO_A_GF_A_FW_PRE, IWL_AX210_UCODE_API_MAX); diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/rf-hr.c b/drivers/net/wireless/intel/iwlwifi/cfg/rf-hr.c new file mode 100644 index 000000000000..d01f823ce272 --- /dev/null +++ b/drivers/net/wireless/intel/iwlwifi/cfg/rf-hr.c @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* + * Copyright (C) 2015-2017 Intel Deutschland GmbH + * Copyright (C) 2018-2025 Intel Corporation + */ +#include "iwl-config.h" + +/* NVM versions */ +#define IWL_HR_NVM_VERSION 0x0a1d + +#define IWL_DEVICE_HR \ + .led_mode = IWL_LED_RF_STATE, \ + .non_shared_ant = ANT_B, \ + .vht_mu_mimo_supported = true, \ + .ht_params = { \ + .stbc = true, \ + .ldpc = true, \ + .ht40_bands = BIT(NL80211_BAND_2GHZ) | \ + BIT(NL80211_BAND_5GHZ), \ + }, \ + .num_rbds = IWL_NUM_RBDS_HE, \ + .nvm_ver = IWL_HR_NVM_VERSION, \ + .nvm_type = IWL_NVM_EXT + +const struct iwl_cfg iwl_rf_hr1 = { + IWL_DEVICE_HR, + .tx_with_siso_diversity = true, +}; + +const struct iwl_cfg iwl_rf_hr = { + IWL_DEVICE_HR, +}; + +const struct iwl_cfg iwl_rf_hr_80mhz = { + IWL_DEVICE_HR, + .bw_limit = 80, +}; diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index 4051800c8d77..8da9fedbaee5 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h @@ -686,14 +686,11 @@ extern const struct iwl_cfg iwl8260_cfg; extern const struct iwl_cfg iwl8265_cfg; extern const struct iwl_cfg iwl_rf_jf; extern const struct iwl_cfg iwl_rf_jf_80mhz; -extern const struct iwl_cfg iwl_qu_hr1; -extern const struct iwl_cfg iwl_qu_hr; -extern const struct iwl_cfg iwl_qu_hr_80mhz; +extern const struct iwl_cfg iwl_rf_hr1; +extern const struct iwl_cfg iwl_rf_hr; +extern const struct iwl_cfg iwl_rf_hr_80mhz; extern const struct iwl_cfg iwl_cfg_ma; - -extern const struct iwl_cfg iwl_cfg_so_a0_hr_a0; -extern const struct iwl_cfg iwl_cfg_so_a0_hr_a0_80mhz; #endif /* CONFIG_IWLMVM */ #if IS_ENABLED(CONFIG_IWLMLD) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index 7dbac8a1446d..ef1ca077d899 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -997,145 +997,145 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { DEVICE(0x7E40), SUBDEV(0x1692)), /* AX200 */ - IWL_DEV_INFO(iwl_qu_hr, iwl_ax200_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax200_name, DEVICE(0x2723)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax200_killer_1650w_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax200_killer_1650w_name, DEVICE(0x2723), SUBDEV(0x1653)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax200_killer_1650x_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax200_killer_1650x_name, DEVICE(0x2723), SUBDEV(0x1654)), /* Qu with Hr */ - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x43F0), SUBDEV(0x0070)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x43F0), SUBDEV(0x0074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x43F0), SUBDEV(0x0078)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x43F0), SUBDEV(0x007C)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_killer_1650s_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650s_name, DEVICE(0x43F0), SUBDEV(0x1651)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_killer_1650i_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650i_name, DEVICE(0x43F0), SUBDEV(0x1652)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x43F0), SUBDEV(0x2074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x43F0), SUBDEV(0x4070)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0xA0F0), SUBDEV(0x0070)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0xA0F0), SUBDEV(0x0074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0xA0F0), SUBDEV(0x0078)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0xA0F0), SUBDEV(0x007C)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0xA0F0), SUBDEV(0x0A10)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_killer_1650s_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650s_name, DEVICE(0xA0F0), SUBDEV(0x1651)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_killer_1650i_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650i_name, DEVICE(0xA0F0), SUBDEV(0x1652)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0xA0F0), SUBDEV(0x2074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0xA0F0), SUBDEV(0x4070)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0xA0F0), SUBDEV(0x6074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x02F0), SUBDEV(0x0070)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x02F0), SUBDEV(0x0074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x02F0), SUBDEV(0x6074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x02F0), SUBDEV(0x0078)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x02F0), SUBDEV(0x007C)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x02F0), SUBDEV(0x0310)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_killer_1650s_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650s_name, DEVICE(0x02F0), SUBDEV(0x1651)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_killer_1650i_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650i_name, DEVICE(0x02F0), SUBDEV(0x1652)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x02F0), SUBDEV(0x2074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x02F0), SUBDEV(0x4070)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x06F0), SUBDEV(0x0070)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x06F0), SUBDEV(0x0074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x06F0), SUBDEV(0x0078)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x06F0), SUBDEV(0x007C)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x06F0), SUBDEV(0x0310)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_killer_1650s_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650s_name, DEVICE(0x06F0), SUBDEV(0x1651)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_killer_1650i_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650i_name, DEVICE(0x06F0), SUBDEV(0x1652)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x06F0), SUBDEV(0x2074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x06F0), SUBDEV(0x4070)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x34F0), SUBDEV(0x0070)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x34F0), SUBDEV(0x0074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x34F0), SUBDEV(0x0078)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x34F0), SUBDEV(0x007C)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x34F0), SUBDEV(0x0310)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_killer_1650s_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650s_name, DEVICE(0x34F0), SUBDEV(0x1651)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_killer_1650i_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650i_name, DEVICE(0x34F0), SUBDEV(0x1652)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x34F0), SUBDEV(0x2074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x34F0), SUBDEV(0x4070)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x3DF0), SUBDEV(0x0070)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x3DF0), SUBDEV(0x0074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x3DF0), SUBDEV(0x0078)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x3DF0), SUBDEV(0x007C)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x3DF0), SUBDEV(0x0310)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_killer_1650s_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650s_name, DEVICE(0x3DF0), SUBDEV(0x1651)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_killer_1650i_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650i_name, DEVICE(0x3DF0), SUBDEV(0x1652)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x3DF0), SUBDEV(0x2074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x3DF0), SUBDEV(0x4070)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x4DF0), SUBDEV(0x0070)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x4DF0), SUBDEV(0x0074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x4DF0), SUBDEV(0x0078)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x4DF0), SUBDEV(0x007C)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x4DF0), SUBDEV(0x0310)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_killer_1650s_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650s_name, DEVICE(0x4DF0), SUBDEV(0x1651)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_killer_1650i_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650i_name, DEVICE(0x4DF0), SUBDEV(0x1652)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x4DF0), SUBDEV(0x2074)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x4DF0), SUBDEV(0x4070)), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, DEVICE(0x4DF0), SUBDEV(0x6074)), /* So with HR */ @@ -1357,25 +1357,25 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { /* Qu with Hr */ /* Qu B step */ - IWL_DEV_INFO(iwl_qu_hr1, iwl_ax101_name, MAC_TYPE(QU), + IWL_DEV_INFO(iwl_rf_hr1, iwl_ax101_name, MAC_TYPE(QU), MAC_STEP(B), RF_TYPE(HR1), NO_CDB), - IWL_DEV_INFO(iwl_qu_hr_80mhz, iwl_ax203_name, MAC_TYPE(QU), MAC_STEP(B), + IWL_DEV_INFO(iwl_rf_hr_80mhz, iwl_ax203_name, MAC_TYPE(QU), MAC_STEP(B), RF_TYPE(HR2), BW_LIMITED, NO_CDB), /* Qu C step */ - IWL_DEV_INFO(iwl_qu_hr1, iwl_ax101_name, MAC_TYPE(QU), + IWL_DEV_INFO(iwl_rf_hr1, iwl_ax101_name, MAC_TYPE(QU), MAC_STEP(C), RF_TYPE(HR1), NO_CDB), - IWL_DEV_INFO(iwl_qu_hr_80mhz, iwl_ax203_name, MAC_TYPE(QU), MAC_STEP(C), + IWL_DEV_INFO(iwl_rf_hr_80mhz, iwl_ax203_name, MAC_TYPE(QU), MAC_STEP(C), RF_TYPE(HR2), BW_LIMITED, NO_CDB), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, MAC_TYPE(QU), MAC_STEP(C), + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, MAC_TYPE(QU), MAC_STEP(C), RF_TYPE(HR2), BW_NOT_LIMITED, NO_CDB), /* QuZ */ - IWL_DEV_INFO(iwl_qu_hr1, iwl_ax101_name, MAC_TYPE(QUZ), + IWL_DEV_INFO(iwl_rf_hr1, iwl_ax101_name, MAC_TYPE(QUZ), RF_TYPE(HR1), NO_CDB), - IWL_DEV_INFO(iwl_qu_hr_80mhz, iwl_ax203_name, MAC_TYPE(QUZ), + IWL_DEV_INFO(iwl_rf_hr_80mhz, iwl_ax203_name, MAC_TYPE(QUZ), MAC_STEP(B), RF_TYPE(HR2), BW_LIMITED, NO_CDB), - IWL_DEV_INFO(iwl_qu_hr, iwl_ax201_name, MAC_TYPE(QUZ), + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, MAC_TYPE(QUZ), MAC_STEP(B), RF_TYPE(HR2), BW_NOT_LIMITED, NO_CDB), /* Ma */ @@ -1386,22 +1386,22 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { NO_CDB), /* So with Hr */ - IWL_DEV_INFO(iwl_cfg_so_a0_hr_a0_80mhz, iwl_ax203_name, MAC_TYPE(SO), + IWL_DEV_INFO(iwl_rf_hr_80mhz, iwl_ax203_name, MAC_TYPE(SO), RF_TYPE(HR2), BW_LIMITED, NO_CDB), - IWL_DEV_INFO(iwl_cfg_so_a0_hr_a0_80mhz, iwl_ax101_name, MAC_TYPE(SO), + IWL_DEV_INFO(iwl_rf_hr_80mhz, iwl_ax101_name, MAC_TYPE(SO), RF_TYPE(HR1), BW_LIMITED, NO_CDB), - IWL_DEV_INFO(iwl_cfg_so_a0_hr_a0, iwl_ax201_name, MAC_TYPE(SO), + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, MAC_TYPE(SO), RF_TYPE(HR2), BW_NOT_LIMITED, NO_CDB), - IWL_DEV_INFO(iwl_cfg_so_a0_hr_a0, iwl_ax201_killer_1650i_name, + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_killer_1650i_name, DEVICE(0x51f0), SUBDEV(0x1652), MAC_TYPE(SO), RF_TYPE(HR2)), /* So-F with Hr */ - IWL_DEV_INFO(iwl_cfg_so_a0_hr_a0_80mhz, iwl_ax203_name, MAC_TYPE(SOF), + IWL_DEV_INFO(iwl_rf_hr_80mhz, iwl_ax203_name, MAC_TYPE(SOF), RF_TYPE(HR2), BW_LIMITED, NO_CDB), - IWL_DEV_INFO(iwl_cfg_so_a0_hr_a0_80mhz, iwl_ax101_name, MAC_TYPE(SOF), + IWL_DEV_INFO(iwl_rf_hr_80mhz, iwl_ax101_name, MAC_TYPE(SOF), RF_TYPE(HR1), BW_LIMITED, NO_CDB), - IWL_DEV_INFO(iwl_cfg_so_a0_hr_a0, iwl_ax201_name, MAC_TYPE(SOF), + IWL_DEV_INFO(iwl_rf_hr, iwl_ax201_name, MAC_TYPE(SOF), RF_TYPE(HR2), BW_NOT_LIMITED, NO_CDB), /* So-F with Gf */ From patchwork Fri May 9 10:44:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889063 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 3D3AD28F930 for ; Fri, 9 May 2025 10:45:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787517; cv=none; b=VMgPcLy+tXEKIE+O8gGw5m9YvyS7b4ouj/Xwlm6shWdyjOo6ehpeWCsUemLhXnYuJe2ubgTCaMLpuyLtXlt2GMlW/IF4pCTYooJGJFXgN3P3VaLrNV9gU9iqk96eyyQYZo1X2LMOTLzLARGUdk0QxG32e3clpExRHvwCEmM8HqM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787517; c=relaxed/simple; bh=TGeDk5UFKM4K7SWAIUHtNNt02DW8SEPLConpxvqtd4Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JZ/qSNx9LOai2NnkK3WNxMulxpj9ifp4DutSuImErPCVh5TKHe4sRid0lvR5dAPY06oeM5tcOCrOoG9Q+n2MB+GX+/0MkwilgOJBCplEjuPb3ytS682pIe1eO+d1XN6wQ0Grv1mxvESJSxdoLNUW9bxMhEc9pG9j+S/kmE4LAiE= 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=WLusnAof; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="WLusnAof" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787515; x=1778323515; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TGeDk5UFKM4K7SWAIUHtNNt02DW8SEPLConpxvqtd4Q=; b=WLusnAofzZqiZvvbX01HZqR/rHTUcxiz/3cgb2uG3z6b3u8ZMlQ4W5Wr kfKGSuOM4Semp5/JLT6ZWwzmYSygRHE5OHYzJv5l3BbMOivbEwQpFZw5D APkpSBAT5Z9VRaUUMWrzJdawPUIFD4+p76o9npSyi0rXejn5c8pEp0QR4 MAgDE7czIXagAFg67L+CifpH6VXypLHEKPtRTq134dVMc2FpDPQPh9pPW uDlUMUKyvoHUkNuUiHzMA1MkIj1YyuX9AHRpaVIkovxAbedpZr4B8xCs9 6hXW7BhUKqd+cG2KCB7wMb3ATSICMFVgn+e0GAzcwrElXYMffM+SW0tUj g==; X-CSE-ConnectionGUID: 57GuYNEDSyiZU/6C/jS+BQ== X-CSE-MsgGUID: MnwoG+DGTGCXqnrgH0bpgA== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239892" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239892" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:15 -0700 X-CSE-ConnectionGUID: ppNsLQDEQEekzxFlzkjqjQ== X-CSE-MsgGUID: jOdsO/ZuSP25haiBXtsJhQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537027" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:14 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH iwlwifi-next 05/15] wifi: iwlwifi: cfg: add GF RF config Date: Fri, 9 May 2025 13:44:44 +0300 Message-Id: <20250509104454.2582160-6-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Johannes Berg This is equivalent to just the previous iwl_cfg_ma, but really should also be used for Bz/Gf and Sc/Gf, instead of those using EHT sizes. Signed-off-by: Johannes Berg Message-Id: <20250509134302.5b2ea8fee5a4.If7f8fc859a33ae88bb8d8b1008adc667f64f2353@changeid> Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/Makefile | 2 +- .../net/wireless/intel/iwlwifi/cfg/ax210.c | 22 ---- .../net/wireless/intel/iwlwifi/cfg/rf-gf.c | 25 ++++ .../net/wireless/intel/iwlwifi/iwl-config.h | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 116 +++++++++--------- 5 files changed, 85 insertions(+), 82 deletions(-) create mode 100644 drivers/net/wireless/intel/iwlwifi/cfg/rf-gf.c diff --git a/drivers/net/wireless/intel/iwlwifi/Makefile b/drivers/net/wireless/intel/iwlwifi/Makefile index e2f947230738..2d4815053821 100644 --- a/drivers/net/wireless/intel/iwlwifi/Makefile +++ b/drivers/net/wireless/intel/iwlwifi/Makefile @@ -22,7 +22,7 @@ iwlwifi-$(CONFIG_IWLMVM) += cfg/9000.o cfg/22000.o iwlwifi-$(CONFIG_IWLMVM) += cfg/ax210.o iwlwifi-$(CONFIG_IWLMLD) += cfg/bz.o cfg/sc.o cfg/dr.o # RF configurations -iwlwifi-$(CONFIG_IWLMVM) += cfg/rf-jf.o cfg/rf-hr.o +iwlwifi-$(CONFIG_IWLMVM) += cfg/rf-jf.o cfg/rf-hr.o cfg/rf-gf.o iwlwifi-objs += iwl-dbg-tlv.o iwlwifi-objs += iwl-trans.o diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c b/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c index f9fe7dca9739..2002b14bb82d 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/ax210.c @@ -15,9 +15,6 @@ /* Lowest firmware API version supported */ #define IWL_AX210_UCODE_API_MIN 77 -/* NVM versions */ -#define IWL_AX210_NVM_VERSION 0x0a1d - /* Memory offsets and lengths */ #define IWL_AX210_SMEM_OFFSET 0x400000 #define IWL_AX210_SMEM_LEN 0xD0000 @@ -91,19 +88,6 @@ static const struct iwl_family_base_params iwl_ax210_base = { .ucode_api_max = IWL_AX210_UCODE_API_MAX, }; -#define IWL_DEVICE_AX210 \ - .led_mode = IWL_LED_RF_STATE, \ - .non_shared_ant = ANT_B, \ - .vht_mu_mimo_supported = true, \ - .ht_params = { \ - .stbc = true, \ - .ldpc = true, \ - .ht40_bands = BIT(NL80211_BAND_2GHZ) | \ - BIT(NL80211_BAND_5GHZ), \ - }, \ - .nvm_ver = IWL_AX210_NVM_VERSION, \ - .nvm_type = IWL_NVM_EXT - const struct iwl_mac_cfg iwl_so_mac_cfg = { .mq_rx_supported = true, .gen2 = true, @@ -169,12 +153,6 @@ const char iwl_ax411_killer_1690i_name[] = const char iwl_ax210_name[] = "Intel(R) Wi-Fi 6 AX210 160MHz"; -const struct iwl_cfg iwl_cfg_ma = { - .uhb_supported = true, - IWL_DEVICE_AX210, - .num_rbds = IWL_NUM_RBDS_HE, -}; - MODULE_FIRMWARE(IWL_SO_A_JF_B_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX)); MODULE_FIRMWARE(IWL_SO_A_HR_B_MODULE_FIRMWARE(IWL_AX210_UCODE_API_MAX)); IWL_FW_AND_PNVM(IWL_SO_A_GF_A_FW_PRE, IWL_AX210_UCODE_API_MAX); diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/rf-gf.c b/drivers/net/wireless/intel/iwlwifi/cfg/rf-gf.c new file mode 100644 index 000000000000..36bf7aee7120 --- /dev/null +++ b/drivers/net/wireless/intel/iwlwifi/cfg/rf-gf.c @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* + * Copyright (C) 2015-2017 Intel Deutschland GmbH + * Copyright (C) 2018-2025 Intel Corporation + */ +#include "iwl-config.h" + +/* NVM versions */ +#define IWL_GF_NVM_VERSION 0x0a1d + +const struct iwl_cfg iwl_rf_gf = { + .uhb_supported = true, + .led_mode = IWL_LED_RF_STATE, + .non_shared_ant = ANT_B, + .vht_mu_mimo_supported = true, + .ht_params = { + .stbc = true, + .ldpc = true, + .ht40_bands = BIT(NL80211_BAND_2GHZ) | + BIT(NL80211_BAND_5GHZ), + }, + .nvm_ver = IWL_GF_NVM_VERSION, + .nvm_type = IWL_NVM_EXT, + .num_rbds = IWL_NUM_RBDS_HE, +}; diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index 8da9fedbaee5..fa12e5259bf9 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h @@ -690,7 +690,7 @@ extern const struct iwl_cfg iwl_rf_hr1; extern const struct iwl_cfg iwl_rf_hr; extern const struct iwl_cfg iwl_rf_hr_80mhz; -extern const struct iwl_cfg iwl_cfg_ma; +extern const struct iwl_cfg iwl_rf_gf; #endif /* CONFIG_IWLMVM */ #if IS_ENABLED(CONFIG_IWLMLD) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index ef1ca077d899..bf2d8db8cfc4 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -970,30 +970,30 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { DEVICE(0x51F0), SUBDEV(0x1552)), IWL_DEV_INFO(iwl_rf_jf, iwl9560_killer_1550i_160_name, DEVICE(0x51F0), SUBDEV(0x1551)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_killer_1690s_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_killer_1690s_name, DEVICE(0x51F0), SUBDEV(0x1691)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_killer_1690i_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_killer_1690i_name, DEVICE(0x51F0), SUBDEV(0x1692)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_killer_1690i_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_killer_1690i_name, DEVICE(0x51F1), SUBDEV(0x1692)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_killer_1690s_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_killer_1690s_name, DEVICE(0x54F0), SUBDEV(0x1691)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_killer_1690i_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_killer_1690i_name, DEVICE(0x54F0), SUBDEV(0x1692)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_killer_1690s_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_killer_1690s_name, DEVICE(0x7A70), SUBDEV(0x1691)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_killer_1690i_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_killer_1690i_name, DEVICE(0x7A70), SUBDEV(0x1692)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_killer_1690s_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_killer_1690s_name, DEVICE(0x7AF0), SUBDEV(0x1691)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_killer_1690i_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_killer_1690i_name, DEVICE(0x7AF0), SUBDEV(0x1692)), IWL_DEV_INFO(iwl_rf_jf, iwl9260_1_name, DEVICE(0x271C), SUBDEV(0x0214)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_killer_1690s_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_killer_1690s_name, DEVICE(0x7E40), SUBDEV(0x1691)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_killer_1690i_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_killer_1690i_name, DEVICE(0x7E40), SUBDEV(0x1692)), /* AX200 */ @@ -1139,57 +1139,57 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { DEVICE(0x4DF0), SUBDEV(0x6074)), /* So with HR */ - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, DEVICE(0x2725), SUBDEV(0x0090)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax210_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax210_name, DEVICE(0x2725), SUBDEV(0x0020)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax210_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax210_name, DEVICE(0x2725), SUBDEV(0x2020)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax210_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax210_name, DEVICE(0x2725), SUBDEV(0x0024)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax210_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax210_name, DEVICE(0x2725), SUBDEV(0x0310)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax210_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax210_name, DEVICE(0x2725), SUBDEV(0x0510)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax210_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax210_name, DEVICE(0x2725), SUBDEV(0x0A10)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax210_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax210_name, DEVICE(0x2725), SUBDEV(0xE020)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax210_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax210_name, DEVICE(0x2725), SUBDEV(0xE024)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax210_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax210_name, DEVICE(0x2725), SUBDEV(0x4020)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax210_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax210_name, DEVICE(0x2725), SUBDEV(0x6020)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax210_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax210_name, DEVICE(0x2725), SUBDEV(0x6024)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax210_killer_1675w_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax210_killer_1675w_name, DEVICE(0x2725), SUBDEV(0x1673)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax210_killer_1675x_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax210_killer_1675x_name, DEVICE(0x2725), SUBDEV(0x1674)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, DEVICE(0x7A70), SUBDEV(0x0090)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, DEVICE(0x7A70), SUBDEV(0x0098)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_name, DEVICE(0x7A70), SUBDEV(0x00B0)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, DEVICE(0x7A70), SUBDEV(0x0310)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, DEVICE(0x7A70), SUBDEV(0x0510)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, DEVICE(0x7A70), SUBDEV(0x0A10)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, DEVICE(0x7AF0), SUBDEV(0x0090)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, DEVICE(0x7AF0), SUBDEV(0x0098)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_name, DEVICE(0x7AF0), SUBDEV(0x00B0)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, DEVICE(0x7AF0), SUBDEV(0x0310)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, DEVICE(0x7AF0), SUBDEV(0x0510)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, DEVICE(0x7AF0), SUBDEV(0x0A10)), /* So with JF */ @@ -1203,35 +1203,35 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { DEVICE(0x7AF0), SUBDEV(0x1552)), /* SO with GF2 */ - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675s_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_killer_1675s_name, DEVICE(0x51F0), SUBDEV(0x1671)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675i_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_killer_1675i_name, DEVICE(0x51F0), SUBDEV(0x1672)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675s_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_killer_1675s_name, DEVICE(0x51F1), SUBDEV(0x1671)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675i_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_killer_1675i_name, DEVICE(0x51F1), SUBDEV(0x1672)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675s_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_killer_1675s_name, DEVICE(0x54F0), SUBDEV(0x1671)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675i_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_killer_1675i_name, DEVICE(0x54F0), SUBDEV(0x1672)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675s_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_killer_1675s_name, DEVICE(0x7A70), SUBDEV(0x1671)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675i_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_killer_1675i_name, DEVICE(0x7A70), SUBDEV(0x1672)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675s_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_killer_1675s_name, DEVICE(0x7AF0), SUBDEV(0x1671)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675i_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_killer_1675i_name, DEVICE(0x7AF0), SUBDEV(0x1672)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675s_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_killer_1675s_name, DEVICE(0x7F70), SUBDEV(0x1671)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675i_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_killer_1675i_name, DEVICE(0x7F70), SUBDEV(0x1672)), /* MA with GF2 */ - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675s_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_killer_1675s_name, DEVICE(0x7E40), SUBDEV(0x1671)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_killer_1675i_name, + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_killer_1675i_name, DEVICE(0x7E40), SUBDEV(0x1672)), IWL_DEV_INFO(iwl_rf_jf, iwl9461_160_name, MAC_TYPE(PU), @@ -1379,10 +1379,10 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { MAC_STEP(B), RF_TYPE(HR2), BW_NOT_LIMITED, NO_CDB), /* Ma */ - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax201_name, MAC_TYPE(MA), RF_TYPE(HR2), + IWL_DEV_INFO(iwl_rf_gf, iwl_ax201_name, MAC_TYPE(MA), RF_TYPE(HR2), NO_CDB), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_name, MAC_TYPE(MA), RF_TYPE(GF)), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax231_name, MAC_TYPE(MA), RF_TYPE(FM), + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, MAC_TYPE(MA), RF_TYPE(GF)), + IWL_DEV_INFO(iwl_rf_gf, iwl_ax231_name, MAC_TYPE(MA), RF_TYPE(FM), NO_CDB), /* So with Hr */ @@ -1405,9 +1405,9 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { RF_TYPE(HR2), BW_NOT_LIMITED, NO_CDB), /* So-F with Gf */ - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_name, MAC_TYPE(SOF), + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, MAC_TYPE(SOF), RF_TYPE(GF), BW_NOT_LIMITED, NO_CDB), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_name, MAC_TYPE(SOF), + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_name, MAC_TYPE(SOF), RF_TYPE(GF), BW_NOT_LIMITED, CDB), /* SoF with JF2 */ @@ -1427,9 +1427,9 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { RF_TYPE(JF1), RF_ID(JF1_DIV), BW_LIMITED, CORES(BT), NO_CDB), /* So with GF */ - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax211_name, MAC_TYPE(SO), + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, MAC_TYPE(SO), RF_TYPE(GF), BW_NOT_LIMITED, NO_CDB), - IWL_DEV_INFO(iwl_cfg_ma, iwl_ax411_name, MAC_TYPE(SO), + IWL_DEV_INFO(iwl_rf_gf, iwl_ax411_name, MAC_TYPE(SO), RF_TYPE(GF), BW_NOT_LIMITED, CDB), /* So with JF2 */ From patchwork Fri May 9 10:44:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889062 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 068DF28F51F for ; Fri, 9 May 2025 10:45:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787520; cv=none; b=NULDMeM1H1rs9NPODtVf1VwrfkKzc924yxD7zIGXl+4YeD3QjJYAi8ZadCQmoIyeAiZIjT4DJ/sBAsBZLVZm0POFWCFW8c8Nepc5VNqlTZohLWb1I5NE7AUV1ONVe0JmSnxsVj25OzmtrhkP4BqqK2fs+z/428B5nuyhkM4d62w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787520; c=relaxed/simple; bh=epj5RczLqBQnX/Kb4NkB434hQSP/Fj+N7Ixamhfb6mo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=m+BcqlBjzDSx22cYyhZJwNplAqGHznq8ZxEWt8RnwHb7fvOOaN/sNRJ0gh61LkQZ03aNJYsuYOFUmif+347ftbg9orYiwvsFk3kYTPc0SccupIYaVFa0l1bqQKd4scw7MUiEUMVBu/G1f1B2QGUfybka8opaYQghUJoA027mORI= 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=jEBybj4W; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jEBybj4W" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787519; x=1778323519; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=epj5RczLqBQnX/Kb4NkB434hQSP/Fj+N7Ixamhfb6mo=; b=jEBybj4WlgmRhRBrUWcRj1mcbaTKinTp6y4D/t0PK7yI9dCsiCWl2rqF nd3vnJSlngHJ4UsAVM8N1Md+gz1I9TG+yZcHF3JUPc4KR9kX9j7/1DZKZ k2S/e5DvIgQnDw8iztBzDdpJkQWY9BxnHr4Py8ekBZ/tPpYffZE+XS3KA 5kNVwg+soGqP+HDtJqa2/ahsF33rC2juyFib5m3vy6p6z6vDdP06WEMiE KUToWIQZEE86ZwyXd4cAafvC1HcFJge9ocx0Y90ZitaevsLfTcPA1q48/ A/HfC7xlwxTY9b5PcQnaJuDvhXfNliqaSDLI38ajBJytL6sZY2huWLmYr w==; X-CSE-ConnectionGUID: uQwHl5R3Q8+UF4niB6FghA== X-CSE-MsgGUID: cBF5ju5rQ3CQ1t7mFcDd+Q== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239893" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239893" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:16 -0700 X-CSE-ConnectionGUID: xm7V7gu/S7qsES7LJOevvQ== X-CSE-MsgGUID: 2tZhpctSQzacHJlcNPDHlw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537030" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:15 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH iwlwifi-next 06/15] wifi: iwlwifi: cfg: add FM RF config Date: Fri, 9 May 2025 13:44:45 +0300 Message-Id: <20250509104454.2582160-7-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Johannes Berg The Bz configs really should be FM for the RF, so move that around. Signed-off-by: Johannes Berg Message-Id: <20250509134302.7ab8b86a1f5f.I6608adf28ba601dee75194c405384754ce229e81@changeid> Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/Makefile | 1 + drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 29 ---------------- .../net/wireless/intel/iwlwifi/cfg/rf-fm.c | 33 +++++++++++++++++++ .../net/wireless/intel/iwlwifi/iwl-config.h | 4 +-- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 20 +++++------ 5 files changed, 46 insertions(+), 41 deletions(-) create mode 100644 drivers/net/wireless/intel/iwlwifi/cfg/rf-fm.c diff --git a/drivers/net/wireless/intel/iwlwifi/Makefile b/drivers/net/wireless/intel/iwlwifi/Makefile index 2d4815053821..0d7daa6d3ebd 100644 --- a/drivers/net/wireless/intel/iwlwifi/Makefile +++ b/drivers/net/wireless/intel/iwlwifi/Makefile @@ -23,6 +23,7 @@ iwlwifi-$(CONFIG_IWLMVM) += cfg/ax210.o iwlwifi-$(CONFIG_IWLMLD) += cfg/bz.o cfg/sc.o cfg/dr.o # RF configurations iwlwifi-$(CONFIG_IWLMVM) += cfg/rf-jf.o cfg/rf-hr.o cfg/rf-gf.o +iwlwifi-$(CONFIG_IWLMLD) += cfg/rf-fm.o iwlwifi-objs += iwl-dbg-tlv.o iwlwifi-objs += iwl-trans.o diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c index dc1b4930c24a..8b07289f4921 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c @@ -15,9 +15,6 @@ /* Lowest firmware API version supported */ #define IWL_BZ_UCODE_API_MIN 93 -/* NVM versions */ -#define IWL_BZ_NVM_VERSION 0x0a1d - /* Memory offsets and lengths */ #define IWL_BZ_SMEM_OFFSET 0x400000 #define IWL_BZ_SMEM_LEN 0xD0000 @@ -93,19 +90,6 @@ static const struct iwl_family_base_params iwl_bz_base = { .ucode_api_min = IWL_BZ_UCODE_API_MIN, }; -#define IWL_DEVICE_BZ \ - .ht_params = { \ - .stbc = true, \ - .ldpc = true, \ - .ht40_bands = BIT(NL80211_BAND_2GHZ) | \ - BIT(NL80211_BAND_5GHZ), \ - }, \ - .led_mode = IWL_LED_RF_STATE, \ - .non_shared_ant = ANT_B, \ - .vht_mu_mimo_supported = true, \ - .nvm_ver = IWL_BZ_NVM_VERSION, \ - .nvm_type = IWL_NVM_EXT - const struct iwl_mac_cfg iwl_bz_mac_cfg = { .device_family = IWL_DEVICE_FAMILY_BZ, .base = &iwl_bz_base, @@ -133,19 +117,6 @@ const char iwl_wh_name[] = "Intel(R) Wi-Fi 7 BE211 320MHz"; const char iwl_gl_name[] = "Intel(R) Wi-Fi 7 BE200 320MHz"; const char iwl_mtp_name[] = "Intel(R) Wi-Fi 7 BE202 160MHz"; -const struct iwl_cfg iwl_cfg_bz = { - .uhb_supported = true, - IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_EHT, -}; - -const struct iwl_cfg iwl_cfg_bz_160mhz = { - .uhb_supported = true, - IWL_DEVICE_BZ, - .num_rbds = IWL_NUM_RBDS_EHT, - .bw_limit = 160, -}; - MODULE_FIRMWARE(IWL_BZ_A_HR_B_MODULE_FIRMWARE(IWL_BZ_UCODE_API_MAX)); IWL_FW_AND_PNVM(IWL_BZ_A_GF_A_FW_PRE, IWL_BZ_UCODE_API_MAX); IWL_FW_AND_PNVM(IWL_BZ_A_GF4_A_FW_PRE, IWL_BZ_UCODE_API_MAX); diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/rf-fm.c b/drivers/net/wireless/intel/iwlwifi/cfg/rf-fm.c new file mode 100644 index 000000000000..670360af3d6e --- /dev/null +++ b/drivers/net/wireless/intel/iwlwifi/cfg/rf-fm.c @@ -0,0 +1,33 @@ +// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause +/* + * Copyright (C) 2015-2017 Intel Deutschland GmbH + * Copyright (C) 2018-2025 Intel Corporation + */ +#include "iwl-config.h" + +/* NVM versions */ +#define IWL_FM_NVM_VERSION 0x0a1d + +#define IWL_DEVICE_FM \ + .ht_params = { \ + .stbc = true, \ + .ldpc = true, \ + .ht40_bands = BIT(NL80211_BAND_2GHZ) | \ + BIT(NL80211_BAND_5GHZ), \ + }, \ + .led_mode = IWL_LED_RF_STATE, \ + .non_shared_ant = ANT_B, \ + .vht_mu_mimo_supported = true, \ + .uhb_supported = true, \ + .num_rbds = IWL_NUM_RBDS_EHT, \ + .nvm_ver = IWL_FM_NVM_VERSION, \ + .nvm_type = IWL_NVM_EXT + +const struct iwl_cfg iwl_rf_fm = { + IWL_DEVICE_FM, +}; + +const struct iwl_cfg iwl_rf_fm_160mhz = { + IWL_DEVICE_FM, + .bw_limit = 160, +}; diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index fa12e5259bf9..541cd5427d6b 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h @@ -694,8 +694,8 @@ extern const struct iwl_cfg iwl_rf_gf; #endif /* CONFIG_IWLMVM */ #if IS_ENABLED(CONFIG_IWLMLD) -extern const struct iwl_cfg iwl_cfg_bz; -extern const struct iwl_cfg iwl_cfg_bz_160mhz; +extern const struct iwl_cfg iwl_rf_fm; +extern const struct iwl_cfg iwl_rf_fm_160mhz; extern const struct iwl_cfg iwl_cfg_sc; extern const struct iwl_cfg iwl_cfg_sc_160mhz; diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index bf2d8db8cfc4..1aa3508ed2ef 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -1451,26 +1451,26 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { #endif /* CONFIG_IWLMVM */ #if IS_ENABLED(CONFIG_IWLMLD) /* Bz */ - IWL_DEV_INFO(iwl_cfg_bz, iwl_ax201_name, MAC_TYPE(BZ), RF_TYPE(HR2)), + IWL_DEV_INFO(iwl_rf_fm, iwl_ax201_name, MAC_TYPE(BZ), RF_TYPE(HR2)), - IWL_DEV_INFO(iwl_cfg_bz, iwl_ax211_name, MAC_TYPE(BZ), RF_TYPE(GF)), + IWL_DEV_INFO(iwl_rf_fm, iwl_ax211_name, MAC_TYPE(BZ), RF_TYPE(GF)), - IWL_DEV_INFO(iwl_cfg_bz, iwl_fm_name, MAC_TYPE(BZ), RF_TYPE(FM)), + IWL_DEV_INFO(iwl_rf_fm, iwl_fm_name, MAC_TYPE(BZ), RF_TYPE(FM)), - IWL_DEV_INFO(iwl_cfg_bz, iwl_wh_name, MAC_TYPE(BZ), RF_TYPE(WH)), + IWL_DEV_INFO(iwl_rf_fm, iwl_wh_name, MAC_TYPE(BZ), RF_TYPE(WH)), - IWL_DEV_INFO(iwl_cfg_bz, iwl_ax201_name, MAC_TYPE(BZ_W), RF_TYPE(HR2)), + IWL_DEV_INFO(iwl_rf_fm, iwl_ax201_name, MAC_TYPE(BZ_W), RF_TYPE(HR2)), - IWL_DEV_INFO(iwl_cfg_bz, iwl_ax211_name, MAC_TYPE(BZ_W), RF_TYPE(GF)), + IWL_DEV_INFO(iwl_rf_fm, iwl_ax211_name, MAC_TYPE(BZ_W), RF_TYPE(GF)), - IWL_DEV_INFO(iwl_cfg_bz, iwl_fm_name, MAC_TYPE(BZ_W), RF_TYPE(FM)), + IWL_DEV_INFO(iwl_rf_fm, iwl_fm_name, MAC_TYPE(BZ_W), RF_TYPE(FM)), - IWL_DEV_INFO(iwl_cfg_bz, iwl_wh_name, MAC_TYPE(BZ_W), RF_TYPE(WH)), + IWL_DEV_INFO(iwl_rf_fm, iwl_wh_name, MAC_TYPE(BZ_W), RF_TYPE(WH)), /* Ga (Gl) */ - IWL_DEV_INFO(iwl_cfg_bz, iwl_gl_name, MAC_TYPE(GL), RF_TYPE(FM), + IWL_DEV_INFO(iwl_rf_fm, iwl_gl_name, MAC_TYPE(GL), RF_TYPE(FM), BW_NOT_LIMITED, NO_CDB), - IWL_DEV_INFO(iwl_cfg_bz_160mhz, iwl_mtp_name, MAC_TYPE(GL), RF_TYPE(FM), + IWL_DEV_INFO(iwl_rf_fm_160mhz, iwl_mtp_name, MAC_TYPE(GL), RF_TYPE(FM), BW_LIMITED, NO_CDB), /* Sc */ From patchwork Fri May 9 10:44:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889145 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 AF87B28FAA8 for ; Fri, 9 May 2025 10:45:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787519; cv=none; b=shQZV2JpUSqa5d1GE5EmSGKSij/mGj5CIb/Fn/MTB/jFwGMJ4y0oeWaEXH+v3jf0ry3Z343ZvkycVPiOgVDTgYEfz+Kc4MpBm6VEpFcPk4C2NHW9DDoM8qrJjbJ/r6Ch9VwHCeZ/rIAUCR3ynZ6UyZCHiy5a1ke3SGoVUGAnres= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787519; c=relaxed/simple; bh=x6+f0uPwlLdn6uENosKogKSQLSZEBEsE7OZ8ouK/rUA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cu+vrUTrm6wKP1exSY4M9NEJ70Hic5ccfEpAkgU/0LOq3T7ElbpJtUR/8UAqSulC17FKACL89S/ZkrdYxFDErH4DHbgnTB6+b46lWmr/6DT6+yD5sWwgCR6DicDvd62gYli5V5aJurw9RloD2e3MltqsziD5WWsxXQZXSBJUhhM= 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=ExWTMjcS; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ExWTMjcS" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787518; x=1778323518; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=x6+f0uPwlLdn6uENosKogKSQLSZEBEsE7OZ8ouK/rUA=; b=ExWTMjcSm98SenfjLdtPcU4MT0Kc2nAP5qtQH/L9LqB1vqHyhGhDg7Z0 2X35b2GuOmw/q4P2XEzwE02DjhonknEM3ZDk95Mxnwz+4AmfusKnaqJKN jjGEsQOhMiKeDQEUXn59aWm0Ec0/5OE/Zfp+veNzAhAjPkqdCck6j7uTu xwlLuY6Ca1qtG1Sjya3xzf+t/gjcPNWS5/vugBSnzndC5pZsoQk+MXGOn +NdG32w5OJdXIDhHWGjwRnKwJHJ6UO41nKgs52T9M98ip99cS/GjpeTqL LbMiYn4OLhFSxO32Pd0ZZ+mhmrrgvAYRhkJX4VXxOjKrMb8XWbbWDVp9W A==; X-CSE-ConnectionGUID: zV4PA3JIR6Cx4emiMYwwkg== X-CSE-MsgGUID: FgmgkiS3R8SbhaiFkMfNrg== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239894" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239894" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:17 -0700 X-CSE-ConnectionGUID: ki+p+Y+GTNqq35NekO3foA== X-CSE-MsgGUID: 29UerHY/SpmQxF7pOm24dg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537034" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:17 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH iwlwifi-next 07/15] wifi: iwlwifi: cfg: clean up Sc/Dr/Br configs Date: Fri, 9 May 2025 13:44:46 +0300 Message-Id: <20250509104454.2582160-8-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Johannes Berg For now, the WH and PE radios require the same config as FM, so just add a #define for those instead of copying the data. Since this is true, Sc/Dr/Br all used the same configs for all RF types, but that's confusing, so now use the defined WH/PE names for the correct combinations. We can also now enable the unit test that ensures we have no duplicate RF configs. Signed-off-by: Johannes Berg Message-Id: <20250509134302.fde890c534f6.I9755fb5e905203bcec4a35e4c4453a3a67add3a3@changeid> Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/cfg/dr.c | 22 ------------ drivers/net/wireless/intel/iwlwifi/cfg/sc.c | 24 ------------- .../net/wireless/intel/iwlwifi/iwl-config.h | 8 ++--- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 35 ++++++++++--------- .../wireless/intel/iwlwifi/tests/devinfo.c | 8 ----- 5 files changed, 22 insertions(+), 75 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/dr.c b/drivers/net/wireless/intel/iwlwifi/cfg/dr.c index 91da09423158..ecf36a8a1135 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/dr.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/dr.c @@ -14,9 +14,6 @@ /* Lowest firmware API version supported */ #define IWL_DR_UCODE_API_MIN 97 -/* NVM versions */ -#define IWL_DR_NVM_VERSION 0x0a1d - /* Memory offsets and lengths */ #define IWL_DR_SMEM_OFFSET 0x400000 #define IWL_DR_SMEM_LEN 0xD0000 @@ -86,21 +83,6 @@ static const struct iwl_family_base_params iwl_dr_base = { .ucode_api_min = IWL_DR_UCODE_API_MIN, }; -#define IWL_DEVICE_DR \ - .led_mode = IWL_LED_RF_STATE, \ - .non_shared_ant = ANT_B, \ - .vht_mu_mimo_supported = true, \ - .nvm_ver = IWL_DR_NVM_VERSION, \ - .nvm_type = IWL_NVM_EXT, \ - .uhb_supported = true, \ - .num_rbds = IWL_NUM_RBDS_EHT, \ - .ht_params = { \ - .stbc = true, \ - .ldpc = true, \ - .ht40_bands = BIT(NL80211_BAND_2GHZ) | \ - BIT(NL80211_BAND_5GHZ), \ - } - const struct iwl_mac_cfg iwl_dr_mac_cfg = { .device_family = IWL_DEVICE_FAMILY_DR, .base = &iwl_dr_base, @@ -115,10 +97,6 @@ const struct iwl_mac_cfg iwl_dr_mac_cfg = { const char iwl_dr_name[] = "Intel(R) TBD Dr device"; -const struct iwl_cfg iwl_cfg_dr = { - IWL_DEVICE_DR, -}; - const struct iwl_mac_cfg iwl_br_mac_cfg = { .device_family = IWL_DEVICE_FAMILY_DR, .base = &iwl_dr_base, diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/sc.c b/drivers/net/wireless/intel/iwlwifi/cfg/sc.c index 6db25355df42..5ccb8fff01f4 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/sc.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/sc.c @@ -93,21 +93,6 @@ static const struct iwl_family_base_params iwl_sc_base = { .ucode_api_min = IWL_SC_UCODE_API_MIN, }; -#define IWL_DEVICE_SC \ - .led_mode = IWL_LED_RF_STATE, \ - .non_shared_ant = ANT_B, \ - .vht_mu_mimo_supported = true, \ - .nvm_ver = IWL_SC_NVM_VERSION, \ - .nvm_type = IWL_NVM_EXT, \ - .uhb_supported = true, \ - .num_rbds = IWL_NUM_RBDS_EHT, \ - .ht_params = { \ - .stbc = true, \ - .ldpc = true, \ - .ht40_bands = BIT(NL80211_BAND_2GHZ) | \ - BIT(NL80211_BAND_5GHZ), \ - } - const struct iwl_mac_cfg iwl_sc_mac_cfg = { .device_family = IWL_DEVICE_FAMILY_SC, .base = &iwl_sc_base, @@ -123,15 +108,6 @@ const struct iwl_mac_cfg iwl_sc_mac_cfg = { const char iwl_sp_name[] = "Intel(R) Wi-Fi 7 BE213 160MHz"; const char iwl_pe_name[] = "Intel(R) Wi-Fi 8 BN201"; -const struct iwl_cfg iwl_cfg_sc = { - IWL_DEVICE_SC, -}; - -const struct iwl_cfg iwl_cfg_sc_160mhz = { - IWL_DEVICE_SC, - .bw_limit = 160, -}; - IWL_FW_AND_PNVM(IWL_SC_A_FM_B_FW_PRE, IWL_SC_UCODE_API_MAX); IWL_FW_AND_PNVM(IWL_SC_A_FM_C_FW_PRE, IWL_SC_UCODE_API_MAX); MODULE_FIRMWARE(IWL_SC_A_HR_A_FW_MODULE_FIRMWARE(IWL_SC_UCODE_API_MAX)); diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index 541cd5427d6b..ecf9e7f8e00f 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h @@ -696,10 +696,10 @@ extern const struct iwl_cfg iwl_rf_gf; #if IS_ENABLED(CONFIG_IWLMLD) extern const struct iwl_cfg iwl_rf_fm; extern const struct iwl_cfg iwl_rf_fm_160mhz; - -extern const struct iwl_cfg iwl_cfg_sc; -extern const struct iwl_cfg iwl_cfg_sc_160mhz; -extern const struct iwl_cfg iwl_cfg_dr; +#define iwl_rf_wh iwl_rf_fm +#define iwl_rf_wh_160mhz iwl_rf_fm_160mhz +#define iwl_rf_pe iwl_rf_fm +#define iwl_rf_pe_160mhz iwl_rf_fm_160mhz #endif /* CONFIG_IWLMLD */ #endif /* __IWL_CONFIG_H__ */ diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index 1aa3508ed2ef..0d26fd0168a5 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -1474,33 +1474,34 @@ VISIBLE_IF_IWLWIFI_KUNIT const struct iwl_dev_info iwl_dev_info_table[] = { BW_LIMITED, NO_CDB), /* Sc */ - IWL_DEV_INFO(iwl_cfg_sc, iwl_ax211_name, MAC_TYPE(SC), RF_TYPE(GF)), - IWL_DEV_INFO(iwl_cfg_sc, iwl_fm_name, MAC_TYPE(SC), RF_TYPE(FM)), - IWL_DEV_INFO(iwl_cfg_sc, iwl_wh_name, MAC_TYPE(SC), RF_TYPE(WH), + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, MAC_TYPE(SC), RF_TYPE(GF)), + IWL_DEV_INFO(iwl_rf_fm, iwl_fm_name, MAC_TYPE(SC), RF_TYPE(FM)), + IWL_DEV_INFO(iwl_rf_wh, iwl_wh_name, MAC_TYPE(SC), RF_TYPE(WH), BW_NOT_LIMITED), - IWL_DEV_INFO(iwl_cfg_sc_160mhz, iwl_sp_name, MAC_TYPE(SC), RF_TYPE(WH), + IWL_DEV_INFO(iwl_rf_wh_160mhz, iwl_sp_name, MAC_TYPE(SC), RF_TYPE(WH), BW_LIMITED), - IWL_DEV_INFO(iwl_cfg_sc, iwl_pe_name, MAC_TYPE(SC), RF_TYPE(PE)), - IWL_DEV_INFO(iwl_cfg_sc, iwl_ax211_name, MAC_TYPE(SC2), RF_TYPE(GF)), - IWL_DEV_INFO(iwl_cfg_sc, iwl_fm_name, MAC_TYPE(SC2), RF_TYPE(FM)), - IWL_DEV_INFO(iwl_cfg_sc, iwl_wh_name, MAC_TYPE(SC2), RF_TYPE(WH), + IWL_DEV_INFO(iwl_rf_pe, iwl_pe_name, MAC_TYPE(SC), RF_TYPE(PE)), + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, MAC_TYPE(SC2), RF_TYPE(GF)), + IWL_DEV_INFO(iwl_rf_fm, iwl_fm_name, MAC_TYPE(SC2), RF_TYPE(FM)), + IWL_DEV_INFO(iwl_rf_wh, iwl_wh_name, MAC_TYPE(SC2), RF_TYPE(WH), BW_NOT_LIMITED), - IWL_DEV_INFO(iwl_cfg_sc_160mhz, iwl_sp_name, MAC_TYPE(SC2), RF_TYPE(WH), + IWL_DEV_INFO(iwl_rf_wh_160mhz, iwl_sp_name, MAC_TYPE(SC2), RF_TYPE(WH), BW_LIMITED), - IWL_DEV_INFO(iwl_cfg_sc, iwl_pe_name, MAC_TYPE(SC2), RF_TYPE(PE)), - IWL_DEV_INFO(iwl_cfg_sc, iwl_ax211_name, MAC_TYPE(SC2F), RF_TYPE(GF)), - IWL_DEV_INFO(iwl_cfg_sc, iwl_fm_name, MAC_TYPE(SC2F), RF_TYPE(FM)), - IWL_DEV_INFO(iwl_cfg_sc, iwl_wh_name, MAC_TYPE(SC2F), RF_TYPE(WH), + IWL_DEV_INFO(iwl_rf_pe, iwl_pe_name, MAC_TYPE(SC2), RF_TYPE(PE)), + IWL_DEV_INFO(iwl_rf_gf, iwl_ax211_name, MAC_TYPE(SC2F), RF_TYPE(GF)), + IWL_DEV_INFO(iwl_rf_fm, iwl_fm_name, MAC_TYPE(SC2F), RF_TYPE(FM)), + IWL_DEV_INFO(iwl_rf_wh, iwl_wh_name, MAC_TYPE(SC2F), RF_TYPE(WH), BW_NOT_LIMITED), - IWL_DEV_INFO(iwl_cfg_sc_160mhz, iwl_sp_name, MAC_TYPE(SC2F), RF_TYPE(WH), + IWL_DEV_INFO(iwl_rf_wh_160mhz, iwl_sp_name, MAC_TYPE(SC2F), RF_TYPE(WH), BW_LIMITED), - IWL_DEV_INFO(iwl_cfg_sc, iwl_pe_name, MAC_TYPE(SC2F), RF_TYPE(PE)), + IWL_DEV_INFO(iwl_rf_pe, iwl_pe_name, MAC_TYPE(SC2F), RF_TYPE(PE)), /* Dr */ - IWL_DEV_INFO(iwl_cfg_dr, iwl_dr_name, MAC_TYPE(DR)), + IWL_DEV_INFO(iwl_rf_pe, iwl_dr_name, MAC_TYPE(DR), RF_TYPE(PE)), + IWL_DEV_INFO(iwl_rf_wh, iwl_dr_name, MAC_TYPE(DR), RF_TYPE(WH)), /* Br */ - IWL_DEV_INFO(iwl_cfg_dr, iwl_br_name, MAC_TYPE(BR)), + IWL_DEV_INFO(iwl_rf_pe, iwl_br_name, MAC_TYPE(BR), RF_TYPE(PE)), #endif /* CONFIG_IWLMLD */ }; EXPORT_SYMBOL_IF_IWLWIFI_KUNIT(iwl_dev_info_table); diff --git a/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c b/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c index c86495abf29b..0e6a74abd5e2 100644 --- a/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c +++ b/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c @@ -69,14 +69,6 @@ static void devinfo_no_cfg_dups(struct kunit *test) if (cfg_i == cfg_j) continue; - /* - * allow different MAC type to have the same config - * for better maintenance / file split - */ - if (iwl_dev_info_table[i].mac_type != - iwl_dev_info_table[j].mac_type) - continue; - KUNIT_EXPECT_NE_MSG(test, memcmp(cfg_i, cfg_j, sizeof(*cfg_i)), 0, "identical configs: %ps and %ps\n", From patchwork Fri May 9 10:44:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889143 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 D26D828FAA8 for ; Fri, 9 May 2025 10:45:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787523; cv=none; b=iDBGRfUFqzPGXRU9JFv2qE2fuOe/q3GfJ1MA1q2nbVh8QoBMnvHs5irDMFqUZXiCo30xY1FgwinPS4hYBzXNhkhZbS11FzD5gwKqG5UySwfHm+Th0MsRdyCibOEeYKTdOSsdCZveHlRDS8XE7tX506b+KhKQl32zJuDgI2FwWro= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787523; c=relaxed/simple; bh=UMPz1st017Jk1ib3cdOPqLjjjVYV7EC0MryF+kqXQ7k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DFK7iUvOlMTmYpNHiBopVJBT12CryxMdaF3+jA6tb2GGlaC629vOkbeKwgY9vNtXRb1YNdTPGrIM0VcyrYKS0NTBnbJYUkjE1fn5E7dsHBVHI4+Efzz+tMm6xugtKyoSqRhaRzz32IB6AEEEEwW68si04TllevTC4UomkiVChXE= 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=SjxoUn1e; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="SjxoUn1e" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787521; x=1778323521; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UMPz1st017Jk1ib3cdOPqLjjjVYV7EC0MryF+kqXQ7k=; b=SjxoUn1e8eG1Arb3Y/4/JmcM4nuS5ajuQuDxSRAIvbX0vX3a5+zbsvLx uMo3SQ40Y3Sbon3htzHDoIXSgqtkzlRGri2mcas32I90Rtbyyo1Pjf9do OuFJPDu15mxtWfA7D6n+DCMsGUg14qNO6b9Rw7lSslm79pq5qq65xrb5f l7OT25ZuamSW/UKeiNdDbJEbfr1NLMtEj/OekKycJzC+JoG51GnHD6qJ0 6h2hUFX84ccXT3h7twAK8STfP2lvUWkg3htdfZusNf5etjeWfT5GIxroC KazWWerxWmmDAcMAALDXaEOUIEKD6uj5/KCG15MvYgl5kXA19lMafSGpW A==; X-CSE-ConnectionGUID: Xm8DwCPVRV+acxZ7oM4vgA== X-CSE-MsgGUID: hqGCN87QRni7/RI5ctFb5w== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239898" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239898" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:19 -0700 X-CSE-ConnectionGUID: YJsJTPLaTjyhK6YWvrcXVg== X-CSE-MsgGUID: YEJi8N2ASICPvqdPJOTAoA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537038" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:18 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH iwlwifi-next 08/15] wifi: iwlwifi: rename iwl_cfg to iwl_rf_cfg Date: Fri, 9 May 2025 13:44:47 +0300 Message-Id: <20250509104454.2582160-9-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Johannes Berg With all the cleanups now, we can rename the structure to better indicate the functionality. For older devices this isn't quite accurate, of course, but it's better to have a name that reflects future use for maintenance. Add some kernel-doc while at it. Signed-off-by: Johannes Berg Message-Id: <20250509134302.f63a2e4a516e.Id23f637024f17a371d9c8194f6e1c9cbec805b4d@changeid> Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/cfg/1000.c | 8 +- drivers/net/wireless/intel/iwlwifi/cfg/2000.c | 8 +- drivers/net/wireless/intel/iwlwifi/cfg/5000.c | 12 +- drivers/net/wireless/intel/iwlwifi/cfg/6000.c | 28 ++--- drivers/net/wireless/intel/iwlwifi/cfg/7000.c | 14 +-- drivers/net/wireless/intel/iwlwifi/cfg/8000.c | 4 +- .../net/wireless/intel/iwlwifi/cfg/rf-fm.c | 4 +- .../net/wireless/intel/iwlwifi/cfg/rf-gf.c | 2 +- .../net/wireless/intel/iwlwifi/cfg/rf-hr.c | 6 +- .../net/wireless/intel/iwlwifi/cfg/rf-jf.c | 4 +- drivers/net/wireless/intel/iwlwifi/dvm/agn.h | 4 +- drivers/net/wireless/intel/iwlwifi/dvm/dev.h | 3 +- .../net/wireless/intel/iwlwifi/dvm/eeprom.c | 8 +- drivers/net/wireless/intel/iwlwifi/dvm/main.c | 2 +- .../net/wireless/intel/iwlwifi/iwl-config.h | 104 +++++++++--------- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 4 +- drivers/net/wireless/intel/iwlwifi/iwl-drv.h | 4 +- .../wireless/intel/iwlwifi/iwl-nvm-parse.c | 30 ++--- .../wireless/intel/iwlwifi/iwl-nvm-parse.h | 4 +- .../wireless/intel/iwlwifi/iwl-nvm-utils.c | 2 +- .../net/wireless/intel/iwlwifi/iwl-op-mode.h | 4 +- .../net/wireless/intel/iwlwifi/iwl-trans.h | 2 +- drivers/net/wireless/intel/iwlwifi/mld/mld.c | 4 +- drivers/net/wireless/intel/iwlwifi/mld/mld.h | 4 +- .../wireless/intel/iwlwifi/mld/tests/utils.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- .../wireless/intel/iwlwifi/tests/devinfo.c | 4 +- 28 files changed, 141 insertions(+), 138 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/1000.c b/drivers/net/wireless/intel/iwlwifi/cfg/1000.c index f40fea33e69b..c029e595e7c2 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/1000.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/1000.c @@ -70,7 +70,7 @@ const struct iwl_mac_cfg iwl1000_mac_cfg = { .eeprom_params = &iwl1000_eeprom_params, \ .led_mode = IWL_LED_BLINK -const struct iwl_cfg iwl1000_bgn_cfg = { +const struct iwl_rf_cfg iwl1000_bgn_cfg = { IWL_DEVICE_1000, .ht_params = { .ht_greenfield_support = true, @@ -81,7 +81,7 @@ const struct iwl_cfg iwl1000_bgn_cfg = { const char iwl1000_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 1000 BGN"; -const struct iwl_cfg iwl1000_bg_cfg = { +const struct iwl_rf_cfg iwl1000_bg_cfg = { IWL_DEVICE_1000, }; @@ -99,7 +99,7 @@ const char iwl1000_bg_name[] = "Intel(R) Centrino(R) Wireless-N 1000 BG"; .led_mode = IWL_LED_RF_STATE, \ .rx_with_siso_diversity = true -const struct iwl_cfg iwl100_bgn_cfg = { +const struct iwl_rf_cfg iwl100_bgn_cfg = { IWL_DEVICE_100, .ht_params = { .ht_greenfield_support = true, @@ -110,7 +110,7 @@ const struct iwl_cfg iwl100_bgn_cfg = { const char iwl100_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 100 BGN"; -const struct iwl_cfg iwl100_bg_cfg = { +const struct iwl_rf_cfg iwl100_bg_cfg = { IWL_DEVICE_100, }; diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/2000.c b/drivers/net/wireless/intel/iwlwifi/cfg/2000.c index 33f04c9d05d6..47554a5f406e 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/2000.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/2000.c @@ -97,7 +97,7 @@ const struct iwl_mac_cfg iwl2000_mac_cfg = { .led_mode = IWL_LED_RF_STATE -const struct iwl_cfg iwl2000_2bgn_cfg = { +const struct iwl_rf_cfg iwl2000_2bgn_cfg = { IWL_DEVICE_2000, .ht_params = { .ht_greenfield_support = true, @@ -125,7 +125,7 @@ const struct iwl_mac_cfg iwl2030_mac_cfg = { .eeprom_params = &iwl20x0_eeprom_params, \ .led_mode = IWL_LED_RF_STATE -const struct iwl_cfg iwl2030_2bgn_cfg = { +const struct iwl_rf_cfg iwl2030_2bgn_cfg = { IWL_DEVICE_2030, .ht_params = { .ht_greenfield_support = true, @@ -153,7 +153,7 @@ const struct iwl_mac_cfg iwl105_mac_cfg = { .led_mode = IWL_LED_RF_STATE, \ .rx_with_siso_diversity = true -const struct iwl_cfg iwl105_bgn_cfg = { +const struct iwl_rf_cfg iwl105_bgn_cfg = { IWL_DEVICE_105, .ht_params = { .ht_greenfield_support = true, @@ -182,7 +182,7 @@ const struct iwl_mac_cfg iwl135_mac_cfg = { .led_mode = IWL_LED_RF_STATE, \ .rx_with_siso_diversity = true -const struct iwl_cfg iwl135_bgn_cfg = { +const struct iwl_rf_cfg iwl135_bgn_cfg = { IWL_DEVICE_135, .ht_params = { .ht_greenfield_support = true, diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/5000.c b/drivers/net/wireless/intel/iwlwifi/cfg/5000.c index 79ba0524086a..aaae3b1f5433 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/5000.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/5000.c @@ -69,7 +69,7 @@ const struct iwl_mac_cfg iwl5000_mac_cfg = { .eeprom_params = &iwl5000_eeprom_params, \ .led_mode = IWL_LED_BLINK -const struct iwl_cfg iwl5300_agn_cfg = { +const struct iwl_rf_cfg iwl5300_agn_cfg = { IWL_DEVICE_5000, /* at least EEPROM 0x11A has wrong info */ .valid_tx_ant = ANT_ABC, /* .cfg overwrite */ @@ -82,7 +82,7 @@ const struct iwl_cfg iwl5300_agn_cfg = { const char iwl5300_agn_name[] = "Intel(R) Ultimate N WiFi Link 5300 AGN"; -const struct iwl_cfg iwl5100_n_cfg = { +const struct iwl_rf_cfg iwl5100_n_cfg = { IWL_DEVICE_5000, .valid_tx_ant = ANT_B, /* .cfg overwrite */ .valid_rx_ant = ANT_AB, /* .cfg overwrite */ @@ -94,7 +94,7 @@ const struct iwl_cfg iwl5100_n_cfg = { const char iwl5100_bgn_name[] = "Intel(R) WiFi Link 5100 BGN"; -const struct iwl_cfg iwl5100_abg_cfg = { +const struct iwl_rf_cfg iwl5100_abg_cfg = { IWL_DEVICE_5000, .valid_tx_ant = ANT_B, /* .cfg overwrite */ .valid_rx_ant = ANT_AB, /* .cfg overwrite */ @@ -103,7 +103,7 @@ const struct iwl_cfg iwl5100_abg_cfg = { const char iwl5100_abg_name[] = "Intel(R) WiFi Link 5100 ABG"; const char iwl5100_agn_name[] = "Intel(R) WiFi Link 5100 AGN"; -const struct iwl_cfg iwl5350_agn_cfg = { +const struct iwl_rf_cfg iwl5350_agn_cfg = { .fw_name_pre = IWL5000_FW_PRE, .ucode_api_max = IWL5000_UCODE_API_MAX, .ucode_api_min = IWL5000_UCODE_API_MIN, @@ -139,7 +139,7 @@ const struct iwl_mac_cfg iwl5150_mac_cfg = { .led_mode = IWL_LED_BLINK, \ .internal_wimax_coex = true -const struct iwl_cfg iwl5150_agn_cfg = { +const struct iwl_rf_cfg iwl5150_agn_cfg = { IWL_DEVICE_5150, .ht_params = { .ht_greenfield_support = true, @@ -149,7 +149,7 @@ const struct iwl_cfg iwl5150_agn_cfg = { const char iwl5150_agn_name[] = "Intel(R) WiMAX/WiFi Link 5150 AGN"; -const struct iwl_cfg iwl5150_abg_cfg = { +const struct iwl_rf_cfg iwl5150_abg_cfg = { IWL_DEVICE_5150, }; diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/6000.c b/drivers/net/wireless/intel/iwlwifi/cfg/6000.c index 94f042760359..ab13394896e0 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/6000.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/6000.c @@ -117,7 +117,7 @@ const struct iwl_mac_cfg iwl6005_mac_cfg = { .eeprom_params = &iwl6000_eeprom_params, \ .led_mode = IWL_LED_RF_STATE -const struct iwl_cfg iwl6005_n_cfg = { +const struct iwl_rf_cfg iwl6005_n_cfg = { IWL_DEVICE_6005, .ht_params = { .ht_greenfield_support = true, @@ -132,7 +132,7 @@ const char iwl6005_2agn_d_name[] = "Intel(R) Centrino(R) Advanced-N 6205D AGN"; const char iwl6005_2agn_mow1_name[] = "Intel(R) Centrino(R) Advanced-N 6206 AGN"; const char iwl6005_2agn_mow2_name[] = "Intel(R) Centrino(R) Advanced-N 6207 AGN"; -const struct iwl_cfg iwl6005_non_n_cfg = { +const struct iwl_rf_cfg iwl6005_non_n_cfg = { IWL_DEVICE_6005, }; @@ -155,7 +155,7 @@ const struct iwl_mac_cfg iwl6030_mac_cfg = { .eeprom_params = &iwl6000_eeprom_params, \ .led_mode = IWL_LED_RF_STATE -const struct iwl_cfg iwl6030_n_cfg = { +const struct iwl_rf_cfg iwl6030_n_cfg = { IWL_DEVICE_6030, .ht_params = { .ht_greenfield_support = true, @@ -169,7 +169,7 @@ const char iwl6030_2bgn_name[] = "Intel(R) Centrino(R) Advanced-N 6230 BGN"; const char iwl1030_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 1030 BGN"; const char iwl1030_bg_name[] = "Intel(R) Centrino(R) Wireless-N 1030 BG"; -const struct iwl_cfg iwl6030_non_n_cfg = { +const struct iwl_rf_cfg iwl6030_non_n_cfg = { IWL_DEVICE_6030, }; @@ -187,7 +187,7 @@ const char iwl6030_2bg_name[] = "Intel(R) Centrino(R) Advanced-N 6230 BG"; .eeprom_params = &iwl6000_eeprom_params, \ .led_mode = IWL_LED_RF_STATE -const struct iwl_cfg iwl6035_2agn_cfg = { +const struct iwl_rf_cfg iwl6035_2agn_cfg = { IWL_DEVICE_6035, .ht_params = { .ht_greenfield_support = true, @@ -199,7 +199,7 @@ const struct iwl_cfg iwl6035_2agn_cfg = { const char iwl6035_2agn_name[] = "Intel(R) Centrino(R) Advanced-N 6235 AGN"; const char iwl6035_2agn_sff_name[] = "Intel(R) Centrino(R) Ultimate-N 6235 AGN"; -const struct iwl_cfg iwl130_bgn_cfg = { +const struct iwl_rf_cfg iwl130_bgn_cfg = { IWL_DEVICE_6030, .ht_params = { .ht_greenfield_support = true, @@ -211,7 +211,7 @@ const struct iwl_cfg iwl130_bgn_cfg = { const char iwl130_bgn_name[] = "Intel(R) Centrino(R) Wireless-N 130 BGN"; -const struct iwl_cfg iwl130_bg_cfg = { +const struct iwl_rf_cfg iwl130_bg_cfg = { IWL_DEVICE_6030, .rx_with_siso_diversity = true, }; @@ -239,7 +239,7 @@ const struct iwl_mac_cfg iwl6000i_mac_cfg = { .eeprom_params = &iwl6000_eeprom_params, \ .led_mode = IWL_LED_BLINK -const struct iwl_cfg iwl6000i_2agn_cfg = { +const struct iwl_rf_cfg iwl6000i_2agn_cfg = { IWL_DEVICE_6000i, .ht_params = { .ht_greenfield_support = true, @@ -250,7 +250,7 @@ const struct iwl_cfg iwl6000i_2agn_cfg = { const char iwl6000i_2agn_name[] = "Intel(R) Centrino(R) Advanced-N 6200 AGN"; -const struct iwl_cfg iwl6000i_non_n_cfg = { +const struct iwl_rf_cfg iwl6000i_non_n_cfg = { IWL_DEVICE_6000i, }; @@ -276,7 +276,7 @@ const struct iwl_mac_cfg iwl6050_mac_cfg = { .led_mode = IWL_LED_BLINK, \ .internal_wimax_coex = true -const struct iwl_cfg iwl6050_2agn_cfg = { +const struct iwl_rf_cfg iwl6050_2agn_cfg = { IWL_DEVICE_6050, .ht_params = { .ht_greenfield_support = true, @@ -287,7 +287,7 @@ const struct iwl_cfg iwl6050_2agn_cfg = { const char iwl6050_2agn_name[] = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN"; -const struct iwl_cfg iwl6050_2abg_cfg = { +const struct iwl_rf_cfg iwl6050_2abg_cfg = { IWL_DEVICE_6050, }; @@ -310,7 +310,7 @@ const struct iwl_mac_cfg iwl6150_mac_cfg = { .led_mode = IWL_LED_BLINK, \ .internal_wimax_coex = true -const struct iwl_cfg iwl6150_bgn_cfg = { +const struct iwl_rf_cfg iwl6150_bgn_cfg = { IWL_DEVICE_6150, .ht_params = { .ht_greenfield_support = true, @@ -321,7 +321,7 @@ const struct iwl_cfg iwl6150_bgn_cfg = { const char iwl6150_bgn_name[] = "Intel(R) Centrino(R) Wireless-N + WiMAX 6150 BGN"; -const struct iwl_cfg iwl6150_bg_cfg = { +const struct iwl_rf_cfg iwl6150_bg_cfg = { IWL_DEVICE_6150, }; @@ -332,7 +332,7 @@ const struct iwl_mac_cfg iwl6000_mac_cfg = { .base = &iwl6000_base, }; -const struct iwl_cfg iwl6000_3agn_cfg = { +const struct iwl_rf_cfg iwl6000_3agn_cfg = { .fw_name_pre = IWL6000_FW_PRE, .ucode_api_max = IWL6000_UCODE_API_MAX, .ucode_api_min = IWL6000_UCODE_API_MIN, diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/7000.c b/drivers/net/wireless/intel/iwlwifi/cfg/7000.c index 4b50a02b1cc5..b6068dfcbd76 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/7000.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/7000.c @@ -130,7 +130,7 @@ const char iwl7265d_2ac_name[] = "Intel(R) Dual Band Wireless AC 7265"; const char iwl7265d_2n_name[] = "Intel(R) Dual Band Wireless N 7265"; const char iwl7265d_n_name[] = "Intel(R) Wireless N 7265"; -const struct iwl_cfg iwl7260_cfg = { +const struct iwl_rf_cfg iwl7260_cfg = { .fw_name_pre = IWL7260_FW_PRE, IWL_DEVICE_7000, .ht_params = { @@ -143,7 +143,7 @@ const struct iwl_cfg iwl7260_cfg = { .dccm_len = IWL7260_DCCM_LEN, }; -const struct iwl_cfg iwl7260_high_temp_cfg = { +const struct iwl_rf_cfg iwl7260_high_temp_cfg = { .fw_name_pre = IWL7260_FW_PRE, IWL_DEVICE_7000, .ht_params = { @@ -157,7 +157,7 @@ const struct iwl_cfg iwl7260_high_temp_cfg = { .thermal_params = &iwl7000_high_temp_tt_params, }; -const struct iwl_cfg iwl3160_cfg = { +const struct iwl_rf_cfg iwl3160_cfg = { .fw_name_pre = IWL3160_FW_PRE, IWL_DEVICE_7000, .ht_params = { @@ -180,7 +180,7 @@ static const struct iwl_pwr_tx_backoff iwl7265_pwr_tx_backoffs[] = { {0}, }; -const struct iwl_cfg iwl3165_2ac_cfg = { +const struct iwl_rf_cfg iwl3165_2ac_cfg = { .fw_name_pre = IWL7265D_FW_PRE, IWL_DEVICE_7005D, .ht_params = { @@ -192,7 +192,7 @@ const struct iwl_cfg iwl3165_2ac_cfg = { .dccm_len = IWL7265_DCCM_LEN, }; -const struct iwl_cfg iwl3168_2ac_cfg = { +const struct iwl_rf_cfg iwl3168_2ac_cfg = { .fw_name_pre = IWL3168_FW_PRE, IWL_DEVICE_3008, .ht_params = { @@ -205,7 +205,7 @@ const struct iwl_cfg iwl3168_2ac_cfg = { .nvm_type = IWL_NVM_SDP, }; -const struct iwl_cfg iwl7265_cfg = { +const struct iwl_rf_cfg iwl7265_cfg = { .fw_name_pre = IWL7265_FW_PRE, IWL_DEVICE_7005, .ht_params = { @@ -218,7 +218,7 @@ const struct iwl_cfg iwl7265_cfg = { .dccm_len = IWL7265_DCCM_LEN, }; -const struct iwl_cfg iwl7265d_cfg = { +const struct iwl_rf_cfg iwl7265d_cfg = { .fw_name_pre = IWL7265D_FW_PRE, IWL_DEVICE_7005D, .ht_params = { diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/8000.c b/drivers/net/wireless/intel/iwlwifi/cfg/8000.c index 03a09920f258..7e2be10ff3ae 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/8000.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/8000.c @@ -105,7 +105,7 @@ const char iwl8265_2ac_name[] = "Intel(R) Dual Band Wireless AC 8265"; const char iwl8275_2ac_name[] = "Intel(R) Dual Band Wireless AC 8275"; const char iwl4165_2ac_name[] = "Intel(R) Dual Band Wireless AC 4165"; -const struct iwl_cfg iwl8260_cfg = { +const struct iwl_rf_cfg iwl8260_cfg = { .fw_name_pre = IWL8000_FW_PRE, IWL_DEVICE_8260, .ht_params = { @@ -116,7 +116,7 @@ const struct iwl_cfg iwl8260_cfg = { .nvm_ver = IWL8000_NVM_VERSION, }; -const struct iwl_cfg iwl8265_cfg = { +const struct iwl_rf_cfg iwl8265_cfg = { .fw_name_pre = IWL8265_FW_PRE, IWL_DEVICE_8265, .ht_params = { diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/rf-fm.c b/drivers/net/wireless/intel/iwlwifi/cfg/rf-fm.c index 670360af3d6e..dfd075bb0865 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/rf-fm.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/rf-fm.c @@ -23,11 +23,11 @@ .nvm_ver = IWL_FM_NVM_VERSION, \ .nvm_type = IWL_NVM_EXT -const struct iwl_cfg iwl_rf_fm = { +const struct iwl_rf_cfg iwl_rf_fm = { IWL_DEVICE_FM, }; -const struct iwl_cfg iwl_rf_fm_160mhz = { +const struct iwl_rf_cfg iwl_rf_fm_160mhz = { IWL_DEVICE_FM, .bw_limit = 160, }; diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/rf-gf.c b/drivers/net/wireless/intel/iwlwifi/cfg/rf-gf.c index 36bf7aee7120..a90dba322094 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/rf-gf.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/rf-gf.c @@ -8,7 +8,7 @@ /* NVM versions */ #define IWL_GF_NVM_VERSION 0x0a1d -const struct iwl_cfg iwl_rf_gf = { +const struct iwl_rf_cfg iwl_rf_gf = { .uhb_supported = true, .led_mode = IWL_LED_RF_STATE, .non_shared_ant = ANT_B, diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/rf-hr.c b/drivers/net/wireless/intel/iwlwifi/cfg/rf-hr.c index d01f823ce272..7d444ee0a187 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/rf-hr.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/rf-hr.c @@ -22,16 +22,16 @@ .nvm_ver = IWL_HR_NVM_VERSION, \ .nvm_type = IWL_NVM_EXT -const struct iwl_cfg iwl_rf_hr1 = { +const struct iwl_rf_cfg iwl_rf_hr1 = { IWL_DEVICE_HR, .tx_with_siso_diversity = true, }; -const struct iwl_cfg iwl_rf_hr = { +const struct iwl_rf_cfg iwl_rf_hr = { IWL_DEVICE_HR, }; -const struct iwl_cfg iwl_rf_hr_80mhz = { +const struct iwl_rf_cfg iwl_rf_hr_80mhz = { IWL_DEVICE_HR, .bw_limit = 80, }; diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/rf-jf.c b/drivers/net/wireless/intel/iwlwifi/cfg/rf-jf.c index 3f50f9df5145..60f5fcfb1f46 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/rf-jf.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/rf-jf.c @@ -58,11 +58,11 @@ static const struct iwl_tt_params iwl_jf_tt_params = { .nvm_ver = IWL_JF_NVM_VERSION, \ .nvm_type = IWL_NVM_EXT -const struct iwl_cfg iwl_rf_jf = { +const struct iwl_rf_cfg iwl_rf_jf = { IWL_DEVICE_JF, }; -const struct iwl_cfg iwl_rf_jf_80mhz = { +const struct iwl_rf_cfg iwl_rf_jf_80mhz = { IWL_DEVICE_JF, .bw_limit = 80, }; diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/agn.h b/drivers/net/wireless/intel/iwlwifi/dvm/agn.h index a13add556a7b..1ebc7effcc2a 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/agn.h +++ b/drivers/net/wireless/intel/iwlwifi/dvm/agn.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2005-2014, 2021, 2024 Intel Corporation + * Copyright (C) 2005-2014, 2021, 2024-2025 Intel Corporation */ #ifndef __iwl_agn_h__ #define __iwl_agn_h__ @@ -399,7 +399,7 @@ static inline void iwl_dvm_set_pmi(struct iwl_priv *priv, bool state) * later with iwl_free_nvm_data(). */ struct iwl_nvm_data * -iwl_parse_eeprom_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, +iwl_parse_eeprom_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg, const u8 *eeprom, size_t eeprom_size); int iwl_read_eeprom(struct iwl_trans *trans, u8 **eeprom, size_t *eeprom_size); diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/dev.h b/drivers/net/wireless/intel/iwlwifi/dvm/dev.h index 4ac8b862ad41..25b24820466d 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/dev.h +++ b/drivers/net/wireless/intel/iwlwifi/dvm/dev.h @@ -2,6 +2,7 @@ /****************************************************************************** * * Copyright(c) 2003 - 2014, 2020, 2023 Intel Corporation. All rights reserved. + * Copyright (C) 2025 Intel Corporation *****************************************************************************/ /* * Please use this file (dev.h) for driver implementation definitions. @@ -627,7 +628,7 @@ struct iwl_priv { struct iwl_trans *trans; struct device *dev; /* for debug prints only */ - const struct iwl_cfg *cfg; + const struct iwl_rf_cfg *cfg; const struct iwl_fw *fw; const struct iwl_dvm_cfg *lib; unsigned long status; diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/eeprom.c b/drivers/net/wireless/intel/iwlwifi/dvm/eeprom.c index 998f3053b3b0..2423125e5284 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/eeprom.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/eeprom.c @@ -413,7 +413,7 @@ static void iwl_eeprom_enhanced_txpower(struct device *dev, } } -static void iwl_init_band_reference(const struct iwl_cfg *cfg, +static void iwl_init_band_reference(const struct iwl_rf_cfg *cfg, const u8 *eeprom, size_t eeprom_size, int eeprom_band, int *eeprom_ch_count, const struct iwl_eeprom_channel **ch_info, @@ -507,7 +507,7 @@ static void iwl_mod_ht40_chan_info(struct device *dev, #define CHECK_AND_PRINT_I(x) \ ((eeprom_ch_info[ch_idx].flags & EEPROM_CHANNEL_##x) ? # x " " : "") -static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg, +static int iwl_init_channel_map(struct device *dev, const struct iwl_rf_cfg *cfg, struct iwl_nvm_data *data, const u8 *eeprom, size_t eeprom_size) { @@ -1024,7 +1024,7 @@ int iwl_read_eeprom(struct iwl_trans *trans, u8 **eeprom, size_t *eeprom_size) return ret; } -static void iwl_init_sbands(struct iwl_trans *trans, const struct iwl_cfg *cfg, +static void iwl_init_sbands(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg, struct iwl_nvm_data *data, const u8 *eeprom, size_t eeprom_size) { @@ -1059,7 +1059,7 @@ static void iwl_init_sbands(struct iwl_trans *trans, const struct iwl_cfg *cfg, /* EEPROM data functions */ struct iwl_nvm_data * -iwl_parse_eeprom_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, +iwl_parse_eeprom_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg, const u8 *eeprom, size_t eeprom_size) { struct iwl_nvm_data *data; diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/main.c b/drivers/net/wireless/intel/iwlwifi/dvm/main.c index 68656706ce34..1d619384c629 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/main.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/main.c @@ -1226,7 +1226,7 @@ static int iwl_nvm_check_version(struct iwl_nvm_data *data, } static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, - const struct iwl_cfg *cfg, + const struct iwl_rf_cfg *cfg, const struct iwl_fw *fw, struct dentry *dbgfs_dir) { diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-config.h b/drivers/net/wireless/intel/iwlwifi/iwl-config.h index ecf9e7f8e00f..031c68fbf8b1 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-config.h @@ -353,7 +353,7 @@ struct iwl_mac_cfg { #define IWL_NUM_RBDS_EHT (512 * 8) /** - * struct iwl_cfg + * struct iwl_rf_cfg * @fw_name_pre: Firmware filename prefix. The api version and extension * (.ucode) will be added to filename before loading from disk. The * filename is constructed as -.ucode. @@ -369,6 +369,9 @@ struct iwl_mac_cfg { * @nvm_calib_ver: NVM calibration version * @bw_limit: bandwidth limit for this device, if non-zero * @ht_params: point to ht parameters + * @eeprom_params: EEPROM parameters (old devices) + * @thermal_params: Thermal throttling parameters + * @lp_xtal_workaround: low-power crystal workaround needed * @led_mode: 0=blinking, 1=On(RF On)/Off(RF Off) * @rx_with_siso_diversity: 1x1 device with rx antenna diversity * @tx_with_siso_diversity: 1x1 device with tx antenna diversity @@ -390,7 +393,7 @@ struct iwl_mac_cfg { * API differences in uCode shouldn't be handled here but through TLVs * and/or the uCode API version instead. */ -struct iwl_cfg { +struct iwl_rf_cfg { /* params specific to an individual device within a device family */ const char *fw_name_pre; /* params likely to change within a device family */ @@ -487,7 +490,7 @@ struct iwl_dev_info { u8 cores; u8 cdb; u8 jacket; - const struct iwl_cfg *cfg; + const struct iwl_rf_cfg *cfg; const char *name; }; @@ -643,59 +646,58 @@ extern const char iwl_mtp_name[]; extern const char iwl_dr_name[]; extern const char iwl_br_name[]; #if IS_ENABLED(CONFIG_IWLDVM) -extern const struct iwl_cfg iwl5300_agn_cfg; -extern const struct iwl_cfg iwl5350_agn_cfg; -extern const struct iwl_cfg iwl5100_n_cfg; -extern const struct iwl_cfg iwl5100_abg_cfg; -extern const struct iwl_cfg iwl5150_agn_cfg; -extern const struct iwl_cfg iwl5150_abg_cfg; -extern const struct iwl_cfg iwl6005_non_n_cfg; -extern const struct iwl_cfg iwl6005_n_cfg; -extern const struct iwl_cfg iwl6030_n_cfg; -extern const struct iwl_cfg iwl6030_non_n_cfg; -extern const struct iwl_cfg iwl6000i_2agn_cfg; -extern const struct iwl_cfg iwl6000i_non_n_cfg; -extern const struct iwl_cfg iwl6000i_non_n_cfg; -extern const struct iwl_cfg iwl6000_3agn_cfg; -extern const struct iwl_cfg iwl6050_2agn_cfg; -extern const struct iwl_cfg iwl6050_2abg_cfg; -extern const struct iwl_cfg iwl6150_bgn_cfg; -extern const struct iwl_cfg iwl6150_bg_cfg; -extern const struct iwl_cfg iwl1000_bgn_cfg; -extern const struct iwl_cfg iwl1000_bg_cfg; -extern const struct iwl_cfg iwl100_bgn_cfg; -extern const struct iwl_cfg iwl100_bg_cfg; -extern const struct iwl_cfg iwl130_bgn_cfg; -extern const struct iwl_cfg iwl130_bg_cfg; -extern const struct iwl_cfg iwl2000_2bgn_cfg; -extern const struct iwl_cfg iwl2030_2bgn_cfg; -extern const struct iwl_cfg iwl6035_2agn_cfg; -extern const struct iwl_cfg iwl105_bgn_cfg; -extern const struct iwl_cfg iwl135_bgn_cfg; +extern const struct iwl_rf_cfg iwl5300_agn_cfg; +extern const struct iwl_rf_cfg iwl5350_agn_cfg; +extern const struct iwl_rf_cfg iwl5100_n_cfg; +extern const struct iwl_rf_cfg iwl5100_abg_cfg; +extern const struct iwl_rf_cfg iwl5150_agn_cfg; +extern const struct iwl_rf_cfg iwl5150_abg_cfg; +extern const struct iwl_rf_cfg iwl6005_non_n_cfg; +extern const struct iwl_rf_cfg iwl6005_n_cfg; +extern const struct iwl_rf_cfg iwl6030_n_cfg; +extern const struct iwl_rf_cfg iwl6030_non_n_cfg; +extern const struct iwl_rf_cfg iwl6000i_2agn_cfg; +extern const struct iwl_rf_cfg iwl6000i_non_n_cfg; +extern const struct iwl_rf_cfg iwl6000i_non_n_cfg; +extern const struct iwl_rf_cfg iwl6000_3agn_cfg; +extern const struct iwl_rf_cfg iwl6050_2agn_cfg; +extern const struct iwl_rf_cfg iwl6050_2abg_cfg; +extern const struct iwl_rf_cfg iwl6150_bgn_cfg; +extern const struct iwl_rf_cfg iwl6150_bg_cfg; +extern const struct iwl_rf_cfg iwl1000_bgn_cfg; +extern const struct iwl_rf_cfg iwl1000_bg_cfg; +extern const struct iwl_rf_cfg iwl100_bgn_cfg; +extern const struct iwl_rf_cfg iwl100_bg_cfg; +extern const struct iwl_rf_cfg iwl130_bgn_cfg; +extern const struct iwl_rf_cfg iwl130_bg_cfg; +extern const struct iwl_rf_cfg iwl2000_2bgn_cfg; +extern const struct iwl_rf_cfg iwl2030_2bgn_cfg; +extern const struct iwl_rf_cfg iwl6035_2agn_cfg; +extern const struct iwl_rf_cfg iwl105_bgn_cfg; +extern const struct iwl_rf_cfg iwl135_bgn_cfg; #endif /* CONFIG_IWLDVM */ #if IS_ENABLED(CONFIG_IWLMVM) - -extern const struct iwl_cfg iwl7260_cfg; -extern const struct iwl_cfg iwl7260_high_temp_cfg; -extern const struct iwl_cfg iwl3160_cfg; -extern const struct iwl_cfg iwl3165_2ac_cfg; -extern const struct iwl_cfg iwl3168_2ac_cfg; -extern const struct iwl_cfg iwl7265_cfg; -extern const struct iwl_cfg iwl7265d_cfg; -extern const struct iwl_cfg iwl8260_cfg; -extern const struct iwl_cfg iwl8265_cfg; -extern const struct iwl_cfg iwl_rf_jf; -extern const struct iwl_cfg iwl_rf_jf_80mhz; -extern const struct iwl_cfg iwl_rf_hr1; -extern const struct iwl_cfg iwl_rf_hr; -extern const struct iwl_cfg iwl_rf_hr_80mhz; - -extern const struct iwl_cfg iwl_rf_gf; +extern const struct iwl_rf_cfg iwl7260_cfg; +extern const struct iwl_rf_cfg iwl7260_high_temp_cfg; +extern const struct iwl_rf_cfg iwl3160_cfg; +extern const struct iwl_rf_cfg iwl3165_2ac_cfg; +extern const struct iwl_rf_cfg iwl3168_2ac_cfg; +extern const struct iwl_rf_cfg iwl7265_cfg; +extern const struct iwl_rf_cfg iwl7265d_cfg; +extern const struct iwl_rf_cfg iwl8260_cfg; +extern const struct iwl_rf_cfg iwl8265_cfg; +extern const struct iwl_rf_cfg iwl_rf_jf; +extern const struct iwl_rf_cfg iwl_rf_jf_80mhz; +extern const struct iwl_rf_cfg iwl_rf_hr1; +extern const struct iwl_rf_cfg iwl_rf_hr; +extern const struct iwl_rf_cfg iwl_rf_hr_80mhz; + +extern const struct iwl_rf_cfg iwl_rf_gf; #endif /* CONFIG_IWLMVM */ #if IS_ENABLED(CONFIG_IWLMLD) -extern const struct iwl_cfg iwl_rf_fm; -extern const struct iwl_cfg iwl_rf_fm_160mhz; +extern const struct iwl_rf_cfg iwl_rf_fm; +extern const struct iwl_rf_cfg iwl_rf_fm_160mhz; #define iwl_rf_wh iwl_rf_fm #define iwl_rf_wh_160mhz iwl_rf_fm_160mhz #define iwl_rf_pe iwl_rf_fm diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index 8734c7913b2f..9504a0cb8b13 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c @@ -296,7 +296,7 @@ static void iwl_get_ucode_api_versions(struct iwl_trans *trans, unsigned int *api_max) { const struct iwl_family_base_params *base = trans->mac_cfg->base; - const struct iwl_cfg *cfg = trans->cfg; + const struct iwl_rf_cfg *cfg = trans->cfg; if (!base->ucode_api_max) { *api_min = cfg->ucode_api_min; @@ -1456,7 +1456,7 @@ static int iwl_alloc_ucode(struct iwl_drv *drv, static int validate_sec_sizes(struct iwl_drv *drv, struct iwl_firmware_pieces *pieces, - const struct iwl_cfg *cfg) + const struct iwl_rf_cfg *cfg) { IWL_DEBUG_INFO(drv, "f/w package hdr runtime inst size = %zd\n", get_sec_size(pieces, IWL_UCODE_REGULAR, diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.h b/drivers/net/wireless/intel/iwlwifi/iwl-drv.h index 854957bdf79d..595300a14639 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2005-2014, 2020-2021, 2023 Intel Corporation + * Copyright (C) 2005-2014, 2020-2021, 2023, 2025 Intel Corporation * Copyright (C) 2013-2014 Intel Mobile Communications GmbH */ #ifndef __iwl_drv_h__ @@ -53,7 +53,7 @@ struct iwl_drv; struct iwl_trans; -struct iwl_cfg; +struct iwl_rf_cfg; /** * iwl_drv_start - start the drv * diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index cf9e2e2ac9d1..0592f0f59d1c 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -336,7 +336,7 @@ static inline void iwl_nvm_print_channel_flags(struct device *dev, u32 level, } static u32 iwl_get_channel_flags(u8 ch_num, int ch_idx, enum nl80211_band band, - u32 nvm_flags, const struct iwl_cfg *cfg) + u32 nvm_flags, const struct iwl_rf_cfg *cfg) { u32 flags = IEEE80211_CHAN_NO_HT40; @@ -403,7 +403,7 @@ static int iwl_init_channel_map(struct iwl_trans *trans, const void * const nvm_ch_flags, u32 sbands_flags, bool v4) { - const struct iwl_cfg *cfg = trans->cfg; + const struct iwl_rf_cfg *cfg = trans->cfg; struct device *dev = trans->dev; int ch_idx; int n_channels = 0; @@ -504,7 +504,7 @@ static void iwl_init_vht_hw_capab(struct iwl_trans *trans, struct ieee80211_sta_vht_cap *vht_cap, u8 tx_chains, u8 rx_chains) { - const struct iwl_cfg *cfg = trans->cfg; + const struct iwl_rf_cfg *cfg = trans->cfg; int num_rx_ants = num_of_ant(rx_chains); int num_tx_ants = num_of_ant(tx_chains); @@ -1251,7 +1251,7 @@ static void iwl_init_sbands(struct iwl_trans *trans, n_used, n_channels); } -static int iwl_get_sku(const struct iwl_cfg *cfg, const __le16 *nvm_sw, +static int iwl_get_sku(const struct iwl_rf_cfg *cfg, const __le16 *nvm_sw, const __le16 *phy_sku) { if (cfg->nvm_type != IWL_NVM_EXT) @@ -1260,7 +1260,7 @@ static int iwl_get_sku(const struct iwl_cfg *cfg, const __le16 *nvm_sw, return le32_to_cpup((const __le32 *)(phy_sku + SKU_FAMILY_8000)); } -static int iwl_get_nvm_version(const struct iwl_cfg *cfg, const __le16 *nvm_sw) +static int iwl_get_nvm_version(const struct iwl_rf_cfg *cfg, const __le16 *nvm_sw) { if (cfg->nvm_type != IWL_NVM_EXT) return le16_to_cpup(nvm_sw + NVM_VERSION); @@ -1269,7 +1269,7 @@ static int iwl_get_nvm_version(const struct iwl_cfg *cfg, const __le16 *nvm_sw) NVM_VERSION_EXT_NVM)); } -static int iwl_get_radio_cfg(const struct iwl_cfg *cfg, const __le16 *nvm_sw, +static int iwl_get_radio_cfg(const struct iwl_rf_cfg *cfg, const __le16 *nvm_sw, const __le16 *phy_sku) { if (cfg->nvm_type != IWL_NVM_EXT) @@ -1279,7 +1279,7 @@ static int iwl_get_radio_cfg(const struct iwl_cfg *cfg, const __le16 *nvm_sw, } -static int iwl_get_n_hw_addrs(const struct iwl_cfg *cfg, const __le16 *nvm_sw) +static int iwl_get_n_hw_addrs(const struct iwl_rf_cfg *cfg, const __le16 *nvm_sw) { int n_hw_addr; @@ -1291,7 +1291,7 @@ static int iwl_get_n_hw_addrs(const struct iwl_cfg *cfg, const __le16 *nvm_sw) return n_hw_addr & N_HW_ADDR_MASK; } -static void iwl_set_radio_cfg(const struct iwl_cfg *cfg, +static void iwl_set_radio_cfg(const struct iwl_rf_cfg *cfg, struct iwl_nvm_data *data, u32 radio_cfg) { @@ -1350,7 +1350,7 @@ static void iwl_set_hw_address_from_csr(struct iwl_trans *trans, } static void iwl_set_hw_address_family_8000(struct iwl_trans *trans, - const struct iwl_cfg *cfg, + const struct iwl_rf_cfg *cfg, struct iwl_nvm_data *data, const __le16 *mac_override, const __be16 *nvm_hw) @@ -1399,7 +1399,7 @@ static void iwl_set_hw_address_family_8000(struct iwl_trans *trans, } static int iwl_set_hw_address(struct iwl_trans *trans, - const struct iwl_cfg *cfg, + const struct iwl_rf_cfg *cfg, struct iwl_nvm_data *data, const __be16 *nvm_hw, const __le16 *mac_override) { @@ -1434,7 +1434,7 @@ static int iwl_set_hw_address(struct iwl_trans *trans, } static bool -iwl_nvm_no_wide_in_5ghz(struct iwl_trans *trans, const struct iwl_cfg *cfg, +iwl_nvm_no_wide_in_5ghz(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg, const __be16 *nvm_hw) { /* @@ -1466,7 +1466,7 @@ iwl_nvm_no_wide_in_5ghz(struct iwl_trans *trans, const struct iwl_cfg *cfg, } struct iwl_nvm_data * -iwl_parse_mei_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, +iwl_parse_mei_nvm_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg, const struct iwl_mei_nvm *mei_nvm, const struct iwl_fw *fw, u8 tx_ant, u8 rx_ant) { @@ -1530,7 +1530,7 @@ iwl_parse_mei_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, IWL_EXPORT_SYMBOL(iwl_parse_mei_nvm_data); struct iwl_nvm_data * -iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, +iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg, const struct iwl_fw *fw, const __be16 *nvm_hw, const __le16 *nvm_sw, const __le16 *nvm_calib, const __le16 *regulatory, @@ -1630,7 +1630,7 @@ IWL_EXPORT_SYMBOL(iwl_parse_nvm_data); static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan, int ch_idx, u16 nvm_flags, struct iwl_reg_capa reg_capa, - const struct iwl_cfg *cfg) + const struct iwl_rf_cfg *cfg) { u32 flags = NL80211_RRF_NO_HT40; @@ -1749,7 +1749,7 @@ iwl_parse_nvm_mcc_info(struct iwl_trans *trans, int num_of_ch, __le32 *channels, u16 fw_mcc, u16 geo_info, u32 cap, u8 resp_ver) { - const struct iwl_cfg *cfg = trans->cfg; + const struct iwl_rf_cfg *cfg = trans->cfg; struct device *dev = trans->dev; int ch_idx; u16 ch_flags; diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h index 17d22a68f074..9ce9fa4e78fd 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.h @@ -30,7 +30,7 @@ enum iwl_nvm_sbands_flags { * later with iwl_free_nvm_data(). */ struct iwl_nvm_data * -iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, +iwl_parse_nvm_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg, const struct iwl_fw *fw, const __be16 *nvm_hw, const __le16 *nvm_sw, const __le16 *nvm_calib, const __le16 *regulatory, @@ -95,7 +95,7 @@ struct iwl_nvm_data *iwl_get_nvm(struct iwl_trans *trans, * iwl_parse_mei_nvm_data - parse the mei_nvm_data and get an iwl_nvm_data */ struct iwl_nvm_data * -iwl_parse_mei_nvm_data(struct iwl_trans *trans, const struct iwl_cfg *cfg, +iwl_parse_mei_nvm_data(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg, const struct iwl_mei_nvm *mei_nvm, const struct iwl_fw *fw, u8 set_tx_ant, u8 set_rx_ant); diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-utils.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-utils.c index 4f8a63a4c296..ec312c90ff85 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-utils.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-utils.c @@ -42,7 +42,7 @@ void iwl_init_ht_hw_capab(struct iwl_trans *trans, enum nl80211_band band, u8 tx_chains, u8 rx_chains) { - const struct iwl_cfg *cfg = trans->cfg; + const struct iwl_rf_cfg *cfg = trans->cfg; int max_bit_rate = 0; tx_chains = hweight8(tx_chains); diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h b/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h index b5d39026fa2f..5dc299296d6d 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h @@ -17,7 +17,7 @@ struct sk_buff; struct iwl_device_cmd; struct iwl_rx_cmd_buffer; struct iwl_fw; -struct iwl_cfg; +struct iwl_rf_cfg; /** * DOC: Operational mode - what is it ? @@ -150,7 +150,7 @@ struct iwl_fw_error_dump_mode { */ struct iwl_op_mode_ops { struct iwl_op_mode *(*start)(struct iwl_trans *trans, - const struct iwl_cfg *cfg, + const struct iwl_rf_cfg *cfg, const struct iwl_fw *fw, struct dentry *dbgfs_dir); void (*stop)(struct iwl_op_mode *op_mode); diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h index 894436a65351..d76caf5bf4c9 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h @@ -892,7 +892,7 @@ struct iwl_trans { bool csme_own; struct iwl_op_mode *op_mode; const struct iwl_mac_cfg *mac_cfg; - const struct iwl_cfg *cfg; + const struct iwl_rf_cfg *cfg; struct iwl_drv *drv; struct iwl_trans_config conf; enum iwl_trans_state state; diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mld.c b/drivers/net/wireless/intel/iwlwifi/mld/mld.c index 3e3af7d23b52..8cdd960c5245 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/mld.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/mld.c @@ -62,7 +62,7 @@ static void iwl_mld_hw_set_regulatory(struct iwl_mld *mld) VISIBLE_IF_IWLWIFI_KUNIT void iwl_construct_mld(struct iwl_mld *mld, struct iwl_trans *trans, - const struct iwl_cfg *cfg, const struct iwl_fw *fw, + const struct iwl_rf_cfg *cfg, const struct iwl_fw *fw, struct ieee80211_hw *hw, struct dentry *dbgfs_dir) { mld->dev = trans->dev; @@ -370,7 +370,7 @@ iwl_mld_configure_trans(struct iwl_op_mode *op_mode) #define NUM_FW_LOAD_RETRIES 3 static struct iwl_op_mode * -iwl_op_mode_mld_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, +iwl_op_mode_mld_start(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg, const struct iwl_fw *fw, struct dentry *dbgfs_dir) { struct ieee80211_hw *hw; diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mld.h b/drivers/net/wireless/intel/iwlwifi/mld/mld.h index 671f3a709322..3eab1774cb89 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/mld.h +++ b/drivers/net/wireless/intel/iwlwifi/mld/mld.h @@ -218,7 +218,7 @@ struct iwl_mld { /* And here fields that survive a fw restart */ struct device *dev; struct iwl_trans *trans; - const struct iwl_cfg *cfg; + const struct iwl_rf_cfg *cfg; const struct iwl_fw *fw; struct ieee80211_hw *hw; struct wiphy *wiphy; @@ -491,7 +491,7 @@ iwl_mld_is_dup(struct iwl_mld *mld, struct ieee80211_sta *sta, struct ieee80211_rx_status *rx_status, int queue); void iwl_construct_mld(struct iwl_mld *mld, struct iwl_trans *trans, - const struct iwl_cfg *cfg, const struct iwl_fw *fw, + const struct iwl_rf_cfg *cfg, const struct iwl_fw *fw, struct ieee80211_hw *hw, struct dentry *dbgfs_dir); #endif diff --git a/drivers/net/wireless/intel/iwlwifi/mld/tests/utils.c b/drivers/net/wireless/intel/iwlwifi/mld/tests/utils.c index 0a9a5677fa85..26cf27be762d 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/tests/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/tests/utils.c @@ -24,7 +24,7 @@ int iwlmld_kunit_test_init(struct kunit *test) { struct iwl_mld *mld; struct iwl_trans *trans; - const struct iwl_cfg *cfg; + const struct iwl_rf_cfg *cfg; struct iwl_fw *fw; struct ieee80211_hw *hw; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index b752bc4feb40..6df5158836db 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -1003,7 +1003,7 @@ struct iwl_mvm { struct iwl_trans *trans; const struct iwl_fw *fw; - const struct iwl_cfg *cfg; + const struct iwl_rf_cfg *cfg; struct iwl_phy_db *phy_db; struct ieee80211_hw *hw; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 5b9c37fb0c0d..a2dc5c3b0596 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c @@ -1278,7 +1278,7 @@ static void iwl_mvm_trig_link_selection(struct wiphy *wiphy, } static struct iwl_op_mode * -iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, +iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_rf_cfg *cfg, const struct iwl_fw *fw, struct dentry *dbgfs_dir) { struct ieee80211_hw *hw; diff --git a/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c b/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c index 0e6a74abd5e2..115642c75d10 100644 --- a/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c +++ b/drivers/net/wireless/intel/iwlwifi/tests/devinfo.c @@ -61,10 +61,10 @@ static void devinfo_names(struct kunit *test) static void devinfo_no_cfg_dups(struct kunit *test) { for (int i = 0; i < iwl_dev_info_table_size; i++) { - const struct iwl_cfg *cfg_i = iwl_dev_info_table[i].cfg; + const struct iwl_rf_cfg *cfg_i = iwl_dev_info_table[i].cfg; for (int j = 0; j < i; j++) { - const struct iwl_cfg *cfg_j = iwl_dev_info_table[j].cfg; + const struct iwl_rf_cfg *cfg_j = iwl_dev_info_table[j].cfg; if (cfg_i == cfg_j) continue; From patchwork Fri May 9 10:44:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889144 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 A40AB28F525 for ; Fri, 9 May 2025 10:45:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787522; cv=none; b=tdSniTOTMUwH6m1VH2Mvexr4xnHHsNJHB2jyKczCL6pZmJFldD2CMs18+hFxJCXdjQ/EmE+gFKwyWJBXaS3LO4Z3EkGutz+HsVV+8UnrBvpb7lcVf50+1F8QpZrt2WloRSdwdb6UsoaAQoIif0UCTq3lg+QyH2lRJ+6Cug3/7YM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787522; c=relaxed/simple; bh=BnNr+fweS66UWB2bqY4GZBhfJa4/OC5kh/LI8y9osMA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=hjMOdvchwi64FCLVtXFQcOxqdy6BVahupMZYoZv90bfRDr7aAqgnFOUQDegEWAOiSHaH8gMbWZQY+6Zpf0c2Kx5xcBymvCix8/dIRFrIEmwfZdbcYywcH6XqsIspkralPyWkVQLxQYl47xz7RILnbHvkUFXcRqHiPUzoHhoy/nA= 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=aB/6dPVX; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="aB/6dPVX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787520; x=1778323520; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=BnNr+fweS66UWB2bqY4GZBhfJa4/OC5kh/LI8y9osMA=; b=aB/6dPVXRLFmJbgsc9mgoHiriRwQm/LsBk6poBXF10G4kOgNgY09DqjT Ll5grQBEzW7++w6o0dE990UI9ENMbaj1j5zg5CIhhX6gbEfivlo+uVx2l LtLtgkhOQNUUroU03oDXfwz/aY65IJz9BG0UswTcCtUvLu9ne3m+PH6YV 3b9pzC6WfGDcq9E+v1lensHuShf+v8WlzhvX05HLlncJfrds9RajD/vAF VaPJOqHsMx6tNvmHIiuZ6hfbVt8cMk/q/Vb3InkSr4u2sTpW5VKEPNNBc eloHK832QR3IAhzpOz6ZzTJ8VQM8NJ9zKf2WxVFM+6V2y3hwr+tQdtaaa A==; X-CSE-ConnectionGUID: dp8+L1DgTNqm7TjZD6uxSw== X-CSE-MsgGUID: m4JD4/g7S+ezos/qziF99Q== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239900" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239900" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:20 -0700 X-CSE-ConnectionGUID: E5vuZOnJT52JkE54Ez7L+w== X-CSE-MsgGUID: wmPzRtTPR96IZqOIKEMsZQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537041" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:19 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Pagadala Yesu Anjaneyulu , Somashekhar Puttagangaiah Subject: [PATCH iwlwifi-next 09/15] wifi: iwlwifi: mld: Correct comments for cleanup functions Date: Fri, 9 May 2025 13:44:48 +0300 Message-Id: <20250509104454.2582160-10-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Pagadala Yesu Anjaneyulu Update comments to accurately reflect the purpose of the iwl_mld_cleanup_link and iwl_cleanup_mld functions. Signed-off-by: Pagadala Yesu Anjaneyulu Reviewed-by: Somashekhar Puttagangaiah Message-Id: <20250509134302.a8fc74198c52.Idf31a48eceda63fc95e3e1466d27c03adcb67bff@changeid> Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mld/link.h | 2 +- drivers/net/wireless/intel/iwlwifi/mld/mld.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/link.h b/drivers/net/wireless/intel/iwlwifi/mld/link.h index 40492f0974e2..86ca5b9286f8 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/link.h +++ b/drivers/net/wireless/intel/iwlwifi/mld/link.h @@ -91,7 +91,7 @@ struct iwl_mld_link { struct iwl_probe_resp_data __rcu *probe_resp_data; }; -/* Cleanup function for struct iwl_mld_phy, will be called in restart */ +/* Cleanup function for struct iwl_mld_link, will be called in restart */ static inline void iwl_mld_cleanup_link(struct iwl_mld *mld, struct iwl_mld_link *link) { diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mld.h b/drivers/net/wireless/intel/iwlwifi/mld/mld.h index 3eab1774cb89..1a2c44f44eff 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/mld.h +++ b/drivers/net/wireless/intel/iwlwifi/mld/mld.h @@ -295,7 +295,7 @@ struct iwl_mld { memset((void *)&(_ptr)->zeroed_on_hw_restart, 0, \ sizeof((_ptr)->zeroed_on_hw_restart)) -/* Cleanup function for struct iwl_mld_vif, will be called in restart */ +/* Cleanup function for struct iwl_mld, will be called in restart */ static inline void iwl_cleanup_mld(struct iwl_mld *mld) { From patchwork Fri May 9 10:44:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889061 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 D9CB428FFD4 for ; Fri, 9 May 2025 10:45:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787523; cv=none; b=SymZBh3whFjTM/1M0QBr8tPCTwJClBm0EBncAPcUlky99H4hFDAFjCr9rEdBwaOdKPrXdt4cdAYBkabsRBAQErzKuwnQvEYgLAF377CYuBDR+psxA8nD4NAZTiSmwEcfOzydB1CPEAdJQh3vVpvQCM9g+KTof8DqMwVOLIbP88g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787523; c=relaxed/simple; bh=8SGowftuOPTNDKE0VG4Xo1rWJcpMArwL4XRimXuc+WQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=dkHZU4Vgh/jyeEMYQ/JmWmRS/CfKKs+t64SnUO5zVA/GjEFxDVZWceUaNbe6REoihnMTb0aB/GusuNiDIxyljW3cajlvzYxRIl8UsGI0VXY5io0X5awgv7FTv/n6ZQ6PHJ34vl1UkBnsuFZqtUbbiqmoDA8gNhONvArxysLigpo= 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=XWSgCt9a; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XWSgCt9a" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787522; x=1778323522; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8SGowftuOPTNDKE0VG4Xo1rWJcpMArwL4XRimXuc+WQ=; b=XWSgCt9a84iyog/WPuhWZjEDChUdNYINiyZ+IQNi7YX2v24ha6We8qvV hpDmidJNd+ZSjBt2+Wob+8U8hnSR/W6wEIyDS8sH2sNtELqX2SNe9qelC hmISyjHNkRKYdq8E3HaDigTn1OK8c0WGT4PfzMZVZ5HuI3TxHDvZH01BW AoRLzaNP4HqXFBgwwzR/nykWUAlDYsmZzA8kkKpfCOJ0rNHcgxJS3Proe 4nwfT7rIoWcwvG2T6WbygkWCWYc98obBstX5gglGbLgpB6DIesGrGejdi OVJ5Gggxg0/e/nPcduCdDO3o8PiKgo3M3CMc/VFFLxq+YLanQoR5Qg1b8 A==; X-CSE-ConnectionGUID: s/bq5uw0Qh+g1VjHS7761g== X-CSE-MsgGUID: xSpFnzdpQHWeZCpoktMykw== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239901" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239901" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:21 -0700 X-CSE-ConnectionGUID: k+a1A4RpSPicsSY6XquU6g== X-CSE-MsgGUID: lqpAmQTSQm6Zkm9W3I+iHg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537044" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:21 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Pagadala Yesu Anjaneyulu Subject: [PATCH iwlwifi-next 10/15] wifi: iwlwifi: mld: Fix ROC activity cleanup in iwl_mld_vif Date: Fri, 9 May 2025 13:44:49 +0300 Message-Id: <20250509104454.2582160-11-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Pagadala Yesu Anjaneyulu The roc_activity member in the iwl_mld_vif structure was previously set to zero during cleanup as was present in struct_group, which incorrectly indicated ROC_ACTIVITY_HOTSPOT. To fix this issue, remove roc_activity member from struct_group. Notify mac80211 of ROC expiration during vif cleanup to maintain synchronization between the driver and mac80211. While on it, update it's type to enum iwl_roc_activity. Signed-off-by: Pagadala Yesu Anjaneyulu Message-Id: <20250509134302.ea3e1fb12595.If2a191ab496046b7e72e6df78ada398b564afeda@changeid> Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mld/iface.c | 3 +++ drivers/net/wireless/intel/iwlwifi/mld/iface.h | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/iface.c b/drivers/net/wireless/intel/iwlwifi/mld/iface.c index c083ba416d40..fdb7a3b3107d 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/iface.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/iface.c @@ -25,6 +25,9 @@ void iwl_mld_cleanup_vif(void *data, u8 *mac, struct ieee80211_vif *vif) /* EMLSR is turned back on during recovery */ vif->driver_flags &= ~IEEE80211_VIF_EML_ACTIVE; + if (mld_vif->roc_activity != ROC_NUM_ACTIVITIES) + ieee80211_remain_on_channel_expired(mld->hw); + mld_vif->roc_activity = ROC_NUM_ACTIVITIES; for_each_mld_vif_valid_link(mld_vif, link) { diff --git a/drivers/net/wireless/intel/iwlwifi/mld/iface.h b/drivers/net/wireless/intel/iwlwifi/mld/iface.h index 1ae522431f3f..3437f0c422cf 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/iface.h +++ b/drivers/net/wireless/intel/iwlwifi/mld/iface.h @@ -10,6 +10,7 @@ #include "link.h" #include "session-protect.h" #include "d3.h" +#include "fw/api/time-event.h" enum iwl_mld_cca_40mhz_wa_status { CCA_40_MHZ_WA_NONE, @@ -125,8 +126,6 @@ struct iwl_mld_emlsr { * Only valid for STA. (FIXME: needs to be per link) * @num_associated_stas: number of associated STAs. Relevant only for AP mode. * @ap_ibss_active: whether the AP/IBSS was started - * @roc_activity: the id of the roc_activity running. Relevant for p2p device - * only. Set to %ROC_NUM_ACTIVITIES when not in use. * @cca_40mhz_workaround: When we are connected in 2.4 GHz and 40 MHz, and the * environment is too loaded, we work around this by reconnecting to the * same AP with 20 MHz. This manages the status of the workaround. @@ -142,6 +141,8 @@ struct iwl_mld_emlsr { * @use_ps_poll: use ps_poll frames * @disable_bf: disable beacon filter * @dbgfs_slink: debugfs symlink for this interface + * @roc_activity: the id of the roc_activity running. Relevant for p2p device + * only. Set to %ROC_NUM_ACTIVITIES when not in use. */ struct iwl_mld_vif { /* Add here fields that need clean up on restart */ @@ -153,7 +154,6 @@ struct iwl_mld_vif { struct ieee80211_key_conf __rcu *bigtks[2]; u8 num_associated_stas; bool ap_ibss_active; - u32 roc_activity; enum iwl_mld_cca_40mhz_wa_status cca_40mhz_workaround; #ifdef CONFIG_IWLWIFI_DEBUGFS bool beacon_inject_active; @@ -176,6 +176,7 @@ struct iwl_mld_vif { bool disable_bf; struct dentry *dbgfs_slink; #endif + enum iwl_roc_activity roc_activity; }; static inline struct iwl_mld_vif * From patchwork Fri May 9 10:44:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889060 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 5865F28FFDA for ; Fri, 9 May 2025 10:45:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787525; cv=none; b=Xdsm71pOWV8ThpQvZZrR3uN5c/fKVpP7CuJE7DYhnYzMblX4vdyOdDiniZXN4MiySHOu3QMVCmP+gyFHGRp4mfQSbKVXk6MuM8xj6UTrCGm6S+5CQBbiIH3SP06nhhXcq+0rBebyyELkWFFRoB+wqWZzL9jWZKgKTDw5rPb2/tc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787525; c=relaxed/simple; bh=dZQqkF0J9hMPstf+Eu1YQJ/At0V+0N/BH1LIyClWqgQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NBSRVOOQJhyCxvK5MqDMkYqp5y8Eg3B0YrnnUQyJ899u4mWV8muVmNlqBHoZ/Ro+WIHMS9kxiMBNRzs96y6riI2uSuHGKxSs2lJtC3WDRKFhGPFPIpovX6B5AVsvsxXiwgq4JEWsbRmarfpDoMm+RFqVndXWug3G2atF3VZ0lzI= 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=XPY+sIgv; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XPY+sIgv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787523; x=1778323523; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dZQqkF0J9hMPstf+Eu1YQJ/At0V+0N/BH1LIyClWqgQ=; b=XPY+sIgvOsZv+JSWYLEV6CYCMcNccTO1Qdcx8jq+6oPcjCGsQxHOocs8 zzUvBnkK8beHa7LazgtUgA+P+2Aro11VlACLtRaY6WZbZUczRRwO1vDQM HcJLuwnesMaj401L8LJsRk8WlJaxnYisD9Y/+KwS08MdncH0VLeDGL1cB AV1dEdnQvcBPsv+T0MJzK57ytDUkpEynpZnAiIk5HiF/AA4ZHhcXyQtAz 8/3iWJHMWfKvl3gBQ22oMYBPRwUrl2vkxjq7Hv/BbXkxH3KNlE24BFVZp tsUwT7X432gUFUU7oL54drRaC1btuQ3f4UCu3k8J46D081uCA73NlXXP0 A==; X-CSE-ConnectionGUID: DkM/8khSQ0WsA869exIWew== X-CSE-MsgGUID: VjnVTV1nTZir+iSo8Mwk6Q== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239903" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239903" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:23 -0700 X-CSE-ConnectionGUID: kDERtkVlTBmAWkMItq2rag== X-CSE-MsgGUID: tMEA4PLPSpKVUh9OtBGXyQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537048" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:22 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Pagadala Yesu Anjaneyulu , Somashekhar Puttagangaiah Subject: [PATCH iwlwifi-next 11/15] wifi: iwlwifi: mld: move aux_sta member from iwl_mld_link to iwl_mld_vif Date: Fri, 9 May 2025 13:44:50 +0300 Message-Id: <20250509104454.2582160-12-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Pagadala Yesu Anjaneyulu This change reflects the correct ownership of aux_sta, as it is not a property of the link but rather of the virtual interface. Updated the initialization, cleanup and access logic for the aux_sta member to align with its new location within iwl_mld_vif. Signed-off-by: Pagadala Yesu Anjaneyulu Reviewed-by: Somashekhar Puttagangaiah Message-Id: <20250509134302.d74e0bd6f605.Ia5e0d50f7f0a605b8873a040a828b1672e070bf8@changeid> Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mld/iface.c | 4 ++++ drivers/net/wireless/intel/iwlwifi/mld/iface.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mld/link.c | 1 - drivers/net/wireless/intel/iwlwifi/mld/link.h | 4 ---- drivers/net/wireless/intel/iwlwifi/mld/roc.c | 9 +++------ drivers/net/wireless/intel/iwlwifi/mld/sta.c | 10 +++------- drivers/net/wireless/intel/iwlwifi/mld/sta.h | 3 +-- drivers/net/wireless/intel/iwlwifi/mld/tx.c | 2 +- 8 files changed, 14 insertions(+), 21 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/iface.c b/drivers/net/wireless/intel/iwlwifi/mld/iface.c index fdb7a3b3107d..3aacca5ed6a3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/iface.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/iface.c @@ -22,6 +22,9 @@ void iwl_mld_cleanup_vif(void *data, u8 *mac, struct ieee80211_vif *vif) struct iwl_mld *mld = mld_vif->mld; struct iwl_mld_link *link; + if (mld_vif->aux_sta.sta_id != IWL_INVALID_STA) + iwl_mld_free_internal_sta(mld, &mld_vif->aux_sta); + /* EMLSR is turned back on during recovery */ vif->driver_flags &= ~IEEE80211_VIF_EML_ACTIVE; @@ -408,6 +411,7 @@ iwl_mld_init_vif(struct iwl_mld *mld, struct ieee80211_vif *vif) wiphy_delayed_work_init(&mld_vif->emlsr.tmp_non_bss_done_wk, iwl_mld_emlsr_tmp_non_bss_done_wk); } + iwl_mld_init_internal_sta(&mld_vif->aux_sta); return 0; } diff --git a/drivers/net/wireless/intel/iwlwifi/mld/iface.h b/drivers/net/wireless/intel/iwlwifi/mld/iface.h index 3437f0c422cf..15b437110351 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/iface.h +++ b/drivers/net/wireless/intel/iwlwifi/mld/iface.h @@ -143,6 +143,7 @@ struct iwl_mld_emlsr { * @dbgfs_slink: debugfs symlink for this interface * @roc_activity: the id of the roc_activity running. Relevant for p2p device * only. Set to %ROC_NUM_ACTIVITIES when not in use. + * @aux_sta: station used for remain on channel. Used in P2P device. */ struct iwl_mld_vif { /* Add here fields that need clean up on restart */ @@ -177,6 +178,7 @@ struct iwl_mld_vif { struct dentry *dbgfs_slink; #endif enum iwl_roc_activity roc_activity; + struct iwl_mld_int_sta aux_sta; }; static inline struct iwl_mld_vif * diff --git a/drivers/net/wireless/intel/iwlwifi/mld/link.c b/drivers/net/wireless/intel/iwlwifi/mld/link.c index 80f7290ef8b2..d0f56189ad3f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/link.c @@ -782,7 +782,6 @@ iwl_mld_init_link(struct iwl_mld *mld, struct ieee80211_bss_conf *link, iwl_mld_init_internal_sta(&mld_link->bcast_sta); iwl_mld_init_internal_sta(&mld_link->mcast_sta); - iwl_mld_init_internal_sta(&mld_link->aux_sta); iwl_mld_init_internal_sta(&mld_link->mon_sta); if (!mld->fw_status.in_hw_restart) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/link.h b/drivers/net/wireless/intel/iwlwifi/mld/link.h index 86ca5b9286f8..39f04aae5579 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/link.h +++ b/drivers/net/wireless/intel/iwlwifi/mld/link.h @@ -39,7 +39,6 @@ struct iwl_probe_resp_data { * @vif: the vif this link belongs to * @bcast_sta: station used for broadcast packets. Used in AP, GO and IBSS. * @mcast_sta: station used for multicast packets. Used in AP, GO and IBSS. - * @aux_sta: station used for remain on channel. Used in P2P device. * @mon_sta: station used for TX injection in monitor interface. * @link_id: over the air link ID * @ap_early_keys: The firmware cannot install keys before bcast/mcast STAs, @@ -73,7 +72,6 @@ struct iwl_mld_link { struct ieee80211_vif *vif; struct iwl_mld_int_sta bcast_sta; struct iwl_mld_int_sta mcast_sta; - struct iwl_mld_int_sta aux_sta; struct iwl_mld_int_sta mon_sta; u8 link_id; @@ -107,8 +105,6 @@ iwl_mld_cleanup_link(struct iwl_mld *mld, struct iwl_mld_link *link) iwl_mld_free_internal_sta(mld, &link->bcast_sta); if (link->mcast_sta.sta_id != IWL_INVALID_STA) iwl_mld_free_internal_sta(mld, &link->mcast_sta); - if (link->aux_sta.sta_id != IWL_INVALID_STA) - iwl_mld_free_internal_sta(mld, &link->aux_sta); if (link->mon_sta.sta_id != IWL_INVALID_STA) iwl_mld_free_internal_sta(mld, &link->mon_sta); } diff --git a/drivers/net/wireless/intel/iwlwifi/mld/roc.c b/drivers/net/wireless/intel/iwlwifi/mld/roc.c index b87faca23ceb..ac52cc06e4d6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/roc.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/roc.c @@ -37,7 +37,7 @@ int iwl_mld_start_roc(struct ieee80211_hw *hw, struct ieee80211_vif *vif, { struct iwl_mld *mld = IWL_MAC80211_GET_MLD(hw); struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif); - struct iwl_mld_int_sta *aux_sta; + struct iwl_mld_int_sta *aux_sta = &mld_vif->aux_sta; struct iwl_roc_req cmd = { .action = cpu_to_le32(FW_CTXT_ACTION_ADD), }; @@ -79,9 +79,6 @@ int iwl_mld_start_roc(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (WARN_ON(mld_vif->roc_activity != ROC_NUM_ACTIVITIES)) return -EBUSY; - /* No MLO on P2P device */ - aux_sta = &mld_vif->deflink.aux_sta; - ret = iwl_mld_add_aux_sta(mld, aux_sta); if (ret) return ret; @@ -136,9 +133,9 @@ static void iwl_mld_destroy_roc(struct iwl_mld *mld, * we can flush the Tx on the queues */ - iwl_mld_flush_link_sta_txqs(mld, mld_vif->deflink.aux_sta.sta_id); + iwl_mld_flush_link_sta_txqs(mld, mld_vif->aux_sta.sta_id); - iwl_mld_remove_aux_sta(mld, vif, &vif->bss_conf); + iwl_mld_remove_aux_sta(mld, vif); } int iwl_mld_cancel_roc(struct ieee80211_hw *hw, diff --git a/drivers/net/wireless/intel/iwlwifi/mld/sta.c b/drivers/net/wireless/intel/iwlwifi/mld/sta.c index 317388ad2170..bc5313f44fde 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/sta.c @@ -1160,19 +1160,15 @@ void iwl_mld_remove_mcast_sta(struct iwl_mld *mld, } void iwl_mld_remove_aux_sta(struct iwl_mld *mld, - struct ieee80211_vif *vif, - struct ieee80211_bss_conf *link) + struct ieee80211_vif *vif) { - struct iwl_mld_link *mld_link = iwl_mld_link_from_mac80211(link); - - if (WARN_ON(!mld_link)) - return; + struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif); /* TODO: Hotspot 2.0 */ if (WARN_ON(vif->type != NL80211_IFTYPE_P2P_DEVICE)) return; - iwl_mld_remove_internal_sta(mld, &mld_link->aux_sta, false, + iwl_mld_remove_internal_sta(mld, &mld_vif->aux_sta, false, IWL_MAX_TID_COUNT); } diff --git a/drivers/net/wireless/intel/iwlwifi/mld/sta.h b/drivers/net/wireless/intel/iwlwifi/mld/sta.h index c45d815d0c73..1897b121aae2 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/sta.h +++ b/drivers/net/wireless/intel/iwlwifi/mld/sta.h @@ -260,8 +260,7 @@ void iwl_mld_remove_mcast_sta(struct iwl_mld *mld, struct ieee80211_bss_conf *link); void iwl_mld_remove_aux_sta(struct iwl_mld *mld, - struct ieee80211_vif *vif, - struct ieee80211_bss_conf *link); + struct ieee80211_vif *vif); void iwl_mld_remove_mon_sta(struct iwl_mld *mld, struct ieee80211_vif *vif, diff --git a/drivers/net/wireless/intel/iwlwifi/mld/tx.c b/drivers/net/wireless/intel/iwlwifi/mld/tx.c index e478afbc61f4..96ea6320c084 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/tx.c @@ -645,7 +645,7 @@ iwl_mld_get_tx_queue_id(struct iwl_mld *mld, struct ieee80211_txq *txq, WARN_ON(!ieee80211_is_mgmt(fc)); - return mld_vif->deflink.aux_sta.queue_id; + return mld_vif->aux_sta.queue_id; case NL80211_IFTYPE_MONITOR: mld_vif = iwl_mld_vif_from_mac80211(info->control.vif); return mld_vif->deflink.mon_sta.queue_id; From patchwork Fri May 9 10:44:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889142 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 19F9628F531 for ; Fri, 9 May 2025 10:45:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787526; cv=none; b=klolpZQ2Y7+L+oyz3O3ggggE4yvtGNyRAshorJCKgA5nrq0DjlRG0WuzW7GnBiyAdZi28WSICgWivunsUKcCC2MOFpBpnmcQb1M7uji5BrQN6AbhZWRni6cSkzuN7ps3ptJy8JtTj5opw3uyRxn9hFuHjqd0JpeLCesXqh9yIVA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787526; c=relaxed/simple; bh=UgQjxSH07jenVSkyjRx92Ned9o4lLLIYH92oSPE/CJU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ge4p6i+iTtT7V07xjEq/fAbeUeqxfX8mYXCucZ1gIa7q12kHkSIkHMgzbSxF5lKw5ELyN0Ccy/597hcbr5iPg/LF0cI03CGZV29ZYtcKI+rjZ64JFBQoMBC4F9gO7cYftzT85C9hBawPRf06TRudCB/4XMUmVujhnX21lAtrJXo= 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=h0b7hEGp; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="h0b7hEGp" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787525; x=1778323525; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UgQjxSH07jenVSkyjRx92Ned9o4lLLIYH92oSPE/CJU=; b=h0b7hEGpjQ2O7sIFHHrAtp/ASIJJH72LMrTZuPa+9SzKZdzOOsRN+FsX fNVn7RqTi3E+SWzMF4XIcwaf7M7AiPm7bk7LDCQZ0viMxYILNdVbX0KKf bXTuuLhnd32caEpFEoh5dfTTBuT6mrJ6ouYc9rSrKNefYXk7GnPd7+eiT PV8AZWBPGmRhQw5Z2Sk1vxVWgooFdSkUgUPaEFdLO/rJCQrTIKszfQqus ojlJknIxsDgNgo5VNiUbhkxUrCU60vDBItgPklX1DsEjUXWQWbyyHqcnY /sQCdCdvjQ7i5xIjHZbhJGksmGqdxWCeeywIZHSxB5d/SrwitXeUrCDJO g==; X-CSE-ConnectionGUID: 2EhByloMQv+yDQF9402f1w== X-CSE-MsgGUID: v3rsrIE7QpWGv0Up2EJdpQ== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239906" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239906" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:24 -0700 X-CSE-ConnectionGUID: +WpQTQ2FRvK5lYivi3Z3CQ== X-CSE-MsgGUID: ryN/vxLtSOunw6ojmV9nLQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537051" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:24 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Pagadala Yesu Anjaneyulu Subject: [PATCH iwlwifi-next 12/15] wifi: iwlwifi: mld: Block EMLSR only when ready to enter ROC Date: Fri, 9 May 2025 13:44:51 +0300 Message-Id: <20250509104454.2582160-13-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Pagadala Yesu Anjaneyulu If one of the stages in starting a ROC failed, the ROC will not start nor end so EMLSR will stay blocked forever. Block EMLSR once all ROC conditions are validated and clear EMLSR blocked reasons in mld_vif cleanup. Signed-off-by: Pagadala Yesu Anjaneyulu Message-Id: <20250509134302.ab16882dc986.Ibbff57d2e2638a1742b64b1afd1a2a5483753525@changeid> Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mld/iface.c | 2 ++ drivers/net/wireless/intel/iwlwifi/mld/roc.c | 14 +++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/iface.c b/drivers/net/wireless/intel/iwlwifi/mld/iface.c index 3aacca5ed6a3..235b55e0fe59 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/iface.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/iface.c @@ -22,6 +22,8 @@ void iwl_mld_cleanup_vif(void *data, u8 *mac, struct ieee80211_vif *vif) struct iwl_mld *mld = mld_vif->mld; struct iwl_mld_link *link; + mld_vif->emlsr.blocked_reasons &= ~IWL_MLD_EMLSR_BLOCKED_ROC; + if (mld_vif->aux_sta.sta_id != IWL_INVALID_STA) iwl_mld_free_internal_sta(mld, &mld_vif->aux_sta); diff --git a/drivers/net/wireless/intel/iwlwifi/mld/roc.c b/drivers/net/wireless/intel/iwlwifi/mld/roc.c index ac52cc06e4d6..cfd010c1ca80 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/roc.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/roc.c @@ -49,13 +49,6 @@ int iwl_mld_start_roc(struct ieee80211_hw *hw, struct ieee80211_vif *vif, lockdep_assert_wiphy(mld->wiphy); - ieee80211_iterate_active_interfaces_mtx(mld->hw, - IEEE80211_IFACE_ITER_NORMAL, - iwl_mld_vif_iter_emlsr_block_roc, - &ret); - if (ret) - return ret; - /* TODO: task=Hotspot 2.0 */ if (vif->type != NL80211_IFTYPE_P2P_DEVICE) { IWL_ERR(mld, "NOT SUPPORTED: ROC on vif->type %d\n", @@ -79,6 +72,13 @@ int iwl_mld_start_roc(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (WARN_ON(mld_vif->roc_activity != ROC_NUM_ACTIVITIES)) return -EBUSY; + ieee80211_iterate_active_interfaces_mtx(mld->hw, + IEEE80211_IFACE_ITER_NORMAL, + iwl_mld_vif_iter_emlsr_block_roc, + &ret); + if (ret) + return ret; + ret = iwl_mld_add_aux_sta(mld, aux_sta); if (ret) return ret; From patchwork Fri May 9 10:44:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889059 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 D596928FFF1 for ; Fri, 9 May 2025 10:45:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787527; cv=none; b=ZxLFKGoN8/LmaVc4KhkB1f+3HT7vbu/Uh/M8FBa3zxJjtrkTgp7t4yML8BHtfDLKXbHKgrXHwb4j+xUuuCfiM02AS0mqmMgIkMvlIFsfXZ19S6Bdqbs2mrS66xgC2CgCsmcJ8qvv4miS8fy+E8eF2IWAndcG41smC5dlVvmOPH8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787527; c=relaxed/simple; bh=rW8E4O+5XrmPttnAA/dFvH3n6OB4N3ELP5QQFIp9aLo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=D7wznAfI38RvIRbpd1+3rY56eR7b8KM+53K8ZYR0BPUm/qCEONdz5w4HyEKpoVsDurINrRTdpDYuR72NYW5gjDAZE7+YWxXtNifR+0mtnET9CXX+l80x92yx7asNmFdpPRC61WJpPfGt3em8etM45JYOmAtdw4Q0H3Ay37d4oDA= 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=amBuCPE5; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="amBuCPE5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787526; x=1778323526; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rW8E4O+5XrmPttnAA/dFvH3n6OB4N3ELP5QQFIp9aLo=; b=amBuCPE5+zogv+mCKizNWK0Njb4oZtIqOhTPlwUtP4Mt8chWaRdQ2grt v1p/QoZp5GNk11V298g2yK3BPTr0AoNsxtiTr2gqPuFXdI4B8od7lWMCs 7NEk0nnUq7Wz7ZfKuqUfJ1Qbkk6uQDyzP8gjLFQH2bkh54EQR9hDe1GVl iIw/OQZ9InTNSA7WbtvQLwRcwNYVownVbjPGnfmsKpK1iQAcd8iFB2xwC 0F8yydyvKqSTdwE/0nK34Cvd1GLOhh4bbjxiqunBSK9vTae28Rjos7F6D chC0/+Nq1MFdAmbFV54ZLWZXo24abdLfX/TRTFs7y62ChJZt1HGr/zyiQ w==; X-CSE-ConnectionGUID: jT+bMxTrS/SHnvIrM/2m0A== X-CSE-MsgGUID: 6/H2+Sc1TGSUjbqTZ4Ev0g== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239907" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239907" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:25 -0700 X-CSE-ConnectionGUID: a0TWwMGUS3emxt9mx5QhHw== X-CSE-MsgGUID: EU5QdXvHQSm86jhqduy0Kg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537055" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:25 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Pagadala Yesu Anjaneyulu Subject: [PATCH iwlwifi-next 13/15] wifi: iwlwifi: mld: add support for ROC on BSS Date: Fri, 9 May 2025 13:44:52 +0300 Message-Id: <20250509104454.2582160-14-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Pagadala Yesu Anjaneyulu add support for remain on channel on BSS vif for iwlmld. Signed-off-by: Pagadala Yesu Anjaneyulu Message-Id: <20250509134302.0cac670cfbfe.I4318f40866181927da17e6cbfada59107cd3c458@changeid> Signed-off-by: Miri Korenblit --- .../net/wireless/intel/iwlwifi/mld/iface.h | 4 +- drivers/net/wireless/intel/iwlwifi/mld/mld.h | 2 + drivers/net/wireless/intel/iwlwifi/mld/roc.c | 53 ++++++++++++------- drivers/net/wireless/intel/iwlwifi/mld/sta.c | 4 +- drivers/net/wireless/intel/iwlwifi/mld/tx.c | 22 +++++++- 5 files changed, 60 insertions(+), 25 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/iface.h b/drivers/net/wireless/intel/iwlwifi/mld/iface.h index 15b437110351..49e2ce65557d 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/iface.h +++ b/drivers/net/wireless/intel/iwlwifi/mld/iface.h @@ -141,8 +141,8 @@ struct iwl_mld_emlsr { * @use_ps_poll: use ps_poll frames * @disable_bf: disable beacon filter * @dbgfs_slink: debugfs symlink for this interface - * @roc_activity: the id of the roc_activity running. Relevant for p2p device - * only. Set to %ROC_NUM_ACTIVITIES when not in use. + * @roc_activity: the id of the roc_activity running. Relevant for STA and + * p2p device only. Set to %ROC_NUM_ACTIVITIES when not in use. * @aux_sta: station used for remain on channel. Used in P2P device. */ struct iwl_mld_vif { diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mld.h b/drivers/net/wireless/intel/iwlwifi/mld/mld.h index 1a2c44f44eff..74fcaad85a32 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/mld.h +++ b/drivers/net/wireless/intel/iwlwifi/mld/mld.h @@ -127,6 +127,7 @@ * cleanup using iwl_mld_free_internal_sta * @netdetect: indicates the FW is in suspend mode with netdetect configured * @p2p_device_vif: points to the p2p device vif if exists + * @bss_roc_vif: points to the BSS vif that has an active ROC. * @dev: pointer to device struct. For printing purposes * @trans: pointer to the transport layer * @cfg: pointer to the device configuration @@ -212,6 +213,7 @@ struct iwl_mld { bool netdetect; #endif /* CONFIG_PM_SLEEP */ struct ieee80211_vif *p2p_device_vif; + struct ieee80211_vif *bss_roc_vif; struct iwl_bt_coex_profile_notif last_bt_notif; ); struct ieee80211_link_sta __rcu *fw_id_to_link_sta[IWL_STATION_COUNT_MAX]; diff --git a/drivers/net/wireless/intel/iwlwifi/mld/roc.c b/drivers/net/wireless/intel/iwlwifi/mld/roc.c index cfd010c1ca80..944d70901de5 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/roc.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/roc.c @@ -49,29 +49,36 @@ int iwl_mld_start_roc(struct ieee80211_hw *hw, struct ieee80211_vif *vif, lockdep_assert_wiphy(mld->wiphy); - /* TODO: task=Hotspot 2.0 */ - if (vif->type != NL80211_IFTYPE_P2P_DEVICE) { + if (vif->type != NL80211_IFTYPE_P2P_DEVICE && + vif->type != NL80211_IFTYPE_STATION) { IWL_ERR(mld, "NOT SUPPORTED: ROC on vif->type %d\n", vif->type); return -EOPNOTSUPP; } - switch (type) { - case IEEE80211_ROC_TYPE_NORMAL: - activity = ROC_ACTIVITY_P2P_DISC; - break; - case IEEE80211_ROC_TYPE_MGMT_TX: - activity = ROC_ACTIVITY_P2P_NEG; - break; - default: - WARN_ONCE(1, "Got an invalid P2P ROC type\n"); - return -EINVAL; + if (vif->type == NL80211_IFTYPE_P2P_DEVICE) { + switch (type) { + case IEEE80211_ROC_TYPE_NORMAL: + activity = ROC_ACTIVITY_P2P_DISC; + break; + case IEEE80211_ROC_TYPE_MGMT_TX: + activity = ROC_ACTIVITY_P2P_NEG; + break; + default: + WARN_ONCE(1, "Got an invalid P2P ROC type\n"); + return -EINVAL; + } + } else { + activity = ROC_ACTIVITY_HOTSPOT; } if (WARN_ON(mld_vif->roc_activity != ROC_NUM_ACTIVITIES)) return -EBUSY; + if (vif->type == NL80211_IFTYPE_STATION && mld->bss_roc_vif) + return -EBUSY; + ieee80211_iterate_active_interfaces_mtx(mld->hw, IEEE80211_IFACE_ITER_NORMAL, iwl_mld_vif_iter_emlsr_block_roc, @@ -88,9 +95,6 @@ int iwl_mld_start_roc(struct ieee80211_hw *hw, struct ieee80211_vif *vif, cmd.channel_info.channel = cpu_to_le32(channel->hw_value); cmd.channel_info.band = iwl_mld_nl80211_band_to_fw(channel->band); cmd.channel_info.width = IWL_PHY_CHANNEL_MODE20; - /* TODO: task=Hotspot 2.0, revisit those parameters when we add an ROC - * on the BSS vif - */ cmd.max_delay = cpu_to_le32(AUX_ROC_MAX_DELAY); cmd.duration = cpu_to_le32(MSEC_TO_TU(duration)); @@ -102,8 +106,12 @@ int iwl_mld_start_roc(struct ieee80211_hw *hw, struct ieee80211_vif *vif, IWL_ERR(mld, "Couldn't send the ROC_CMD\n"); return ret; } + mld_vif->roc_activity = activity; + if (vif->type == NL80211_IFTYPE_STATION) + mld->bss_roc_vif = vif; + return 0; } @@ -122,6 +130,9 @@ static void iwl_mld_destroy_roc(struct iwl_mld *mld, { mld_vif->roc_activity = ROC_NUM_ACTIVITIES; + if (vif->type == NL80211_IFTYPE_STATION) + mld->bss_roc_vif = NULL; + ieee80211_iterate_active_interfaces_mtx(mld->hw, IEEE80211_IFACE_ITER_NORMAL, iwl_mld_vif_iter_emlsr_unblock_roc, @@ -153,8 +164,8 @@ int iwl_mld_cancel_roc(struct ieee80211_hw *hw, lockdep_assert_wiphy(mld->wiphy); - /* TODO: task=Hotspot 2.0 */ - if (WARN_ON(vif->type != NL80211_IFTYPE_P2P_DEVICE)) + if (WARN_ON(vif->type != NL80211_IFTYPE_P2P_DEVICE && + vif->type != NL80211_IFTYPE_STATION)) return -EOPNOTSUPP; /* No roc activity running it's probably already done */ @@ -189,9 +200,13 @@ void iwl_mld_handle_roc_notif(struct iwl_mld *mld, { const struct iwl_roc_notif *notif = (void *)pkt->data; u32 activity = le32_to_cpu(notif->activity); - /* TODO: task=Hotspot 2.0 - roc can run on BSS */ - struct ieee80211_vif *vif = mld->p2p_device_vif; struct iwl_mld_vif *mld_vif; + struct ieee80211_vif *vif; + + if (activity == ROC_ACTIVITY_HOTSPOT) + vif = mld->bss_roc_vif; + else + vif = mld->p2p_device_vif; if (WARN_ON(!vif)) return; diff --git a/drivers/net/wireless/intel/iwlwifi/mld/sta.c b/drivers/net/wireless/intel/iwlwifi/mld/sta.c index bc5313f44fde..8fb51209b4a6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/sta.c @@ -1164,8 +1164,8 @@ void iwl_mld_remove_aux_sta(struct iwl_mld *mld, { struct iwl_mld_vif *mld_vif = iwl_mld_vif_from_mac80211(vif); - /* TODO: Hotspot 2.0 */ - if (WARN_ON(vif->type != NL80211_IFTYPE_P2P_DEVICE)) + if (WARN_ON(vif->type != NL80211_IFTYPE_P2P_DEVICE && + vif->type != NL80211_IFTYPE_STATION)) return; iwl_mld_remove_internal_sta(mld, &mld_vif->aux_sta, false, diff --git a/drivers/net/wireless/intel/iwlwifi/mld/tx.c b/drivers/net/wireless/intel/iwlwifi/mld/tx.c index 96ea6320c084..4d4d3308a90d 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/tx.c @@ -638,8 +638,11 @@ iwl_mld_get_tx_queue_id(struct iwl_mld *mld, struct ieee80211_txq *txq, case NL80211_IFTYPE_P2P_DEVICE: mld_vif = iwl_mld_vif_from_mac80211(info->control.vif); - if (mld_vif->roc_activity == ROC_NUM_ACTIVITIES) { - IWL_DEBUG_DROP(mld, "Drop tx outside ROC\n"); + if (mld_vif->roc_activity != ROC_ACTIVITY_P2P_DISC && + mld_vif->roc_activity != ROC_ACTIVITY_P2P_NEG) { + IWL_DEBUG_DROP(mld, + "Drop tx outside ROC with activity %d\n", + mld_vif->roc_activity); return IWL_MLD_INVALID_DROP_TX; } @@ -649,6 +652,21 @@ iwl_mld_get_tx_queue_id(struct iwl_mld *mld, struct ieee80211_txq *txq, case NL80211_IFTYPE_MONITOR: mld_vif = iwl_mld_vif_from_mac80211(info->control.vif); return mld_vif->deflink.mon_sta.queue_id; + case NL80211_IFTYPE_STATION: + mld_vif = iwl_mld_vif_from_mac80211(info->control.vif); + + if (!(info->flags & IEEE80211_TX_CTL_TX_OFFCHAN)) { + IWL_DEBUG_DROP(mld, "Drop tx not off-channel\n"); + return IWL_MLD_INVALID_DROP_TX; + } + + if (mld_vif->roc_activity != ROC_ACTIVITY_HOTSPOT) { + IWL_DEBUG_DROP(mld, "Drop tx outside ROC\n"); + return IWL_MLD_INVALID_DROP_TX; + } + + WARN_ON(!ieee80211_is_mgmt(fc)); + return mld_vif->aux_sta.queue_id; default: WARN_ONCE(1, "Unsupported vif type\n"); break; From patchwork Fri May 9 10:44:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889141 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 1F85C28F53F for ; Fri, 9 May 2025 10:45:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787528; cv=none; b=jrBwrQxANYoFhko0JqU3w7fdwzJRbaCJSvFd/4wtysTzLouxSTZNg4QyPvWdJitZRqIFIGlMowCg3l3JHqSGuWNzIDjXqsdOYG7e8vuXDuv4OiYHwVoR+SsUJhICn00QYhyRFacg/+DVKMwWb+d6Df2tKBb9en20ncXiQVaOm20= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787528; c=relaxed/simple; bh=Ai6pzHqEjJBCOCCuvkPX66rya5f6r7/RihprIw+FPrc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JGJHEjslSTJFnqWzLV/rErQgTpPnKxc+JpRgWRozYi9rhJxznKMoYj9ip+j4ELzpxSvzm/556VdgKSUU42B3nW2mkWcaTBdXbQ5vH7YKDPmCuUS0sV8i7G9EU2Hyq5dMpBD3s0YfDDniTnBEtPMtIzGDYzYgG73vQtV/gzNTpZs= 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=aIF5aVSd; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="aIF5aVSd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787527; x=1778323527; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ai6pzHqEjJBCOCCuvkPX66rya5f6r7/RihprIw+FPrc=; b=aIF5aVSdWb7zIhjrCHHBbMDMUTWJgKnfYfDSSuGFheiBr6UhknM44mfw 8WAXJ7fYkZRXbeC/Hcyi7reEDj+sWBe30lP7J/sTskSSBAx9ITOvH4Bsj TU4p4ELakI+Dp+TYDBkTWgAKwC27M4RG5mwrb/w/tXG8YVUrrje8pYqjf bpe9z37FGw1iVXlWrcn/Gul4X+K2Q+VRNM/2r9AGivATydm2FMCIlsNHZ ERxqdfPG0x5Tcnv0fY1+ojo6psIB3I6NyvK8OYLPfQB9ZhGsqzxqVkygm jU6QfN3UQsJNXmq+5iu1tjZ3oggvuPdxgu28WyLQZdwe9A4tEUprKryY2 A==; X-CSE-ConnectionGUID: IxBvN3aKTDiapT+HNMJa/Q== X-CSE-MsgGUID: regiKrEwT/Wz3Hqxdhd+wg== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239908" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239908" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:27 -0700 X-CSE-ConnectionGUID: LllQUXXYQEqI6EaX+pHFfA== X-CSE-MsgGUID: 4M0NkLO6QvqSaHfBYPaipg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537058" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:26 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH iwlwifi-next 14/15] wifi: iwlwifi: mvm/mld: allow puncturing use in 5 GHz Date: Fri, 9 May 2025 13:44:53 +0300 Message-Id: <20250509104454.2582160-15-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Johannes Berg It was decided this was supported after all, so remove the restriction. Signed-off-by: Johannes Berg Message-Id: <20250509134302.a19d92ef7351.I4f1f1383a894f3035623274b310b12c916da3f09@changeid> Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mld/mac80211.c | 1 - drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c index 8677dbd2b4b6..92ea8f896478 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/mac80211.c @@ -243,7 +243,6 @@ static void iwl_mac_hw_set_flags(struct iwl_mld *mld) ieee80211_hw_set(hw, TX_AMPDU_SETUP_IN_HW); ieee80211_hw_set(hw, HAS_RATE_CONTROL); ieee80211_hw_set(hw, SUPPORTS_REORDERING_BUFFER); - ieee80211_hw_set(hw, DISALLOW_PUNCTURING_5GHZ); ieee80211_hw_set(hw, SINGLE_SCAN_ON_ALL_BANDS); ieee80211_hw_set(hw, SUPPORTS_AMSDU_IN_AMPDU); ieee80211_hw_set(hw, TDLS_WIDER_BW); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 37a24f561770..0f056a6641bd 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -731,8 +731,6 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm) mvm->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD; - ieee80211_hw_set(hw, DISALLOW_PUNCTURING_5GHZ); - #ifdef CONFIG_PM_SLEEP if ((unified || mvm->fw->img[IWL_UCODE_WOWLAN].num_sec) && device_can_wakeup(mvm->trans->dev)) { From patchwork Fri May 9 10:44:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 889058 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 743B5290084 for ; Fri, 9 May 2025 10:45:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787530; cv=none; b=vC7V8VP+vm8PN71nVYKqjZQFWgmbVqamReD+lWMV+8dUvcvXKeBynwQNj5E4WLTm05ThWqOB1qwLFKy4lTDE02KDHiQt7oDScz95A2O6spuaUVeY4alNX1nzBPACcvDnOw8jf2oYhmSWXWDDexhS1bsK8KvRAc4MlwcSgc+ydMA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746787530; c=relaxed/simple; bh=EXW8XSQiXJUlI2GKSRVAlo/52sr5QqTZIh2GIwrYqdk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sYkiejNQO5GYsI680TZpBsaspESCGTb3jyz9018RZiAtLgxToIFaxBXPXL1SlwCDTv2/J1hfszZYAP0FlG2/8jIUGgccyNlhvHBWLL8pShAS4T2b8TKcJROvpO/cO27NhDdOT2lJQPX6ROyypIGYvMaNNFT4IznUMjik3LTG5Lw= 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=McxfwEBm; arc=none smtp.client-ip=192.198.163.11 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="McxfwEBm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746787528; x=1778323528; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EXW8XSQiXJUlI2GKSRVAlo/52sr5QqTZIh2GIwrYqdk=; b=McxfwEBmAjw9By968nyzgmdTwtHO/Jk9c9+trv+FQYhU9Hp6GGJeKg9Q omg7RMWEWVlDSZ5CE/7/Ms6yKBj8cirlCE0td9DY1LZunF1Lhp2ybHk5m w28vsC96D9PIW7scFOdoM02uUl7sSzTMN11IhELOB2h+mj58+SANR4SSX ir0MGiBVh3V1AbcsCEKuDXBAignSiM3iIMTMEaR3B7i5ikkEouvn3LQ6h qPexCEaq9KIPta5s7/MSg9jxUDES80+tooUhupRnErQo1OEoNv/AICnqV EdmiAHYqCBwaCMeiIEVNGsDgDfQ7zsaaQBJ25Vh/XkPz0f3oIjISIAgSj g==; X-CSE-ConnectionGUID: jxXonX0sRTSzaq097fmsbA== X-CSE-MsgGUID: UoPYT4FDTJuzRWQ8t5meHg== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="59239911" X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="59239911" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:28 -0700 X-CSE-ConnectionGUID: T+Pc8GpSRXm/s18+AnLpEg== X-CSE-MsgGUID: JR5QI/9CRpSkdp43DdDn1w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,275,1739865600"; d="scan'208";a="136537064" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2025 03:45:27 -0700 From: Miri Korenblit To: linux-wireless@vger.kernel.org Cc: Benjamin Berg Subject: [PATCH iwlwifi-next 15/15] wifi: iwlwifi: move dBm averaging function into utils Date: Fri, 9 May 2025 13:44:54 +0300 Message-Id: <20250509104454.2582160-16-miriam.rachel.korenblit@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250509104454.2582160-1-miriam.rachel.korenblit@intel.com> References: <20250509104454.2582160-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 From: Benjamin Berg The function really is just a simple math helper. Move it into iwl-utils.c so that it can also be used by iwlmld. Signed-off-by: Benjamin Berg Message-Id: <20250509134302.96aa8fb4b00c.I09bb2137863e888efe756c92d8eb0271ec95456c@changeid> Signed-off-by: Miri Korenblit --- .../net/wireless/intel/iwlwifi/iwl-utils.c | 114 ++++++++++++++++- .../net/wireless/intel/iwlwifi/iwl-utils.h | 4 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 - drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 117 +----------------- .../wireless/intel/iwlwifi/mvm/tests/Makefile | 2 +- .../net/wireless/intel/iwlwifi/tests/Makefile | 2 +- .../{mvm/tests/scan.c => tests/utils.c} | 43 ++++--- 7 files changed, 143 insertions(+), 142 deletions(-) rename drivers/net/wireless/intel/iwlwifi/{mvm/tests/scan.c => tests/utils.c} (63%) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-utils.c b/drivers/net/wireless/intel/iwlwifi/iwl-utils.c index c5b49851e4b9..a26800c60f8a 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-utils.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-utils.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation */ #include #include @@ -81,4 +81,116 @@ int iwl_tx_tso_segment(struct sk_buff *skb, unsigned int num_subframes, return 0; } IWL_EXPORT_SYMBOL(iwl_tx_tso_segment); + +static u32 iwl_div_by_db(u32 value, u8 db) +{ + /* + * 2^32 * 10**(i / 10) for i = [1, 10], skipping 0 and simply stopping + * at 10 dB and looping instead of using a much larger table. + * + * Using 64 bit math is overkill, but means the helper does not require + * a limit on the input range. + */ + static const u32 db_to_val[] = { + 0xcb59185e, 0xa1866ba8, 0x804dce7a, 0x65ea59fe, 0x50f44d89, + 0x404de61f, 0x331426af, 0x2892c18b, 0x203a7e5b, 0x1999999a, + }; + + while (value && db > 0) { + u8 change = min_t(u8, db, ARRAY_SIZE(db_to_val)); + + value = (((u64)value) * db_to_val[change - 1]) >> 32; + + db -= change; + } + + return value; +} + +s8 iwl_average_neg_dbm(const u8 *neg_dbm_values, u8 len) +{ + int average_magnitude; + u32 average_factor; + int sum_magnitude = -128; + u32 sum_factor = 0; + int i, count = 0; + + /* + * To properly average the decibel values (signal values given in dBm) + * we need to do the math in linear space. Doing a linear average of + * dB (dBm) values is a bit annoying though due to the large range of + * at least -10 to -110 dBm that will not fit into a 32 bit integer. + * + * A 64 bit integer should be sufficient, but then we still have the + * problem that there are no directly usable utility functions + * available. + * + * So, lets not deal with that and instead do much of the calculation + * with a 16.16 fixed point integer along with a base in dBm. 16.16 bit + * gives us plenty of head-room for adding up a few values and even + * doing some math on it. And the tail should be accurate enough too + * (1/2^16 is somewhere around -48 dB, so effectively zero). + * + * i.e. the real value of sum is: + * sum = sum_factor / 2^16 * 10^(sum_magnitude / 10) mW + * + * However, that does mean we need to be able to bring two values to + * a common base, so we need a helper for that. + * + * Note that this function takes an input with unsigned negative dBm + * values but returns a signed dBm (i.e. a negative value). + */ + + for (i = 0; i < len; i++) { + int val_magnitude; + u32 val_factor; + + /* Assume invalid */ + if (neg_dbm_values[i] == 0xff) + continue; + + val_factor = 0x10000; + val_magnitude = -neg_dbm_values[i]; + + if (val_magnitude <= sum_magnitude) { + u8 div_db = sum_magnitude - val_magnitude; + + val_factor = iwl_div_by_db(val_factor, div_db); + val_magnitude = sum_magnitude; + } else { + u8 div_db = val_magnitude - sum_magnitude; + + sum_factor = iwl_div_by_db(sum_factor, div_db); + sum_magnitude = val_magnitude; + } + + sum_factor += val_factor; + count++; + } + + /* No valid noise measurement, return a very high noise level */ + if (count == 0) + return 0; + + average_magnitude = sum_magnitude; + average_factor = sum_factor / count; + + /* + * average_factor will be a number smaller than 1.0 (0x10000) at this + * point. What we need to do now is to adjust average_magnitude so that + * average_factor is between -0.5 dB and 0.5 dB. + * + * Just do -1 dB steps and find the point where + * -0.5 dB * -i dB = 0x10000 * 10^(-0.5/10) / i dB + * = div_by_db(0xe429, i) + * is smaller than average_factor. + */ + for (i = 0; average_factor < iwl_div_by_db(0xe429, i); i++) { + /* nothing */ + } + + return clamp(average_magnitude - i, -128, 0); +} +IWL_EXPORT_SYMBOL(iwl_average_neg_dbm); + #endif /* CONFIG_INET */ diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-utils.h b/drivers/net/wireless/intel/iwlwifi/iwl-utils.h index 8f1f11d06fbe..5172035e4d26 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-utils.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-utils.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation */ #ifndef __iwl_utils_h__ #define __iwl_utils_h__ @@ -53,4 +53,6 @@ u32 iwl_find_ie_offset(u8 *beacon, u8 eid, u32 frame_size) return ie - beacon; } +s8 iwl_average_neg_dbm(const u8 *neg_dbm_values, u8 len); + #endif /* __iwl_utils_h__ */ diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 6df5158836db..37a0e0c54507 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -2131,9 +2131,6 @@ bool iwl_mvm_mld_valid_link_pair(struct ieee80211_vif *vif, const struct iwl_mvm_link_sel_data *a, const struct iwl_mvm_link_sel_data *b); -s8 iwl_mvm_average_dbm_values(const struct iwl_umac_scan_channel_survey_notif *notif); - - extern const struct iwl_hcmd_arr iwl_mvm_groups[]; extern const unsigned int iwl_mvm_groups_size; #endif diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c index 60bd9c7e5f03..5f30109ca18f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* - * Copyright (C) 2012-2014, 2018-2024 Intel Corporation + * Copyright (C) 2012-2014, 2018-2025 Intel Corporation * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2016-2017 Intel Deutschland GmbH */ @@ -11,6 +11,7 @@ #include "mvm.h" #include "fw/api/scan.h" #include "iwl-io.h" +#include "iwl-utils.h" #define IWL_DENSE_EBS_SCAN_RATIO 5 #define IWL_SPARSE_EBS_SCAN_RATIO 1 @@ -3685,117 +3686,6 @@ static int iwl_mvm_chanidx_from_phy(struct iwl_mvm *mvm, return -EINVAL; } -static u32 iwl_mvm_div_by_db(u32 value, u8 db) -{ - /* - * 2^32 * 10**(i / 10) for i = [1, 10], skipping 0 and simply stopping - * at 10 dB and looping instead of using a much larger table. - * - * Using 64 bit math is overkill, but means the helper does not require - * a limit on the input range. - */ - static const u32 db_to_val[] = { - 0xcb59185e, 0xa1866ba8, 0x804dce7a, 0x65ea59fe, 0x50f44d89, - 0x404de61f, 0x331426af, 0x2892c18b, 0x203a7e5b, 0x1999999a, - }; - - while (value && db > 0) { - u8 change = min_t(u8, db, ARRAY_SIZE(db_to_val)); - - value = (((u64)value) * db_to_val[change - 1]) >> 32; - - db -= change; - } - - return value; -} - -VISIBLE_IF_IWLWIFI_KUNIT s8 -iwl_mvm_average_dbm_values(const struct iwl_umac_scan_channel_survey_notif *notif) -{ - s8 average_magnitude; - u32 average_factor; - s8 sum_magnitude = -128; - u32 sum_factor = 0; - int i, count = 0; - - /* - * To properly average the decibel values (signal values given in dBm) - * we need to do the math in linear space. Doing a linear average of - * dB (dBm) values is a bit annoying though due to the large range of - * at least -10 to -110 dBm that will not fit into a 32 bit integer. - * - * A 64 bit integer should be sufficient, but then we still have the - * problem that there are no directly usable utility functions - * available. - * - * So, lets not deal with that and instead do much of the calculation - * with a 16.16 fixed point integer along with a base in dBm. 16.16 bit - * gives us plenty of head-room for adding up a few values and even - * doing some math on it. And the tail should be accurate enough too - * (1/2^16 is somewhere around -48 dB, so effectively zero). - * - * i.e. the real value of sum is: - * sum = sum_factor / 2^16 * 10^(sum_magnitude / 10) mW - * - * However, that does mean we need to be able to bring two values to - * a common base, so we need a helper for that. - * - * Note that this function takes an input with unsigned negative dBm - * values but returns a signed dBm (i.e. a negative value). - */ - - for (i = 0; i < ARRAY_SIZE(notif->noise); i++) { - s8 val_magnitude; - u32 val_factor; - - if (notif->noise[i] == 0xff) - continue; - - val_factor = 0x10000; - val_magnitude = -notif->noise[i]; - - if (val_magnitude <= sum_magnitude) { - u8 div_db = sum_magnitude - val_magnitude; - - val_factor = iwl_mvm_div_by_db(val_factor, div_db); - val_magnitude = sum_magnitude; - } else { - u8 div_db = val_magnitude - sum_magnitude; - - sum_factor = iwl_mvm_div_by_db(sum_factor, div_db); - sum_magnitude = val_magnitude; - } - - sum_factor += val_factor; - count++; - } - - /* No valid noise measurement, return a very high noise level */ - if (count == 0) - return 0; - - average_magnitude = sum_magnitude; - average_factor = sum_factor / count; - - /* - * average_factor will be a number smaller than 1.0 (0x10000) at this - * point. What we need to do now is to adjust average_magnitude so that - * average_factor is between -0.5 dB and 0.5 dB. - * - * Just do -1 dB steps and find the point where - * -0.5 dB * -i dB = 0x10000 * 10^(-0.5/10) / i dB - * = div_by_db(0xe429, i) - * is smaller than average_factor. - */ - for (i = 0; average_factor < iwl_mvm_div_by_db(0xe429, i); i++) { - /* nothing */ - } - - return average_magnitude - i; -} -EXPORT_SYMBOL_IF_IWLWIFI_KUNIT(iwl_mvm_average_dbm_values); - void iwl_mvm_rx_channel_survey_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb) { @@ -3853,5 +3743,6 @@ void iwl_mvm_rx_channel_survey_notif(struct iwl_mvm *mvm, info->time_busy = le32_to_cpu(notif->busy_time); info->time_rx = le32_to_cpu(notif->rx_time); info->time_tx = le32_to_cpu(notif->tx_time); - info->noise = iwl_mvm_average_dbm_values(notif); + info->noise = + iwl_average_neg_dbm(notif->noise, ARRAY_SIZE(notif->noise)); } diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tests/Makefile b/drivers/net/wireless/intel/iwlwifi/mvm/tests/Makefile index 895d53f223e9..bb33f4a06f1c 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tests/Makefile +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tests/Makefile @@ -1,3 +1,3 @@ -iwlmvm-tests-y += module.o links.o scan.o hcmd.o +iwlmvm-tests-y += module.o links.o hcmd.o obj-$(CONFIG_IWLWIFI_KUNIT_TESTS) += iwlmvm-tests.o diff --git a/drivers/net/wireless/intel/iwlwifi/tests/Makefile b/drivers/net/wireless/intel/iwlwifi/tests/Makefile index 84491488f589..1b49241c578f 100644 --- a/drivers/net/wireless/intel/iwlwifi/tests/Makefile +++ b/drivers/net/wireless/intel/iwlwifi/tests/Makefile @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause -iwlwifi-tests-y += module.o devinfo.o +iwlwifi-tests-y += module.o devinfo.o utils.o ccflags-y += -I$(src)/../ diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tests/scan.c b/drivers/net/wireless/intel/iwlwifi/tests/utils.c similarity index 63% rename from drivers/net/wireless/intel/iwlwifi/mvm/tests/scan.c rename to drivers/net/wireless/intel/iwlwifi/tests/utils.c index 7a3275199ace..df2c3a891e7e 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tests/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/tests/utils.c @@ -1,20 +1,19 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * KUnit tests for channel helper functions + * KUnit tests for utilities * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation */ -#include -#include "../mvm.h" +#include "../iwl-utils.h" #include -MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING"); +MODULE_IMPORT_NS("IWLWIFI"); -static const struct acs_average_db_case { +static const struct average_neg_db_case { const char *desc; u8 neg_dbm[22]; s8 result; -} acs_average_db_cases[] = { +} average_neg_db_cases[] = { { .desc = "Smallest possible value, all filled", .neg_dbm = { @@ -73,38 +72,38 @@ static const struct acs_average_db_case { }, }; -KUNIT_ARRAY_PARAM_DESC(acs_average_db, acs_average_db_cases, desc) +KUNIT_ARRAY_PARAM_DESC(average_neg_db, average_neg_db_cases, desc) -static void test_acs_average_db(struct kunit *test) +static void test_average_neg_db(struct kunit *test) { - const struct acs_average_db_case *params = test->param_value; - struct iwl_umac_scan_channel_survey_notif notif; + const struct average_neg_db_case *params = test->param_value; + u8 reversed[ARRAY_SIZE(params->neg_dbm)]; int i; /* Test the values in the given order */ - for (i = 0; i < ARRAY_SIZE(params->neg_dbm); i++) - notif.noise[i] = params->neg_dbm[i]; KUNIT_ASSERT_EQ(test, - iwl_mvm_average_dbm_values(¬if), + iwl_average_neg_dbm(params->neg_dbm, + ARRAY_SIZE(params->neg_dbm)), params->result); /* Test in reverse order */ for (i = 0; i < ARRAY_SIZE(params->neg_dbm); i++) - notif.noise[ARRAY_SIZE(params->neg_dbm) - i - 1] = + reversed[ARRAY_SIZE(params->neg_dbm) - i - 1] = params->neg_dbm[i]; KUNIT_ASSERT_EQ(test, - iwl_mvm_average_dbm_values(¬if), + iwl_average_neg_dbm(reversed, + ARRAY_SIZE(params->neg_dbm)), params->result); } -static struct kunit_case acs_average_db_case[] = { - KUNIT_CASE_PARAM(test_acs_average_db, acs_average_db_gen_params), +static struct kunit_case average_db_case[] = { + KUNIT_CASE_PARAM(test_average_neg_db, average_neg_db_gen_params), {} }; -static struct kunit_suite acs_average_db = { - .name = "iwlmvm-acs-average-db", - .test_cases = acs_average_db_case, +static struct kunit_suite average_db = { + .name = "iwl-average-db", + .test_cases = average_db_case, }; -kunit_test_suite(acs_average_db); +kunit_test_suite(average_db);