From patchwork Sat Dec 28 20:34:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922505 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 C864138DC8 for ; Sat, 28 Dec 2024 20:34:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418077; cv=none; b=fgFDWD7FfNBkvuqIAxqyCqUNh/EKRaJzDAR+egoi9mdm0Fs4kQmzgeIAfxwzkU72+rW7K9fAl6KBoWxuioCk6UbBabpYyPECBFZXrSEzScAIxLXTL8aOWTJm9LVtRRit3Z53ub1xlfVlgLsmSqVddfbcj6Cg+Wbb4AF4CLFxjFA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418077; c=relaxed/simple; bh=D55MPvQ/LgGYGYUWkB/rb/govWTif7mKh16tSAyR1Io=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=njl8lBOi58q3HfG7wIOr8KEOVwl4iAxUBsGorRhr0DW57mdQAnpg5CjTwjgg0TT/5Wg5kQxOHGIpAsZi4y1ONFjzVoWrRSlv5+FXzN0p7nOeAO4cb6ty2GoBGXF8czFadDC3SBBIWU/2DG9DP8Qf0ojk2wZYd50sHUElFla01bk= 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=CCWTu2OM; arc=none smtp.client-ip=198.175.65.20 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="CCWTu2OM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418076; x=1766954076; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=D55MPvQ/LgGYGYUWkB/rb/govWTif7mKh16tSAyR1Io=; b=CCWTu2OMDHnkCJ71EpNvGYK4TfMrKgNN6EuDzhL50UnUX/FsUQfg+Khg IVEWqE9gkhfD1l6ZR2/pfOO5msg9Gd7BpXqLH+0VgdSQaR8X5Wob5k2HF Zsv/fvMPEPFDx6Yb5mfV0acFq2pFExy5zgh0eJDgDGqxTAsaZGZe5DNw5 CtRyoL9arOgC9BKUHRHa14f1kZPPVnTK4/4SofQeCRr9g0Ytb778MtYjY qkfJ1qyn87OOK8fhMymyJchZGO8zY054s9PkvrV9h29Wbel0t12K6zHo5 sNKcH1G+L2Sr6ZTcL4PtwMs684/cPEJPHjUdjWhQtNTdggbv0uy7LQvAc Q==; X-CSE-ConnectionGUID: U07oDJahSzK4MwpGbSa3kQ== X-CSE-MsgGUID: TvjrYNcRSY+3uAzyRCYwnQ== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479750" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479750" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:35 -0800 X-CSE-ConnectionGUID: gQerue8uSbyLUv8nU1e5Ag== X-CSE-MsgGUID: nU4PHyJIT8SH6IfmU5Cn0A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488355" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:34 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 01/15] wifi: iwlwifi: mld: make iwl_mvm_find_ie_offset a iwlwifi util Date: Sat, 28 Dec 2024 22:34:05 +0200 Message-Id: <20241228223206.a36373eefbf2.Ib1f305b78508c98934f6000720d6455c88a860cb@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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 This is needed also for more opmodes, and is really not opmode dependent. Make it a iwlwifi util. Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach --- .../net/wireless/intel/iwlwifi/iwl-utils.h | 20 ++++++++ .../net/wireless/intel/iwlwifi/mvm/debugfs.c | 7 +-- .../net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 48 +++++++------------ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 - 4 files changed, 40 insertions(+), 36 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-utils.h b/drivers/net/wireless/intel/iwlwifi/iwl-utils.h index b43703afdff2..909460316995 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-utils.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-utils.h @@ -5,6 +5,8 @@ #ifndef __iwl_utils_h__ #define __iwl_utils_h__ +#include + #ifdef CONFIG_INET /** * iwl_tx_tso_segment - Segments a TSO packet into subframes for A-MSDU. @@ -33,4 +35,22 @@ int iwl_tx_tso_segment(struct sk_buff *skb, unsigned int num_subframes, } #endif /* CONFIG_INET */ +static inline +u32 iwl_find_ie_offset(u8 *beacon, u8 eid, u32 frame_size) +{ + struct ieee80211_mgmt *mgmt = (void *)beacon; + const u8 *ie; + + if (WARN_ON_ONCE(frame_size <= (mgmt->u.beacon.variable - beacon))) + return 0; + + frame_size -= mgmt->u.beacon.variable - beacon; + + ie = cfg80211_find_ie(eid, mgmt->u.beacon.variable, frame_size); + if (!ie) + return 0; + + return ie - beacon; +} + #endif /* __iwl_utils_h__ */ diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c index 7fbfec6750c1..b8ae86039045 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c @@ -16,6 +16,7 @@ #include "debugfs.h" #include "iwl-modparams.h" #include "iwl-drv.h" +#include "iwl-utils.h" #include "fw/error-dump.h" #include "fw/api/phy-ctxt.h" @@ -1413,9 +1414,9 @@ static int _iwl_dbgfs_inject_beacon_ie(struct iwl_mvm *mvm, char *bin, int len) if (iwl_fw_lookup_cmd_ver(mvm->fw, BEACON_TEMPLATE_CMD, 0) >= 14) { - u32 offset = iwl_mvm_find_ie_offset(beacon->data, - WLAN_EID_S1G_TWT, - beacon->len); + u32 offset = iwl_find_ie_offset(beacon->data, + WLAN_EID_S1G_TWT, + beacon->len); beacon_cmd.btwt_offset = cpu_to_le32(offset); } diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c index 51ee62ae70fb..bbf0f2753f9f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c @@ -12,6 +12,7 @@ #include "fw-api.h" #include "mvm.h" #include "time-event.h" +#include "iwl-utils.h" const u8 iwl_mvm_ac_to_tx_fifo[] = { IWL_MVM_TX_FIFO_VO, @@ -868,23 +869,6 @@ void iwl_mvm_mac_ctxt_set_tim(struct iwl_mvm *mvm, } } -u32 iwl_mvm_find_ie_offset(u8 *beacon, u8 eid, u32 frame_size) -{ - struct ieee80211_mgmt *mgmt = (void *)beacon; - const u8 *ie; - - if (WARN_ON_ONCE(frame_size <= (mgmt->u.beacon.variable - beacon))) - return 0; - - frame_size -= mgmt->u.beacon.variable - beacon; - - ie = cfg80211_find_ie(eid, mgmt->u.beacon.variable, frame_size); - if (!ie) - return 0; - - return ie - beacon; -} - u8 iwl_mvm_mac_ctxt_get_lowest_rate(struct iwl_mvm *mvm, struct ieee80211_tx_info *info, struct ieee80211_vif *vif) @@ -1078,13 +1062,13 @@ static int iwl_mvm_mac_ctxt_send_beacon_v7(struct iwl_mvm *mvm, beacon->data, beacon->len); beacon_cmd.csa_offset = - cpu_to_le32(iwl_mvm_find_ie_offset(beacon->data, - WLAN_EID_CHANNEL_SWITCH, - beacon->len)); + cpu_to_le32(iwl_find_ie_offset(beacon->data, + WLAN_EID_CHANNEL_SWITCH, + beacon->len)); beacon_cmd.ecsa_offset = - cpu_to_le32(iwl_mvm_find_ie_offset(beacon->data, - WLAN_EID_EXT_CHANSWITCH_ANN, - beacon->len)); + cpu_to_le32(iwl_find_ie_offset(beacon->data, + WLAN_EID_EXT_CHANSWITCH_ANN, + beacon->len)); return iwl_mvm_mac_ctxt_send_beacon_cmd(mvm, beacon, &beacon_cmd, sizeof(beacon_cmd)); @@ -1151,20 +1135,20 @@ static int iwl_mvm_mac_ctxt_send_beacon_v9(struct iwl_mvm *mvm, beacon->data, beacon->len); beacon_cmd.csa_offset = - cpu_to_le32(iwl_mvm_find_ie_offset(beacon->data, - WLAN_EID_CHANNEL_SWITCH, - beacon->len)); + cpu_to_le32(iwl_find_ie_offset(beacon->data, + WLAN_EID_CHANNEL_SWITCH, + beacon->len)); beacon_cmd.ecsa_offset = - cpu_to_le32(iwl_mvm_find_ie_offset(beacon->data, - WLAN_EID_EXT_CHANSWITCH_ANN, - beacon->len)); + cpu_to_le32(iwl_find_ie_offset(beacon->data, + WLAN_EID_EXT_CHANSWITCH_ANN, + beacon->len)); if (vif->type == NL80211_IFTYPE_AP && iwl_fw_lookup_cmd_ver(mvm->fw, BEACON_TEMPLATE_CMD, 0) >= 14) beacon_cmd.btwt_offset = - cpu_to_le32(iwl_mvm_find_ie_offset(beacon->data, - WLAN_EID_S1G_TWT, - beacon->len)); + cpu_to_le32(iwl_find_ie_offset(beacon->data, + WLAN_EID_S1G_TWT, + beacon->len)); return iwl_mvm_mac_ctxt_send_beacon_cmd(mvm, beacon, &beacon_cmd, sizeof(beacon_cmd)); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index dbf32bf5760b..43e304f22475 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -1819,7 +1819,6 @@ u8 iwl_mvm_next_antenna(struct iwl_mvm *mvm, u8 valid, u8 last_idx); void iwl_mvm_get_sync_time(struct iwl_mvm *mvm, int clock_type, u32 *gp2, u64 *boottime, ktime_t *realtime); u32 iwl_mvm_get_systime(struct iwl_mvm *mvm); -u32 iwl_mvm_find_ie_offset(u8 *beacon, u8 eid, u32 frame_size); /* Tx / Host Commands */ int __must_check iwl_mvm_send_cmd(struct iwl_mvm *mvm, From patchwork Sat Dec 28 20:34:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922506 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 32C4478F5B for ; Sat, 28 Dec 2024 20:34:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418079; cv=none; b=ITMhvZqE2E4C5u7CvRAMLc/fq7CHRp1JD3CWVI3U9BrrWAvJbv1aBX1HMm4ZIYSX0EZeSqDasyrmjcIntOBijMTdibU+ZUmlmKnXZBqgtf/00uOp+kfI8DVqil9SQoXQBRsAIEnEncuV6PggG2tQANmlfgknqMDYEtmzd/G+91s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418079; c=relaxed/simple; bh=3bJJU0d6ZdWjYX1AEwzEdxbEnuu1q75GYZCV5jtFEFI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mIVZpBzNsjAJDsldtFcWpPMHZvV6+mhO1VX8mNE639BAoO93rU5CV+9w/3z4rQ9aVnb6exrLsHE7nd3qJkyUVcuyIwbbquX53i+YmZg+cwzvgvdysuux7A+1Mbl3jedG8uVcoYuJ94dLep5QN+e6LOqZsOgB2nZgWj70jWdsGVM= 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=TQE1BC7B; arc=none smtp.client-ip=198.175.65.20 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="TQE1BC7B" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418077; x=1766954077; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3bJJU0d6ZdWjYX1AEwzEdxbEnuu1q75GYZCV5jtFEFI=; b=TQE1BC7BY1ETfwb6x/+KTvVsJpe51Pt/Xr43SCX4GjPv8Hl22Zca8S/0 jPtyku2ZIsnGCiopJYznbhyLtk4EksebHsg4LjWYRVE35dUAW9AbBZB07 OFhbhdnHO58HTJqIBw3ocT3Huw1TioAQdvSI72lWqtJUfLBzyOOZmWQlu tTaiEL7VYLfWEISuLQNGEsHHQ4apb11AdletGMR6oVsvC+bh2hoHPzsu5 I5HUjiLLaOB7uR7S6VRl/raz2K1EAg0O/0tvE1W5PBOWTgKhEccVpu5it uop73xHsqxN6HJNblpw3piodMbcQJnFMN9BTPipnxa8eiL2FONVziFf8N Q==; X-CSE-ConnectionGUID: wkOoy8aGTEaDcwkTAK1xYg== X-CSE-MsgGUID: 1VcFvJtTTn6o5R4sDHf6vw== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479752" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479752" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:37 -0800 X-CSE-ConnectionGUID: f4qnMzlBR2mEV9T5OkVa9Q== X-CSE-MsgGUID: tVfMtpdERwyGM8YF7ZSeLQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488358" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:36 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 02/15] wifi: iwlwifi: move fw_ver debugfs to firmware runtime Date: Sat, 28 Dec 2024 22:34:06 +0200 Message-Id: <20241228223206.98bdc5e62828.Iee7a8365dd63ebf580d324f90e1e04466d8ef5d5@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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: Emmanuel Grumbach This is really where it belongs. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- .../net/wireless/intel/iwlwifi/fw/debugfs.c | 23 ++++++++++++- .../net/wireless/intel/iwlwifi/mvm/debugfs.c | 32 ------------------- 2 files changed, 22 insertions(+), 33 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c index 893b21fcaf87..e79fdb5fe387 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* - * Copyright (C) 2012-2014, 2018-2023 Intel Corporation + * Copyright (C) 2012-2014, 2018-2024 Intel Corporation * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2016-2017 Intel Deutschland GmbH */ @@ -282,6 +282,26 @@ static ssize_t iwl_dbgfs_fw_dbg_domain_read(struct iwl_fw_runtime *fwrt, FWRT_DEBUGFS_READ_FILE_OPS(fw_dbg_domain, 20); +static ssize_t iwl_dbgfs_fw_ver_read(struct iwl_fw_runtime *fwrt, + size_t size, char *buf) +{ + char *pos = buf; + char *endpos = buf + size; + + pos += scnprintf(pos, endpos - pos, "FW id: %s\n", + fwrt->fw->fw_version); + pos += scnprintf(pos, endpos - pos, "FW: %s\n", + fwrt->fw->human_readable); + pos += scnprintf(pos, endpos - pos, "Device: %s\n", + fwrt->trans->name); + pos += scnprintf(pos, endpos - pos, "Bus: %s\n", + fwrt->dev->bus->name); + + return pos - buf; +} + +FWRT_DEBUGFS_READ_FILE_OPS(fw_ver, 1024); + struct iwl_dbgfs_fw_info_priv { struct iwl_fw_runtime *fwrt; }; @@ -404,4 +424,5 @@ void iwl_fwrt_dbgfs_register(struct iwl_fw_runtime *fwrt, FWRT_DEBUGFS_ADD_FILE(send_hcmd, dbgfs_dir, 0200); FWRT_DEBUGFS_ADD_FILE(enabled_severities, dbgfs_dir, 0200); FWRT_DEBUGFS_ADD_FILE(fw_dbg_domain, dbgfs_dir, 0400); + FWRT_DEBUGFS_ADD_FILE(fw_ver, dbgfs_dir, 0400); } diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c index b8ae86039045..340f3a026c42 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c @@ -538,36 +538,6 @@ static ssize_t iwl_dbgfs_disable_power_off_write(struct iwl_mvm *mvm, char *buf, return ret ?: count; } -static ssize_t iwl_dbgfs_fw_ver_read(struct file *file, char __user *user_buf, - size_t count, loff_t *ppos) -{ - struct iwl_mvm *mvm = file->private_data; - char *buff, *pos, *endpos; - static const size_t bufsz = 1024; - int ret; - - buff = kmalloc(bufsz, GFP_KERNEL); - if (!buff) - return -ENOMEM; - - pos = buff; - endpos = pos + bufsz; - - pos += scnprintf(pos, endpos - pos, "FW id: %s\n", - mvm->fwrt.fw->fw_version); - pos += scnprintf(pos, endpos - pos, "FW: %s\n", - mvm->fwrt.fw->human_readable); - pos += scnprintf(pos, endpos - pos, "Device: %s\n", - mvm->fwrt.trans->name); - pos += scnprintf(pos, endpos - pos, "Bus: %s\n", - mvm->fwrt.dev->bus->name); - - ret = simple_read_from_buffer(user_buf, count, ppos, buff, pos - buff); - kfree(buff); - - return ret; -} - static ssize_t iwl_dbgfs_tas_get_status_read(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) @@ -1969,7 +1939,6 @@ MVM_DEBUGFS_READ_WRITE_FILE_OPS(disable_power_off, 64); MVM_DEBUGFS_READ_FILE_OPS(fw_rx_stats); MVM_DEBUGFS_READ_FILE_OPS(drv_rx_stats); MVM_DEBUGFS_READ_FILE_OPS(fw_system_stats); -MVM_DEBUGFS_READ_FILE_OPS(fw_ver); MVM_DEBUGFS_READ_FILE_OPS(phy_integration_ver); MVM_DEBUGFS_READ_FILE_OPS(tas_get_status); MVM_DEBUGFS_WRITE_FILE_OPS(fw_restart, 10); @@ -2169,7 +2138,6 @@ void iwl_mvm_dbgfs_register(struct iwl_mvm *mvm) MVM_DEBUGFS_ADD_FILE(force_ctkill, mvm->debugfs_dir, 0200); MVM_DEBUGFS_ADD_FILE(stations, mvm->debugfs_dir, 0400); MVM_DEBUGFS_ADD_FILE(disable_power_off, mvm->debugfs_dir, 0600); - MVM_DEBUGFS_ADD_FILE(fw_ver, mvm->debugfs_dir, 0400); MVM_DEBUGFS_ADD_FILE(fw_rx_stats, mvm->debugfs_dir, 0400); MVM_DEBUGFS_ADD_FILE(drv_rx_stats, mvm->debugfs_dir, 0400); MVM_DEBUGFS_ADD_FILE(fw_system_stats, mvm->debugfs_dir, 0400); From patchwork Sat Dec 28 20:34:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922507 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 A6B1D198A0D for ; Sat, 28 Dec 2024 20:34:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418080; cv=none; b=g0A6NdVG3SpxcGn2gWGKR+h2JsEXd6WLBUK1B+YmUYeyDGGHzn/+BCK6uRZKciadTzCIexMRSchagkC75sJEWXr3XmsCqxbh4HlfzWp+BYQRhEggcZhjmKa/hxLIovEB7/Er5nQIRpYVAz+H1cy4+xNhTgFIyxS13bgxL/YzoVQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418080; c=relaxed/simple; bh=dKI7gOaNuFnmLluch8bgiP13d1AyP0C6Af2sRm1ZaDw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZE3u4S8r7ATtC9LkuRR+kUpN2HK/AkR3b2upZLTyAVSq+UmfZXMSOOiMpjzhcVuahhuikq15OXFDWcNf7b9UK2zWefYOxtqgw9SnfI8P8fjMOVlLl5FzhhMvzZXgkdZsebTgqpqegZ6jjzXEIEgkRkCxAdTB35WxvGZSrOvk3ns= 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=ZGf2Xv45; arc=none smtp.client-ip=198.175.65.20 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="ZGf2Xv45" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418078; x=1766954078; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dKI7gOaNuFnmLluch8bgiP13d1AyP0C6Af2sRm1ZaDw=; b=ZGf2Xv45Ri97hjhhXfCshIy9O6oyMP5YExUCn24wdgUQ0dfGLUzMI6EJ iohufNQ0kfNvfA+FUSCQZQbNO52gasFqTNe+x5mAnbYD0A8paK9I4YUk4 W0Hf/e1J0FDNgGvoVp+zO1H9I8vlSDP0UlJ+tKD8HvavmQ+2oq3YeOOk3 frv43CVhPOjh78cEQeU4HxAIMcs4doEAD5xzndRkc1/7D03tBS18d6ioa hLbAes6eGhkDfMdXNlP85+azKtoKu1OELA4Iwx5TyX6vqw22fUF3Om4+v kfunPq+Anj+8jocybme60bGyfIo8Cj1WT47NDNyJ67CXz/Sxzj35QOgNH A==; X-CSE-ConnectionGUID: pyeUcCrWTqy4zNG5GPM21Q== X-CSE-MsgGUID: HMct4hCETPmxqVGtadoX7Q== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479754" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479754" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:38 -0800 X-CSE-ConnectionGUID: Qyf49ZOtRMOrzoqjgw3dvA== X-CSE-MsgGUID: HRhoB17WR4KwobFibcdNHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488363" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:37 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 03/15] wifi: iwlwifi: rename bits in config/boot control register Date: Sat, 28 Dec 2024 22:34:07 +0200 Message-Id: <20241228223206.6f25be160619.I3ffc9601e99dc414a9ae54a0d90c9d20c0253da5@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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 register 0x000 is now really boot control, and some of the old bit names were (even for old hardware) not reflecting the names on the hardware side; rename them in the driver to align the naming. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- .../net/wireless/intel/iwlwifi/dvm/eeprom.c | 8 ++++---- drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 15 ++++++++------- .../wireless/intel/iwlwifi/pcie/trans-gen2.c | 6 +++--- .../net/wireless/intel/iwlwifi/pcie/trans.c | 18 +++++++++--------- 4 files changed, 24 insertions(+), 23 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/dvm/eeprom.c b/drivers/net/wireless/intel/iwlwifi/dvm/eeprom.c index 931aa3f5798d..cdc05f7e75a6 100644 --- a/drivers/net/wireless/intel/iwlwifi/dvm/eeprom.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/eeprom.c @@ -676,12 +676,12 @@ static int iwl_eeprom_acquire_semaphore(struct iwl_trans *trans) for (count = 0; count < IWL_EEPROM_SEM_RETRY_LIMIT; count++) { /* Request semaphore */ iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG, - CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM); + CSR_HW_IF_CONFIG_REG_EEPROM_OWN_SEM); /* See if we got it */ ret = iwl_poll_bit(trans, CSR_HW_IF_CONFIG_REG, - CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM, - CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM, + CSR_HW_IF_CONFIG_REG_EEPROM_OWN_SEM, + CSR_HW_IF_CONFIG_REG_EEPROM_OWN_SEM, IWL_EEPROM_SEM_TIMEOUT); if (ret >= 0) { IWL_DEBUG_EEPROM(trans->dev, @@ -697,7 +697,7 @@ static int iwl_eeprom_acquire_semaphore(struct iwl_trans *trans) static void iwl_eeprom_release_semaphore(struct iwl_trans *trans) { iwl_clear_bit(trans, CSR_HW_IF_CONFIG_REG, - CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM); + CSR_HW_IF_CONFIG_REG_EEPROM_OWN_SEM); } static int iwl_eeprom_verify_signature(struct iwl_trans *trans, bool nvm_is_otp) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-csr.h b/drivers/net/wireless/intel/iwlwifi/iwl-csr.h index 98563757ce2c..c2cd5c24646b 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-csr.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-csr.h @@ -167,13 +167,14 @@ #define CSR_HW_IF_CONFIG_REG_POS_PHY_DASH (12) #define CSR_HW_IF_CONFIG_REG_POS_PHY_STEP (14) -#define CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A (0x00080000) -#define CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM (0x00200000) -#define CSR_HW_IF_CONFIG_REG_BIT_NIC_READY (0x00400000) /* PCI_OWN_SEM */ -#define CSR_HW_IF_CONFIG_REG_BIT_NIC_PREPARE_DONE (0x02000000) /* ME_OWN */ -#define CSR_HW_IF_CONFIG_REG_PREPARE (0x08000000) /* WAKE_ME */ -#define CSR_HW_IF_CONFIG_REG_ENABLE_PME (0x10000000) -#define CSR_HW_IF_CONFIG_REG_PERSIST_MODE (0x40000000) /* PERSISTENCE */ +#define CSR_HW_IF_CONFIG_REG_HAP_WAKE 0x00080000 +/* NOTE: EEPROM_OWN_SEM is no longer defined for new HW */ +#define CSR_HW_IF_CONFIG_REG_EEPROM_OWN_SEM 0x00200000 +#define CSR_HW_IF_CONFIG_REG_PCI_OWN_SET 0x00400000 +#define CSR_HW_IF_CONFIG_REG_ME_OWN 0x02000000 +#define CSR_HW_IF_CONFIG_REG_WAKE_ME 0x08000000 +#define CSR_HW_IF_CONFIG_REG_WAKE_ME_PCIE_OWNER_EN 0x10000000 +#define CSR_HW_IF_CONFIG_REG_PERSISTENCE 0x40000000 #define CSR_MBOX_SET_REG_OS_ALIVE BIT(5) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c index 5f6cd60b50b9..3677e0154888 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c @@ -43,7 +43,7 @@ int iwl_pcie_gen2_apm_init(struct iwl_trans *trans) * wake device's PCI Express link L1a -> L0s */ iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG, - CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A); + CSR_HW_IF_CONFIG_REG_HAP_WAKE); iwl_pcie_apm_config(trans); @@ -68,8 +68,8 @@ static void iwl_pcie_gen2_apm_stop(struct iwl_trans *trans, bool op_mode_leave) iwl_set_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG, CSR_RESET_LINK_PWR_MGMT_DISABLED); iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG, - CSR_HW_IF_CONFIG_REG_PREPARE | - CSR_HW_IF_CONFIG_REG_ENABLE_PME); + CSR_HW_IF_CONFIG_REG_WAKE_ME | + CSR_HW_IF_CONFIG_REG_WAKE_ME_PCIE_OWNER_EN); mdelay(1); iwl_clear_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG, CSR_RESET_LINK_PWR_MGMT_DISABLED); diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index 86f1d87a909c..053f0ac756be 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -311,7 +311,7 @@ static int iwl_pcie_apm_init(struct iwl_trans *trans) * wake device's PCI Express link L1a -> L0s */ iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG, - CSR_HW_IF_CONFIG_REG_BIT_HAP_WAKE_L1A); + CSR_HW_IF_CONFIG_REG_HAP_WAKE); iwl_pcie_apm_config(trans); @@ -439,7 +439,7 @@ static void iwl_pcie_apm_lp_xtal_enable(struct iwl_trans *trans) * SHRD_HW_RST is applied in S3. */ iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG, - CSR_HW_IF_CONFIG_REG_PERSIST_MODE); + CSR_HW_IF_CONFIG_REG_PERSISTENCE); /* * Clear "initialization complete" bit to move adapter from @@ -508,8 +508,8 @@ static void iwl_pcie_apm_stop(struct iwl_trans *trans, bool op_mode_leave) iwl_set_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG, CSR_RESET_LINK_PWR_MGMT_DISABLED); iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG, - CSR_HW_IF_CONFIG_REG_PREPARE | - CSR_HW_IF_CONFIG_REG_ENABLE_PME); + CSR_HW_IF_CONFIG_REG_WAKE_ME | + CSR_HW_IF_CONFIG_REG_WAKE_ME_PCIE_OWNER_EN); mdelay(1); iwl_clear_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG, CSR_RESET_LINK_PWR_MGMT_DISABLED); @@ -581,12 +581,12 @@ static int iwl_pcie_set_hw_ready(struct iwl_trans *trans) int ret; iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG, - CSR_HW_IF_CONFIG_REG_BIT_NIC_READY); + CSR_HW_IF_CONFIG_REG_PCI_OWN_SET); /* See if we got it */ ret = iwl_poll_bit(trans, CSR_HW_IF_CONFIG_REG, - CSR_HW_IF_CONFIG_REG_BIT_NIC_READY, - CSR_HW_IF_CONFIG_REG_BIT_NIC_READY, + CSR_HW_IF_CONFIG_REG_PCI_OWN_SET, + CSR_HW_IF_CONFIG_REG_PCI_OWN_SET, HW_READY_TIMEOUT); if (ret >= 0) @@ -620,7 +620,7 @@ int iwl_pcie_prepare_card_hw(struct iwl_trans *trans) /* If HW is not ready, prepare the conditions to check again */ iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG, - CSR_HW_IF_CONFIG_REG_PREPARE); + CSR_HW_IF_CONFIG_REG_WAKE_ME); do { ret = iwl_pcie_set_hw_ready(trans); @@ -1566,7 +1566,7 @@ int iwl_trans_pcie_d3_suspend(struct iwl_trans *trans, bool test, bool reset) if (!reset) /* Enable persistence mode to avoid reset */ iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG, - CSR_HW_IF_CONFIG_REG_PERSIST_MODE); + CSR_HW_IF_CONFIG_REG_PERSISTENCE); ret = iwl_pcie_d3_handshake(trans, true); if (ret) From patchwork Sat Dec 28 20:34:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922508 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 CCC891990C7 for ; Sat, 28 Dec 2024 20:34:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418081; cv=none; b=MBbF1XgG/TEK/rqKec9ChAjB+lENg6HPupC8R7BSKfK0B5E7XvhqfCuDMfUTsAZzU2K2xq/r45+xap7fFCSTv/S7MsrFLZMIDfCxF65wsoqxS+Qooxb++HsHiObXeheH+JLSOg2u6tPO27pdBYko3WioIDpe8fIExIxTs7/PYn4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418081; c=relaxed/simple; bh=rO/o6y2WdZQ0UIS8eFPk4AByvCX4rDsoydR1rVVwdlM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=B9fVmxn5lqWQ2Arrj2Q6txkelHC3sPP2DXOSnutjkDnUbcJB31FvdHI4+abYROFIvzGgYyx6aXVg8T+o/5J0OB66Fgg1aPUE47oR3L9dMTM7Pca7tNxG6apNWIm76KTLswRLacTN/NVy0lWwEc1U1v89YlXl+pKVClNkY6nyU+c= 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=Faqn7d9l; arc=none smtp.client-ip=198.175.65.20 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="Faqn7d9l" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418080; x=1766954080; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=rO/o6y2WdZQ0UIS8eFPk4AByvCX4rDsoydR1rVVwdlM=; b=Faqn7d9lBAHIzWPqMkqSOqgij1vw3TnSJJbDTeWDQWHRqamD9hsmN2z7 UW+6uHFgyQeneOvHbtIgBTWNPiMX8NqCsDrm00uHs/GBOwRxH3UMCiq3l x9us8yeFY7kCaERFJvA+Yqk0hLwJHVyw3tdWqFoTgpIC31yOHe8SIJLMR NVoM+dN7fDp9Lbg63fdV6CObSddIUhTyPVjBFvuCGjbnIP34zgtRk9yiZ K856m3cM9jd2AxEWuAuSYDUIt0ebJHdZvx30UWsc4ELuHN9vPkfRSPIpl R67nwrC5/orLjNULOtedKsYifvC+Qskj8Z8EhbBOpTt/SjZ4fvWpQYwtu g==; X-CSE-ConnectionGUID: 8w/EJ3OnQCCyv5Iu3o33cQ== X-CSE-MsgGUID: ZYjdRIVNQga6WGV4zkMnbw== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479756" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479756" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:39 -0800 X-CSE-ConnectionGUID: v1xDuV6GTB6lhrfpOrMQdA== X-CSE-MsgGUID: kZVz68kES5SHypj+CgXpRw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488375" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:38 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Daniel Gabay Subject: [PATCH 04/15] wifi: iwlwifi: Remove MVM prefix from TX API macros Date: Sat, 28 Dec 2024 22:34:08 +0200 Message-Id: <20241228223206.1b235ec5354e.If99a38b1f0d7e42ea4ee3907e6c395846c4aa9b0@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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: Daniel Gabay These are not mvm specific. Signed-off-by: Daniel Gabay Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/api/tx.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/tx.h b/drivers/net/wireless/intel/iwlwifi/fw/api/tx.h index 04b177b8ef30..1f23bde5720c 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/tx.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/tx.h @@ -482,8 +482,8 @@ struct agg_tx_status { #define TX_RES_RATE_TABLE_COL_GET(_f) (((_f) & TX_RES_RATE_TABLE_COLOR_MSK) >>\ TX_RES_RATE_TABLE_COLOR_POS) -#define IWL_MVM_TX_RES_GET_TID(_ra_tid) ((_ra_tid) & 0x0f) -#define IWL_MVM_TX_RES_GET_RA(_ra_tid) ((_ra_tid) >> 4) +#define IWL_TX_RES_GET_TID(_ra_tid) ((_ra_tid) & 0x0f) +#define IWL_TX_RES_GET_RA(_ra_tid) ((_ra_tid) >> 4) /** * struct iwl_tx_resp_v3 - notifies that fw is TXing a packet diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index b5f6bb9cab4a..bd09bd0ca930 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c @@ -1626,8 +1626,8 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm, int txq_id = SEQ_TO_QUEUE(sequence); /* struct iwl_tx_resp_v3 is almost the same */ struct iwl_tx_resp *tx_resp = (void *)pkt->data; - int sta_id = IWL_MVM_TX_RES_GET_RA(tx_resp->ra_tid); - int tid = IWL_MVM_TX_RES_GET_TID(tx_resp->ra_tid); + int sta_id = IWL_TX_RES_GET_RA(tx_resp->ra_tid); + int tid = IWL_TX_RES_GET_TID(tx_resp->ra_tid); struct agg_tx_status *agg_status = iwl_mvm_get_agg_status(mvm, tx_resp); u32 status = le16_to_cpu(agg_status->status); @@ -1917,8 +1917,8 @@ static void iwl_mvm_rx_tx_cmd_agg(struct iwl_mvm *mvm, struct iwl_rx_packet *pkt) { struct iwl_tx_resp *tx_resp = (void *)pkt->data; - int sta_id = IWL_MVM_TX_RES_GET_RA(tx_resp->ra_tid); - int tid = IWL_MVM_TX_RES_GET_TID(tx_resp->ra_tid); + int sta_id = IWL_TX_RES_GET_RA(tx_resp->ra_tid); + int tid = IWL_TX_RES_GET_TID(tx_resp->ra_tid); u16 sequence = le16_to_cpu(pkt->hdr.sequence); struct iwl_mvm_sta *mvmsta; int queue = SEQ_TO_QUEUE(sequence); From patchwork Sat Dec 28 20:34:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922509 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 097081991A1 for ; Sat, 28 Dec 2024 20:34:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418082; cv=none; b=Y/62Cyp5aP/PA5v78QjftDIRWxIjPioXI5SDM2wD0DBqxRlAnmq+MKBqNm7crezRcyn9tjuLGeukEToj/QkOt2JqDHG7YPfr0wPF1MXXPWGrIcxQhELedaoMfRfeKW+777IyHVANk3UPS0IbYyrRLXBy3CISrICwKmZNX4HD3vE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418082; c=relaxed/simple; bh=1ozWsU+w1RVlHu+IJ5lF2Bt633QkVu65bnlspGZvhFA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TK3kZDE0Tdzh1bGyn+4uCOjNF9cUeLkd4PjgKdtbQvyPWrXEBf/387M0oRRJkzKCZhDfU4xwmAah9haHOwb/PxpJPkcNg9psXrq+TbmWvTiKZsLgmc12yRiNDG769xJIglD/Pjg0vnLnNyO0hb7iTBUGx0Ei+RvSqhQMwQedTCI= 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=ZQs5bA44; arc=none smtp.client-ip=198.175.65.20 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="ZQs5bA44" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418081; x=1766954081; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1ozWsU+w1RVlHu+IJ5lF2Bt633QkVu65bnlspGZvhFA=; b=ZQs5bA44qbXzMeVq/SGOltb8UdO8G8VaWNLJqdQ2wALsqwDIUBXzNa22 n+u6EwNFEOGDl59ThfljtMYjKkzkjJewbP8x0coK75dz3g4lYj72RrkeI 0eyZ3MOF+jHmBgZiZyhDhBXBcfIXGGtty9w7ZUwYdcX3SoRlPaTsVOhvw drqoNtm08/6mrHvTC6hB4gypiP62pxXaRjEpBVafYTinlPJ0VcGHmPvTx Edvbvg0DwM1oOqhq6Cp2hyWfV/OG7Q7068HNxwryvne/RBHYVwtGBnA0M HSQiGl5rW8Jq4H88Abvrwj1gx7WAF+l35evqEBwT6dHX8ilaIRT5QXS69 w==; X-CSE-ConnectionGUID: 4KEYhaauTHW67NHcldpzow== X-CSE-MsgGUID: Yo7w+NRKSsSLvSc6FY3kgw== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479760" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479760" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:41 -0800 X-CSE-ConnectionGUID: 3MJaKHj8SQ+uzKG2xTt2Kw== X-CSE-MsgGUID: SA7Go/tZQYeAThVwJWE3zg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488391" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:40 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 05/15] wifi: iwlwifi: iwl-drv: refactor image loading a bit Date: Sat, 28 Dec 2024 22:34:09 +0200 Message-Id: <20241228223206.224ac6599bbe.Iadc1974d633eec09797522f7d3fa543ea18bd7f6@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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 Refactor some parts of the image loading to be able to extend the code for external FSEQ image loading more easily. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 78 +++++++++----------- 1 file changed, 33 insertions(+), 45 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index 61ac62591161..fba9feee923d 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c @@ -137,8 +137,7 @@ static void iwl_dealloc_ucode(struct iwl_drv *drv) memset(&drv->fw, 0, sizeof(drv->fw)); } -static int iwl_alloc_fw_desc(struct iwl_drv *drv, struct fw_desc *desc, - struct fw_sec *sec) +static int iwl_alloc_fw_desc(struct fw_desc *desc, struct fw_sec *sec) { void *data; @@ -318,17 +317,6 @@ struct iwl_firmware_pieces { size_t n_mem_tlv; }; -/* - * These functions are just to extract uCode section data from the pieces - * structure. - */ -static struct fw_sec *get_sec(struct iwl_firmware_pieces *pieces, - enum iwl_ucode_type type, - int sec) -{ - return &pieces->img[type].sec[sec]; -} - static void alloc_sec_data(struct iwl_firmware_pieces *pieces, enum iwl_ucode_type type, int sec) @@ -389,22 +377,18 @@ static void set_sec_offset(struct iwl_firmware_pieces *pieces, /* * Gets uCode section from tlv. */ -static int iwl_store_ucode_sec(struct iwl_firmware_pieces *pieces, - const void *data, enum iwl_ucode_type type, - int size) +static int iwl_store_ucode_sec(struct fw_img_parsing *img, + const void *data, int size) { - struct fw_img_parsing *img; struct fw_sec *sec; const struct fw_sec_parsing *sec_parse; size_t alloc_size; - if (WARN_ON(!pieces || !data || type >= IWL_UCODE_TYPE_MAX)) - return -1; + if (WARN_ON(!img || !data)) + return -EINVAL; sec_parse = (const struct fw_sec_parsing *)data; - img = &pieces->img[type]; - alloc_size = sizeof(*img->sec) * (img->sec_counter + 1); sec = krealloc(img->sec, alloc_size, GFP_KERNEL); if (!sec) @@ -900,18 +884,18 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, le32_to_cpup((const __le32 *)tlv_data); break; case IWL_UCODE_TLV_SEC_RT: - iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_REGULAR, - tlv_len); + iwl_store_ucode_sec(&pieces->img[IWL_UCODE_REGULAR], + tlv_data, tlv_len); drv->fw.type = IWL_FW_MVM; break; case IWL_UCODE_TLV_SEC_INIT: - iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_INIT, - tlv_len); + iwl_store_ucode_sec(&pieces->img[IWL_UCODE_INIT], + tlv_data, tlv_len); drv->fw.type = IWL_FW_MVM; break; case IWL_UCODE_TLV_SEC_WOWLAN: - iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_WOWLAN, - tlv_len); + iwl_store_ucode_sec(&pieces->img[IWL_UCODE_WOWLAN], + tlv_data, tlv_len); drv->fw.type = IWL_FW_MVM; break; case IWL_UCODE_TLV_DEF_CALIB: @@ -932,18 +916,18 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, FW_PHY_CFG_RX_CHAIN_POS; break; case IWL_UCODE_TLV_SECURE_SEC_RT: - iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_REGULAR, - tlv_len); + iwl_store_ucode_sec(&pieces->img[IWL_UCODE_REGULAR], + tlv_data, tlv_len); drv->fw.type = IWL_FW_MVM; break; case IWL_UCODE_TLV_SECURE_SEC_INIT: - iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_INIT, - tlv_len); + iwl_store_ucode_sec(&pieces->img[IWL_UCODE_INIT], + tlv_data, tlv_len); drv->fw.type = IWL_FW_MVM; break; case IWL_UCODE_TLV_SECURE_SEC_WOWLAN: - iwl_store_ucode_sec(pieces, tlv_data, IWL_UCODE_WOWLAN, - tlv_len); + iwl_store_ucode_sec(&pieces->img[IWL_UCODE_WOWLAN], + tlv_data, tlv_len); drv->fw.type = IWL_FW_MVM; break; case IWL_UCODE_TLV_NUM_OF_CPU: @@ -1110,9 +1094,8 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, } case IWL_UCODE_TLV_SEC_RT_USNIFFER: *usniffer_images = true; - iwl_store_ucode_sec(pieces, tlv_data, - IWL_UCODE_REGULAR_USNIFFER, - tlv_len); + iwl_store_ucode_sec(&pieces->img[IWL_UCODE_REGULAR_USNIFFER], + tlv_data, tlv_len); break; case IWL_UCODE_TLV_PAGING: if (tlv_len != sizeof(u32)) @@ -1337,26 +1320,31 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, return -EINVAL; } -static int iwl_alloc_ucode(struct iwl_drv *drv, - struct iwl_firmware_pieces *pieces, - enum iwl_ucode_type type) +static int iwl_alloc_ucode_mem(struct fw_img *out, struct fw_img_parsing *img) { - int i; struct fw_desc *sec; - sec = kcalloc(pieces->img[type].sec_counter, sizeof(*sec), GFP_KERNEL); + sec = kcalloc(img->sec_counter, sizeof(*sec), GFP_KERNEL); if (!sec) return -ENOMEM; - drv->fw.img[type].sec = sec; - drv->fw.img[type].num_sec = pieces->img[type].sec_counter; - for (i = 0; i < pieces->img[type].sec_counter; i++) - if (iwl_alloc_fw_desc(drv, &sec[i], get_sec(pieces, type, i))) + out->sec = sec; + out->num_sec = img->sec_counter; + + for (int i = 0; i < out->num_sec; i++) + if (iwl_alloc_fw_desc(&sec[i], &img->sec[i])) return -ENOMEM; return 0; } +static int iwl_alloc_ucode(struct iwl_drv *drv, + struct iwl_firmware_pieces *pieces, + enum iwl_ucode_type type) +{ + return iwl_alloc_ucode_mem(&drv->fw.img[type], &pieces->img[type]); +} + static int validate_sec_sizes(struct iwl_drv *drv, struct iwl_firmware_pieces *pieces, const struct iwl_cfg *cfg) From patchwork Sat Dec 28 20:34:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922510 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 52FAB1991B8 for ; Sat, 28 Dec 2024 20:34:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418083; cv=none; b=Xiy0cJYR+LayeQmiWqsHfD/O1X3OuUCN18Me2YLVSJL5y17Sn3owElOgwOaBtHfAYyaPu589bhc0mRCHynJul4QYBT1igaiyExxCWQohkRXzmuwz4BCLq/XdaUzGTolhcCkP5l5hF5iHW/82CkJiDUnxtLyL52ODezI0UzXh2TY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418083; c=relaxed/simple; bh=Yj5zys47jGAG55ODB3gEFWVyzX5A8wuj6SbkmySD/yk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RLzI95+JwduL3+hwkUqrsJsS1MkhI8H08TBL61+Sz9bRGTFgI4WPf/Gu0f44tY69Pvn/itbiyhdqzI/0LXK6In3STtzbjPd2eITaGRAu42gy//lV1+gATX43/iLUUeXly/Jp/+2QOSrRk3MVA2jg3oJ3WnBRt1/bApKhq98jpyQ= 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=F7t5FnGd; arc=none smtp.client-ip=198.175.65.20 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="F7t5FnGd" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418082; x=1766954082; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Yj5zys47jGAG55ODB3gEFWVyzX5A8wuj6SbkmySD/yk=; b=F7t5FnGdG4DyyaLEO4gFW733nDyk9dGeOXW9xs6AGHA5QBsWh4skizsG HSxWNowQ/V8LXabGjovuNM4RH8yLTyJHgYSOv0Q+VKXhNBQxl8rJr3srt zfeW03WvPEej+x65YbMIs0g2wlcj4nZVHEpcv8XmnxlATcwD//DIjMfPA gbe8GfZNk60cf/y8kuNP6BAzJLu5A47sCLQaJFcUexW3mMpwYnG5HlzJs P6Jp6xy/cBbEgvklf/WT+uydSb1rzXfrfYi2BjXN8rffZ3nz7OOHuMsCr l5RfzmFB1cECd0kkZPmtg+SS2u33P467BfQnU1zDIiKcjQJy4cbdb6fSI g==; X-CSE-ConnectionGUID: FJAsXXwHTPSmBdXAYQ1Tzg== X-CSE-MsgGUID: 00Jdb5iPTxeT7ZsWS3PVXw== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479762" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479762" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:42 -0800 X-CSE-ConnectionGUID: Ihv5USYYSZquD1+dMxOs4Q== X-CSE-MsgGUID: epPPR52fTBOICQA6WASsCA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488399" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:41 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, "Somashekhar(Som)" Subject: [PATCH 06/15] wifi: iwlwifi: Allow entering EMLSR for more band combinations Date: Sat, 28 Dec 2024 22:34:10 +0200 Message-Id: <20241228223206.ec659168eeb7.I403f61f0e827c14cf2b245f48e1736559f17c476@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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: "Somashekhar(Som)" Enter EMLSR only when two bands are different. EMLSR should be allowed when one of the link is LB. Signed-off-by: Somashekhar(Som) Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/link.c | 5 ++--- drivers/net/wireless/intel/iwlwifi/mvm/tests/links.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c index 272da41567ef..1f2d281864a7 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c @@ -762,9 +762,8 @@ bool iwl_mvm_mld_valid_link_pair(struct ieee80211_vif *vif, iwl_mvm_esr_disallowed_with_link(mvm, vif, b, false)) return false; - if (a->chandef->width != b->chandef->width || - !(a->chandef->chan->band == NL80211_BAND_6GHZ && - b->chandef->chan->band == NL80211_BAND_5GHZ)) + if (a->chandef->chan->band == b->chandef->chan->band || + a->chandef->width != b->chandef->width) ret |= IWL_MVM_ESR_EXIT_BANDWIDTH; if (ret) { diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tests/links.c b/drivers/net/wireless/intel/iwlwifi/mvm/tests/links.c index 1dc57e022191..d692f1813d44 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tests/links.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tests/links.c @@ -262,7 +262,7 @@ static const struct valid_link_pair_case { .desc = "LB + HB, no BT.", .chan_a = &chan_2ghz, .chan_b = &chan_5ghz, - .valid = false, + .valid = true, }, { .desc = "LB + HB, with BT.", From patchwork Sat Dec 28 20:34:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922511 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 C46B01E515 for ; Sat, 28 Dec 2024 20:34:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418090; cv=none; b=nETRP0NwC1zEB+ZfoBbLtmeuxPH+J0fVmcxHdbWW0f4Oeiok3AeH53hz9DIureUeDVdQUs3BJBIyWGzRx7/IucK4ipo6lv1PDy5zYievW8HpX9pfJwkoqg7kpEBzmPkaZSTyQ/+/URGMO91M15/elaH/EaGZBfZOuq71IHC4OJA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418090; c=relaxed/simple; bh=h3q/WIbw/sxxfKW9aZaa4gjwG5X4m+x7JoOYhwBoKfs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ETg7jlNfF46FQXutlkKDrMpGYWAvenJPHKoLrHD2v54s0G5FDcZqm8z9rFNtEJtFucHo8WOxZW6c1/XLOhAsA8BugFTvBZPulS5nUL4FDKqEidqQP8ABi0N/MRxm+NkxV18WbYjulEnFkn95Qzd3EMwzf9At4Ac1W+k2RJab6Z8= 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=W1LZk1a0; arc=none smtp.client-ip=198.175.65.20 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="W1LZk1a0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418089; x=1766954089; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=h3q/WIbw/sxxfKW9aZaa4gjwG5X4m+x7JoOYhwBoKfs=; b=W1LZk1a0BUGcweziFVH3y8EDCcOcJ9KRAilcq5mZaEp447yFRDrIgiuM h8nsgEbPYVqbn9YaZFW81HytNbw+CX2xNR3ULWQaal8HvawGRLH5JV6R/ 8vUvJomOt4gTC23dCsb2FWQvISdqb1uHAMPg7poHJqlQr+IlkguMQDzfi 6acQE1buIBwo1lJPSC/6EV98v0kEyQcr5tppwY+63xEA3lkaIcPUguytW Mqmjdt2gCkeYCbbEeffYN8IglPf4Ci51lgA8iVgInuMO1ERSy/6jzQQzl lzPkhw0RiXWtMgDVfpsCbGSmib+7ek5CBPkZZ2/9uhmBDEgMnTrysuuG4 w==; X-CSE-ConnectionGUID: oNZXS+u0QQOBIrT/Rd8SpQ== X-CSE-MsgGUID: 5YGxARTIRZaPpql9E8oraQ== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479766" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479766" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:48 -0800 X-CSE-ConnectionGUID: xRNZMLS0R+mnhK1TKbVNHQ== X-CSE-MsgGUID: kaWDQS9LR0eEQBpGX0JLUQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488402" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:42 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, "Somashekhar(Som)" Subject: [PATCH 07/15] wifi: iwlwifi: add mapping of prph register crf for PE RF Date: Sat, 28 Dec 2024 22:34:11 +0200 Message-Id: <20241228223206.a8899d585a6e.I9d9b223c75d5370811220291c62c364967c0acc3@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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: "Somashekhar(Som)" In blank OTP, we get the CRF type from a peripheral register, support it for PE CRF Signed-off-by: Somashekhar(Som) Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-prph.h | 1 + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h index dc171c29eb7b..8d4ff42da35a 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-prph.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-prph.h @@ -458,6 +458,7 @@ enum { #define REG_CRF_ID_TYPE_GF 0x410 #define REG_CRF_ID_TYPE_FM 0x910 #define REG_CRF_ID_TYPE_WHP 0xA10 +#define REG_CRF_ID_TYPE_PE 0xA30 #define HPM_DEBUG 0xA03440 #define PERSISTENCE_BIT BIT(12) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index 8297d56815fa..e73a9a47bf1d 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -1267,6 +1267,9 @@ static int map_crf_id(struct iwl_trans *iwl_trans) case REG_CRF_ID_TYPE_WHP: iwl_trans->hw_rf_id = (IWL_CFG_RF_TYPE_WH << 12); break; + case REG_CRF_ID_TYPE_PE: + iwl_trans->hw_rf_id = (IWL_CFG_RF_TYPE_PE << 12); + break; default: ret = -EIO; IWL_ERR(iwl_trans, From patchwork Sat Dec 28 20:34:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922512 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 6B68673446 for ; Sat, 28 Dec 2024 20:34:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418092; cv=none; b=mx2adLVkR+619vV3pavG3DzZUJXjZL1QIBRzUTxIsf22Ump+t3na3hihnLVkugNW6KxSYZK7xZLGpvcVqQyGPRRVtJhhgxHyDM5mT0I+1HGpLlyQoEH2YCHLibBXZ5nqULvStITvPTlZfS06Qz7gXdwCkUrqMZ9oC5knae4n8Zk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418092; c=relaxed/simple; bh=ES3MnL8K1rJSRKxgGIW3ZQEUZFv63eqPn1z19MzhQBA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ezyMOF4aOqFbrXnTmob7docEWcCi4TIRc0ZN9mn2izGENYtD4ARO9IfkP8NdtD/aCFr/bZZ08i7aUnl/AdZ/yrtcYxg/Tm1gYkDc5kDRIvd/xPVsssCOsST//v2pS94YZomWOz9+0rx6yxhlvO03O1fRF4HSei045SsIsbveYa4= 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=L+uNqDQq; arc=none smtp.client-ip=198.175.65.20 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="L+uNqDQq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418090; x=1766954090; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ES3MnL8K1rJSRKxgGIW3ZQEUZFv63eqPn1z19MzhQBA=; b=L+uNqDQqQ6KbA/JAVVnXty1I/ZsLKMjPAAlt2Iymd4sHUZQoEjECZ33v skNRJ1oPYjbZFXwnB57kSdtDCwmgSJxctCkBkOKftnBTw6jGWVPIZXLsi w0ab5LUOhv3ZmNmUtag638eK6Ne2NlDRF6/hNODg3EWCtJyY/i+y7T6uT Zz84fK2SojT/bjFpjiaBBnhlgn9uGnG/Md76lcXsej3WrkyaaVVrKv2w3 OlZD73rMpbfYaseJL51kJChkYoidQnX62aGXyWZHD9ZaiSMHfDg/pJS3V tgVOb51B8QxIc2anjPs3c1pxJQ3FjUPHV97LXzgBITULnfJQoDrmIgq9+ g==; X-CSE-ConnectionGUID: w/oSPz2/T62P4U/Jko65CQ== X-CSE-MsgGUID: cbIVZ7igQViOe1Li2f6Mnw== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479768" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479768" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:48 -0800 X-CSE-ConnectionGUID: 9mOPIbNqSe6MF667WPeQJQ== X-CSE-MsgGUID: G5MOM+phRUGiJfIPAypfSQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488406" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:45 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, "Somashekhar(Som)" Subject: [PATCH 08/15] wifi: iwlwifi: add channel_load_not_by_us in iwl_mvm_phy_ctxt Date: Sat, 28 Dec 2024 22:34:12 +0200 Message-Id: <20241228223206.7c7f3ebebadf.Ifac005cf1e3b02cba0861eb19bfd8099957faad9@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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: "Somashekhar(Som)" Adding channel_load_not_by_us in the mvm phy context. Signed-off-by: Somashekhar(Som) Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 43e304f22475..fbf7306b9b6f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -103,6 +103,7 @@ struct iwl_mvm_phy_ctxt { u32 center_freq1; bool rlc_disabled; u32 channel_load_by_us; + u32 channel_load_not_by_us; }; struct iwl_mvm_time_event_data { diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c index 00aac76e8509..2dbef7b46355 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rx.c @@ -789,6 +789,8 @@ static void iwl_mvm_handle_per_phy_stats(struct iwl_mvm *mvm, continue; mvm->phy_ctxts[i].channel_load_by_us = le32_to_cpu(per_phy[i].channel_load_by_us); + mvm->phy_ctxts[i].channel_load_not_by_us = + le32_to_cpu(per_phy[i].channel_load_not_by_us); } } From patchwork Sat Dec 28 20:34:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922513 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 BB1CC19883C for ; Sat, 28 Dec 2024 20:34:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418092; cv=none; b=YTy/eA87QAfXow2TFA8fgpAIZ/bH2h3sohPQ5UL3fAXs6Vl/748hRDfahVhuSqGfxXMLjkPvs+f1KNCKf77uVBoT+wMBHqHcGrX6HTcK8CDKpk87Cbatq3F0oZAF7cOSpaMvPveT+1gKDlhQfFGbqt/3V6HhKnegxuG3taa8ClE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418092; c=relaxed/simple; bh=hIhRVWiZezutTbRJCsvM8qyf+jtr2beZQd870I2Mu0k=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=saOkId48rFnABKN1SZeSd5S9Og8TTgbnxVTE55kvc3u/VYHerCexQNhxC9Lo43z3m4Q4u1P9z4z1ZJpgJoYx1GdDjgYopm2l62sdRGLlDRrVHDZBi6t3DIUJB7+TKS+IpTqkepQxieCSeF6RfU0FIWO7Dbrk2KeyPkbaUenUot4= 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=OEGeFBCo; arc=none smtp.client-ip=198.175.65.20 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="OEGeFBCo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418090; x=1766954090; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hIhRVWiZezutTbRJCsvM8qyf+jtr2beZQd870I2Mu0k=; b=OEGeFBCoQ/tYA3Cn51gfo9JzXhxYWRp5AYFz1quKeFSlTbB7oHX1b9XO 9JO1OG+S9UdMtfuZwyt6QIhlMHuVKztQ9qORGtNac6BsmxK+NFx6chlxV 3uNISqmn344xOJBr1W/QBsiH4lyD3cyQgSzl+GAisS9MsxsJud4qhoYrU rIJvu7kv0LhYXDX+4/VHKtBHorUZ09jitZ6BSMoxFCDFixCZOogzf2vI2 fBHFVkWYWDOz6vL+Sgb1EPSSHR3kcrHxaLRYTcWDadoVQ3p/lFGIU09gW 8VP6Tmx5+6aZrRIqyEW76DtG9xiT8gPw/ihmD/ederV6rTxLIEq8CmXHF Q==; X-CSE-ConnectionGUID: SbXaBz2RQjiZY5bNJGjMfA== X-CSE-MsgGUID: L9wiCY2lT0q7G6co+ZIZ4g== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479770" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479770" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:48 -0800 X-CSE-ConnectionGUID: GlDdmdxLSb2XfD0nE1Egew== X-CSE-MsgGUID: V6v8kNEwRSK2RNeb+1a4mg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488411" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:47 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 09/15] wifi: iwlwifi: s/iwl_dts_measurement_notif_v2/iwl_dts_measurement_notif/g Date: Sat, 28 Dec 2024 22:34:13 +0200 Message-Id: <20241228223206.c2f489844d87.I9de3e424be48d66994cde3684ce7e9e99456067d@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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: Emmanuel Grumbach No need to carry the version number in the structure name if this is the latest version available. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/api/commands.h | 2 +- drivers/net/wireless/intel/iwlwifi/fw/api/phy.h | 6 +++--- drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/commands.h b/drivers/net/wireless/intel/iwlwifi/fw/api/commands.h index 34a1f97653c0..4b450c722a9c 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/commands.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/commands.h @@ -502,7 +502,7 @@ enum iwl_legacy_cmds { /** * @DTS_MEASUREMENT_NOTIFICATION: * &struct iwl_dts_measurement_notif_v1 or - * &struct iwl_dts_measurement_notif_v2 + * &struct iwl_dts_measurement_notif */ DTS_MEASUREMENT_NOTIFICATION = 0xdd, diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/phy.h b/drivers/net/wireless/intel/iwlwifi/fw/api/phy.h index 1dce28f3afa0..eb8961b51cb0 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/phy.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/phy.h @@ -55,7 +55,7 @@ enum iwl_phy_ops_subcmd_ids { /** * @DTS_MEASUREMENT_NOTIF_WIDE: * &struct iwl_dts_measurement_notif_v1 or - * &struct iwl_dts_measurement_notif_v2 + * &struct iwl_dts_measurement_notif */ DTS_MEASUREMENT_NOTIF_WIDE = 0xFF, }; @@ -152,13 +152,13 @@ struct iwl_dts_measurement_notif_v1 { } __packed; /* TEMPERATURE_MEASUREMENT_TRIGGER_NTFY_S_VER_1*/ /** - * struct iwl_dts_measurement_notif_v2 - measurements notification + * struct iwl_dts_measurement_notif - measurements notification * * @temp: the measured temperature * @voltage: the measured voltage * @threshold_idx: the trip index that was crossed */ -struct iwl_dts_measurement_notif_v2 { +struct iwl_dts_measurement_notif { __le32 temp; __le32 voltage; __le32 threshold_idx; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c index 256f8f558b15..c851290e75a2 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c @@ -105,7 +105,7 @@ static bool iwl_mvm_temp_notif_wait(struct iwl_notif_wait_data *notif_wait, void iwl_mvm_temp_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb) { struct iwl_rx_packet *pkt = rxb_addr(rxb); - struct iwl_dts_measurement_notif_v2 *notif_v2; + struct iwl_dts_measurement_notif *notif_v2; int len = iwl_rx_packet_payload_len(pkt); int temp; u32 ths_crossed; From patchwork Sat Dec 28 20:34:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922514 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 1C1241990BB for ; Sat, 28 Dec 2024 20:34:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418093; cv=none; b=s06q5g25Vr5KULeJ2QKRxygCHvbEYzilY5e1bU5YK302vsPSUpJTtM3FLBl81fgUMvawn27AIMT9rG2Kw0G1qFpz917ZwJw23Y/hpvsxSZ0Frqzri+x4yfT6844/XnAUPULth+GgvJqdzHQVrxaydZoG+0bKodO7txcnDDWYftk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418093; c=relaxed/simple; bh=WTMZl7hBU7ezzQKNSTeXiwL7dUgcKOYDSKgBfAzgUAw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=S/923k3BP2gDiqa3fgtGAoyiiiifq+WwIIL7y/Ous6DJbYTB20yRau6LROe4h4EVksInJTrqqhHuUOfMD2FWHfFFUUZZSKGE9JALz+ojI8qCDvaSlcJE6/gVKFWCscO9YI16ayMHEhfRqUnpuGLbkQAidAZDeTp/9VT7NZBlceQ= 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=DNoHOPiF; arc=none smtp.client-ip=198.175.65.20 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="DNoHOPiF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418092; x=1766954092; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WTMZl7hBU7ezzQKNSTeXiwL7dUgcKOYDSKgBfAzgUAw=; b=DNoHOPiFbAOvtebdkGgUrvPAAIFhPdd36FF9yqghm3jH5u7gif1rNSdE meBGdte5nNmBL2krQFNdZw9VJkOjsjyYOXvgTqyBjFq2JmlNJvcPDXjOa C2BnZ4o58tikPRBOdOoJ55w9OiM3HfpasLpbOc5rrLIztqmN8d554shDz P3fvgg7sbR/OW3oq5MBHElVyntkjt4MBeTknuWEUkNM4t76AJUfyI43et CEW3C/iCbpOG8h8mHgravEIt+dyCT7N4Ko7Qsis+k9yiK5UKXDYI7o9Ag bgqUzq1ylD4bpUsObHVSXV92FXegxWcqjvLhxbQ7C86E74+eKSy7ubFwJ g==; X-CSE-ConnectionGUID: 87kzVfApQea89rIrjyeW2g== X-CSE-MsgGUID: 3rWkPFLITSuXOg2EJ2Aq/Q== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479772" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479772" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:49 -0800 X-CSE-ConnectionGUID: KJRJ4XNrQlSFml12aL/t7g== X-CSE-MsgGUID: AyQfRN4GSfeCpyJl31vOzQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488414" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:48 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 10/15] wifi: iwlwifi: mark that we support TX_CMD_API_S_VER_10 Date: Sat, 28 Dec 2024 22:34:14 +0200 Message-Id: <20241228223206.83d681dc9cf7.I355270fb20b23978d9402cb70caf52a0108b8cd4@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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 Usually each struct that represent an API needs to have a comment specifying all the versions of the API that this struct corresponds to. iwl_tx_cmd_gen3 was long supporting also version 10. Say that. Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach --- drivers/net/wireless/intel/iwlwifi/fw/api/tx.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/tx.h b/drivers/net/wireless/intel/iwlwifi/fw/api/tx.h index 1f23bde5720c..b9807dd4f255 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/tx.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/tx.h @@ -298,8 +298,7 @@ struct iwl_tx_cmd_gen3 { __le32 rate_n_flags; u8 reserved[8]; struct ieee80211_hdr hdr[]; -} __packed; /* TX_CMD_API_S_VER_8, - TX_CMD_API_S_VER_10 */ +} __packed; /* TX_CMD_API_S_VER_8, TX_CMD_API_S_VER_10 */ /* * TX response related data @@ -601,7 +600,8 @@ struct iwl_tx_resp { __le16 reserved2; struct agg_tx_status status; } __packed; /* TX_RSP_API_S_VER_6, - TX_RSP_API_S_VER_7 */ + TX_RSP_API_S_VER_7, + TX_RSP_API_S_VER_8 */ /** * struct iwl_mvm_ba_notif - notifies about reception of BA From patchwork Sat Dec 28 20:34:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922515 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 602961990C8 for ; Sat, 28 Dec 2024 20:34:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418093; cv=none; b=DE2JeSDoNI1C5XuJZDajSufb9ksPZJ37WuGCUwhSWDUYmLJesZSdOjI0DOSa05qz/8E9LD2KDfLmmNnSwTmkcSHeUsp3pN3986XGIwZdXb13eFY6gUtdqRhkJM4IeG4QC7grwLDRgjkqK8BaxD5/Ioz1WI+e/XnrKcrgNQ8TjmQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418093; c=relaxed/simple; bh=m1OUxnykpE9ZgaUf+ZodfpqCPgaGa0hAlpJ6xdBKLlA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Q6V3zyXGcLvsB48WPfdXxDVmo70GxM6K7GsLIfNE7l8F7tKqzsMDMr0N7yXD/ITP+reGz/BOLaCW7b8Qfm7hRhJtBYQMC0kGuITr2zUCtJIH1bgJQyrGkZQzojhmqQqkDEw3rigbgNdgYhvqtVkWXoWGQu/DxG7DdCJ94/JCA2c= 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=KZh8UJY1; arc=none smtp.client-ip=198.175.65.20 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="KZh8UJY1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418092; x=1766954092; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=m1OUxnykpE9ZgaUf+ZodfpqCPgaGa0hAlpJ6xdBKLlA=; b=KZh8UJY1JblLnr5jl/iMuB02WNrq/AC609FgnhlTFUyyvS5zYU/i3oce k7SK8qbWwjfTLiivuTrZgIT8SX9zrw0Y6ysUZ3tKXws0lLWOhsSHLe7BE 9733GDDxrL/TdFozWIbKrkS3FSa60lEDr21RfWgb0YS/i/v2+ug624I8a a7pcDLOWnNJMOEe7eGZJBuzPNaqvS8shiX1wJHEsqI/5DwAoaWISisRAg 7fnsBvn3vF1jHSd+iboy76IPicqxmpBh8xQF2yDXCTeqwaCHUusAty7tl 2yw5qfgk7CMpBeQSWWDVjrCG+9XFRZoYn/lgz0U+YEWpgsyPht8AMET+H A==; X-CSE-ConnectionGUID: 9nILGjo1RcaXPXppLcblJw== X-CSE-MsgGUID: feYoqpR3QPqnyAvqd+zUug== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479774" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479774" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:50 -0800 X-CSE-ConnectionGUID: kE9PXMJtSM+6dxY1TDymDQ== X-CSE-MsgGUID: uO21h2quSkWvU1VJp/Vqcw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488415" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:50 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 11/15] wifi: iwlwifi: avoid memory leak Date: Sat, 28 Dec 2024 22:34:15 +0200 Message-Id: <20241228223206.bf61eaab99f8.Ibdc5df02f885208c222456d42c889c43b7e3b2f7@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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 A caller of iwl_acpi_get_dsm_object must free the returned object. iwl_acpi_get_dsm_integer returns immediately without freeing it if the expected size is more than 8 bytes. Fix that. Note that with the current code this will never happen, since the caller of iwl_acpi_get_dsm_integer already checks that the expected size if either 1 or 4 bytes, so it can't exceed 8 bytes. While at it, print the DSM value instead of the return value, as this was the intention in the first place. Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c index d3ab40fc8ab0..b32d5141dbbe 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c @@ -108,7 +108,7 @@ static int iwl_acpi_get_dsm_integer(struct device *dev, int rev, int func, size_t expected_size) { union acpi_object *obj; - int ret = 0; + int ret; obj = iwl_acpi_get_dsm_object(dev, rev, func, NULL, guid); if (IS_ERR(obj)) { @@ -123,8 +123,10 @@ static int iwl_acpi_get_dsm_integer(struct device *dev, int rev, int func, } else if (obj->type == ACPI_TYPE_BUFFER) { __le64 le_value = 0; - if (WARN_ON_ONCE(expected_size > sizeof(le_value))) - return -EINVAL; + if (WARN_ON_ONCE(expected_size > sizeof(le_value))) { + ret = -EINVAL; + goto out; + } /* if the buffer size doesn't match the expected size */ if (obj->buffer.length != expected_size) @@ -145,8 +147,9 @@ static int iwl_acpi_get_dsm_integer(struct device *dev, int rev, int func, } IWL_DEBUG_DEV_RADIO(dev, - "ACPI: DSM method evaluated: func=%d, ret=%d\n", - func, ret); + "ACPI: DSM method evaluated: func=%d, value=%lld\n", + func, *value); + ret = 0; out: ACPI_FREE(obj); return ret; From patchwork Sat Dec 28 20:34:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922516 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 74FA01990CF for ; Sat, 28 Dec 2024 20:34:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418094; cv=none; b=Pv6w7LSHo7e6yxp25omJo46EJS1VF8/eXeSHAu8PVpB4UuuqCbJO3ks96o94GfSY799vPVdtu0N5IGj9mS/3E9CDxrtj1vUuZcaknjZ2bKpiJFAttqD0lNkUpYhdh8Ld18WtiZwrP+MVOmHPI8FO02z8iq+ssEf4xRzOOB9rQb4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418094; c=relaxed/simple; bh=YhHHDSAOgED8HlcKQ5h79Kl0h8DGO2y2HHmuqlIfoqQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=HoHoy3Y69IcPcJmh7XYux6DUY4drfkWLZoENtaA+XXB3uDcM/esmqbRaqSvr6GSCEvuwk4VdOMsyR3eLBSAOSwVPC8K1jCSTjB8S/NoqVcIjF/NiP4MeQZeh4wh91pqXB8L7X7fcgcXx7tDPjRUhSXkAt7Jj6ijf3OyfTEIxNXY= 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=Rl5DoPTo; arc=none smtp.client-ip=198.175.65.20 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="Rl5DoPTo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418092; x=1766954092; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YhHHDSAOgED8HlcKQ5h79Kl0h8DGO2y2HHmuqlIfoqQ=; b=Rl5DoPToRUr9pCsQMtxcudNc68ssj07wJS8v50Fjq4k2UHRlCpsQzRC2 MlSVpP1pWBI5ThWPPCUsExrMY9vyCGBUJ5tLoHumo3meHC9bNijEg4mSl 7Jx2qP65dD2KAf4idUXYkf0wYFVAGuCgJpO8Dj9YyLClfVXeKxki2VWf6 F/zWYBTEhUYLa9EzkyXtKPqUQgzv4TsFaeotQCDmrIBprGibYRY736Nua ypHhG+CCYIqcJu7x1xOyf6Im8KVEvQYeJx5p8DOkxahLQLzRDEZFas1bM VbdIbMG5qe6CMveoDcOXAyOcD0uvOrYmOtgZ351wPhYIyghcz5JrusIA1 w==; X-CSE-ConnectionGUID: 9zdHyQABSlWDGZOhwcMEaA== X-CSE-MsgGUID: +uBCLj82SxabXeEsq8kOTA== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479776" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479776" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:52 -0800 X-CSE-ConnectionGUID: lQfhElYwTBKkaXjUCpvsHw== X-CSE-MsgGUID: krP821b3Tpycgx0bHVy5rA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488421" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:51 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Yedidya Benshimol Subject: [PATCH 12/15] wifi: iwlwifi: api: remove version number from latest stored_beacon_notif Date: Sat, 28 Dec 2024 22:34:16 +0200 Message-Id: <20241228223206.e2140aa3c65b.Ie851bdda6df02dcc352bf765a3ec6bdac45c65a2@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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: Yedidya Benshimol By convention the newest version of a command/notification structure is named with out the _ver_# suffix. Apply to stored_beacon_notif. Signed-off-by: Yedidya Benshimol Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/api/offload.h | 8 ++++---- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/offload.h b/drivers/net/wireless/intel/iwlwifi/fw/api/offload.h index 6a7bbfd6b2b7..9b09b835560b 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/offload.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/offload.h @@ -31,7 +31,7 @@ enum iwl_prot_offload_subcmd_ids { /** * @STORED_BEACON_NTF: &struct iwl_stored_beacon_notif_v2 or - * &struct iwl_stored_beacon_notif_v3 + * &struct iwl_stored_beacon_notif */ STORED_BEACON_NTF = 0xFF, }; @@ -71,18 +71,18 @@ struct iwl_stored_beacon_notif_v2 { } __packed; /* WOWLAN_STROED_BEACON_INFO_S_VER_2 */ /** - * struct iwl_stored_beacon_notif_v3 - Stored beacon notification + * struct iwl_stored_beacon_notif - Stored beacon notification * * @common: fields common for all versions * @sta_id: station for which the beacon was received * @reserved: reserved for alignment * @data: beacon data, length in @byte_count */ -struct iwl_stored_beacon_notif_v3 { +struct iwl_stored_beacon_notif { struct iwl_stored_beacon_notif_common common; u8 sta_id; u8 reserved[3]; u8 data[MAX_STORED_BEACON_SIZE]; -} __packed; /* WOWLAN_STROED_BEACON_INFO_S_VER_3 */ +} __packed; /* WOWLAN_STROED_BEACON_INFO_S_VER_3, _VER_4 */ #endif /* __iwl_fw_api_offload_h__ */ diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c index bbf0f2753f9f..daa3bfaccaba 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c @@ -1751,7 +1751,7 @@ void iwl_mvm_rx_stored_beacon_notif(struct iwl_mvm *mvm, data = sb_v2->data; } else { - struct iwl_stored_beacon_notif_v3 *sb_v3 = (void *)pkt->data; + struct iwl_stored_beacon_notif *sb_v3 = (void *)pkt->data; if (pkt_len < struct_size(sb_v3, data, size)) return; From patchwork Sat Dec 28 20:34:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922517 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 AF252199249 for ; Sat, 28 Dec 2024 20:34:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418095; cv=none; b=DbBG3U1Knzy9w0fAFTeTKjrabzePKQJE08nDJMO4n8Z5n1+ZmfLO0S6VEXXqjar8wgEi8fF4y/bu6m0rtKbn3ITrXlOLXZyVnKRIjpewDWDxD4BmgIzr+wq7YpEJXRBn2eOSdd1e2tcB8ADnhgCZDa35fUJa73ENcen0ZtGgGPM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418095; c=relaxed/simple; bh=lGUbBWdPLvKK82hHeko5pq0AbxZmGbzR2K2u47WOZVg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=D23dg1lkMx9l9E6asFip1A5Upauv9mU8nxX4808qYWXbH7NidMe59/Sq6LvofSkYpQxfXLyVKb06Z3Xa3fvTusirrQl4TgiP35rnltOp9tZ7adoGZl9f0SCRf6XoPx7XFohzTVWwglhuOabmLV7xopbWBdVeDFsBCZaWq4v7C0Q= 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=jwieGeqC; arc=none smtp.client-ip=198.175.65.20 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="jwieGeqC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418093; x=1766954093; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lGUbBWdPLvKK82hHeko5pq0AbxZmGbzR2K2u47WOZVg=; b=jwieGeqCC2X79i53vFAUlv+m2KtE6XlQ9f3wxYEi/aG9FGQ0UaROs4rF sZvC0L1jieBR8+PQorQ531Q4RTPjHGgjYT0zyjVkj/i6vhn5He77Du2As ip8I1y5GTR9f4Laez4hieT9vv5Dc/g27Bwk6/fiTQlL2JmArohyoWd8oL xmJKlHa+F0qYOqMoyjEWrPgVBn4HZK7SErmyMk2DesX022ejeoLsF3U35 f/1bL9Bw0PQly8+EPyXsrdxs99vzn0UjtibIxMItFCmSPaePCa+dmjVEb xN2gOos1FJPw3nlwAd1hXpSKoNZaVuF+0H6KxfKiY3rlfKPaXX9eF3SXU g==; X-CSE-ConnectionGUID: HLm5ayPFRpGXA+b1zSKQHQ== X-CSE-MsgGUID: jDPlUQzyQMyqTyJM32s0Dg== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479778" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479778" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:53 -0800 X-CSE-ConnectionGUID: nhj75iZCSNOV0hZSqHn2lA== X-CSE-MsgGUID: xSDY/vifTF+2hkMF6O0Tig== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488424" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:52 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 13/15] wifi: iwlwifi: move fw_dbg_collect to fw debugfs Date: Sat, 28 Dec 2024 22:34:17 +0200 Message-Id: <20241228223206.d31f5994c6a6.Ibe3bc7a25e2bbf7a575287e19db58833bb3e6b9e@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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: Emmanuel Grumbach This debugfs hook really belongs to the firmware handling code and then we can use it across different op_modes. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- .../net/wireless/intel/iwlwifi/fw/debugfs.c | 19 +++++++++++++++++++ .../net/wireless/intel/iwlwifi/mvm/debugfs.c | 18 ------------------ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c index e79fdb5fe387..f0c813d675f4 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/debugfs.c @@ -123,6 +123,24 @@ static const struct file_operations iwl_dbgfs_##name##_ops = { \ #define FWRT_DEBUGFS_ADD_FILE(name, parent, mode) \ FWRT_DEBUGFS_ADD_FILE_ALIAS(#name, name, parent, mode) +static ssize_t iwl_dbgfs_fw_dbg_collect_write(struct iwl_fw_runtime *fwrt, + char *buf, size_t count) +{ + if (count == 0) + return 0; + + if (!iwl_trans_fw_running(fwrt->trans)) + return count; + + iwl_dbg_tlv_time_point(fwrt, IWL_FW_INI_TIME_POINT_USER_TRIGGER, NULL); + + iwl_fw_dbg_collect(fwrt, FW_DBG_TRIGGER_USER, buf, (count - 1), NULL); + + return count; +} + +FWRT_DEBUGFS_WRITE_FILE_OPS(fw_dbg_collect, 16); + static int iwl_dbgfs_enabled_severities_write(struct iwl_fw_runtime *fwrt, char *buf, size_t count) { @@ -423,6 +441,7 @@ void iwl_fwrt_dbgfs_register(struct iwl_fw_runtime *fwrt, FWRT_DEBUGFS_ADD_FILE(fw_info, dbgfs_dir, 0200); FWRT_DEBUGFS_ADD_FILE(send_hcmd, dbgfs_dir, 0200); FWRT_DEBUGFS_ADD_FILE(enabled_severities, dbgfs_dir, 0200); + FWRT_DEBUGFS_ADD_FILE(fw_dbg_collect, dbgfs_dir, 0200); FWRT_DEBUGFS_ADD_FILE(fw_dbg_domain, dbgfs_dir, 0400); FWRT_DEBUGFS_ADD_FILE(fw_ver, dbgfs_dir, 0400); } diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c index 340f3a026c42..2472a78ada47 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c @@ -1470,22 +1470,6 @@ static ssize_t iwl_dbgfs_fw_dbg_conf_write(struct iwl_mvm *mvm, return ret ?: count; } -static ssize_t iwl_dbgfs_fw_dbg_collect_write(struct iwl_mvm *mvm, - char *buf, size_t count, - loff_t *ppos) -{ - if (count == 0) - return 0; - - iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_USER_TRIGGER, - NULL); - - iwl_fw_dbg_collect(&mvm->fwrt, FW_DBG_TRIGGER_USER, buf, - (count - 1), NULL); - - return count; -} - static ssize_t iwl_dbgfs_fw_dbg_clear_write(struct iwl_mvm *mvm, char *buf, size_t count, loff_t *ppos) @@ -1945,7 +1929,6 @@ MVM_DEBUGFS_WRITE_FILE_OPS(fw_restart, 10); MVM_DEBUGFS_WRITE_FILE_OPS(fw_nmi, 10); MVM_DEBUGFS_READ_WRITE_FILE_OPS(scan_ant_rxchain, 8); MVM_DEBUGFS_READ_WRITE_FILE_OPS(fw_dbg_conf, 8); -MVM_DEBUGFS_WRITE_FILE_OPS(fw_dbg_collect, 64); MVM_DEBUGFS_WRITE_FILE_OPS(fw_dbg_clear, 64); MVM_DEBUGFS_WRITE_FILE_OPS(dbg_time_point, 64); MVM_DEBUGFS_WRITE_FILE_OPS(indirection_tbl, @@ -2146,7 +2129,6 @@ void iwl_mvm_dbgfs_register(struct iwl_mvm *mvm) MVM_DEBUGFS_ADD_FILE(scan_ant_rxchain, mvm->debugfs_dir, 0600); MVM_DEBUGFS_ADD_FILE(prph_reg, mvm->debugfs_dir, 0600); MVM_DEBUGFS_ADD_FILE(fw_dbg_conf, mvm->debugfs_dir, 0600); - MVM_DEBUGFS_ADD_FILE(fw_dbg_collect, mvm->debugfs_dir, 0200); MVM_DEBUGFS_ADD_FILE(fw_dbg_clear, mvm->debugfs_dir, 0200); MVM_DEBUGFS_ADD_FILE(dbg_time_point, mvm->debugfs_dir, 0200); MVM_DEBUGFS_ADD_FILE(send_echo_cmd, mvm->debugfs_dir, 0200); From patchwork Sat Dec 28 20:34:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922518 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 75B4D1990CF for ; Sat, 28 Dec 2024 20:34:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418097; cv=none; b=hsrWRedsBYXb/EIzqKin/TwWJifF/AqxIKZevAr5s2JrxR+nXNbE0VukLOHBN5uxUpgu6XuoOQG59vS7t0qv5uayttWvi2cKPZOnI5v9TZO850EgRNzFfogrrFF3FTfHCDil/80kcXvBpBatNmABuYml3u22Sp0ujnTBeJbyYzM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418097; c=relaxed/simple; bh=lP9DRq6rlE86Ure9e4wX49DTWynRn2dDVtEZGSYHpYE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ATLbJjgK2zJ/TkQHWD3oN4mQV/0UnRNAuyRV7xT/iv9YZVz5wHjnJzXPt3QPDT+G8hKhljFWBFKI/GbbtBl914d8kVqkYQ2sER3oc/oOKDz/PEEOCzXIFk6JXwMhIlhiIWNklO3baUpq914Lso0glWQVJFf+Dmi2NxIl2RbmEz0= 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=GXC+Oif0; arc=none smtp.client-ip=198.175.65.20 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="GXC+Oif0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418095; x=1766954095; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=lP9DRq6rlE86Ure9e4wX49DTWynRn2dDVtEZGSYHpYE=; b=GXC+Oif0lX+9Zvdz+YrNvmkugFkkLykQ/VF1QI/hsOdMVpHOgCBx+HWV q6Cu0lq7QA0iatwP5YkTKuvdQjfVOR7duZ/c8RyXdF1UC1KkPEZyIJOrI 5DwXblQ41KjoZUipyqIT6iM4jnr7lSj1gJr0feLWAfmELfFfTxVlKiMJv Y/bYmI2j6Df+rhlTrp/pXGtsWuzpiEyGwvO8fWbTR/OcdBQYyAV7ogdhD Cai47BMEs1eHYwFYvhSX9Y6OBVH/3HU90BNpV8b8uX2hE1pUcj3aVc7g5 axeUjJbzXJ+VZ+2gOlMn894DzBm7jP8PTHd2EAsXIRo9vfsmI0/L71u35 w==; X-CSE-ConnectionGUID: fNZJjnAbRXCnkGcspAK3Hg== X-CSE-MsgGUID: OzgVeZlmRJ2pIUEJGzUAeg== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479781" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479781" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:55 -0800 X-CSE-ConnectionGUID: Xvvx2R4STTG2fu3P/D3tfQ== X-CSE-MsgGUID: ApON1S0CR0WYhX1tHRLA9w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488427" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:53 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 14/15] wifi: iwlwifi: mvm: fix add stream vs. restart race Date: Sat, 28 Dec 2024 22:34:18 +0200 Message-Id: <20241228223206.9c30af039b4d.I1a32936776f8ba5e83dda0a68ffc2722d9d37950@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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 My recent restart related work has made this race more likely to happen and we've now noticed it, but it seems that it was always possible. The race is that the add stream work can be scheduled just before a restart is scheduled and then execute before the restart, accessing the device while it's doing the restart and not accessible. To fix this, check if the device is restarting and abort the work in that case. Reschedule it after the restart as well. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 4 ++++ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index a88ca5b48eca..d34ce4ffa980 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -1341,6 +1341,10 @@ static void iwl_mvm_restart_complete(struct iwl_mvm *mvm) IWL_INFO(mvm, "restart completed\n"); iwl_trans_finish_sw_reset(mvm->trans); + + /* no need to lock, adding in parallel would schedule too */ + if (!list_empty(&mvm->add_stream_txqs)) + schedule_work(&mvm->add_stream_wk); } void iwl_mvm_mac_reconfig_complete(struct ieee80211_hw *hw, diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index cd74c181c260..ede053507366 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -1520,7 +1520,12 @@ void iwl_mvm_add_new_dqa_stream_wk(struct work_struct *wk) struct iwl_mvm *mvm = container_of(wk, struct iwl_mvm, add_stream_wk); - mutex_lock(&mvm->mutex); + guard(mvm)(mvm); + + /* will reschedule to run after restart */ + if (test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status) || + test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) + return; iwl_mvm_inactivity_check(mvm, IWL_INVALID_STA); @@ -1564,8 +1569,6 @@ void iwl_mvm_add_new_dqa_stream_wk(struct work_struct *wk) iwl_mvm_mac_itxq_xmit(mvm->hw, txq); local_bh_enable(); } - - mutex_unlock(&mvm->mutex); } static int iwl_mvm_reserve_sta_stream(struct iwl_mvm *mvm, From patchwork Sat Dec 28 20:34:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13922519 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (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 25397199396 for ; Sat, 28 Dec 2024 20:34:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418100; cv=none; b=Zc+QGVObYGidxJkCRglj4Yr9vv7kxlk3tf4lmv1cYF6aDd4x6w1MgcB+9NoFJOmIdUdZ6QuGRJns0gEVNvOlV/avbez+AxtQC6gLjl5qzRH5aqMM4EIAB/Sb49ey5sCqRk1SbW2Jg3m670bAc0CvpDlF20vDN0CJC4ZC9YGhxpo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735418100; c=relaxed/simple; bh=N+l+zjwb6uQa+0sj3qLQm9oqSgTyeThwEKDaztzxBOM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ek8Z3ul8pSVVe3LGYEqLrmQew/K72tI3kRtWCEufJHeiGlWZwSd/LZ+VsBEezp4bgHKU1Hx5D2R23VeDwJitbWKpyzvkW598NRhFk/CFfKkgFrgpPpNUjK/t4PWT0/qwr+Vob3SYdWkRtet7z9BBsUI2aT1qRO0FzrlYfV2OPFc= 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=PyqqW+sy; arc=none smtp.client-ip=198.175.65.20 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="PyqqW+sy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1735418096; x=1766954096; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=N+l+zjwb6uQa+0sj3qLQm9oqSgTyeThwEKDaztzxBOM=; b=PyqqW+syL1v0gtfeu19oy3V+e0mxaZQTO4qWV2z3y37io2fLfEsViVQN xgZ0WpKfkKawzAQgl4NvTE/JNkOEt/lkk/5NN3M+vBE1CrUiOCrkPgIQl fjkvMbGZY/EN/6s69YUe4zoXJYsfmrCXCmJ9xgQt9/Go1bmOwSr2l1MQw kaI4Ny7T7tOVEm7xygMsJW8iICAwo+Xp+RgK7mtUsvMdVky4aV8XZQ4aj 7YCMcwGSiCvmg2vK27LxGR6PfnWWn/G8s9f1y59Qx2P8PrOK+krtQGUWY w9936hlsl9Vck+hGmL7v1sTTdp45+ltxv90LBbxwDe9apqvBzgDNb5Ghh A==; X-CSE-ConnectionGUID: wl7IyIbMRL2Svxm4D1bkHQ== X-CSE-MsgGUID: 09kuHUxCQI6Dyi5yehsEAg== X-IronPort-AV: E=McAfee;i="6700,10204,11299"; a="35479783" X-IronPort-AV: E=Sophos;i="6.12,273,1728975600"; d="scan'208";a="35479783" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:56 -0800 X-CSE-ConnectionGUID: OrBz2UwFSFKuHoKyMYCEeA== X-CSE-MsgGUID: g157llQ4RfeZUSKqIazqTA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="104488428" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Dec 2024 12:34:55 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 15/15] wifi: iwlwifi: bump FW API to 96 for BZ/SC devices Date: Sat, 28 Dec 2024 22:34:19 +0200 Message-Id: <20241228223206.4028b66f4563.I5d5caf4bffeabcab72a69c2b31445e7bee4a94b6@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241228203419.2443350-1-miriam.rachel.korenblit@intel.com> References: <20241228203419.2443350-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 Start supporting API version 96 for new devices. Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/sc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c index af6d3c85eb6e..33f5e110acb0 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c @@ -10,7 +10,7 @@ #include "fw/api/txq.h" /* Highest firmware API version supported */ -#define IWL_BZ_UCODE_API_MAX 95 +#define IWL_BZ_UCODE_API_MAX 96 /* Lowest firmware API version supported */ #define IWL_BZ_UCODE_API_MIN 92 diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/sc.c b/drivers/net/wireless/intel/iwlwifi/cfg/sc.c index 4b92cd274765..0422d7771b28 100644 --- a/drivers/net/wireless/intel/iwlwifi/cfg/sc.c +++ b/drivers/net/wireless/intel/iwlwifi/cfg/sc.c @@ -10,7 +10,7 @@ #include "fw/api/txq.h" /* Highest firmware API version supported */ -#define IWL_SC_UCODE_API_MAX 95 +#define IWL_SC_UCODE_API_MAX 96 /* Lowest firmware API version supported */ #define IWL_SC_UCODE_API_MIN 92