From patchwork Tue Oct 8 04:25: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: 13825624 X-Patchwork-Delegate: johannes@sipsolutions.net 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 4FA0E78685 for ; Tue, 8 Oct 2024 04:25:43 +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=gkXy1ZO978Z/au/QJd35jUjjP15uVGLLi3dCMZvjQKpcN1lDhEx6Pw2WRUeOJyifsP6AW7vvtg5x67+Ro30Cucoc6CMR7alM4vbmn+VAwsaAVDN1RI3qxGvms2bFMJeTC/d4BjaU5pS0BAzyQYS+jk5O14SxfrBSKll4AsMC158= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361545; c=relaxed/simple; bh=L3MA+5QoBakMaIIKTXEC/tMG9cwsxEwzdkYGUEB7yeY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BeZxBFEPwf1RUOqMP082ZgtVhPbfc2DFLRQyosMoGX6rF2NWNt2yJmKhW5ufTl4WNge/eZNVGowJQbJs9JCCpGtnZbNOj3szka1VbSyTOt/ihzQ952g/ULWiyAr6wYvdRRt8SXyInk38aZsbGTy7xT7bpaI8fpc/zbRcrdshnsc= 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=m8Gbrxhm; 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="m8Gbrxhm" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728361543; x=1759897543; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=L3MA+5QoBakMaIIKTXEC/tMG9cwsxEwzdkYGUEB7yeY=; b=m8Gbrxhmf0SdYeY92Ug7BBlTv5rc7KO+Fj1xLoAhFGQ3Z1lFIrF1GkIr +r2XJyNoP9DxFyigfpt85MX2ApRnRqb85VuZWsuShU2umElbHNXQ4uosM W+vwq/8FrVvalnOYDU9BL+qjrIUz/8NNz2ALOBmNBuUvZ354G9eqv2Rzd qkRYIqsKj81lqLTyA92lXzKDMdFVIbutneDU/gTef6hXg5S7GwDgIX3jz /eunXwhKxv8SwMs4EVwVqyfLPCjLOCs14BJsc85rFVMWnvDAfZdMqwlzy 58GZcKMGXpiQ3vXg7CTqMRomyN5Pip+5ow51EGqVzgAlDzAT+d0p3ciHd Q==; X-CSE-ConnectionGUID: 734REcq7Ty2Jg9qgkU9c4Q== X-CSE-MsgGUID: zdLAz/KFQwyt6cUvovI4SQ== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27024250" X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="27024250" 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:43 -0700 X-CSE-ConnectionGUID: bRV1hTtXSS6Fjb4OHMwetA== X-CSE-MsgGUID: HtIbkny/RPmoIvvudF0C6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="80486296" 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:42 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer Subject: [PATCH 01/14] wifi: iwlwifi: mvm: Add support for prep_add_interface() callback Date: Tue, 8 Oct 2024 07:25:15 +0300 Message-Id: <20241008072037.3baf282d0a01.Ife0a929455cb13a95ab197ca765d8db777ff9d89@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: Ilan Peer Implement the prep_add_interface() callback, so that in case EMLSR is active and an AP or a P2P interface is do to be added, EMLSR would be blocked. Add a delayed work, so that in case that the interface was not eventually added, EMLSR would be unblocked after 5 seconds. Signed-off-by: Ilan Peer Signed-off-by: Miri Korenblit --- This needs "wifi: mac80211: Add support to indicate that a new interface is to be added" drivers/net/wireless/intel/iwlwifi/mvm/link.c | 1 + .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 22 +++++++++++++ .../wireless/intel/iwlwifi/mvm/mld-mac80211.c | 31 +++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 7 +++++ 4 files changed, 61 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c index 2b0652168002..19ecd215f1dc 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c @@ -12,6 +12,7 @@ HOW(BLOCKED_FW) \ HOW(BLOCKED_NON_BSS) \ HOW(BLOCKED_ROC) \ + HOW(BLOCKED_TMP_NON_BSS) \ HOW(EXIT_MISSED_BEACON) \ HOW(EXIT_LOW_RSSI) \ HOW(EXIT_COEX) \ diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 3721d6349cc5..99e017f365e0 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -1731,6 +1731,21 @@ static void iwl_mvm_unblock_esr_tpt(struct wiphy *wiphy, struct wiphy_work *wk) iwl_mvm_unblock_esr(mvm, vif, IWL_MVM_ESR_BLOCKED_TPT); } +static void iwl_mvm_unblock_esr_tmp_non_bss(struct wiphy *wiphy, + struct wiphy_work *wk) +{ + struct iwl_mvm_vif *mvmvif = + container_of(wk, struct iwl_mvm_vif, + unblock_esr_tmp_non_bss_wk.work); + struct iwl_mvm *mvm = mvmvif->mvm; + struct ieee80211_vif *vif = + container_of((void *)mvmvif, struct ieee80211_vif, drv_priv); + + mutex_lock(&mvm->mutex); + iwl_mvm_unblock_esr(mvm, vif, IWL_MVM_ESR_BLOCKED_TMP_NON_BSS); + mutex_unlock(&mvm->mutex); +} + void iwl_mvm_mac_init_mvmvif(struct iwl_mvm *mvm, struct iwl_mvm_vif *mvmvif) { lockdep_assert_held(&mvm->mutex); @@ -1749,6 +1764,9 @@ void iwl_mvm_mac_init_mvmvif(struct iwl_mvm *mvm, struct iwl_mvm_vif *mvmvif) wiphy_work_init(&mvmvif->unblock_esr_tpt_wk, iwl_mvm_unblock_esr_tpt); + + wiphy_delayed_work_init(&mvmvif->unblock_esr_tmp_non_bss_wk, + iwl_mvm_unblock_esr_tmp_non_bss); } static int iwl_mvm_mac_add_interface(struct ieee80211_hw *hw, @@ -1899,6 +1917,8 @@ void iwl_mvm_prepare_mac_removal(struct iwl_mvm *mvm, &mvmvif->mlo_int_scan_wk); wiphy_work_cancel(mvm->hw->wiphy, &mvmvif->unblock_esr_tpt_wk); + wiphy_delayed_work_cancel(mvm->hw->wiphy, + &mvmvif->unblock_esr_tmp_non_bss_wk); cancel_delayed_work_sync(&mvmvif->csa_work); } @@ -4075,6 +4095,8 @@ iwl_mvm_sta_state_authorized_to_assoc(struct iwl_mvm *mvm, &mvmvif->mlo_int_scan_wk); wiphy_work_cancel(mvm->hw->wiphy, &mvmvif->unblock_esr_tpt_wk); + wiphy_delayed_work_cancel(mvm->hw->wiphy, + &mvmvif->unblock_esr_tmp_non_bss_wk); /* No need for the periodic statistics anymore */ if (ieee80211_vif_is_mld(vif) && mvmvif->esr_active) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c index 7de6c96646ca..3947f6a0e0cf 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c @@ -1376,6 +1376,36 @@ iwl_mvm_mld_mac_pre_channel_switch(struct ieee80211_hw *hw, return ret; } +#define IWL_MVM_MLD_UNBLOCK_ESR_NON_BSS_TIMEOUT (5 * HZ) + +static void iwl_mvm_mld_prep_add_interface(struct ieee80211_hw *hw, + enum nl80211_iftype type) +{ + struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); + struct ieee80211_vif *bss_vif = iwl_mvm_get_bss_vif(mvm); + struct iwl_mvm_vif *mvmvif; + int ret; + + IWL_DEBUG_MAC80211(mvm, "prep_add_interface: type=%u\n", + type); + + if (IS_ERR_OR_NULL(bss_vif) || + !(type == NL80211_IFTYPE_AP || + type == NL80211_IFTYPE_P2P_GO || + type == NL80211_IFTYPE_P2P_CLIENT)) + return; + + mvmvif = iwl_mvm_vif_from_mac80211(bss_vif); + ret = iwl_mvm_block_esr_sync(mvm, bss_vif, + IWL_MVM_ESR_BLOCKED_TMP_NON_BSS); + if (ret) + return; + + wiphy_delayed_work_queue(mvmvif->mvm->hw->wiphy, + &mvmvif->unblock_esr_tmp_non_bss_wk, + IWL_MVM_MLD_UNBLOCK_ESR_NON_BSS_TIMEOUT); +} + const struct ieee80211_ops iwl_mvm_mld_hw_ops = { .tx = iwl_mvm_mac_tx, .wake_tx_queue = iwl_mvm_mac_wake_tx_queue, @@ -1472,4 +1502,5 @@ const struct ieee80211_ops iwl_mvm_mld_hw_ops = { .change_sta_links = iwl_mvm_mld_change_sta_links, .can_activate_links = iwl_mvm_mld_can_activate_links, .can_neg_ttlm = iwl_mvm_mld_can_neg_ttlm, + .prep_add_interface = iwl_mvm_mld_prep_add_interface, }; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 6246ffce7cf8..3f7b6465130a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -361,6 +361,9 @@ struct iwl_mvm_vif_link_info { * @IWL_MVM_ESR_BLOCKED_NON_BSS: An active non-BSS interface's link is * preventing EMLSR * @IWL_MVM_ESR_BLOCKED_ROC: remain-on-channel is preventing EMLSR + * @IWL_MVM_ESR_BLOCKED_TMP_NON_BSS: An expected active non-BSS interface's link + * is preventing EMLSR. This is a temporary blocking that is set when there + * is an indication that a non-BSS interface is to be added. * @IWL_MVM_ESR_EXIT_MISSED_BEACON: exited EMLSR due to missed beacons * @IWL_MVM_ESR_EXIT_LOW_RSSI: link is deactivated/not allowed for EMLSR * due to low RSSI. @@ -379,6 +382,7 @@ enum iwl_mvm_esr_state { IWL_MVM_ESR_BLOCKED_FW = 0x8, IWL_MVM_ESR_BLOCKED_NON_BSS = 0x10, IWL_MVM_ESR_BLOCKED_ROC = 0x20, + IWL_MVM_ESR_BLOCKED_TMP_NON_BSS = 0x40, IWL_MVM_ESR_EXIT_MISSED_BEACON = 0x10000, IWL_MVM_ESR_EXIT_LOW_RSSI = 0x20000, IWL_MVM_ESR_EXIT_COEX = 0x40000, @@ -452,6 +456,8 @@ struct iwl_mvm_esr_exit { * @prevent_esr_done_wk: work that should be done when esr prevention ends. * @mlo_int_scan_wk: work for the internal MLO scan. * @unblock_esr_tpt_wk: work for unblocking EMLSR when tpt is high enough. + * @unblock_esr_tmp_non_bss_wk: work for removing the + * IWL_MVM_ESR_BLOCKED_TMP_NON_BSS blocking for EMLSR. * @roc_activity: currently running ROC activity for this vif (or * ROC_NUM_ACTIVITIES if no activity is running). * @session_prot_connection_loss: the connection was lost due to session @@ -588,6 +594,7 @@ struct iwl_mvm_vif { struct wiphy_delayed_work prevent_esr_done_wk; struct wiphy_delayed_work mlo_int_scan_wk; struct wiphy_work unblock_esr_tpt_wk; + struct wiphy_delayed_work unblock_esr_tmp_non_bss_wk; struct iwl_mvm_vif_link_info deflink; struct iwl_mvm_vif_link_info *link[IEEE80211_MLD_MAX_NUM_LINKS]; 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: 13825625 X-Patchwork-Delegate: johannes@sipsolutions.net 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: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: 13825626 X-Patchwork-Delegate: johannes@sipsolutions.net 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 B7F8313541B for ; Tue, 8 Oct 2024 04:25:45 +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=1728361547; cv=none; b=APW1UMfYElNl+lHDPWD3fagDvLR9CfuhZfkTEedCRNoA+u8Xfi6glDXG1+QRvaPrdMVgu6LeDvxD5z43d7C7h9XyfFskHBgjO1t8txPcc25MLv844lHkUpJNT0Sz4i9F4SgMWbuscce+rpN5rIqK/Qv3bT2+W/7iZs4szmN+HD4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361547; c=relaxed/simple; bh=P8GMX2V0vmbTVbtNntq8ucvFzEzXHzXagkSnx8qpC9o=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NPb0LAM5yuoDI+r1V2wJHK4y20yWGL7+qZc4QppoYYd5ECcyucst6Lhxj8+ABLqqu1D1vcbZV26pDgwnbpVaFqkG8GJbQVtNLq2TkNxqt2ibRlUpVSbwxQwomLSkydx4cqZj0oIrF5Za8avNJhGd/sziDGmRJROikl5OGHo/v9E= 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=I6yxBv+n; 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="I6yxBv+n" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728361546; x=1759897546; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=P8GMX2V0vmbTVbtNntq8ucvFzEzXHzXagkSnx8qpC9o=; b=I6yxBv+nzdTP6p5D0anTsXoO4HYqyjJ5LzoVOd4Mk6LMI5djJvY7BMsV Nx+NdWBJ0IUQa6SV1saDizbgVlw6FJGCWng7aU9isWipaBtb8A0dyVI4o vJZtfJFzhTzHBWEz8NZHkZTuC4aH+21xy2dgQ/0CCTdzqWwHAH04kHdi/ RPj8FvaX7T0mhcT1JYFAdfaACgF4PfESyzg3Pg5fB8qW9wpHsUWDzF5k4 cDx0pWPCZ5+OQZuWHnaEhDKnlKYV/6aSQH8/C2IahS/IrrxiAqurWu2RO oZJ3vmOYR+rr2+GEJZlnKDg6199ouReg9Mpmg0Q82jbZo0ifNeN++dad2 A==; X-CSE-ConnectionGUID: sh6+N8TVQ4y/ssdG1wVWoA== X-CSE-MsgGUID: R/INnEHaTwa5llLbMy82cg== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27024258" X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="27024258" 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:46 -0700 X-CSE-ConnectionGUID: 2JbWz16nTBOTmSX6IZckPQ== X-CSE-MsgGUID: PHuvEvmbQ1KtRawurdwwGQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="80486309" 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:45 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 03/14] wifi: iwlwifi: mvm: prepare the tx_power handling to be per-link Date: Tue, 8 Oct 2024 07:25:17 +0300 Message-Id: <20241008072037.317f44628eb9.I3f6a735181c6c20e805b61e4f9d2056b7f90d7ea@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 We still need the firmware to align Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 12 ++++++------ .../net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 99e017f365e0..3fefb0696248 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -1466,15 +1466,16 @@ struct iwl_mvm_phy_ctxt *iwl_mvm_get_free_phy_ctxt(struct iwl_mvm *mvm) return NULL; } -int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif, +int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, + struct ieee80211_bss_conf *link_conf, s16 tx_power) { u32 cmd_id = REDUCE_TX_POWER_CMD; + u32 mac_id = iwl_mvm_vif_from_mac80211(link_conf->vif)->id; int len; struct iwl_dev_tx_power_cmd_v3_v8 cmd = { .common.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_MAC), - .common.mac_context_id = - cpu_to_le32(iwl_mvm_vif_from_mac80211(vif)->id), + .common.mac_context_id = cpu_to_le32(mac_id), }; struct iwl_dev_tx_power_cmd cmd_v9_v10; u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, 3); @@ -1487,8 +1488,7 @@ int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif, if (cmd_ver > 8) { /* Those fields sit on the same place for v9 and v10 */ cmd_v9_v10.common.set_mode = cpu_to_le32(IWL_TX_POWER_MODE_SET_MAC); - cmd_v9_v10.common.mac_context_id = - cpu_to_le32(iwl_mvm_vif_from_mac80211(vif)->id); + cmd_v9_v10.common.mac_context_id = cpu_to_le32(mac_id); cmd_v9_v10.common.pwr_restriction = cpu_to_le16(u_tx_power); cmd_data = &cmd_v9_v10; } @@ -3323,7 +3323,7 @@ static void iwl_mvm_bss_info_changed(struct ieee80211_hw *hw, if (changes & BSS_CHANGED_TXPOWER) { IWL_DEBUG_CALIB(mvm, "Changing TX Power to %d dBm\n", bss_conf->txpower); - iwl_mvm_set_tx_power(mvm, vif, bss_conf->txpower); + iwl_mvm_set_tx_power(mvm, bss_conf, bss_conf->txpower); } } diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c index 3947f6a0e0cf..9aa08d289680 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c @@ -1038,7 +1038,7 @@ static void iwl_mvm_mld_link_info_changed(struct ieee80211_hw *hw, if (changes & BSS_CHANGED_TXPOWER) { IWL_DEBUG_CALIB(mvm, "Changing TX Power to %d dBm\n", link_conf->txpower); - iwl_mvm_set_tx_power(mvm, vif, link_conf->txpower); + iwl_mvm_set_tx_power(mvm, link_conf, link_conf->txpower); } } diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 3f7b6465130a..ff5d720b7314 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -2989,7 +2989,8 @@ void iwl_mvm_abort_pmsr(struct ieee80211_hw *hw, struct ieee80211_vif *vif, bool iwl_mvm_have_links_same_channel(struct iwl_mvm_vif *vif1, struct iwl_mvm_vif *vif2); bool iwl_mvm_vif_is_active(struct iwl_mvm_vif *mvmvif); -int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif, +int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, + struct ieee80211_bss_conf *bss_conf, s16 tx_power); int iwl_mvm_set_hw_timestamp(struct ieee80211_hw *hw, struct ieee80211_vif *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: 13825627 X-Patchwork-Delegate: johannes@sipsolutions.net 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: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: 13825628 X-Patchwork-Delegate: johannes@sipsolutions.net 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 ACB167DA87 for ; Tue, 8 Oct 2024 04:25:48 +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=1728361550; cv=none; b=j/mP9yJc0H5RjA52vqR6UAq0mXNKlYuVQvNf0TjVmjKPEjqr58fnaKjAh2l29khIa1pR8dfeRD9iNn3iVMSqdzgHgTBsdyEqP6wj11Xp2BV7Z2Rk6Djfe3lHO16Wap1nENZgZm2CUgy/pHqHfjQlTcGbjX57aVahrzEIi0DLTUE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361550; c=relaxed/simple; bh=pWtlFPV37E8Kc2iQNvfMld01t5S9w5dMaNndYV0lPGE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VAll6VRURRqd5bkNJAHUREEMLugPP/2r5wwGI5lJ1z4zjbQDqu8PW9wBCmFqdoZ7smgcwavjF8HisDzQ4Sp0AYKPH8TYLqTz7Zi8HwQJcxAlSCeSIAMdpODh4XbB9BxbWb/xmPPTIsURyj7rECWLdK96tigUE4fGbAsBqCFJ6II= 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=A5m2H+05; 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="A5m2H+05" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728361549; x=1759897549; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pWtlFPV37E8Kc2iQNvfMld01t5S9w5dMaNndYV0lPGE=; b=A5m2H+05kJsFGmqx0PXzjZGeLxPiZ8p95ICeCC8XLAOqKXwCdjnFqnP7 KNVnG0KZ1JRGzRdAT2nf8KPFL5f5LFK0QF7OBrVD3HnKHNX3df4cqgoPs 4ecGDm0QZcgnSzlkl6vNP4Q17Nn70w0C53EONwxj/qG6Ms9gFiMXEAv/K Pzr/FfgnGq//QsxO9R4MM2iFmEUPhx/amp51HkHiGyfTFdWwW57nejOlb vg85RzgNNEJsyM4pVapKUqYt7+/fzp/1EYHpROZPi2yXVlTn1UIYEsFF1 g/zHvCbExlechUqJ/68T8XyHQaABbYg8G0AZw+OKVjz3mOz/wHyB7ZT2Y Q==; X-CSE-ConnectionGUID: /qfdwMkOSV2clhYef4Cafg== X-CSE-MsgGUID: E6fjOOh+QWCX4jG9AfbetA== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27024267" X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="27024267" 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:49 -0700 X-CSE-ConnectionGUID: KP8YL9K2Rnem+va4frvP3w== X-CSE-MsgGUID: FNyPFohiSUi0ad2QXlYsng== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="80486326" 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:48 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 05/14] wifi: iwlwifi: fw: api: update link context API version Date: Tue, 8 Oct 2024 07:25:19 +0300 Message-Id: <20241008072037.437c6573df3c.I03612cb6cf47b12038c1db11b95a554cdea714e9@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 The flags_mask field is becoming reserved, and a new bandwidth request is being added for RX OMI purposes. Support the new API version as preparation. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- .../wireless/intel/iwlwifi/fw/api/mac-cfg.h | 32 ++++++++++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/link.c | 3 +- 2 files changed, 29 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h b/drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h index c46e24fc6a1e..b23d5fc4bbe6 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h @@ -382,6 +382,8 @@ struct iwl_mac_config_cmd { * @LINK_CONTEXT_MODIFY_EHT_PARAMS: covers iwl_link_ctx_cfg_cmd::puncture_mask. * This flag can be set only if the MAC that this link relates to has * eht_support set to true. No longer used since _VER_3 of this command. + * @LINK_CONTEXT_MODIFY_BANDWIDTH: Covers iwl_link_ctx_cfg_cmd::modify_bandwidth. + * Request RX OMI to the AP to modify bandwidth of this link. * @LINK_CONTEXT_MODIFY_ALL: set all above flags */ enum iwl_link_ctx_modify_flags { @@ -393,6 +395,7 @@ enum iwl_link_ctx_modify_flags { LINK_CONTEXT_MODIFY_HE_PARAMS = BIT(5), LINK_CONTEXT_MODIFY_BSS_COLOR_DISABLE = BIT(6), LINK_CONTEXT_MODIFY_EHT_PARAMS = BIT(7), + LINK_CONTEXT_MODIFY_BANDWIDTH = BIT(8), LINK_CONTEXT_MODIFY_ALL = 0xff, }; /* LINK_CONTEXT_MODIFY_MASK_E_VER_1 */ @@ -433,6 +436,22 @@ enum iwl_link_ctx_flags { LINK_FLG_NDP_FEEDBACK_ENABLED = BIT(3), }; /* LINK_CONTEXT_FLAG_E_VER_1 */ +/** + * enum iwl_link_modify_bandwidth - link modify (RX OMI) bandwidth + * @IWL_LINK_MODIFY_BW_20: request 20 MHz + * @IWL_LINK_MODIFY_BW_40: request 40 MHz + * @IWL_LINK_MODIFY_BW_80: request 80 MHz + * @IWL_LINK_MODIFY_BW_160: request 160 MHz + * @IWL_LINK_MODIFY_BW_320: request 320 MHz + */ +enum iwl_link_modify_bandwidth { + IWL_LINK_MODIFY_BW_20, + IWL_LINK_MODIFY_BW_40, + IWL_LINK_MODIFY_BW_80, + IWL_LINK_MODIFY_BW_160, + IWL_LINK_MODIFY_BW_320, +}; + /** * struct iwl_link_config_cmd - command structure to configure the LINK context * in MLD API @@ -457,6 +476,8 @@ enum iwl_link_ctx_flags { * @block_tx: tell the firmware that this link can't Tx. This should be used * only when a link is de-activated because of CSA with mode = 1. * Available since version 5. + * @modify_bandwidth: bandwidth request value for RX OMI (see also + * %LINK_CONTEXT_MODIFY_BANDWIDTH), from &enum iwl_link_modify_bandwidth. * @reserved1: in version 2, listen_lmac became reserved * @cck_rates: basic rates available for CCK * @ofdm_rates: basic rates available for OFDM @@ -500,10 +521,11 @@ struct iwl_link_config_cmd { __le32 modify_mask; __le32 active; union { - __le32 listen_lmac; + __le32 listen_lmac; /* only _VER_1 */ struct { - u8 block_tx; - u8 reserved1[3]; + u8 block_tx; /* since _VER_5 */ + u8 modify_bandwidth; /* since _VER_6 */ + u8 reserved1[2]; }; }; __le32 cck_rates; @@ -524,7 +546,7 @@ struct iwl_link_config_cmd { __le16 puncture_mask; /* removed in _VER_3 */ __le16 frame_time_rts_th; __le32 flags; - __le32 flags_mask; + __le32 flags_mask; /* removed in _VER_6 */ /* The below fields are for multi-bssid */ u8 ref_bssid_addr[6]; __le16 reserved_for_ref_bssid_addr; @@ -535,7 +557,7 @@ struct iwl_link_config_cmd { u8 ibss_bssid_addr[6]; __le16 reserved_for_ibss_bssid_addr; __le32 reserved3[8]; -} __packed; /* LINK_CONTEXT_CONFIG_CMD_API_S_VER_1, _VER_2, _VER_3, _VER_4, _VER_5 */ +} __packed; /* LINK_CONTEXT_CONFIG_CMD_API_S_VER_1, _VER_2, _VER_3, _VER_4, _VER_5, _VER_6 */ /* Currently FW supports link ids in the range 0-3 and can have * at most two active links for each vif. diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c index 19ecd215f1dc..628baf67b208 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c @@ -361,7 +361,8 @@ int iwl_mvm_link_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif, send_cmd: cmd.modify_mask = cpu_to_le32(changes); cmd.flags = cpu_to_le32(flags); - cmd.flags_mask = cpu_to_le32(flags_mask); + if (cmd_ver < 6) + cmd.flags_mask = cpu_to_le32(flags_mask); cmd.spec_link_id = link_conf->link_id; if (cmd_ver < 2) cmd.listen_lmac = cpu_to_le32(link_info->listen_lmac); 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: 13825629 X-Patchwork-Delegate: johannes@sipsolutions.net 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:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13825630 X-Patchwork-Delegate: johannes@sipsolutions.net 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 C6B8E12C484 for ; Tue, 8 Oct 2024 04:25:51 +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=1728361553; cv=none; b=tdvpQ9Ahlq1eZlid8rfUBOMCJ7t6VSWLsc09MDkmrs6vW9c5DlKKOCZ2dodxAivm2N619VqU/jTnkcD8ebR+lVAvYvK+fMVXF6mBuNIRuti1Ssujabo6uXtBpgFixOgMVpnPqwEyCsoN5Dmrm00bxlWrqschPajJm4sHgw7Y3jg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361553; c=relaxed/simple; bh=GQI78rGAQr07e0zchy2qc/JkbRJB6sk3lh5diHAmBz4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Jq/ZYxmlMJyeHG++85I2wqe49A/VfdVDy1cqDdfF/ul/BrB7mwfsBHCjucmrVE1ve3otSqlR4PzVfFs3/nPOpraC7hBKfiCvFs7+Azqs2blFt/aVe6Ew9tQ1A/I4Z0jz+bTtPrRbGYldDKTwMC9bAC8hJEXV8IsZaWIYpreSj7g= 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=drhZdNO4; 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="drhZdNO4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728361552; x=1759897552; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GQI78rGAQr07e0zchy2qc/JkbRJB6sk3lh5diHAmBz4=; b=drhZdNO4rFmejchjEAjy2D+NXUFWKrwz6ZrddBL/GMFho13/mRWSc0cA Bp5XU8Y76jHEr/kJrPxrCVZfIl6T7tXB3SiTd09+jMfwE4U4/sIg27lxS xYaL7oRRVz5uNjMrf+U3/BTz2DZjxQLZg7B7VB2gwrEKRoAuUKS52sWzR v2hvdxWlSrjAL1CsD7mmHR6nA4DbD/eRA3rB5yazwHKiVk51KSCiwWwUH VAbNoDq2AGq2zvkswSaUpcThiiPqBiyVOOz5ve7TrPtG2RbBWzA/Gad/B Zrdj3UgD6haRVp3aJquNiMrwE3OGpID06xInyR3iL8kI8woA5SY3KU1nH g==; X-CSE-ConnectionGUID: 1VyyKcwxR+mIUfxlJOi01g== X-CSE-MsgGUID: rcs3WfGZSdWuFVdm373Hng== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27024282" X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="27024282" 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:51 -0700 X-CSE-ConnectionGUID: pzo2ez7RRReaCJev20vF0g== X-CSE-MsgGUID: AP0ZRCdqThiNoS2XNWtTDw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="80486349" 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:50 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Daniel Gabay Subject: [PATCH 07/14] wifi: iwlwifi: mvm: Remove unused last_amsdu from reorder buffer Date: Tue, 8 Oct 2024 07:25:21 +0300 Message-Id: <20241008072037.13ba0eeae0fd.I94985512596e5996f5ab199451ce851c59a5a72a@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 The last_amsdu field is not used and appears to be a leftover from a previous implementation, remove it. Signed-off-by: Daniel Gabay Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 -- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 6 +----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index ff5d720b7314..475e781e166a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -780,7 +780,6 @@ struct iwl_mvm_tcm { * @head_sn: reorder window head sn * @num_stored: number of mpdus stored in the buffer * @queue: queue of this reorder buffer - * @last_amsdu: track last ASMDU SN for duplication detection * @valid: reordering is valid for this queue * @lock: protect reorder buffer internal state */ @@ -788,7 +787,6 @@ struct iwl_mvm_reorder_buffer { u16 head_sn; u16 num_stored; int queue; - u16 last_amsdu; bool valid; spinlock_t lock; } ____cacheline_aligned_in_smp; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 65f8933c34b4..fdbd63ff91ef 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -814,7 +814,7 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm, if (!buffer->num_stored && ieee80211_sn_less(sn, nssn)) { if (!amsdu || last_subframe) buffer->head_sn = nssn; - /* No need to update AMSDU last SN - we are moving the head */ + spin_unlock_bh(&buffer->lock); return false; } @@ -831,7 +831,6 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm, if (!amsdu || last_subframe) buffer->head_sn = ieee80211_sn_inc(buffer->head_sn); - /* No need to update AMSDU last SN - we are moving the head */ spin_unlock_bh(&buffer->lock); return false; } @@ -841,9 +840,6 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm, __skb_queue_tail(&entries[index].frames, skb); buffer->num_stored++; - if (amsdu) - buffer->last_amsdu = sn; - /* * We cannot trust NSSN for AMSDU sub-frames that are not the last. * The reason is that NSSN advances on the first sub-frame, and may 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: 13825631 X-Patchwork-Delegate: johannes@sipsolutions.net 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:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13825632 X-Patchwork-Delegate: johannes@sipsolutions.net 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 229251369B6 for ; Tue, 8 Oct 2024 04:25:54 +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=1728361555; cv=none; b=AUZ6J0CU5fpSgrvyEH5aWkiAfRj80YnQGyoaD+v7lF6aDOOoumisq7AWOCjKCAbN03Fh2BQcUcPGncKVrBeD6DTtdc21HTit9WrgYr/ZHRzb6+GDgAI7etaVN00EI1rsI6MdJ7dR2a09JfSlalmLcugnt6pi3EHB/w/+fv2u95A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361555; c=relaxed/simple; bh=zrOhAFBVSPLXoTK8bTtox4ymEp/1RUxAlkEFjdmSTUA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=PQLBBuAL6hO9/uZTRr2YCGumGuE+CezU95ZMzetP+uo9Yp5O3aUwdLiSn06CFJxC0EOQ+rMOWv+OJivYD0oJaXJ6rsvMB7GywcOjSEUIN00jk3vz3aGP1miQhCrpTB9PGlrzxf7Op9rGhZS9FtJvFMM8vACrqfs2HCMDtVT43rY= 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=NoxecGie; 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="NoxecGie" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728361554; x=1759897554; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zrOhAFBVSPLXoTK8bTtox4ymEp/1RUxAlkEFjdmSTUA=; b=NoxecGiek95wI5WM6MXDqlLXJTzPGFLhpuoLrEGfkgCAUEIBDRgpCZE9 57ho9Faj1VkuGRmvXkiHmB7beH+2BAFCvVPXX3DYZiQG8f+y1WVIoyHjg KWIVsRkVNH6r2yR0+duTE1OPu1JGjvcgqKiEjUOKzSp/IDaOG1umrsEyy MgXzH7p8CBqHla3oqDpKqZ7T205U9zbU3TOI8+R5cvSeSX62JPC/pgopy Gr6LM/8GGzi3rNjQ4LC1d1OmxWSAZIr88pc5SWiHpouHnCC6I6pjxS/kD Feej7W7lRDT6fPcQpVEaIdqSNB6XhrO36LE1Q7Tfiejrkknrn5ZFZVRZ4 Q==; X-CSE-ConnectionGUID: StBi8yBKQfGsZTE7+GXQjw== X-CSE-MsgGUID: +1a8QugaQ+my9kdjGeGcKw== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27024288" X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="27024288" 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:54 -0700 X-CSE-ConnectionGUID: ttwy4XfvTkCe/+hD6g/J/w== X-CSE-MsgGUID: wWaa1d28RhyqBnysDlMylQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="80486366" 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:53 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 09/14] wifi: iwlwifi: mvm: remove unneeded check Date: Tue, 8 Oct 2024 07:25:23 +0300 Message-Id: <20241008072037.78b0adbb7b50.I630a64f06ca86baecde6a2a238733b7df3cf70e4@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 When checking if extra LTF should be disabled, we don't need to check the the HW revision. sband_eht_cap will be NULL if eht_capa::has_eht is false, and that will be the case for the HWs that don't support EHT. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg --- drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c index 05715e5af6ab..a0c088efd240 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c @@ -615,11 +615,8 @@ void iwl_mvm_rs_fw_rate_init(struct iwl_mvm *mvm, int cmd_ver; int ret; - /* Enable external EHT LTF only for GL device and if there's - * mutual support by AP and client - */ - if (CSR_HW_REV_TYPE(mvm->trans->hw_rev) == IWL_CFG_MAC_TYPE_GL && - sband_eht_cap && + /* Enable extra EHT LTF if there's mutual support by AP and client */ + if (sband_eht_cap && sband_eht_cap->eht_cap_elem.phy_cap_info[5] & IEEE80211_EHT_PHY_CAP5_SUPP_EXTRA_EHT_LTF && link_sta->eht_cap.has_eht && 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: 13825633 X-Patchwork-Delegate: johannes@sipsolutions.net 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:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13825634 X-Patchwork-Delegate: johannes@sipsolutions.net 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 D89B712C484 for ; Tue, 8 Oct 2024 04:25:57 +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=1728361559; cv=none; b=CJUMeqLbKh9JE0FvWj6eR5fxDj8xLM0l6UgeDOlaEp5kmo9HflVCBvIqCcPH6c6wabDSHLU+WR968vkg814VhxQRBw+6MMduuhWgalwqc+CZA5d39klKh/1P23VuJUgJPAAtu+TESzr5GjAvvh7ecOgz0mwN/nZYKoj1Tr0DIB8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361559; c=relaxed/simple; bh=1X68w1t8FfSAedz2vntuxswzV6KQYPNBQ0b1knPSXs0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Cr0D8DFTFGjJMJLgE6bKZDCWLF8COz5hgd5JcxKbfOD4d9Cw4BF8N6JNSOdMU4vv4DMJeX4WNZNVjzVO5MJx6mKLWViMNsqWbgTQFM0v1VYKC+UhCyn3IPgsMzfDim9nyXhJiUszUanUru6w6vWxnsXhHQO6YDaxltMiUyLqUJ8= 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=O0UHFpJo; 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="O0UHFpJo" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728361558; x=1759897558; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1X68w1t8FfSAedz2vntuxswzV6KQYPNBQ0b1knPSXs0=; b=O0UHFpJoDLzCks+E4+J3IlC0urPidYW+fzYTy1anbxBbXYbSrrJKYbK3 8hKJQ6sze9iIbuOhw5nLqsH2n2ia1TfQ8/+xrQqk7c+trNVu4RRJpVYGn Xzvw2gcOcSszXwCeDKfzjwd9CNdSTQ+pgFQRw8Qjxbn1x3yovwt5xzHY6 lxjVBnclz7oynlcttLRhqz1ZmzWpx3/YSRIYSWhN9r6ubQDw8G2Rfxa85 N1rS8ROwwvCpRsFnKLt70Frr83irLi70KJZJy+MYvS77mAZolur44Wdqy Cn5oPe01n7gUB1fwvZ/jZuwJyun+kjxBSY2RarZo+Q2wdTSkRky58y29x A==; X-CSE-ConnectionGUID: cVKNj7SUS7K4X3tzlrm4Iw== X-CSE-MsgGUID: yCMg0GntTOaSaLcEGmXpZw== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27024299" X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="27024299" 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:57 -0700 X-CSE-ConnectionGUID: YomwILFgRaiIvOlOuRPL7w== X-CSE-MsgGUID: NKXtHRsLT8O07vvL/Iu94w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="80486386" 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:56 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg , Emmanuel Grumbach , Johannes Berg Subject: [PATCH 11/14] wifi: iwlwifi: do not warn about a flush with an empty TX queue Date: Tue, 8 Oct 2024 07:25:25 +0300 Message-Id: <20241008072037.7c152d0820be.I3ae39a9a470f47bfe4405f2e5c30327e157eb55f@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 When resuming it can happen that the TX queue is flushed even though it is entirely empty. This is completely fine and should not be causing an error level log message. Return early from reclaim in that case. Signed-off-by: Benjamin Berg Reviewed-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c index 9fe050f0ddc1..1ef14340953c 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c @@ -2351,6 +2351,10 @@ void iwl_pcie_reclaim(struct iwl_trans *trans, int txq_id, int ssn, txq_write_ptr = txq->write_ptr; spin_unlock(&txq->lock); + /* There is nothing to do if we are flushing an empty queue */ + if (is_flush && txq_write_ptr == txq_read_ptr) + goto out; + read_ptr = iwl_txq_get_cmd_index(txq, txq_read_ptr); if (!test_bit(txq_id, trans_pcie->txqs.queue_used)) { 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: 13825635 X-Patchwork-Delegate: johannes@sipsolutions.net 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:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 13825636 X-Patchwork-Delegate: johannes@sipsolutions.net 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 2F45A13C9CB for ; Tue, 8 Oct 2024 04:26:00 +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=1728361561; cv=none; b=pWVzxjOfezNoVHSlbdYprh8yCCT/JK+/MzG0oUbQ6AU7ieAWVIF8veV172fsS73e/GSDiXEgN8K1RYfZrvHGvt788Jr+vDUMk+jxm5h9A2BS6yR1ZEebJuaoBnjuBemDa7xCJq9hOSG4Gwaip3ODoDkC0O3hLGWQEgVFYHhhMaY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728361561; c=relaxed/simple; bh=g7bbZhF1550XdlVZW2yrFEmAqS/Vic3JK8qrTAE4LLA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Kin8fFwTT3JFQ+U+QcLAbZ07tkCodF+uufWUdsCH132fVaSh9kBv98rSb6Cn44rbN0cZEt/AFXBC2q1Zx6nAepdvV1XwoEDW6PGgPRCXE6XaPwoAzateSNn8bwvySRKJuNu/aSi6MJ6IcFJy0cIxZhc/yWRIzrFs35grTB+lqsE= 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=dSgFGKg8; 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="dSgFGKg8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728361560; x=1759897560; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=g7bbZhF1550XdlVZW2yrFEmAqS/Vic3JK8qrTAE4LLA=; b=dSgFGKg84uxKXg4G1or2zEWGbSL18zQJkGv/opdZqJpcjC5rZGlEgpy8 5qVYjP0IXUcuv42wItW0kFAnj0VjsmsdridOVi7ZV5Dv6bklaW5SqchsC 7XAz7YjZ5t0qxcxzuHmPjO8IzISNSv8EC3ex2zx1YHQBLbFifrqnaoOLa 0GLyS7w/htD5M6yc4QWUPnu9Q6hYeer/YRIPybOdhkO/CyBCgLrLrmdr7 raJBxUleV4BYVvVgoYn24rdj+I0lYSH8O6GOi101pwBRFeibzD6/COyyd H6hG+HVPK03c8Iop5TvB45YgwV450i66VtksuUz+1WJV31Ubi3fQDathR Q==; X-CSE-ConnectionGUID: LdtuoedSTh6ks5PD72F2WA== X-CSE-MsgGUID: M9zvxVYbRlG0QbjuN/u/0A== X-IronPort-AV: E=McAfee;i="6700,10204,11218"; a="27024307" X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="27024307" 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:00 -0700 X-CSE-ConnectionGUID: qBQSvwv2SPidD680GoDmxQ== X-CSE-MsgGUID: rW0snNVkSbqwAGc9j8psGA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,185,1725346800"; d="scan'208";a="80486406" 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:59 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 13/14] wifi: iwlwifi: mvm: remove redundant check Date: Tue, 8 Oct 2024 07:25:27 +0300 Message-Id: <20241008072037.5d6bab61c75e.I2cfa1669d4534bce9e9cfdace45f797005b71b9b@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 iwl_mvm_sta_from_mac80211 can't return NULL. Remove the check. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg --- drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c index a0c088efd240..de5ac000272e 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rs-fw.c @@ -440,12 +440,6 @@ void iwl_mvm_tlc_update_notif(struct iwl_mvm *mvm, mvmsta = iwl_mvm_sta_from_mac80211(sta); - if (!mvmsta) { - IWL_ERR(mvm, "Invalid sta id (%d) in FW TLC notification\n", - notif->sta_id); - goto out; - } - flags = le32_to_cpu(notif->flags); mvm_link_sta = rcu_dereference(mvmsta->link[link_sta->link_id]); 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: 13825637 X-Patchwork-Delegate: johannes@sipsolutions.net 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); \ })