From patchwork Tue Oct 8 04:25: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: 833909 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 4AFE43C0C for ; Tue, 8 Oct 2024 04:25:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361545; cv=none; b=cyJaLqKuRMMEIxCuKwWUeIaPeGippXWJrwHS0a17dpsvNPTS6PkDqyQd5LavAjCcy23XVC0Zj+EnRnsvdfFXxdEdzVp+JPKZLPyjXwvydYwvBXRSOICElzJNmC0djhDBGXPOOsiyje9X8v69mDiQc+4GBMjdoLY18kz5EtNY5eg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361545; c=relaxed/simple; bh=57OQ+bOo+K8uR+gyDkq+23AYOtECQvt/iRffbqS1NNQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=iEAaVCVbXQMqWjz9OkdMiVxFgnt3fwhcpsiJjIVcWRzErR5GOeE2tHK12sz3w31Z79Mu1Wzcx2fak000qsPugAURkN33ncjbGn3DKyGI8uRKLh3TBdh1fg6kihdz3ISa3Zzg35YaW8of6g0mWg1tGRAXlwR6drhf0ZQrP/ChPOc= 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=D4tdnUpg; arc=none smtp.client-ip=192.198.163.19 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="D4tdnUpg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728361544; x=1759897544; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=57OQ+bOo+K8uR+gyDkq+23AYOtECQvt/iRffbqS1NNQ=; b=D4tdnUpgN2qePahGulaCavijXcBBZgZmnyAdCaZKI1n/vZy8r+S6mABc c5cynODmli67EPY/sKyLbsm97msstWbVdL+rgPZ6fCVRlNJOKZfq2VW7O kCPrgwhr/GEw5cXBZkFrtxgYXlNZho1H2tc/s1BaQSpHJI04T0HZgANZd x7ugu5RMNRY+rXRLZPH/noJdsehttXvoKZYpqN9iep8lV1JIAdy7IZcgN eBHH67Z1GTr2v2aG58cYchkALhPH83XgWeOxlP193ACNj284gM4dXBJTM hRMQ7nE0DCDP7/2xx6dqv24Hm7TgTMLvW7kGLWRbyjttk89DIeO1otHYe g==; X-CSE-ConnectionGUID: YQOMHvAGSkK3f1grjqO5QQ== X-CSE-MsgGUID: 1ALFgnJ0TQGzkwDoLHezeg== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27024254" X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="27024254" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 21:25:44 -0700 X-CSE-ConnectionGUID: x3sZzRVYSRKnm/LcktfITg== X-CSE-MsgGUID: USgB1MtQRmucJdTrSb4x3Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="80486301" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 21:25:43 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 02/14] wifi: iwlwifi: mvm: exit EMLSR earlier if bss_param_ch_cnt is updated Date: Tue, 8 Oct 2024 07:25:16 +0300 Message-Id: <20241008072037.9c5ad120b937.Ibdde0b3770d0821e802009d4684b617220dd6e1a@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241008042528.2549752-1-miriam.rachel.korenblit@intel.com> References: <20241008042528.2549752-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 If we lose beacons and bss_param_ch_cnt gets updated on the other link, we need to exit EMLSR earlier. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- This needs "wifi: mac80211: make bss_param_ch_cnt available for the low level driver" drivers/net/wireless/intel/iwlwifi/mvm/constants.h | 3 ++- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 13 ++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/constants.h b/drivers/net/wireless/intel/iwlwifi/mvm/constants.h index ddf484027d4f..fdccdea918bf 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/constants.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/constants.h @@ -17,7 +17,8 @@ #define IWL_MVM_TRIGGER_LINK_SEL_TIME_SEC 30 #define IWL_MVM_TPT_COUNT_WINDOW_SEC 5 #define IWL_MVM_BCN_LOSS_EXIT_ESR_THRESH_2_LINKS 5 -#define IWL_MVM_BCN_LOSS_EXIT_ESR_THRESH 11 +#define IWL_MVM_BCN_LOSS_EXIT_ESR_THRESH 15 +#define IWL_MVM_BCN_LOSS_EXIT_ESR_THRESH_BSS_PARAM_CHANGED 11 #define IWL_MVM_DEFAULT_PS_TX_DATA_TIMEOUT (100 * USEC_PER_MSEC) #define IWL_MVM_DEFAULT_PS_RX_DATA_TIMEOUT (100 * USEC_PER_MSEC) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c index a7a10e716e65..9a43df49493f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c @@ -1605,6 +1605,7 @@ iwl_mvm_handle_missed_beacons_notif(struct iwl_mvm *mvm, 0); u8 new_notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, MAC_CONF_GROUP, MISSED_BEACONS_NOTIF, 0); + struct ieee80211_bss_conf *bss_conf; /* If the firmware uses the new notification (from MAC_CONF_GROUP), * refer to that notification's version. @@ -1617,9 +1618,9 @@ iwl_mvm_handle_missed_beacons_notif(struct iwl_mvm *mvm, /* before version four the ID in the notification refers to mac ID */ if (notif_ver < 4) { vif = iwl_mvm_rcu_dereference_vif_id(mvm, id, false); + bss_conf = &vif->bss_conf; } else { - struct ieee80211_bss_conf *bss_conf = - iwl_mvm_rcu_fw_link_id_to_link_conf(mvm, id, false); + bss_conf = iwl_mvm_rcu_fw_link_id_to_link_conf(mvm, id, false); if (!bss_conf) return; @@ -1664,6 +1665,8 @@ iwl_mvm_handle_missed_beacons_notif(struct iwl_mvm *mvm, rx_missed_bcon, rx_missed_bcon_since_rx); } } else if (link_id >= 0 && hweight16(vif->active_links) > 1) { + u32 bss_param_ch_cnt_link_id = + bss_conf->bss_param_ch_cnt_link_id; u32 scnd_lnk_bcn_lost = 0; if (notif_ver >= 5 && @@ -1677,10 +1680,14 @@ iwl_mvm_handle_missed_beacons_notif(struct iwl_mvm *mvm, /* Exit EMLSR if we lost more than * IWL_MVM_MISSED_BEACONS_EXIT_ESR_THRESH beacons on boths links * OR more than IWL_MVM_BCN_LOSS_EXIT_ESR_THRESH on any link. + * OR more than IWL_MVM_BCN_LOSS_EXIT_ESR_THRESH_BSS_PARAM_CHANGED + * and the link's bss_param_ch_count has changed. */ if ((rx_missed_bcon >= IWL_MVM_BCN_LOSS_EXIT_ESR_THRESH_2_LINKS && scnd_lnk_bcn_lost >= IWL_MVM_BCN_LOSS_EXIT_ESR_THRESH_2_LINKS) || - rx_missed_bcon >= IWL_MVM_BCN_LOSS_EXIT_ESR_THRESH) + rx_missed_bcon >= IWL_MVM_BCN_LOSS_EXIT_ESR_THRESH || + (bss_param_ch_cnt_link_id != link_id && + rx_missed_bcon >= IWL_MVM_BCN_LOSS_EXIT_ESR_THRESH_BSS_PARAM_CHANGED)) iwl_mvm_exit_esr(mvm, vif, IWL_MVM_ESR_EXIT_MISSED_BEACON, iwl_mvm_get_primary_link(vif)); From patchwork Tue Oct 8 04:25: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: 833908 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 382063C0C for ; Tue, 8 Oct 2024 04:25:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361548; cv=none; b=oIc7Oiu7xZjf3VmEWovFGLYYOjsDGkq5moT9xZ+urM/VkoZ8pBi5zEBFBdfOQ3sc7ehThH5KvB1AbtGLo9f55Obk99xnykCzGvBvGUYXapy4x0fJC3oI+satiLCorlf0CxAgOHSq3NXRX2HRVM5w2NjY2dNv7jAdOuMLanA7MkM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361548; c=relaxed/simple; bh=ZwtdlBCUZnuOqpcidnfHycZze3+d4q9H3u2YelPl6gs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=d8n7mtxpsR7uhl7z4Eg1Qitji7Q7Xr0NIEEuGOL9oZmMR1boedxv1+kj9z5E9o7FQNCLvQRn+kzuKdMf1xyMY9u1q8FcDzfizMPK7O4LNR4i3o8lVRZiONpqEGgN11/UqcxS9flO4H1rbWrWD27BKT+xj1T5SoaronWUY5hwMK0= 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=KCAYe6ER; arc=none smtp.client-ip=192.198.163.19 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="KCAYe6ER" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728361547; x=1759897547; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZwtdlBCUZnuOqpcidnfHycZze3+d4q9H3u2YelPl6gs=; b=KCAYe6ERmELXpqvmj8JRpx/XlxwoVdQm2coSnMnDzOxrPPMXDr+Dy9pH AEfQnQMNz+hgFCae1NmHEGQHveppGnv1boEetr0Or5N+cnMIFmbJeNePR gYZdJlc+2khRscUjoNq0IsMKj0qF/bEq7rsWKUyK+cf10Q6eoieDfYe4Y R0A2KoXyiWiIx47ikhqE9KBz6CpFYRedetJU35TSbcOHZKNxZojMhPbTg yjdGJ3i4p7rtt9bZzKFxqMh44raMfceL0Ei5NukruKHXN+w88w7BqUmTV y6b1RPTXeJxyqAXz3gmcsEuL7HLHBnipceuqmOx2V6Z5T/6wfcsYNTgb/ Q==; X-CSE-ConnectionGUID: wkDk/hvVRdqSMNGBLlfpyQ== X-CSE-MsgGUID: oCakPO4nQfK192jZISrSxQ== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27024264" X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="27024264" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 21:25:47 -0700 X-CSE-ConnectionGUID: E12MzglQRfWqfu5Puv/MMQ== X-CSE-MsgGUID: iqjmHM0BRS+lRYnl5uOhKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="80486318" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 21:25:46 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg Subject: [PATCH 04/14] wifi: iwlwifi: mvm: log information about HW restart completion Date: Tue, 8 Oct 2024 07:25:18 +0300 Message-Id: <20241008072037.d205dd88fb9d.Ic43a1b399f59d2ab1018ff2f9e6e3a0324692660@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241008042528.2549752-1-miriam.rachel.korenblit@intel.com> References: <20241008042528.2549752-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Benjamin Berg It can happen that more errors occur after a firmware assertion. In that case, having another log message after the restart has completed makes it easier to see which errors where still part of the restart flow. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 3fefb0696248..4db7c3ee6bf5 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -1336,6 +1336,8 @@ static void iwl_mvm_restart_complete(struct iwl_mvm *mvm) * of packets the FW sent out, so we must reconnect. */ iwl_mvm_teardown_tdls_peers(mvm); + + IWL_INFO(mvm, "restart completed\n"); } void iwl_mvm_mac_reconfig_complete(struct ieee80211_hw *hw, From patchwork Tue Oct 8 04:25:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 833907 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 AB59813AA2A for ; Tue, 8 Oct 2024 04:25:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361551; cv=none; b=nObd1UKPst2x8kmnjDOShKp8I4TsHJemt6fVSelbvSkGVEhkyID+qdxtfjaGNOJokR1OGIx1oJKIX4gFV45IXVTLPR61MeBC2NSUYOJo6v7GFUFzJ5uUJ+kS3MH9YBb+g6ZYGtoIP4B4GdbbNBEfLxqzFv8u35XE/hc19Tlj1io= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361551; c=relaxed/simple; bh=anFFpWbCjBeMTRyD3jarTGcTRgTJWwQq3KtWu4w1GX8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=h4EYBFQ9ARKQupkXZK8F2GvV4HnJ3QyBOaRTVccZiA/2Ahq0Kwlc/tBkOn6WKi/8VFq+BaCZ8liR4nuoQ1tYdsPrsUDZiXyoSum8+A/eCpehHcioKqJJKoojHYtPeG9WHZlMNOxvRw2XbUanjefHu6T0QXqBf7O9UGPo3pRM+K0= 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=ViF4DJFo; arc=none smtp.client-ip=192.198.163.19 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="ViF4DJFo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728361550; x=1759897550; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=anFFpWbCjBeMTRyD3jarTGcTRgTJWwQq3KtWu4w1GX8=; b=ViF4DJFoETNP1OUg+GB1nvrgyT85FnRhC3Cx82nrR/HcEdfJB5fSdNl4 S34MAKLhb7lqp+EfCzLFccgRU2/34yWnFzRDj/RugDK3mwPrxXHdpI/kp 6ZcXoBr33e9nrnKlWR2SPmTDPr5gMnmgb/lceQrROrB/SIZ6xr1CQAIeM cvhPdKka/YMMvD1ZJ2KW2996e3bH+WBaOeCTiPUN2Gn112W+EJtNoRu2D fx22BfL9eajcX3tUTVdHY72cwOVnJNcGBNtFhmCBHy+0JWs2xULpj/dlT FBI/dnc+ny6mnpk+jI2Zrcvc1O3RyCQWm671N3n4Z5uIcT6FWHAZwDK90 g==; X-CSE-ConnectionGUID: sIYMlB8IQJKp0qAyydsEww== X-CSE-MsgGUID: L6kjWwEySc6eL5E0G7CMHQ== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27024274" X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="27024274" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 21:25:50 -0700 X-CSE-ConnectionGUID: NcrGnO0+QhWMUyjhbRmD0A== X-CSE-MsgGUID: oMNVVOdlSse0raMHzNoEVg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="80486328" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 21:25:49 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 06/14] wifi: iwlwifi: bump FW API to 94 for BZ/SC devices Date: Tue, 8 Oct 2024 07:25:20 +0300 Message-Id: <20241008072037.7ddabbd42131.Ib8bd35521a317c14b3a2a2e5983cf5bca5e8718b@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241008042528.2549752-1-miriam.rachel.korenblit@intel.com> References: <20241008042528.2549752-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 94 for those 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 fa1be8c54d3c..ea40d402681d 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 93 +#define IWL_BZ_UCODE_API_MAX 94 /* Lowest firmware API version supported */ #define IWL_BZ_UCODE_API_MIN 90 diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/sc.c b/drivers/net/wireless/intel/iwlwifi/cfg/sc.c index f1dd1c29f305..635fed641c19 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 93 +#define IWL_SC_UCODE_API_MAX 94 /* Lowest firmware API version supported */ #define IWL_SC_UCODE_API_MIN 90 From patchwork Tue Oct 8 04:25:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 833906 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 2CA411311B6 for ; Tue, 8 Oct 2024 04:25:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361554; cv=none; b=UlPq4oGy8zb6IExpjgnS/ImMlq98FfU9J3FT94DSCmdnnlPNV+rbC68a7zrKhsuDyl9vn6JqijM/2LZFRB0ntUmUmrQjFlsRf09+CgV7MVRoiTOeuEl6LVLw653S+d9QP8r+dLIlIR/7f5xe8OPGFlT5fkgsW4mt+RNgajePkqA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361554; c=relaxed/simple; bh=HsAW6HKzcDhAOJKjsI3rXNTpJKq5S/6d4a6QXRHdds4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=e2Zlqg8wz8W5NHfuA/Qv4jBMJR1ttkAl3a9FcEnogtOhbhPG67W4bTSPCZtE2orhyoUdpEsY+OnnzP6IQiBiznf0mnt9tgauuNWch42i+J0m9H6yHXRQWOoYTBvSzPq6+AKgOVZT7S7vWitpnFTSd5h06qJsegUckXo8hhet424= 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=WPbAX/kK; arc=none smtp.client-ip=192.198.163.19 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="WPbAX/kK" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728361553; x=1759897553; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HsAW6HKzcDhAOJKjsI3rXNTpJKq5S/6d4a6QXRHdds4=; b=WPbAX/kKJeC1jG7lU2z4pPIKbLCOen51t8zESirkSvb/2ybGm4liqTGK j8WL3xWK6TB69mZWeUX1SLYCiM4DVNcSO9cSS3cFrCFJHybZsRmvlrrQM 21+onPL1H6bL3/ncksSOV7YhEX9NfdL9nXi2PU8EY0YjsisGAIBoxAd+2 vhfms8ftkfOWZHjrExOpWvhXs0YCOaQg4PPDi/06K/W09teBghZwaV4tK YSb3Unw5qubyJ0V/GR3PN8ayTDUD7L4DHsl08YsvG2k1gG1+noAbFuUrp 5ZfNzy/2WfGNoWm7STqbZrJsDOUoRPLuiN/zNuzqv1MFu3D5EFNhh9zwj w==; X-CSE-ConnectionGUID: I2jgcaG3TcyRmMFtLy6/SA== X-CSE-MsgGUID: kKDWIlybSiW4rUczBUfZyw== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27024284" X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="27024284" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 21:25:53 -0700 X-CSE-ConnectionGUID: Fez4XLm0QC+06BSAHd1e0Q== X-CSE-MsgGUID: fhz1BcTZT5yOB6TzZnOhog== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="80486357" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 21:25:52 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Daniel Gabay Subject: [PATCH 08/14] wifi: iwlwifi: mvm: Remove redundant rcu_read_lock() in reorder buffer Date: Tue, 8 Oct 2024 07:25:22 +0300 Message-Id: <20241008072037.8f229e1b08b7.I31a371f635d84db300ad16ce6170cc07a8b154fb@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241008042528.2549752-1-miriam.rachel.korenblit@intel.com> References: <20241008042528.2549752-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 iwl_mvm_reorder() is already called within a rcu-read section. Signed-off-by: Daniel Gabay Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index fdbd63ff91ef..a2f16bfaec44 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -773,9 +773,7 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm, return false; } - rcu_read_lock(); sta_mask = iwl_mvm_sta_fw_id_mask(mvm, sta, -1); - rcu_read_unlock(); if (IWL_FW_CHECK(mvm, tid != baid_data->tid || From patchwork Tue Oct 8 04:25:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 833905 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 79C2113BC0C for ; Tue, 8 Oct 2024 04:25:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361556; cv=none; b=eKVc8RuB3HyWVoYfr/jpW1OEE05ybJPfVml22a3ORYqtJ6ObF6KZUNcLf76qWByOANt6wKPlpU3/Y34n2cD08dMNeeN/WYjvEwSXw/D8wMrPAIO5RxcBb6oteCtS1I2cooiP3Hizfu8yz8jWU1g2rNlK6JI356PCTFX8qEiKAhA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361556; c=relaxed/simple; bh=TO+aTwMIcUqjh+EKnRCdgKiGFBelOoT6X+JWnz2BnXA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ivdoQhM6DBuOigq/o8XMMJBQRB0ELoneumu++aKJQeYIZOKQ3O0Lc/f4aSeZYfMM1gUaYGKcO0F8ZSViKcxaVGPENpqJnoelPwgMoncmR2g854oajcn8i4LRZLsNS5IlQnVNsWXgjjX0ECYY1Wf56PrhL/j0oZAoutS7z6G0qLY= 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=GJxWIp5Z; arc=none smtp.client-ip=192.198.163.19 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="GJxWIp5Z" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728361556; x=1759897556; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TO+aTwMIcUqjh+EKnRCdgKiGFBelOoT6X+JWnz2BnXA=; b=GJxWIp5ZLgZAvdxoSEA6ExVRi5xQHFpOrj/ixfmvznBsCBqS8G8mPVek ryA/W2/QRKlOMmBgTUR9IL/kqHQeJJFD2dVKu/gRyLwnyqOY6fPnSbuuo vuv9lKk7Lpuk1y8VR3lR4TsljzxX+DzI2pIlhiNrFsL1jCzozAZlrwCw9 o3FO8SvpOkc57/CYfzrclKjYdWmxRhls1gDv0Yv9hC3Vvorrz89NxJsZi GykJUBrvU1xjaemZeknO2kiCcyLYhYmV+MFSOG9PqTZqPI0CAt0yQeRKt yRA8/SrLns6xwFioeyJaUcDQEcIAEVjHhe9i69nMEpKyhxWqoGQr9YacH A==; X-CSE-ConnectionGUID: nLTqKCyHQlG8Ws3JqTuGUw== X-CSE-MsgGUID: GacoyC74SPm1WvxHKSgDDw== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27024294" X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="27024294" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 21:25:55 -0700 X-CSE-ConnectionGUID: JQ+lW+jYTgGkxfOlOVmedA== X-CSE-MsgGUID: oo33RpIbSUSB/bvoPecs0A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="80486368" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 21:25:55 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 10/14] wifi: iwlwifi: mvm: remove IWL_MVM_HW_CSUM_DISABLE Date: Tue, 8 Oct 2024 07:25:24 +0300 Message-Id: <20241008072037.e1b6ab87c969.Ic623ab87cb2a22285cdbed99325fdfcfe439c7d4@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241008042528.2549752-1-miriam.rachel.korenblit@intel.com> References: <20241008042528.2549752-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 always set to 0. Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/constants.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/constants.h b/drivers/net/wireless/intel/iwlwifi/mvm/constants.h index fdccdea918bf..795a166ed63a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/constants.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/constants.h @@ -58,7 +58,6 @@ #define IWL_MVM_RS_RSSI_BASED_INIT_RATE 0 #define IWL_MVM_RS_80_20_FAR_RANGE_TWEAK 1 #define IWL_MVM_TOF_IS_RESPONDER 0 -#define IWL_MVM_HW_CSUM_DISABLE 0 #define IWL_MVM_ADWELL_ENABLE 1 #define IWL_MVM_ADWELL_MAX_BUDGET 0 #define IWL_MVM_TCM_LOAD_MEDIUM_THRESH 10 /* percentage */ diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 475e781e166a..5aa48c77b054 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -1589,8 +1589,7 @@ static inline bool iwl_mvm_bt_is_rrc_supported(struct iwl_mvm *mvm) static inline bool iwl_mvm_is_csum_supported(struct iwl_mvm *mvm) { return fw_has_capa(&mvm->fw->ucode_capa, - IWL_UCODE_TLV_CAPA_CSUM_SUPPORT) && - !IWL_MVM_HW_CSUM_DISABLE; + IWL_UCODE_TLV_CAPA_CSUM_SUPPORT); } static inline bool iwl_mvm_is_mplut_supported(struct iwl_mvm *mvm) From patchwork Tue Oct 8 04:25:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 833904 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 061B4139CEC for ; Tue, 8 Oct 2024 04:25:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361560; cv=none; b=KcvoB1jppkCGjjTxwMx7Az/HIhee+dlXkGwU1Hb63DaH8alc+NTNkC2G21IsQ2hkzPTGlWwlwuNz9ocCGx/cjb7m5X8aiguWLQxJf0XD0uxKYMwY6asoi0uiogbWndjgcqRKgjtPcNT4uaopME9hkjx1nWq2ogV45AbEjf+KSDA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361560; c=relaxed/simple; bh=OXQtPiWBDH/Ghw6KSS6XK2YShw0JtZrHzTerp6x8N4w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GhB5kPgLuz1ey8OztwNiywAiCwgp+A9zd+dk3SoifQ1AfcGnagIwXG8WZOAs9lrUEckROzKW4iChVTRcQTP8ZI88MZWA+8dSomuWOGy10NuTQqKPNgP5mFSHkDTlggYXRf1LQjZjS7symit/ZpVzmSvi2MWxjiOv6UZM1lcNOjc= 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=Tz8kPpp8; arc=none smtp.client-ip=192.198.163.19 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="Tz8kPpp8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728361559; x=1759897559; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OXQtPiWBDH/Ghw6KSS6XK2YShw0JtZrHzTerp6x8N4w=; b=Tz8kPpp88bFMGQFMT3amFl6pxblYk2oYxfVu2TRnpX615q7u6uxgg10T CO7ECHRVUGgeeYvipZmj46bPQUfLPSrvIz3zthLRyCFADjfyIvtJKEITR q0Gzp13J3DxLUQb2aTbBaXbLDjnv8DdJC1GmTPaIcVZgbgG8anmu+1klt IwjYGprgIyAU4YYj7JGnrTeDHVyFwVSSXLAWXshJL0NhQ9hjaPVJlufcb NGLi8uQLlQmuw4CD9bX13bD2RYaGQgGoBfb7k/osh3B2WoSOB6eRlaR7S 2dLlbb+L6lTeqJUt5N/HPD/ONv/4GPq+L3n8gLCP/j8mkOgab/ctiyuNo g==; X-CSE-ConnectionGUID: GJcNQn5VRBKLYKx0IJ/yog== X-CSE-MsgGUID: IBvhA+KWRRWa8paLIyYunw== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27024302" X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="27024302" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 21:25:59 -0700 X-CSE-ConnectionGUID: Sz5scg9wQ16MhF2u8MjZjw== X-CSE-MsgGUID: IBGL8H7LRNuHtP6CmnB7Uw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="80486394" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 21:25:58 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Yedidya Benshimol Subject: [PATCH 12/14] wifi: iwlwifi: fw: add an error table status getter Date: Tue, 8 Oct 2024 07:25:26 +0300 Message-Id: <20241008072037.610a38614ce6.Iab5f795bc30ce5d08550cff1772fe051527bcb95@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241008042528.2549752-1-miriam.rachel.korenblit@intel.com> References: <20241008042528.2549752-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 Add a function for getting the error status and error code for given error table. Remove a static function of same purpose from mvm/d3.c Signed-off-by: Yedidya Benshimol Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 3 +- drivers/net/wireless/intel/iwlwifi/fw/dump.c | 22 ++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 34 ++++++-------------- 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h index 98d56e778d99..9d8f89adc322 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2005-2014, 2018-2019, 2021-2023 Intel Corporation + * Copyright (C) 2005-2014, 2018-2019, 2021-2024 Intel Corporation * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2015-2017 Intel Deutschland GmbH */ @@ -327,6 +327,7 @@ void iwl_fwrt_dump_error_logs(struct iwl_fw_runtime *fwrt); void iwl_send_dbg_dump_complete_cmd(struct iwl_fw_runtime *fwrt, u32 timepoint, u32 timepoint_data); +bool iwl_fwrt_read_err_table(struct iwl_trans *trans, u32 base, u32 *err_id); void iwl_fw_disable_dbg_asserts(struct iwl_fw_runtime *fwrt); void iwl_fw_dbg_clear_monitor_buf(struct iwl_fw_runtime *fwrt); diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dump.c b/drivers/net/wireless/intel/iwlwifi/fw/dump.c index 8f107ceec407..3cabdeb53e99 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dump.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/dump.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-2014 Intel Mobile Communications GmbH * Copyright (C) 2015-2017 Intel Deutschland GmbH */ @@ -530,3 +530,23 @@ void iwl_fwrt_dump_error_logs(struct iwl_fw_runtime *fwrt) } } IWL_EXPORT_SYMBOL(iwl_fwrt_dump_error_logs); + +bool iwl_fwrt_read_err_table(struct iwl_trans *trans, u32 base, u32 *err_id) +{ + struct error_table_start { + /* cf. struct iwl_error_event_table */ + u32 valid; + __le32 err_id; + } err_info; + + if (!base) + return false; + + iwl_trans_read_mem_bytes(trans, base, + &err_info, sizeof(err_info)); + if (err_info.valid && err_id) + *err_id = le32_to_cpu(err_info.err_id); + + return !!err_info.valid; +} +IWL_EXPORT_SYMBOL(iwl_fwrt_read_err_table); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 99a541d442bb..cdda404c0654 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -3024,24 +3024,6 @@ static void iwl_mvm_d3_disconnect_iter(void *data, u8 *mac, ieee80211_resume_disconnect(vif); } -static bool iwl_mvm_rt_status(struct iwl_trans *trans, u32 base, u32 *err_id) -{ - struct error_table_start { - /* cf. struct iwl_error_event_table */ - u32 valid; - __le32 err_id; - } err_info; - - if (!base) - return false; - - iwl_trans_read_mem_bytes(trans, base, - &err_info, sizeof(err_info)); - if (err_info.valid && err_id) - *err_id = le32_to_cpu(err_info.err_id); - - return !!err_info.valid; -} static bool iwl_mvm_check_rt_status(struct iwl_mvm *mvm, struct ieee80211_vif *vif) @@ -3049,9 +3031,9 @@ static bool iwl_mvm_check_rt_status(struct iwl_mvm *mvm, u32 err_id; /* check for lmac1 error */ - if (iwl_mvm_rt_status(mvm->trans, - mvm->trans->dbg.lmac_error_event_table[0], - &err_id)) { + if (iwl_fwrt_read_err_table(mvm->trans, + mvm->trans->dbg.lmac_error_event_table[0], + &err_id)) { if (err_id == RF_KILL_INDICATOR_FOR_WOWLAN && vif) { struct cfg80211_wowlan_wakeup wakeup = { .rfkill_release = true, @@ -3063,13 +3045,15 @@ static bool iwl_mvm_check_rt_status(struct iwl_mvm *mvm, } /* check if we have lmac2 set and check for error */ - if (iwl_mvm_rt_status(mvm->trans, - mvm->trans->dbg.lmac_error_event_table[1], NULL)) + if (iwl_fwrt_read_err_table(mvm->trans, + mvm->trans->dbg.lmac_error_event_table[1], + NULL)) return true; /* check for umac error */ - if (iwl_mvm_rt_status(mvm->trans, - mvm->trans->dbg.umac_error_event_table, NULL)) + if (iwl_fwrt_read_err_table(mvm->trans, + mvm->trans->dbg.umac_error_event_table, + NULL)) return true; return false; From patchwork Tue Oct 8 04:25:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 833903 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19]) (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 2602513D250 for ; Tue, 8 Oct 2024 04:26:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361563; cv=none; b=nTSV/OEp7pmbnadegPyw/Zv/U+68cf05rUhaEuIEecAQbetZtZAAv7aU4YHvQFZWvbVTFtWsY9cYxxQmPgIJ4tIjYVeAn9Hsd1kMv55SgFHZSlcmB3vmzTvS6YWdKAp6jkhHOD3FhVOqCPWZ9nGOYHReaH+JXRmYaAgkNEtDmi8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361563; c=relaxed/simple; bh=hCthz/FiJPNZEQyMKckM/YWoUkInQkXA8bPKRkaUpko=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CTgK5VCtAJa8HCIcFqWA+DvGb1pqeZMQTT12/DX2vxG9iM2cmSmUtxV4Pg1LkoEHd3vpyQEY83uE/GrIazac71Sr5BDlP3oUK3AaywNnB+LKhbsYvLkDWEEy4v+JzWxLmPeFPxspy6Og7+wLJZL4+YuHU9wXwWv+cw/4m6SFlKU= 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=BmK8nvq9; arc=none smtp.client-ip=192.198.163.19 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="BmK8nvq9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728361562; x=1759897562; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=hCthz/FiJPNZEQyMKckM/YWoUkInQkXA8bPKRkaUpko=; b=BmK8nvq9JHVvK840NW76z/AD2WpG1eAE7kkR5xc7lRnMw45pbtTpIeUD cLOASHZW6WSje5rqc6jxlPg+raOOuegmZRW7pg9KJwkE5N8TUnAVO12e4 qvTVm/PvTWj0XPD5rIwBER1Cb5Hwto6Ki2l3v27Gwdf8hm/fZfAx4Bejn yd6ID8rS2D69qpG4F7yCld29xZvS4/Ic5ROgFR6DH2J7dgt3/6o75+23D QXowc0HkhaDFvcslF3Lt9UO+6l07eu9S7NBfUGVD1LOk2D0aLC6pp03o3 q6kaxIEnDIxxriDgwP+0MT+uRp6Y2Xeo1Ew8WeUFRmzQ4GfHwCxaZ5XSQ A==; X-CSE-ConnectionGUID: 1B5F2DF6S82Ux0FBO888Qg== X-CSE-MsgGUID: TtWwogeMQ6mQrQ9TmPMkQA== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27024316" X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="27024316" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 21:26:02 -0700 X-CSE-ConnectionGUID: Z9dcWhmUQHCRwZKc4vfYxg== X-CSE-MsgGUID: ymw0nRCvTsakJKSfQAA4gQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="80486424" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Oct 2024 21:26:01 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 14/14] wifi: iwlwifi: allow IWL_FW_CHECK() with just a string Date: Tue, 8 Oct 2024 07:25:28 +0300 Message-Id: <20241008072037.96e8554cb7a2.I0e06d8fd49f86bd4e9e216fc2265c43d7e78a095@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241008042528.2549752-1-miriam.rachel.korenblit@intel.com> References: <20241008042528.2549752-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 We require a message, but the macros shouldn't require a formatted message, a constant one can be fine. Change the macros to support that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h index 9d8f89adc322..f4803b55adb9 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h @@ -331,15 +331,15 @@ bool iwl_fwrt_read_err_table(struct iwl_trans *trans, u32 base, u32 *err_id); void iwl_fw_disable_dbg_asserts(struct iwl_fw_runtime *fwrt); void iwl_fw_dbg_clear_monitor_buf(struct iwl_fw_runtime *fwrt); -#define IWL_FW_CHECK_FAILED(_obj, _fmt, ...) \ - IWL_ERR_LIMIT(_obj, _fmt, __VA_ARGS__) +#define IWL_FW_CHECK_FAILED(_obj, ...) \ + IWL_ERR_LIMIT(_obj, __VA_ARGS__) #define IWL_FW_CHECK(_obj, _cond, _fmt, ...) \ ({ \ bool __cond = (_cond); \ \ if (unlikely(__cond)) \ - IWL_FW_CHECK_FAILED(_obj, _fmt, __VA_ARGS__); \ + IWL_FW_CHECK_FAILED(_obj, _fmt, ##__VA_ARGS__); \ \ unlikely(__cond); \ })