From patchwork Sun May 12 04:30:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 797263 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 7274BCA40 for ; Sun, 12 May 2024 04:31:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488289; cv=none; b=KMlvCeNluwOcItRs4WSwQK/3sd/vy5h4nRQCTTPx1hK350nAKpagtAryzeR/B1ya6nUnLKASWEIUM797S/yIyYcw/E4pSqhM4hNhRtM/UN9xL8O002gw/P6vLdnvrK37Es0U4v1s/IbO66JXrXqEsdOS1FdrcuNx1RHJwsXm9IU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488289; c=relaxed/simple; bh=NB8M6Y4Drs3wmgENe8Sf9O4xBibn84NlCGxczelPshM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=X1cY9ZFnXI5+9Ko5TKifCL6apLbP9fPYVrILO0VN75JrbTXgfcAm+LYhuanOydBH8KX+n+qL/1ZD4djAKPGIoNDeEyxniEfZ7sjbaFNMXb5wXf6XFCa4vFUn7O02fxSvTDCEFpyDG76z+p7SL04PAKGpKQBkgNPoq/6zkuJAqcA= 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=DkAdady6; arc=none smtp.client-ip=192.198.163.17 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="DkAdady6" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488287; x=1747024287; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NB8M6Y4Drs3wmgENe8Sf9O4xBibn84NlCGxczelPshM=; b=DkAdady6nyz+Uu5RPevoYpp1ERzUkix0ItYot5FXNNFI4R6vjCuEuJi5 fhRopqm9uLhtMzqv1cjwoG5NgebdLYxx3sedTcwG8uKzQ3mzSnq62iYLZ x4dR5PMEqwvZR/iEWw8xH5lP3RPtzlO7p9TIM89fE/T4XsVbLbJ8ZXZxT ZXAIp62btnUIeiAbvDcFzU/sV1MzC48qSja5IoLyd1XSW07tm17lZJMmP KybcWIckes9RxsFIIVcw53mAlkupUU0GnSi8CWz0jHMg0gCOwbI/JSA3r bJRwfOrWS3cy8d/aWNtBm/VanLRiqnAEqnQccWxppkumJaoGfBJ0N4HwK A==; X-CSE-ConnectionGUID: jKz4fKNpSmmZnUErmW9Saw== X-CSE-MsgGUID: YvNgIizXRcaqW6hL9UlGPQ== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323833" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323833" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:27 -0700 X-CSE-ConnectionGUID: ZsmWnuj+RRyHTgl8J6Ey9g== X-CSE-MsgGUID: pRLovPJtTzmsP23lN4bXXQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532144" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:25 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 01/16] wifi: iwlwifi: mvm: don't always set anttena in beacon template cmd Date: Sun, 12 May 2024 07:30:55 +0300 Message-Id: <20240512072733.73d790911268.I158dc1dbc9c2e199c69d8213e5496d2de72da28b@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-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 needs to be set only if the FW is not capable of selecting an antenna on its own. Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c index 5a06f887769a..f6baf7135efd 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c @@ -1010,12 +1010,13 @@ static void iwl_mvm_mac_ctxt_set_tx(struct iwl_mvm *mvm, tx->tx_flags = cpu_to_le32(tx_flags); if (!fw_has_capa(&mvm->fw->ucode_capa, - IWL_UCODE_TLV_CAPA_BEACON_ANT_SELECTION)) + IWL_UCODE_TLV_CAPA_BEACON_ANT_SELECTION)) { iwl_mvm_toggle_tx_ant(mvm, &mvm->mgmt_last_antenna_idx); - tx->rate_n_flags = - cpu_to_le32(BIT(mvm->mgmt_last_antenna_idx) << - RATE_MCS_ANT_POS); + tx->rate_n_flags = + cpu_to_le32(BIT(mvm->mgmt_last_antenna_idx) << + RATE_MCS_ANT_POS); + } rate = iwl_mvm_mac_ctxt_get_beacon_rate(mvm, info, vif); From patchwork Sun May 12 04:30:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796466 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 9D749CA62 for ; Sun, 12 May 2024 04:31:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488290; cv=none; b=ezTf5RdwIt0MFVRDOdSUfc2qDEuATKihKi3fxxnZAw3jZIs9mB9CElLUG3UrrQ2EsRkHA5lfsUE/x67a/1BQBCmudWBi5xjhxCG/WPaEVDHVXPj06j+SMlg47BWRiXT4IdO/5g2/LQMUVgw5y3erLD1NBc3Z5y+GFSj33IVh4fs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488290; c=relaxed/simple; bh=RgKQaIO5oUvr9SguXC1vzmIPGzuwaTQqlUeVClg3Cbk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mDh3MgWt87wDMHpmoU6EA+Far6aY+crjoeGWK/l+MMvFUWsjcUgegGSU+62oyszx4rQl0VbCsWshcfAhScWHKM3D0GkJmHqjsGnKHJKQumYrTEWSZ6E7hQ1/wfmOyet8+iJy/zRtFkIrDz+hhB0Zh+1WxSoUZmu0OoD/bJZPQW4= 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=ealu3xfE; arc=none smtp.client-ip=192.198.163.17 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="ealu3xfE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488288; x=1747024288; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RgKQaIO5oUvr9SguXC1vzmIPGzuwaTQqlUeVClg3Cbk=; b=ealu3xfEQ09f4Y0AQYDpbHjuoesN5CwCL2iN2vKI6luWwRk4aDK+8a2i Hm/uZNS9o7X3w5I0r2Z6/KxBVL1Qm6ggdWqeTdkt6DztFcgZcSbuJXt+P X+fQQNYOnQfDcyUhz8B36kfbDkYY9tCU5aQWwbcYrvvwiOY3APSPehhPq QF4EnBFpTR7D496qEavQVLvl5tQ1HxRcrXUslsSkoGWk2vsms/TiTjP9f suYNtYpH+1BKrEqZgqRdMC7iCpR8KF+lhOpxrVYLUMluvWRV+yLBkehft hV8XNYhF4a1rWNaN+NleyAwVhruFcsch+ct/llkdD5eY2vhwicyokZG6G w==; X-CSE-ConnectionGUID: dUHIs2ddQgaWOo6at7cqjw== X-CSE-MsgGUID: 1iNzks8KSUCtP2MrVMbRJA== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323836" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323836" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:28 -0700 X-CSE-ConnectionGUID: FaR1NimXQZqrV8ffzZ4v1g== X-CSE-MsgGUID: kkyrKoqKQfyzv4ZscmlJZA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532146" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:27 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 02/16] wifi: iwlwifi: mvm: Use the SMPS cfg of the correct link Date: Sun, 12 May 2024 07:30:56 +0300 Message-Id: <20240512072733.f3e2834e78f5.Ie24b431a6ad0dbf977afbbd4d2116bfe2426a0d5@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-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 The exiting code is checking the SMPS mode of deflink. Use the SMPS mode of the link_sta function parameter. Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index b7a461dba41e..3b2875f2cab7 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -470,7 +470,7 @@ static int iwl_mvm_mld_cfg_sta(struct iwl_mvm *mvm, struct ieee80211_sta *sta, break; } - switch (sta->deflink.smps_mode) { + switch (link_sta->smps_mode) { case IEEE80211_SMPS_AUTOMATIC: case IEEE80211_SMPS_NUM_MODES: WARN_ON(1); From patchwork Sun May 12 04:30:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 797262 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 45FB0DDC5 for ; Sun, 12 May 2024 04:31:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488291; cv=none; b=Bb+CJ1QIWFv1+NnUGHwEVr1B8wWXxXlWXYSZpMqNKBetnvq2t069cj3LNrK71Y3uWkXSMDOBeKiku47FmBQDKdaYt/mHc+5QlAc4cpAI7HsEHArQ4jElCFZY41mxlEnSL2Gl7iJZGGH9Mf9C1oBCb9ajooa5TYoM1RWEneVUw4s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488291; c=relaxed/simple; bh=1SzQ1KPnrIk+Ueeoge/Wt5FxE0zq+7Itay+4Q5IpxCM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EeuxODZI+ItA2PYYIZ+LHSiyX6w3x7KCJ59vZ+8BBA/csA21J0Lxv506XbVbArrlRnvBAy3I4x23gnrMp9g5vOzf4Ind44MNzJvm9v5CW2bvBUI6kKkCUAUv1fwI5OwG7otDS3FRREA3/ZwxMfzEw8VBDl0ScnSMybwFt0U/0Ek= 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=jG8/7SFX; arc=none smtp.client-ip=192.198.163.17 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="jG8/7SFX" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488289; x=1747024289; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1SzQ1KPnrIk+Ueeoge/Wt5FxE0zq+7Itay+4Q5IpxCM=; b=jG8/7SFXAFQCmdmB2AakLYoj4hEnyGAVzwLpnjzexd3TQ2TfbdlEyrkn ieg4waEGpdYjQzqaXFeJ54UJYC/Sw3TI0yuT8ML+2g//68P7xcu8SRLMb LHcpLjrbLF98/SnRC5xz2/oJ5NRoHygfagfQ2ICdXVnfTT2kdtEdhw6N/ 5R0iD8AX2JEPw+w5G1u9E2NXdETqCQ9S4EZ8ff8LGO3zflOfs2BR8wUx7 N6pwcUvDOtPKqY7AjnSXiBD6JrE3W5cAnY3R+m4vUppq3+IKPI1rf/ofX dgsEYg7cAg9mvMqpEoUqP+s0FXN5Rl1d+NYBbBa7DM3AbYbZ5lgJzHU5e g==; X-CSE-ConnectionGUID: OSdr/DLvQqed0Z3sI3p1Rw== X-CSE-MsgGUID: AL8Fdt0+Q3ObIX8lAOpMwQ== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323838" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323838" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:29 -0700 X-CSE-ConnectionGUID: R/hh+3NsShKUR4r2nrbOHQ== X-CSE-MsgGUID: hNmKBBK0QRyLy8lHM4HmUA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532147" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:28 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 03/16] wifi: iwlwifi: mvm: add a of print of a few commands Date: Sun, 12 May 2024 07:30:57 +0300 Message-Id: <20240512072733.65fc46e2ffbc.I19d4ef2cc06bfee7d9644a376d39399f0f6eaa15@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited This is needed for debugging. Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index f19577474f4b..c3cd5ab11aec 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c @@ -572,6 +572,7 @@ static const struct iwl_hcmd_names iwl_mvm_legacy_names[] = { HCMD_NAME(D0I3_END_CMD), HCMD_NAME(LTR_CONFIG), HCMD_NAME(LDBG_CONFIG_CMD), + HCMD_NAME(DEBUG_LOG_MSG), }; /* Please keep this array *SORTED* by hex value. @@ -579,6 +580,7 @@ static const struct iwl_hcmd_names iwl_mvm_legacy_names[] = { */ static const struct iwl_hcmd_names iwl_mvm_system_names[] = { HCMD_NAME(SHARED_MEM_CFG_CMD), + HCMD_NAME(SOC_CONFIGURATION_CMD), HCMD_NAME(INIT_EXTENDED_CFG_CMD), HCMD_NAME(FW_ERROR_RECOVERY_CMD), HCMD_NAME(RFI_CONFIG_CMD), @@ -593,8 +595,10 @@ static const struct iwl_hcmd_names iwl_mvm_system_names[] = { * Access is done through binary search */ static const struct iwl_hcmd_names iwl_mvm_mac_conf_names[] = { + HCMD_NAME(LOW_LATENCY_CMD), HCMD_NAME(CHANNEL_SWITCH_TIME_EVENT_CMD), HCMD_NAME(SESSION_PROTECTION_CMD), + HCMD_NAME(CANCEL_CHANNEL_SWITCH_CMD), HCMD_NAME(MAC_CONFIG_CMD), HCMD_NAME(LINK_CONFIG_CMD), HCMD_NAME(STA_CONFIG_CMD), @@ -603,7 +607,10 @@ static const struct iwl_hcmd_names iwl_mvm_mac_conf_names[] = { HCMD_NAME(STA_DISABLE_TX_CMD), HCMD_NAME(ROC_CMD), HCMD_NAME(ROC_NOTIF), + HCMD_NAME(CHANNEL_SWITCH_ERROR_NOTIF), + HCMD_NAME(MISSED_VAP_NOTIF), HCMD_NAME(SESSION_PROTECTION_NOTIF), + HCMD_NAME(PROBE_RESPONSE_DATA_NOTIF), HCMD_NAME(CHANNEL_SWITCH_START_NOTIF), }; @@ -627,6 +634,8 @@ static const struct iwl_hcmd_names iwl_mvm_data_path_names[] = { HCMD_NAME(DQA_ENABLE_CMD), HCMD_NAME(UPDATE_MU_GROUPS_CMD), HCMD_NAME(TRIGGER_RX_QUEUES_NOTIF_CMD), + HCMD_NAME(WNM_PLATFORM_PTM_REQUEST_CMD), + HCMD_NAME(WNM_80211V_TIMING_MEASUREMENT_CONFIG_CMD), HCMD_NAME(STA_HE_CTXT_CMD), HCMD_NAME(RLC_CONFIG_CMD), HCMD_NAME(RFH_QUEUE_CONFIG_CMD), @@ -650,6 +659,21 @@ static const struct iwl_hcmd_names iwl_mvm_statistics_names[] = { HCMD_NAME(STATISTICS_OPER_PART1_NOTIF), }; +/* Please keep this array *SORTED* by hex value. + * Access is done through binary search + */ +static const struct iwl_hcmd_names iwl_mvm_debug_names[] = { + HCMD_NAME(LMAC_RD_WR), + HCMD_NAME(UMAC_RD_WR), + HCMD_NAME(HOST_EVENT_CFG), + HCMD_NAME(DBGC_SUSPEND_RESUME), + HCMD_NAME(BUFFER_ALLOCATION), + HCMD_NAME(GET_TAS_STATUS), + HCMD_NAME(FW_DUMP_COMPLETE_CMD), + HCMD_NAME(FW_CLEAR_BUFFER), + HCMD_NAME(MFU_ASSERT_DUMP_NTF), +}; + /* Please keep this array *SORTED* by hex value. * Access is done through binary search */ @@ -705,6 +729,7 @@ static const struct iwl_hcmd_arr iwl_mvm_groups[] = { [PROT_OFFLOAD_GROUP] = HCMD_ARR(iwl_mvm_prot_offload_names), [REGULATORY_AND_NVM_GROUP] = HCMD_ARR(iwl_mvm_regulatory_and_nvm_names), + [DEBUG_GROUP] = HCMD_ARR(iwl_mvm_debug_names), [STATISTICS_GROUP] = HCMD_ARR(iwl_mvm_statistics_names), }; From patchwork Sun May 12 04:30:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796465 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 CD7AEFC11 for ; Sun, 12 May 2024 04:31:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488292; cv=none; b=VlXXxZ6YK9TsLyf2rxoZcojfCx7mB4Yz2AOng9KmZNiya0csS6jQvDstmLotRCVHVaVugg09g9SlYqchdqEJvMxNbsWlIvQ1rnZPVnGXfSHuJ2fMSjjdYGMw7kOdTovWU81/SBQ5wVUgr/RN6IYj5+d91XipQP1gBqiJtpO2ABY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488292; c=relaxed/simple; bh=dm2eP8Pi01XSaQIgtcadxmgHnGVJlPiUU+rwoJYY7mQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=elutshTSNtGl6q5kKuRMOHWbtQerxYzj+QnNcOg3RwhateKhzoTbnNF+8md9S7Y7jJnU0phKN1U8J4QeFyPupt23NLMFqFfEZ0RHYZeQ4+8HXWs79cr4tm/9TBlNL/vQ1tWxaOcb91XtoicdyI8/Ge4xeYH0XVhxBMs4Bk9o7wA= 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=nWe/gLII; arc=none smtp.client-ip=192.198.163.17 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="nWe/gLII" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488291; x=1747024291; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dm2eP8Pi01XSaQIgtcadxmgHnGVJlPiUU+rwoJYY7mQ=; b=nWe/gLII/V7FT9reL3tUVikM/LcRbTMzY63Gf3xHFePrjpdARxnep+jB k8APAHIPmdjvsDKVWlFyXnP1MEYt8YKwE8QQZMTyxZD0iReQCHHWKymr3 xQ3C7BOunABBlhWRWol9CrmRynQuWvFRHQo/PxdCMuv/U84yMFgBR0CRW HUg7+YoFwDVQWxBsBcuMJkH8jpgC5JlwsPCgovGfrKQSJunSH7oG8myoC zbx0XaYJIyB+mexMaAl8kmefzOz7Vb7P0VJgx+CRYYrhi2wmlc4k5wZ4L qRCgsMiOxvjj1Mp759kK28y6Zj0Qh/20vEgrsPsGgH2jb+YRY5mAnWpsL A==; X-CSE-ConnectionGUID: 1lh3qiyfSd2IhUxIIHIRLQ== X-CSE-MsgGUID: 73GIKjgCQKelHOhGmM44gA== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323841" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323841" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:30 -0700 X-CSE-ConnectionGUID: zNDaQqU6TLaCm7RQj34Kpw== X-CSE-MsgGUID: +2vPv0agRkC1pchtzOs7NA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532148" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:29 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 04/16] wifi: iwlwifi: bump FW API to 91 for BZ/SC devices Date: Sun, 12 May 2024 07:30:58 +0300 Message-Id: <20240512072733.27c00099e8b7.I99b4f24bba073414dd04a6e04a359c7fbba52990@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-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 91 for new devices. Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/cfg/bz.c | 2 +- drivers/net/wireless/intel/iwlwifi/cfg/sc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/bz.c b/drivers/net/wireless/intel/iwlwifi/cfg/bz.c index bc98b87cf2a1..45905e57e084 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 90 +#define IWL_BZ_UCODE_API_MAX 91 /* Lowest firmware API version supported */ #define IWL_BZ_UCODE_API_MIN 80 diff --git a/drivers/net/wireless/intel/iwlwifi/cfg/sc.c b/drivers/net/wireless/intel/iwlwifi/cfg/sc.c index 9b79279fd76c..653279e08927 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 90 +#define IWL_SC_UCODE_API_MAX 91 /* Lowest firmware API version supported */ #define IWL_SC_UCODE_API_MIN 82 From patchwork Sun May 12 04:30:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 797261 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 18BBE12E71 for ; Sun, 12 May 2024 04:31:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488293; cv=none; b=JD/ttzn3EN8QXvzf+C5+aqnwePkBecHEevkMxGQTvIiqmmIDBDuHB42OWW8TVaosWL+G95T9YJ3hIt43xE+UKrCVF0rteUSA2o98LVI7htFhOBSKxPfBc+u+HU22MMzW1HZi6vqnS4XW0MSIx91sUr+j/ncLVuMqIgTElTedAKU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488293; c=relaxed/simple; bh=KZPX2OG4/jcYUZjM5ulQdQ7PAkEjaVHVAr+Cb2+3/cg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cNB2vT0Ms0KB7ZoffaKGTJDHxB0Lyk8jmMQL8WRk5P7ifsdMi2kQH6gtQG82uYGnDIKbxTwGhpEjwFlaOAQpNziS+DIOxg2ivajV9xuwhzxhY9ckIbccpXqHqDB4+gDsxJG/Ziu7jH29nB/rIH2qrhlHiFzZJicDcVgW5kojwao= 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=NWWCTd0y; arc=none smtp.client-ip=192.198.163.17 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="NWWCTd0y" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488292; x=1747024292; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KZPX2OG4/jcYUZjM5ulQdQ7PAkEjaVHVAr+Cb2+3/cg=; b=NWWCTd0yIKVrj95GAIsWVTcz1R4hnYU65a22Tblp3I46m0F1rG9KMZtg LCpjgJco/R1rfa8ss9Qi+LwgItXg2u3Xwx56cXuYq+wC9K9Ll3DF5cqul 7hb2tQBZ8gR9jqLpbZ+8ORM2IUMX6dcDD5NCgleltc9B7fUQMAHf8bFZv B/uGwTy4K5w/zlEJx4ay/8l5HhLz/nkPTzD+U798TZYuSWsrBQ+KJ7nHm wqPkeq43q4seT6bT3PTbji7HhNF3n2LHgWqJLzQ3C0h5r5igxPA+azdSv wEgBG3go8Di0grnfj5kEjvxc9w+q1bwVMl4zZG7r/rttUomNwhK8c9OQq g==; X-CSE-ConnectionGUID: /H548CJxRsenDVf3UYv9xg== X-CSE-MsgGUID: WlqAAi7oRiWxUtyh7A91gw== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323843" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323843" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:32 -0700 X-CSE-ConnectionGUID: oO2jeZ1fTSKxnkth6o732w== X-CSE-MsgGUID: 8sa5iHodSZWSP6ZY84eC1g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532153" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:30 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Emmanuel Grumbach Subject: [PATCH 05/16] wifi: iwlwifi: mvm: mark bad no-data RX as having bad PLCP Date: Sun, 12 May 2024 07:30:59 +0300 Message-Id: <20240512072733.e6adcb9a6ece.Ic14c2e8ed5e80d48af78b2f04e9f08beeb62d68e@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-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 Just like with any other frame, mac80211 will do sanity checks on no-data RX (representing e.g. sounding PPDUs), and if e.g. the NSS is wrong, it will warn. This isn't a good idea if we already know the frame wasn't received well, e.g. has bad PLCP. Unless the firmware reports "no error", set the bad PLCP flag to skip checks in mac80211. Also, since we're now extracting two different values from the info field, use le32_get_bits() for both. Signed-off-by: Johannes Berg Reviewed-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 98a4f6fb3f03..0f78a9ef5240 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -2361,7 +2361,6 @@ void iwl_mvm_rx_monitor_no_data(struct iwl_mvm *mvm, struct napi_struct *napi, struct iwl_rx_packet *pkt = rxb_addr(rxb); struct iwl_rx_no_data_ver_3 *desc = (void *)pkt->data; u32 rssi; - u32 info_type; struct ieee80211_sta *sta = NULL; struct sk_buff *skb; struct iwl_mvm_rx_phy_data phy_data; @@ -2374,7 +2373,6 @@ void iwl_mvm_rx_monitor_no_data(struct iwl_mvm *mvm, struct napi_struct *napi, return; rssi = le32_to_cpu(desc->rssi); - info_type = le32_to_cpu(desc->info) & RX_NO_DATA_INFO_TYPE_MSK; phy_data.d0 = desc->phy_info[0]; phy_data.d1 = desc->phy_info[1]; phy_data.phy_info = IWL_RX_MPDU_PHY_TSF_OVERLOAD; @@ -2426,7 +2424,12 @@ void iwl_mvm_rx_monitor_no_data(struct iwl_mvm *mvm, struct napi_struct *napi, /* 0-length PSDU */ rx_status->flag |= RX_FLAG_NO_PSDU; - switch (info_type) { + /* mark as failed PLCP on any errors to skip checks in mac80211 */ + if (le32_get_bits(desc->info, RX_NO_DATA_INFO_ERR_MSK) != + RX_NO_DATA_INFO_ERR_NONE) + rx_status->flag |= RX_FLAG_FAILED_PLCP_CRC; + + switch (le32_get_bits(desc->info, RX_NO_DATA_INFO_TYPE_MSK)) { case RX_NO_DATA_INFO_TYPE_NDP: rx_status->zero_length_psdu_type = IEEE80211_RADIOTAP_ZERO_LEN_PSDU_SOUNDING; From patchwork Sun May 12 04:31:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796464 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 81EFA14286 for ; Sun, 12 May 2024 04:31:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488295; cv=none; b=HXv2sZnFRadElXrBF7syrCeBryprrK1GFpTFVLmdLKXMgS3VsRtgLHRYVnb0l9fkDbr7h/uzKdtyqEsJP8lGBV2k+07f3NXnoSP0UvSgiAXwQqnA4bk0IR/Ar+Gk+zSKxkSiRxeki/RvJXrPEWwa9rKsdDfIbUX4UvnBVd40vDE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488295; c=relaxed/simple; bh=QhqG7UP0HVXKNSRLthzPpzkThTw7hORoyvQcQDUNJkM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ukjNK8dKdRQXN2BaVz7UU39V8xCtG4H4cc58clzqHWUSKeFJR4lMG1cfZGsFjYakVyjEakSKdiCoMpALh+E6+9Qd8wX7tyPrmcRURc+aWf1I8AaXM+QXcw/JZO3c05bZeyVbZ1IS+UbhV7ttDZS0Ydqrm86kmI8feZltp/Fp/xs= 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=BkGCLAY+; arc=none smtp.client-ip=192.198.163.17 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="BkGCLAY+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488293; x=1747024293; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QhqG7UP0HVXKNSRLthzPpzkThTw7hORoyvQcQDUNJkM=; b=BkGCLAY+FdBGlg95LmKgse2JMFC3IoXkLcgcA05pzkJE1AXuInpUd/PB yWs6ncQr6B3FhFu3tWoyjBxXffo+zb2sxww/zWrJSParQv1/hzi595g48 rjr/3m9StgrHhpAJVS9eaCpKxnE+iqmng8xq9TTerBxUqFcciTUtxTVfZ TnLnQGwD5vKpy2c7YhcIyzJojfTBRDZvMLzdCBkJxSmSvjxF6SdEUF8tP DGFNWPka1sMBdXrKj2lALSzIhS6qIJe9j/GZWbOF3XXLEIz2ysoBF6Hcs HQZjROeKNA1RHvmTmw+dotFDSBRVZBgzWr660TDUxbwTd2w7u2kVYKxab g==; X-CSE-ConnectionGUID: FZFZkCpURWmxwYoccOU+qQ== X-CSE-MsgGUID: 1vDmvvuIR6Czz+D4zecQUA== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323846" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323846" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:33 -0700 X-CSE-ConnectionGUID: EkF8OoCAQn+tUuBwJ93kkg== X-CSE-MsgGUID: n09QPY7iT6GcQU0O4kAv8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532156" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:32 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 06/16] wifi: iwlwifi: mei: unify iwl_mei_set_power_limit() prototype Date: Sun, 12 May 2024 07:31:00 +0300 Message-Id: <20240512072733.854427753c92.I557716085cb1f6a35d1f97640388fa421f42a56a@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-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 two versions of iwl_mei_set_power_limit() are a bit different, and while really the const isn't all that necessary on the inline, it's still better to have it be the same. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h b/drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h index 1f3c885aeb65..ee48b86674a6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h +++ b/drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ /* - * Copyright (C) 2021-2023 Intel Corporation + * Copyright (C) 2021-2024 Intel Corporation */ #ifndef __iwl_mei_h__ @@ -488,7 +488,7 @@ static inline void iwl_mei_set_nic_info(const u8 *mac_address, const u8 *nvm_add static inline void iwl_mei_set_country_code(u16 mcc) {} -static inline void iwl_mei_set_power_limit(__le16 *power_limit) +static inline void iwl_mei_set_power_limit(const __le16 *power_limit) {} static inline int iwl_mei_register(void *priv, From patchwork Sun May 12 04:31:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 797260 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 E097917547 for ; Sun, 12 May 2024 04:31:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488296; cv=none; b=WJVGQIksv4rk1uqoVi/Gf/4s4rFteJjpQZXqDaIF/XUrc/vJLCa+udDlGqkMi1FyDVzHuM/WfJZz3qDrX5KHq8oJBmtCcWSoe/eLXwO5FsesGtzbYPOSo+GcuWxioEj1EkHAAdmBJEmWWPxaKVBPvzDNzM6RJGo7nJgicJsCwQk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488296; c=relaxed/simple; bh=GG4124oFwRtWcHDBAYcq+lbViWy1XHZ+XMMXvpeQxNQ=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CYHx+7ZnygEbMRgEEFlS3N52mGyDESD2AYVWJuEYe0YQFNRBoJpxCVWMGnb8bbugILxUAcSyRdPn0OEuC1SmlsFjcNDVMBZzDx8zHMbnY+ZvJEkYEd80aS28fvRio+OEKvRlH9+jj5ToiWWQsqD/RuHXpB3HSgAO8HAeG1FsdOA= 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=hEXhveI7; arc=none smtp.client-ip=192.198.163.17 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="hEXhveI7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488295; x=1747024295; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GG4124oFwRtWcHDBAYcq+lbViWy1XHZ+XMMXvpeQxNQ=; b=hEXhveI7QMv2VhYQ3qIC4oaf5z3pOmHJNh4qXBBJUVCAbRPcDldbxtna KdiChnZtTfPyPivjLmDs3uixyjsWfGXdZrNgyTctzVjrlH01FTZoewxyk Dh9jBEVEn+MMZN2mFOvbSX5S4dgsTO5pgS6wRYNUs2H4vYB0MvhTtWo3B Hw2R3541n9v9FSXZk3kNXEKhFahUnkuPlck/gnA18MStdKtLQNM4qtR8V Mn9+8lR5/jIdH+BxAcjKt6hD10VK/ZAz19ODwaoc4TidE26uW6t4gHC1m EaQ3MqZ3f6b+oVouShoa47MdbqL1wMUMgqMZmWgxBuEmbkF9tbYr4t+0f Q==; X-CSE-ConnectionGUID: xWug79aJSqaH1oTBeN4+Zg== X-CSE-MsgGUID: yyP3NsQlQU6fYWQ+KPylNg== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323848" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323848" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:35 -0700 X-CSE-ConnectionGUID: nB0U7xXeS1StJsDoGxUh3w== X-CSE-MsgGUID: 3KTQmFlUQJy3Yn9dy6p4hg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532159" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:33 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Mukesh Sisodiya , Pagadala Yesu Anjaneyulu Subject: [PATCH 07/16] wifi: iwlwifi: fw: api: Add new timepoint for scan failure Date: Sun, 12 May 2024 07:31:01 +0300 Message-Id: <20240512072733.6781e76990c4.Iadfb3f6dd63a98fc35019772266b5ebddc5b5270@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-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: Mukesh Sisodiya Add new time point to get the details of scan failure While on it added other missing enum to match with FW. Signed-off-by: Mukesh Sisodiya Reviewed-by: Pagadala Yesu Anjaneyulu Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h b/drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h index 47c914de2992..6cfe8a779cc7 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/dbg-tlv.h @@ -470,6 +470,10 @@ enum iwl_fw_ini_region_device_memory_subtype { * @IWL_FW_INI_TIME_POINT_EAPOL_FAILED: EAPOL failed * @IWL_FW_INI_TIME_POINT_FAKE_TX: fake Tx * @IWL_FW_INI_TIME_POINT_DEASSOC: de association + * @IWL_FW_INI_TIME_POINT_PRESET_OVERRIDE_EXT_REQ: request to override preset + * @IWL_FW_INI_TIME_POINT_PRESET_OVERRIDE_START: start handling override preset + * request + * @IWL_FW_INI_TIME_SCAN_FAILURE: failed scan channel list * @IWL_FW_INI_TIME_POINT_NUM: number of time points */ enum iwl_fw_ini_time_point { @@ -500,6 +504,9 @@ enum iwl_fw_ini_time_point { IWL_FW_INI_TIME_POINT_EAPOL_FAILED, IWL_FW_INI_TIME_POINT_FAKE_TX, IWL_FW_INI_TIME_POINT_DEASSOC, + IWL_FW_INI_TIME_POINT_PRESET_OVERRIDE_EXT_REQ, + IWL_FW_INI_TIME_POINT_PRESET_OVERRIDE_START, + IWL_FW_INI_TIME_SCAN_FAILURE, IWL_FW_INI_TIME_POINT_NUM, }; /* FW_TLV_DEBUG_TIME_POINT_API_E */ From patchwork Sun May 12 04:31:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796463 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 66A7D1798F for ; Sun, 12 May 2024 04:31:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488297; cv=none; b=E+g5ibIyMFx3b2aQk4jaCIc+pjXUrHhUpElzBhm58Q4xVMJGFmIkccEIojaW/u46+h53oyq9FOhXo9gE9lfAy8t7C368Ck0W6z3XWVsf/ko6x3UVFhLQZcHmxQOxMTtiuxj5d0qLpScfUixPY5lxHm3V3DliYAC764IIWuxutqo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488297; c=relaxed/simple; bh=fU8V3tIHog8OUa/mo2nNYJFWCnImJqTN7MoY0u1BTig=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sZl5v14oykpxohnYlg57GtZM55hk1auFoKwyPjI+As8KH8wVXhof9oui8/AiDyj87/MP4HopD4jmRC+PqC/etSIt+L/OQh6q4m2t+IdXmmYdUMWtQF7lLnB5fiNCIiUzO8J7fZjt40ag4/RCLefO0uHwNzT+IVNmNIka06tISCI= 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=cItujQ5y; arc=none smtp.client-ip=192.198.163.17 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="cItujQ5y" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488296; x=1747024296; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fU8V3tIHog8OUa/mo2nNYJFWCnImJqTN7MoY0u1BTig=; b=cItujQ5yA7zmKKIUsqrEzWiGTyyYnitZiI+/LHgHqpGEk5GF899TWbl4 XUFdY4tZOEp9jSIMYJeTUT81M4yItYrNucRmqI1YLSqYORHLQE50Jk7HX 70vfrcD/tjl+k0taeDiDQIEe9mfpSCZrxQRukrGLXIDnJu5kcTUArllKo o/PI8ItflrVNm/WWP9yW4hZsCErK6SbBpbLiIfwcgv4u8AscWY3E4eL1G paVPm/IeAh/bk5qVPzTSl+heiQKVFlB5g2BShIdC7j7Az++ZGpdX4hCwk 9lTEXLmkxL9gjfSlgLNzD2p0pIcAspS6sYmhDckmCSqiHQ+eSTfaxbtqz g==; X-CSE-ConnectionGUID: 7AJVyB3KTNWNrc/KIEq73Q== X-CSE-MsgGUID: Vkow8ze7RhGYQGyBjsa/qg== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323852" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323852" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:36 -0700 X-CSE-ConnectionGUID: Pls/x8B4QWW8Xd4XDzRgSg== X-CSE-MsgGUID: Ll0GCMB3Qmmqjla64pMDFQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532163" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:34 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach , Miriam Rachel Korenblit Subject: [PATCH 08/16] wifi: iwlwifi: mvm: leave a print in the logs when we call fw_nmi() Date: Sun, 12 May 2024 07:31:02 +0300 Message-Id: <20240512072733.ef1502a9ef0e.Idd81777c47264e6f557b086625895c1dc2f667f3@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-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 When we crash the firmware, we need to know why we decided to do so. Almost all the callsites of iwl_force_nmi() print something in the logs that explain why the driver decided to crash the firmware. Debugfs doesn't print anything and it is then hard to understand why the firmware has crashed. Add a simple print in the debugfs hook to ease the debug. Signed-off-by: Emmanuel Grumbach Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c index 79f4ac8cbc72..96c9382b98fb 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c @@ -1396,6 +1396,8 @@ static ssize_t iwl_dbgfs_fw_nmi_write(struct iwl_mvm *mvm, char *buf, if (!iwl_mvm_firmware_running(mvm)) return -EIO; + IWL_ERR(mvm, "Triggering an NMI from debugfs\n"); + if (count == 6 && !strcmp(buf, "nolog\n")) set_bit(IWL_MVM_STATUS_SUPPRESS_ERROR_LOG_ONCE, &mvm->status); From patchwork Sun May 12 04:31:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 797259 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 B622518040 for ; Sun, 12 May 2024 04:31:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488299; cv=none; b=CGZlqNxCpRahkJroHLxFWVQH+YuT2OSNNx6uAwf9Ke16Pmdj8fK4+G5924qLrd6GWKasx6yExt2kMfRPrXCpC7wThky9xlAZAH0sQXKCD/x/3wz8Dh2CCz6CueY+xIsqtKaPoDAKcZEDxiCjD7ysfABAwVeXsdsMENURwizlpLY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488299; c=relaxed/simple; bh=02xpOPIxUWrmTGm+MwU8U5S4B5509jNsZb2bclQsBfM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=C745GhJ7cEL2fzU2oWQHtVCFfks4ivBMSurU9I5dBaAPN+HmcOmVPlJhxsyMNOM6IvsUQVc0wlVXTr0ZtDVbaC/XLBr7Pacq7lxstvKSACnsS+QrtflroIG9epA8k3f48ylS5DMT6Gmn8eazGx6cRbrgufNLJLNa175czjnqzDk= 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=gx8VwZue; arc=none smtp.client-ip=192.198.163.17 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="gx8VwZue" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488298; x=1747024298; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=02xpOPIxUWrmTGm+MwU8U5S4B5509jNsZb2bclQsBfM=; b=gx8VwZueX1p/0JjVInc11hwwlBsjmY3P8v1sQupsZUoVs8MJQ4O4Vcua xN3Zo4Z4GyT2Pb9xwW3HQ91qsfTMYFxjwW+FMinSSNCIVplFbZyOa9rGJ qyIiWbZSADZp8GvwJQXj9zILSUNexLefE4Qg8RUxLntZAR/idJGZD0O9s hdoNYqCvOsnpzwltA+lHdiOuPPCnAt9lTyFBBxydYcrlPYstqgo5P3EvR Az3HYexV2l628TaYSbByaJa4rpAAS/SyGRnleiqyDQxnfjURs6AIalJfy 7O5V4kFdkMgQ2DOYLx1wytxjr+cId2b/73Lu4xe7/VPH1YB9HcIuBl5Y9 Q==; X-CSE-ConnectionGUID: P7Gcv1KRRtC9DyiJp4y2NA== X-CSE-MsgGUID: /DN4BH9hTmGSiwtHLZ25vw== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323854" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323854" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:37 -0700 X-CSE-ConnectionGUID: jXMqOGi1QoSKiLPYVDZ6mg== X-CSE-MsgGUID: 2yQRSPriSy+TkeSJXNcvfA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532166" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:36 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 09/16] wifi: iwlwifi: fw: avoid bad FW config on RXQ DMA failure Date: Sun, 12 May 2024 07:31:03 +0300 Message-Id: <20240512072733.faf3a1b87589.I77c950173cb914676fbd28483e5ef420bb9f1bc9@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Johannes Berg In practice, iwl_trans_get_rxq_dma_data() will not fail, it only can do that if called with the wrong arguments. But it does have an error value and doesn't initialize the argument when it fails, so don't use the value then. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/fw/init.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/fw/init.c b/drivers/net/wireless/intel/iwlwifi/fw/init.c index 135bd48bfe9f..d8b083be5b6b 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/init.c +++ b/drivers/net/wireless/intel/iwlwifi/fw/init.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause /* * Copyright (C) 2017 Intel Deutschland GmbH - * Copyright (C) 2019-2021 Intel Corporation + * Copyright (C) 2019-2021, 2024 Intel Corporation */ #include "iwl-drv.h" #include "runtime.h" @@ -135,7 +135,9 @@ int iwl_configure_rxq(struct iwl_fw_runtime *fwrt) struct iwl_trans_rxq_dma_data data; cmd->data[i].q_num = i + 1; - iwl_trans_get_rxq_dma_data(fwrt->trans, i + 1, &data); + ret = iwl_trans_get_rxq_dma_data(fwrt->trans, i + 1, &data); + if (ret) + goto out; cmd->data[i].fr_bd_cb = cpu_to_le64(data.fr_bd_cb); cmd->data[i].urbd_stts_wrptr = @@ -149,6 +151,7 @@ int iwl_configure_rxq(struct iwl_fw_runtime *fwrt) ret = iwl_trans_send_cmd(fwrt->trans, &hcmd); +out: kfree(cmd); if (ret) From patchwork Sun May 12 04:31:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796462 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 0E7DD19470 for ; Sun, 12 May 2024 04:31:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488300; cv=none; b=cQOy0SwEL+UrlZ6vuQ7dG78R540FjW/s8SgLsViuYABbraL3WdahX+Y4RA/GjRpQ7s6TVu5FTEc8zvpkSaJTy99FewKcYcQUjZd8ncT1m4A7JbDRAVYpu079aZI3rPWif0KF7AVfX/LIzXqN1x43ysCiLeG7tYRXXgYRGOQ4FW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488300; c=relaxed/simple; bh=Za2UWbVBINje6RFOAVwZNay2Aqtae3XpPKlxOevknFY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZTHCdqMpdt7y/hjWHgUEbgzZXofkPSyJtL4KZkp7WuAzeBy9Jn74llYDrBZGlgPAulGpH9XZJVVzF9yPhmmWVdza+sIDhGjpCEjG35oFoxEWj5j+K/TErobwUKqKMTLlMFuuVG785ldTUlQsNZeK4XZkoTdIwxHXB5u2mfuGeTU= 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=cARnuj5n; arc=none smtp.client-ip=192.198.163.17 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="cARnuj5n" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488299; x=1747024299; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Za2UWbVBINje6RFOAVwZNay2Aqtae3XpPKlxOevknFY=; b=cARnuj5nW8yov7D/SSBjuPS4JjiZrHfVj9u3djh/YGVyKshJetqNomxH dORYsglDFEka8/uD6vXo1YNV+LITZIHIi9fPNOKXPRhmIruFokelhtqEe UADZBjRtI0dDbnmnnoEBa1pTu2SydnCiiyVq8BzWYiJXQGlGOBA/5YsoY wYS9AqO+tXio+sycYmkTXgy910DKcRS50nRSKH0BnPHjkxizemzWT/hZR MaZ5PaK6Bi9/vYPv2ar63YrVg9+SZJQk2VXASG0AoJH0LbYgB0z+dOjHQ X8cD97iDskqSzN9wpd5kg8ET7bH5Q4+cRpEnRAeTPuQnva3YbvzAQL/g4 g==; X-CSE-ConnectionGUID: +jtk9D29TtiHA/NjIbtbZw== X-CSE-MsgGUID: PoNMBpmmTXGDy/JJWB8/gw== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323856" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323856" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:39 -0700 X-CSE-ConnectionGUID: PfEik2oRR/OiYOZmm3DNhQ== X-CSE-MsgGUID: wVtGPBFdSZ+ycnPFGqcMfQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532169" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:37 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg Subject: [PATCH 10/16] wifi: iwlwifi: mvm: remove stale STA link data during restart Date: Sun, 12 May 2024 07:31:04 +0300 Message-Id: <20240512072733.12d9368a4f72.I840d4fdce5fd49fe69896d928b071067e3730259@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-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 If pre-recovery mac80211 tried to disable a link but this disablement failed, then there might be a mismatch between mac80211 assuming the link has been disabled and the driver still having the data around. During recover itself, that is not a problem, but should the link be activated again at a later point, iwlwifi will refuse the activation as it detects the inconsistent state. Solve this corner-case by iterating the station in the restart cleanup handler. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit --- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 37 +++++++++++++++++++ .../net/wireless/intel/iwlwifi/mvm/mld-sta.c | 10 ++--- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 5 +++ 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 486a6b8f3c97..628b50ee0244 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -1128,6 +1128,39 @@ static void iwl_mvm_cleanup_iterator(void *data, u8 *mac, RCU_INIT_POINTER(mvmvif->deflink.probe_resp_data, NULL); } +static void iwl_mvm_cleanup_sta_iterator(void *data, struct ieee80211_sta *sta) +{ + struct iwl_mvm *mvm = data; + struct iwl_mvm_sta *mvm_sta; + struct ieee80211_vif *vif; + int link_id; + + mvm_sta = iwl_mvm_sta_from_mac80211(sta); + vif = mvm_sta->vif; + + if (!sta->valid_links) + return; + + for (link_id = 0; link_id < ARRAY_SIZE((sta)->link); link_id++) { + struct iwl_mvm_link_sta *mvm_link_sta; + + mvm_link_sta = + rcu_dereference_check(mvm_sta->link[link_id], + lockdep_is_held(&mvm->mutex)); + if (mvm_link_sta && !(vif->active_links & BIT(link_id))) { + /* + * We have a link STA but the link is inactive in + * mac80211. This will happen if we failed to + * deactivate the link but mac80211 roll back the + * deactivation of the link. + * Delete the stale data to avoid issues later on. + */ + iwl_mvm_mld_free_sta_link(mvm, mvm_sta, mvm_link_sta, + link_id, false); + } + } +} + static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm) { iwl_mvm_stop_device(mvm); @@ -1150,6 +1183,10 @@ static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm) */ ieee80211_iterate_interfaces(mvm->hw, 0, iwl_mvm_cleanup_iterator, mvm); + /* cleanup stations as links may be gone after restart */ + ieee80211_iterate_stations_atomic(mvm->hw, + iwl_mvm_cleanup_sta_iterator, mvm); + mvm->p2p_device_vif = NULL; iwl_mvm_reset_phy_ctxts(mvm); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c index 3b2875f2cab7..d20aa639eea5 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-sta.c @@ -515,11 +515,11 @@ static int iwl_mvm_mld_cfg_sta(struct iwl_mvm *mvm, struct ieee80211_sta *sta, return iwl_mvm_mld_send_sta_cmd(mvm, &cmd); } -static void iwl_mvm_mld_free_sta_link(struct iwl_mvm *mvm, - struct iwl_mvm_sta *mvm_sta, - struct iwl_mvm_link_sta *mvm_sta_link, - unsigned int link_id, - bool is_in_fw) +void iwl_mvm_mld_free_sta_link(struct iwl_mvm *mvm, + struct iwl_mvm_sta *mvm_sta, + struct iwl_mvm_link_sta *mvm_sta_link, + unsigned int link_id, + bool is_in_fw) { RCU_INIT_POINTER(mvm->fw_id_to_mac_id[mvm_sta_link->sta_id], is_in_fw ? ERR_PTR(-EINVAL) : NULL); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.h b/drivers/net/wireless/intel/iwlwifi/mvm/sta.h index 264f1f9394b6..754a05a8c189 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.h @@ -662,6 +662,11 @@ int iwl_mvm_mld_update_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct ieee80211_sta *sta); int iwl_mvm_mld_rm_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct ieee80211_sta *sta); +void iwl_mvm_mld_free_sta_link(struct iwl_mvm *mvm, + struct iwl_mvm_sta *mvm_sta, + struct iwl_mvm_link_sta *mvm_sta_link, + unsigned int link_id, + bool is_in_fw); int iwl_mvm_mld_rm_sta_id(struct iwl_mvm *mvm, u8 sta_id); int iwl_mvm_mld_update_sta_links(struct iwl_mvm *mvm, struct ieee80211_vif *vif, From patchwork Sun May 12 04:31:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 797258 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 8EE891BF37 for ; Sun, 12 May 2024 04:31:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488302; cv=none; b=A2qv1n61Bo3xIt9wriRsl9en5pR1vqPWb9iGfqGSQXAdGncRgQHSvvZQ/HANzuvAb0SWdimzeMSe+b0IQa3/xRB7Nw6nB6qKPZfEMjoyn/3qRuuhwXZtp2ASQGxN5oV71HT5dQzBu62aTpLE8Hb0wwfAx6nAkqLX95m9NM+ODvE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488302; c=relaxed/simple; bh=Jam9qhvpJ3uN0qNGyqg9b5MfIYbwsvwj2oMgIwDqeJ8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=NAENhi5D4pKzC4er7mH2QOiW5TLoOjtC/rRajMVoriKCjZ3ECYuMIsEf2pYdDeukMCz1/tZw9u30pKCtijY0lVwG0uckVF5NINaq2l5DTyrVwCVSkSuWePPwJdGQYqL7c/spZUfNEFKmO5lrkRHykKpTp6D8RQIMn28J1D3A8Js= 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=iFsuFXnT; arc=none smtp.client-ip=192.198.163.17 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="iFsuFXnT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488300; x=1747024300; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Jam9qhvpJ3uN0qNGyqg9b5MfIYbwsvwj2oMgIwDqeJ8=; b=iFsuFXnTLh2JJCvgRxwe02o4Eu7+R3b+oiamatil5VvqbL/vGworEqLa 9JBhHlPighf6n+t4YeyybQPx5/6a+mUJqfTJisK1xZdZomnt9/8jySfLs v74AAq3BwS2OzBmJBiP2XUKNkalLmdpZKKivhqSaFXChtTU9Ef8MUp1L9 Jj7qCWxZbo7wxKe/GO1un/qiIHW6gt3o9shUR3hIR7YhUOWdQvbQpIu3c ectDOjQRKreOfHCjCznnz2Jz6/4Iw/LmKSQynHJlwMOsfL9AGCR3Vgctv AGZrrxkx4+3X59gtfm7yKnDNyQewcwCrT8qivT4xEjBy/OdZBMelGxsLx w==; X-CSE-ConnectionGUID: u2+MECG4RVCRmyYA2B6Gqw== X-CSE-MsgGUID: Zmg/l6LxR6O1dqzyo8OKXw== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323861" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323861" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:40 -0700 X-CSE-ConnectionGUID: eTv2hWD/RKCXlMH++CdeRw== X-CSE-MsgGUID: MA1gnJDfRRGIk9Oh9U+MMA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532175" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:39 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach , Johannes Berg Subject: [PATCH 11/16] wifi: iwlwifi: always print the firmware version in hex Date: Sun, 12 May 2024 07:31:05 +0300 Message-Id: <20240512072733.cae4c562b2c3.I5043383bd0e81f872c55046afd2c6560f482c8e0@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-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 All our firmware versions should now be printed in hex. Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c index d156a9c64194..249dfd207fcf 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-drv.c @@ -982,16 +982,10 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv, minor = le32_to_cpup(ptr++); local_comp = le32_to_cpup(ptr); - if (major >= 35) - snprintf(drv->fw.fw_version, - sizeof(drv->fw.fw_version), - "%u.%08x.%u %s", major, minor, - local_comp, iwl_reduced_fw_name(drv)); - else - snprintf(drv->fw.fw_version, - sizeof(drv->fw.fw_version), - "%u.%u.%u %s", major, minor, - local_comp, iwl_reduced_fw_name(drv)); + snprintf(drv->fw.fw_version, + sizeof(drv->fw.fw_version), + "%u.%08x.%u %s", major, minor, + local_comp, iwl_reduced_fw_name(drv)); break; } case IWL_UCODE_TLV_FW_DBG_DEST: { From patchwork Sun May 12 04:31:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796461 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 1A9D01C6A4 for ; Sun, 12 May 2024 04:31:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488303; cv=none; b=nwN5tGQBrrYc9o7iOhGNOhr3pbnBtBr0yUbUlX7MfY9cvY3CTO2lcwNzTqsVYDvL9bLQu5qViUc4eMjfrEVhhBKIO2Hqr8qFKOGXFOnRgAmxyfOGAC+QzJ64DVqiZ8Y96dNQNbscQ0b5tngkb//X6UzMjt29G2nG/iL+nXx5w34= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488303; c=relaxed/simple; bh=ksVa0Ef3eC9TXL960tkBKyziQJhrCRCCT3YXc2d65F4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Id1Rpjw197ecnXWVbU3e/nItZ1bIecAGu6nOsr3YdSpN6PN3YdMfzrBWXtDq0tZDNo/PAz8DsLlA6eH+6U39GzOBRm1aF2jMycXHgmhJoMcDdQSNwjvjS8FbcR8ZPZ+mSV+gPGXJ7JAXlVNSSSBPDP813ZxYGQf0iIGmQI67AUo= 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=A06+hTwP; arc=none smtp.client-ip=192.198.163.17 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="A06+hTwP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488302; x=1747024302; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ksVa0Ef3eC9TXL960tkBKyziQJhrCRCCT3YXc2d65F4=; b=A06+hTwPwgIksYKWoPuFZLA6dsr10VTt72ApcY/Gae7oU0uFZHqlAP8q TSIloVzYlz3DtiZcnCEB5Z7RxLMxyL8kYA2DRs0Y7SQCdra+HXYd8+2j0 MFO4JnY1SOFM9WgAM9Tkjm5bj/1nO4A/GHfLx0KeXAMdSoeod1ocRYqyO 8U8ZYg+sdI/TxKIYKcLvHQgh8+JiQ78mJCsifOmxqV/NN35xcZ59dp46l tMd32kWolYZxzgm4d98W9xZCjWd3xMOdXZpD2ab8fbpDV5t+s99VyISUm xt/69wSDAngR7nbdDpNJt/eV3ZhqfpdEIA7qrbV7nfJjouujJCwFNENnp Q==; X-CSE-ConnectionGUID: jLjKJsqHQTiUeIgXCyrc5g== X-CSE-MsgGUID: nno44ic/RJa9ZW4A2lSHYg== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323863" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323863" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:42 -0700 X-CSE-ConnectionGUID: xMMmjbTsT9Si3/DTtL225A== X-CSE-MsgGUID: jAn9wcx+QKO5GGXv6Fl8pw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532180" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:40 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach , Johannes Berg Subject: [PATCH 12/16] wifi: iwlwifi: mvm: fix a crash on 7265 Date: Sun, 12 May 2024 07:31:06 +0300 Message-Id: <20240512072733.eb20ff5050d3.Ie4fc6f5496cd296fd6ff20d15e98676f28a3cccd@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-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 Since IWL_FW_CMD_VER_UNKNOWN = 99, then my change to consider cmd_ver >= 7 instead of cmd_ver = 7 included also firmwares that don't advertise the command version at all. This made us send a command with a bad size and because of that, the firmware hit a BAD_COMMAND immediately after handling the REDUCE_TX_POWER_CMD command. Fixes: 8f892e225f41 ("wifi: iwlwifi: mvm: support iwl_dev_tx_power_cmd_v8") Signed-off-by: Emmanuel Grumbach Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index e7f5978ef2d7..ca7fcae6995e 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -895,8 +895,8 @@ int iwl_mvm_sar_select_profile(struct iwl_mvm *mvm, int prof_a, int prof_b) int ret; u16 len = 0; u32 n_subbands; - u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, - IWL_FW_CMD_VER_UNKNOWN); + u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, 3); + if (cmd_ver >= 7) { len = sizeof(cmd.v7); n_subbands = IWL_NUM_SUB_BANDS_V2; From patchwork Sun May 12 04:31:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 797257 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 8EA6F1CAAF for ; Sun, 12 May 2024 04:31:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488305; cv=none; b=Va6VjDb7kOJwG+EGTkNs0mUkU66TfC5RYUdf3FQGCWeqhGrw6mh5+uO4LeRaArFEFdBxpWq3uXR0WZFVSQfQKKrW7zwqXvENa6oUFaoGGKNAjG0O/7dtXX0T8ECBUY4fQ4xiJWPjmWHhwSIVFF+0RHTq2EFy07rpPzlNSyRjd4A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488305; c=relaxed/simple; bh=wOQxW2LdvztdWJbk2efwWJDEqDHxFJ7VbJ3xuJna98w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=OR1zaqbbQoJDa7VB3tkmoNJ77hhMzD9zv1DZoCkg8KGCU2VFstzLpi+igKK7boTMZDByVBKIjvcyNvZ/0jXaCmid0cSc7pGLceAHWI0tAaZ47j+EqVAN5np3MafcTNWGGNI9+jb5dq5/tgQL48TOg91qMSqCRpt+ENb8LqkO6P4= 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=JMVujXq5; arc=none smtp.client-ip=192.198.163.17 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="JMVujXq5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488303; x=1747024303; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wOQxW2LdvztdWJbk2efwWJDEqDHxFJ7VbJ3xuJna98w=; b=JMVujXq5DUKiAjOCckMi33q4P9Ncy/HA4hyUPjsrGoFyZxtV4fR2GWM3 l3Ci2JzUh4gaY6LXd/F8HGvd1cwGZjuTgZDpGuEj/FjXmnHs6ydIB0jgC yplnPLrRJx5xHfme3wj5FLmiSu9xcYbVreITOMUKnRyg54DQWIXoAiWz/ H0szlERceTPhInWYhOz+eYKfQjn8lfj4oZuA/nXLJD41ngESJpGiq3IKo D9YDvkBUtbkuV7Ophgl/SX6SshEY/qjOutHdzg/GkyKbw/9Dfr6a3bE0b vno7vn96lTHHIPJYGn2FtuHKbyvwEMgF+chvwRrYxM0i/dTo7ARXrZEzd A==; X-CSE-ConnectionGUID: b7XX8QppR56ch+mH8guokQ== X-CSE-MsgGUID: ukhrtrRpSjq8OzPdrWBkyg== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323866" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323866" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:43 -0700 X-CSE-ConnectionGUID: 1rzcfEnTTUiIGyOZZofAkQ== X-CSE-MsgGUID: a7rzdvVuQ2ezFvvSJ4JzQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532187" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:42 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 13/16] wifi: iwlwifi: mvm: don't track used links separately Date: Sun, 12 May 2024 07:31:07 +0300 Message-Id: <20240512072733.1a67d8af815f.Ie642c12dce3ab55c688abd9a25918569e83e558a@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-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 track which link is using which FW link ID, so there really isn't a need to separately track which link IDs are in use. Remove that code and check the table when looking for a new link ID to use. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 -- drivers/net/wireless/intel/iwlwifi/mvm/link.c | 22 +++++-------------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 - 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index ca7fcae6995e..87cc1471dfdd 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -1499,8 +1499,6 @@ int iwl_mvm_up(struct iwl_mvm *mvm) for (i = 0; i < IWL_MVM_FW_MAX_LINK_ID + 1; i++) RCU_INIT_POINTER(mvm->link_id_to_link_conf[i], NULL); - memset(&mvm->fw_link_ids_map, 0, sizeof(mvm->fw_link_ids_map)); - mvm->tdls_cs.peer.sta_id = IWL_MVM_INVALID_STA; /* reset quota debouncing buffer - 0xff will yield invalid data */ diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c index 6ec9a8e21a34..14dab617c0bd 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c @@ -50,26 +50,15 @@ static void iwl_mvm_print_esr_state(struct iwl_mvm *mvm, u32 mask) static u32 iwl_mvm_get_free_fw_link_id(struct iwl_mvm *mvm, struct iwl_mvm_vif *mvm_vif) { - u32 link_id; + u32 i; lockdep_assert_held(&mvm->mutex); - link_id = ffz(mvm->fw_link_ids_map); + for (i = 0; i < ARRAY_SIZE(mvm->link_id_to_link_conf); i++) + if (!rcu_access_pointer(mvm->link_id_to_link_conf[i])) + return i; - /* this case can happen if there're deactivated but not removed links */ - if (link_id > IWL_MVM_FW_MAX_LINK_ID) - return IWL_MVM_FW_LINK_ID_INVALID; - - mvm->fw_link_ids_map |= BIT(link_id); - return link_id; -} - -static void iwl_mvm_release_fw_link_id(struct iwl_mvm *mvm, u32 link_id) -{ - lockdep_assert_held(&mvm->mutex); - - if (!WARN_ON(link_id > IWL_MVM_FW_MAX_LINK_ID)) - mvm->fw_link_ids_map &= ~BIT(link_id); + return IWL_MVM_FW_LINK_ID_INVALID; } static int iwl_mvm_link_cmd_send(struct iwl_mvm *mvm, @@ -380,7 +369,6 @@ int iwl_mvm_unset_link_mapping(struct iwl_mvm *mvm, struct ieee80211_vif *vif, RCU_INIT_POINTER(mvm->link_id_to_link_conf[link_info->fw_link_id], NULL); - iwl_mvm_release_fw_link_id(mvm, link_info->fw_link_id); return 0; } diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index ca1c5944da67..d732780aae5f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -1043,7 +1043,6 @@ struct iwl_mvm { struct iwl_rx_phy_info last_phy_info; struct ieee80211_sta __rcu *fw_id_to_mac_id[IWL_MVM_STATION_COUNT_MAX]; struct ieee80211_link_sta __rcu *fw_id_to_link_sta[IWL_MVM_STATION_COUNT_MAX]; - unsigned long fw_link_ids_map; u8 rx_ba_sessions; /* configured by mac80211 */ From patchwork Sun May 12 04:31:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796460 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 C9FDD1E4B0 for ; Sun, 12 May 2024 04:31:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488307; cv=none; b=uPJoDi0Tp3uxddcJzSAi/3ZK3o6bNfauM/WacBm7VO6f48kT1G6vEi/SyDUQ5XBBnkOIUfxn+kJQFcpTqK7+d2Qva0eMbqn6ouFrCMv5qmaHaR/tcAHZxwCUMYcBhGUvi2QnhHW1G4PwPQPf6574ntEBqDfAw+iU/twSjlnLAv4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488307; c=relaxed/simple; bh=dDFCy/3W4Gm9FhtPzS4rE0ksb5M0igjNp+kgIjWUsyY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gDjYQQO71ys/qhF0jGDq+saGNzNuSoPzyBQrrpipPrGtjPB56CCGErPjbBEX2Ts5I3VzhizonKfY93Tbz+LhWv6Y8JQKFNtpFFOF8PC+8RPVuaWYkxURBHvg/Yp0ow82b0O/c4Dra9VpWmWduMxyMfMkKZXD+sxFtgCVIKCfsag= 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=d3jZax+E; arc=none smtp.client-ip=192.198.163.17 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="d3jZax+E" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488306; x=1747024306; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dDFCy/3W4Gm9FhtPzS4rE0ksb5M0igjNp+kgIjWUsyY=; b=d3jZax+Er4tFvFWvJ465/k3jzZ/buIQDYRZdOCKWcuInc2ClABs1g6Wt RF0fSx7qyiXhQ7t2DNubtYdE6zth8HiG3IqQBJ//ZdnB3f55h5RWM99WO ftrUkdIncR4MbOjexHsYgUXwN4EMgyb57qs0FS+j3QPRnkLHVi+MTVjQk zzaOx6TSIyUBIt9bp3T7VP2vNNcYPQfcJGaQr7cFIxnTRwJdhGUFwTI7O KvIyCC0MK3JyGM1QmWp0TvYpIoFpMDyO7R4alrZLh7rauZG1bHiWJCM5e VYQHqOtp+tdHBZZ7QT9yMO9X7vqMaqnKa2sRFeiAAL+Vqqr4KiumWgsXa A==; X-CSE-ConnectionGUID: RyEi8sVXSnmyxBRx7Aen+Q== X-CSE-MsgGUID: VWShgQiyRrCjxUYSkQxxJw== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323870" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323870" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:45 -0700 X-CSE-ConnectionGUID: SJzu38AQR6y9icpiF7tEbg== X-CSE-MsgGUID: abcTtjArQk23779tqmc7cw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532196" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:43 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg Subject: [PATCH 14/16] wifi: iwlwifi: mvm: use vif P2P type helper Date: Sun, 12 May 2024 07:31:08 +0300 Message-Id: <20240512072733.15a00a812c1b.I5ffee795d960c9beda46a934f5b4c70acde112f9@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-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 Use ieee80211_vif_type_p2p instead of checking for IFTYPE_AP in combination with vif->p2p. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c index a7ec172eeade..695b5ba3d023 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/scan.c @@ -208,7 +208,7 @@ static void iwl_mvm_scan_iterator(void *_data, u8 *mac, curr_mvmvif = iwl_mvm_vif_from_mac80211(data->current_vif); - if (vif->type == NL80211_IFTYPE_AP && vif->p2p && + if (ieee80211_vif_type_p2p(vif) == NL80211_IFTYPE_P2P_GO && mvmvif->deflink.phy_ctxt && curr_mvmvif->deflink.phy_ctxt && mvmvif->deflink.phy_ctxt->id != curr_mvmvif->deflink.phy_ctxt->id) data->is_dcm_with_p2p_go = true; @@ -2875,7 +2875,7 @@ static void iwl_mvm_scan_respect_p2p_go_iter(void *_data, u8 *mac, if (vif == data->current_vif) return; - if (vif->type == NL80211_IFTYPE_AP && vif->p2p) { + if (ieee80211_vif_type_p2p(vif) == NL80211_IFTYPE_P2P_GO) { u32 link_id; for (link_id = 0; From patchwork Sun May 12 04:31:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 797256 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 23A0D1EB37 for ; Sun, 12 May 2024 04:31:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488308; cv=none; b=bmmeKcd301LxH+sI0qlr4rQcyasIdXItvMvzgAnMph0faZatPRd6SCaZbYcwZ9dqGQ5ATM+cqUz+29I1VZEtxmrHlUfQ+gwQGkWFe/OkBxkr+X9sHmhLC00pG3XWKkDO3sD1YrvfRpME13oBmWFd/NR+6/Kx+MG7UnVHk0NGxdM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488308; c=relaxed/simple; bh=t0K/uWPQqJua7x7knKr97pAvGWy1B5d06Qre1Rxe+1g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=W6DXtOo93GyTyHx1q0pvfUM6JFa4wlGj8XaWEvqkmzYzhNAOSKBch9d8KvpSxM5GRnfRopRr+y3cqTQ9wkGnSsMVN8JZIObNuuTy3Nszh8U1KhI4pwxv9ed5p4k74AR5WjyK5p6/p29LsWgH3x+3j0aFAUxoT7Q39zFlzGjuvJ4= 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=I8L989wx; arc=none smtp.client-ip=192.198.163.17 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="I8L989wx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488307; x=1747024307; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=t0K/uWPQqJua7x7knKr97pAvGWy1B5d06Qre1Rxe+1g=; b=I8L989wxsiTY8NSfDouvy7FK+RWoVHl0GsKA18raUm5pEteOJMQGLmGg Obnr4Oq9ADTLACncyEyu6Laoiq7f2xmHIet4dhortKE4oLwIVoVND1ptB LaMoP+aYfDDkCbdixCZdNTBLiORwnsT1L9c8vof8ywZjTc0do1Fyv9q/l mWsc8eBk63yaDwN2BxyMtYIC4AVU3JyIV2To1nAqiPR7X0fjIywwtzbOa F1Eflc/9KN5CGjm51uZwHl6e9qZUh6Y23BKRqav34sJg6ZMgQNj8I1g43 ZIfMYCgbhU9XPeeMJD7MS0Sunx2hWfnJ5ehh63e/OC20RP8vczoO4t47j A==; X-CSE-ConnectionGUID: mX6TqMb9RBecUYh3aqm17w== X-CSE-MsgGUID: APE2kn/AQjKQCk5NTldl/A== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323872" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323872" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:46 -0700 X-CSE-ConnectionGUID: j5udjB2hQ5GO7rJyQikmbg== X-CSE-MsgGUID: viOr3XYvQD6oODWqXuaOrQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532201" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:45 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Yedidya Benshimol Subject: [PATCH 15/16] wifi: iwlwifi: mvm: Handle BIGTK cipher in kek_kck cmd Date: Sun, 12 May 2024 07:31:09 +0300 Message-Id: <20240512072733.f429f618a46b.Ie9b581652b74bd7806980364d59e1b2e78e682c0@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-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 The BIGTK cipher field was added to the kek_kck_material_cmd but wasn't assigned. Fix that by differentiating between the IGTK/BIGTK keys and assign the ciphers fields accordingly. Signed-off-by: Yedidya Benshimol Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 0f954e506d62..00dadd133ed3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -595,6 +595,12 @@ static void iwl_mvm_wowlan_gtk_type_iter(struct ieee80211_hw *hw, void *_data) { struct wowlan_key_gtk_type_iter *data = _data; + __le32 *cipher = NULL; + + if (key->keyidx == 4 || key->keyidx == 5) + cipher = &data->kek_kck_cmd->igtk_cipher; + if (key->keyidx == 6 || key->keyidx == 7) + cipher = &data->kek_kck_cmd->bigtk_cipher; switch (key->cipher) { default: @@ -606,10 +612,13 @@ static void iwl_mvm_wowlan_gtk_type_iter(struct ieee80211_hw *hw, return; case WLAN_CIPHER_SUITE_BIP_GMAC_256: case WLAN_CIPHER_SUITE_BIP_GMAC_128: - data->kek_kck_cmd->igtk_cipher = cpu_to_le32(STA_KEY_FLG_GCMP); + if (cipher) + *cipher = cpu_to_le32(STA_KEY_FLG_GCMP); return; case WLAN_CIPHER_SUITE_AES_CMAC: - data->kek_kck_cmd->igtk_cipher = cpu_to_le32(STA_KEY_FLG_CCM); + case WLAN_CIPHER_SUITE_BIP_CMAC_256: + if (cipher) + *cipher = cpu_to_le32(STA_KEY_FLG_CCM); return; case WLAN_CIPHER_SUITE_CCMP: if (!sta) From patchwork Sun May 12 04:31:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 796459 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) (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 D64511F959 for ; Sun, 12 May 2024 04:31:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.17 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488309; cv=none; b=P3lUZgMKK0ivam/ixjq1h+7s4RxcYq1e68NGH/W+N7VgjMvQOqLbI6RrDs774EQr9L5z331Y5bA/m89tZInQUI4SLmHLfpZqOFHKyD+i8A61rq5YPf2++oV1cL4yKx6ZOy0DnFm0CV9qqjUpXSiuHGUt8uw3cONyFuFK4ttZCBg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715488309; c=relaxed/simple; bh=3VJUCJqEs2rPcnRDSaANpvGy3JYTuwoLNHQEGLVQ0xo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=AJLPUJxMjupX/vLXWGjyLvvojHsUpq9Zn+BvifF6bqTkHhkiC268r+gqM3bkzht+OI/BKCAxzDw3U56ahJGiDrY85K4ZVQzyaMFYXnBbhMBcEb+BHoBhltZZaFQE8ECDSUl5X0Izg36nMlfF6DE7nTJ6MQL2OeG71DkDtAEGFkw= 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=fafDqpBL; arc=none smtp.client-ip=192.198.163.17 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="fafDqpBL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715488308; x=1747024308; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3VJUCJqEs2rPcnRDSaANpvGy3JYTuwoLNHQEGLVQ0xo=; b=fafDqpBLLDjh9CxlCEVYpz43kH9o9NWMZy2NMSv2ehRJNS97vqOe0JdE PgTX+eA/RyfMWSAY86dmM00wVEX393vLsqA9E3yf9zAHZXklcjDDD2VwY ezyh8ZGBpy0WI5U2sq5Qh7mOgsYbsU0oo6pEhAceNYiDzIzvrfgDhbQ2h dVILv3zRBEJ6aS9n8KqqGx21HabOu6BIFAJBeQ2e/HAg4tI7OKiy5o//a RgtmhHFc/zcg17K82fvCjvojyI4pFCLZH13Lw0whZMSZ6Gbwsgm2eTTTq fvIGXTYoxKywnV4RHcUtWmIbu4f3PvXiGRWfFmfiH8Q1Y3rXBUcO9BnQA g==; X-CSE-ConnectionGUID: z5ig2rr5QA21NYWIr17ykQ== X-CSE-MsgGUID: N8+3WQDiSraH8TltalqE8A== X-IronPort-AV: E=McAfee;i="6600,9927,11070"; a="11323874" X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="11323874" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:48 -0700 X-CSE-ConnectionGUID: cEFgAoTRQR2hBdoKJX3N8g== X-CSE-MsgGUID: fPZj83moR8CkJJS5bl4oug== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,155,1712646000"; d="scan'208";a="34532204" Received: from weis0040.iil.intel.com ([10.12.217.108]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2024 21:31:46 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 16/16] wifi: iwlwifi: mvm: disable dynamic EMLSR when AUTO_EML is false Date: Sun, 12 May 2024 07:31:10 +0300 Message-Id: <20240512072733.10a0b5da6ec2.I46fd578a3ef6cdbf14fdc4dfa97b4be008fe68e3@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240512043110.3413383-1-miriam.rachel.korenblit@intel.com> References: <20240512043110.3413383-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 AUTO_EML is set to false, this change ignores the exit criteria, for testing purposes. Currently, if AUTO_EML is disabled, the driver will not select a link or enter EMLSR, but will still exit if one of the criteria is not fulfilled. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg --- drivers/net/wireless/intel/iwlwifi/mvm/link.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c index 14dab617c0bd..fd8a21891d26 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c @@ -966,6 +966,9 @@ void iwl_mvm_exit_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif, lockdep_assert_held(&mvm->mutex); + if (!IWL_MVM_AUTO_EML_ENABLE) + return; + /* Nothing to do */ if (!mvmvif->esr_active) return; @@ -1013,6 +1016,9 @@ void iwl_mvm_block_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif, lockdep_assert_held(&mvm->mutex); + if (!IWL_MVM_AUTO_EML_ENABLE) + return; + /* This should be called only with disable reasons */ if (WARN_ON(!(reason & IWL_MVM_BLOCK_ESR_REASONS))) return; @@ -1099,6 +1105,9 @@ void iwl_mvm_unblock_esr(struct iwl_mvm *mvm, struct ieee80211_vif *vif, lockdep_assert_held(&mvm->mutex); + if (!IWL_MVM_AUTO_EML_ENABLE) + return; + /* This should be called only with disable reasons */ if (WARN_ON(!(reason & IWL_MVM_BLOCK_ESR_REASONS))) return;