From patchwork Tue Jun 18 16:44:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13702726 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6190B13C674 for ; Tue, 18 Jun 2024 16:44:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729067; cv=none; b=Y3lw1EmaKg7bJ46j6Wgc9pdbXMPKX3cu36AqbQRk+no5rmQ8/d78lhjRCQtB9Ph5gBLz1D7hHkjgxUOYnCWK/J42svQtdOU6xQiHzrk+OSu2XYBBZ3w1AXrU4moCkRegzAB6QaM+XTnRphWXXSFFcT2AmJwnBXATbFFlejEFbas= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729067; c=relaxed/simple; bh=dnsPCnoP48ahpUkMbaJr4nLD///1EeJGIkPTTg4t8K8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=KqYnUR782M+eyYR8Ng8LCwxLXfhlBRbnCzpQJuxWNuo48mk5puxYE37HPszTPvigju5f0YvzN8uVSpauepqdtEWejS9ThgvBuur5u3X/9L1F8IO12nOt6+F3SGb0ebQpbYRrYFwu9QVdStcWdXH2lGvf9/cgxhppHVlhO+NahO0= 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=dFlU20IJ; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="dFlU20IJ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718729065; x=1750265065; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dnsPCnoP48ahpUkMbaJr4nLD///1EeJGIkPTTg4t8K8=; b=dFlU20IJziPo5ljj3Pk1z7cafJJuBE4yZm8RNLWnrIpYjht5u63kQ27C QeAGScgcnG1Z8NP+LPS5+UukPfT2vUteRhLo/Z2/mnLy4Jbq7aup/jt1O dyDben0oLNuerw21jO2nuXWSpLKcBhIN7pJFPX5CllHY5CwHyTNF9Z4ox Dp3hrGfotz4l/uLey+3lnkvwWlCl2jQ8DwI2uetI09wQ/6+37XIGglPwx bWbNdr+2/Mrrog7YrWd85l6jT5L5ZyaKpUXw11KY9ckZcRGadVz9/uKoR BROBYLhMAlOUkLQZYiVjR7DlBwv64/6UvRD+5YIgfLditXKGWt5rfARkn w==; X-CSE-ConnectionGUID: nUb2bIURRNqkMBB5d61zsw== X-CSE-MsgGUID: tKbnSuv5RUGFV5vs0k3IAw== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26257164" X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="26257164" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:24 -0700 X-CSE-ConnectionGUID: DShJ/lK9QsiAQU/HHDFxUg== X-CSE-MsgGUID: e6GQg5mgQ8qgx6v3kP4DiA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="42306500" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:23 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 01/11] wifi: iwlwifi: support fast resume Date: Tue, 18 Jun 2024 19:44:03 +0300 Message-Id: <20240618194245.03b8d2801044.I613d17c712de7a0d611cde4e14f37ebbe0c3c964@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240618164413.2416719-1-miriam.rachel.korenblit@intel.com> References: <20240618164413.2416719-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Emmanuel Grumbach This will allow to suspend / resume the system without resetting the firmware. This will allow to reduce the resume time. In case the fast_resume fails, stop the device and bring it up from scratch. Raise the timeout for the D3_END notification since in some iterations, it took 240ms. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 85 +++++++++++++++++-- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 40 ++++++++- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 14 ++- drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 2 +- 4 files changed, 130 insertions(+), 11 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index 54f4acbbd05b..b4d650583ac2 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -2493,6 +2493,9 @@ static void iwl_mvm_parse_wowlan_info_notif(struct iwl_mvm *mvm, return; } + if (mvm->fast_resume) + return; + iwl_mvm_convert_key_counters_v5(status, &data->gtk[0].sc); iwl_mvm_convert_gtk_v3(status, data->gtk); iwl_mvm_convert_igtk(status, &data->igtk[0]); @@ -3049,7 +3052,7 @@ static bool iwl_mvm_check_rt_status(struct iwl_mvm *mvm, if (iwl_mvm_rt_status(mvm->trans, mvm->trans->dbg.lmac_error_event_table[0], &err_id)) { - if (err_id == RF_KILL_INDICATOR_FOR_WOWLAN) { + if (err_id == RF_KILL_INDICATOR_FOR_WOWLAN && vif) { struct cfg80211_wowlan_wakeup wakeup = { .rfkill_release = true, }; @@ -3366,7 +3369,7 @@ static int iwl_mvm_resume_firmware(struct iwl_mvm *mvm, bool test) return ret; } -#define IWL_MVM_D3_NOTIF_TIMEOUT (HZ / 5) +#define IWL_MVM_D3_NOTIF_TIMEOUT (HZ / 3) static int iwl_mvm_d3_notif_wait(struct iwl_mvm *mvm, struct iwl_d3_data *d3_data) @@ -3377,12 +3380,22 @@ static int iwl_mvm_d3_notif_wait(struct iwl_mvm *mvm, WIDE_ID(SCAN_GROUP, OFFLOAD_MATCH_INFO_NOTIF), WIDE_ID(PROT_OFFLOAD_GROUP, D3_END_NOTIFICATION) }; + static const u16 d3_fast_resume_notif[] = { + WIDE_ID(PROT_OFFLOAD_GROUP, D3_END_NOTIFICATION) + }; struct iwl_notification_wait wait_d3_notif; int ret; - iwl_init_notification_wait(&mvm->notif_wait, &wait_d3_notif, - d3_resume_notif, ARRAY_SIZE(d3_resume_notif), - iwl_mvm_wait_d3_notif, d3_data); + if (mvm->fast_resume) + iwl_init_notification_wait(&mvm->notif_wait, &wait_d3_notif, + d3_fast_resume_notif, + ARRAY_SIZE(d3_fast_resume_notif), + iwl_mvm_wait_d3_notif, d3_data); + else + iwl_init_notification_wait(&mvm->notif_wait, &wait_d3_notif, + d3_resume_notif, + ARRAY_SIZE(d3_resume_notif), + iwl_mvm_wait_d3_notif, d3_data); ret = iwl_mvm_resume_firmware(mvm, d3_data->test); if (ret) { @@ -3567,6 +3580,68 @@ void iwl_mvm_set_wakeup(struct ieee80211_hw *hw, bool enabled) device_set_wakeup_enable(mvm->trans->dev, enabled); } +void iwl_mvm_fast_suspend(struct iwl_mvm *mvm) +{ + struct iwl_d3_manager_config d3_cfg_cmd_data = {}; + int ret; + + lockdep_assert_held(&mvm->mutex); + + IWL_DEBUG_WOWLAN(mvm, "Starting fast suspend flow\n"); + + mvm->fast_resume = true; + set_bit(IWL_MVM_STATUS_IN_D3, &mvm->status); + + WARN_ON(iwl_mvm_power_update_device(mvm)); + mvm->trans->system_pm_mode = IWL_PLAT_PM_MODE_D3; + ret = iwl_mvm_send_cmd_pdu(mvm, D3_CONFIG_CMD, CMD_SEND_IN_D3, + sizeof(d3_cfg_cmd_data), &d3_cfg_cmd_data); + if (ret) + IWL_ERR(mvm, + "fast suspend: couldn't send D3_CONFIG_CMD %d\n", ret); + + WARN_ON(iwl_mvm_power_update_mac(mvm)); + + ret = iwl_trans_d3_suspend(mvm->trans, false, false); + if (ret) + IWL_ERR(mvm, "fast suspend: trans_d3_suspend failed %d\n", ret); +} + +int iwl_mvm_fast_resume(struct iwl_mvm *mvm) +{ + struct iwl_d3_data d3_data = { + .notif_expected = + IWL_D3_NOTIF_D3_END_NOTIF, + }; + int ret; + + lockdep_assert_held(&mvm->mutex); + + IWL_DEBUG_WOWLAN(mvm, "Starting the fast resume flow\n"); + + mvm->last_reset_or_resume_time_jiffies = jiffies; + iwl_fw_dbg_read_d3_debug_data(&mvm->fwrt); + + if (iwl_mvm_check_rt_status(mvm, NULL)) { + set_bit(STATUS_FW_ERROR, &mvm->trans->status); + iwl_mvm_dump_nic_error_log(mvm); + iwl_dbg_tlv_time_point(&mvm->fwrt, + IWL_FW_INI_TIME_POINT_FW_ASSERT, NULL); + iwl_fw_dbg_collect_desc(&mvm->fwrt, &iwl_dump_desc_assert, + false, 0); + return -ENODEV; + } + ret = iwl_mvm_d3_notif_wait(mvm, &d3_data); + clear_bit(IWL_MVM_STATUS_IN_D3, &mvm->status); + mvm->trans->system_pm_mode = IWL_PLAT_PM_MODE_DISABLED; + mvm->fast_resume = false; + + if (ret) + IWL_ERR(mvm, "Couldn't get the d3 notif %d\n", ret); + + return ret; +} + #ifdef CONFIG_IWLWIFI_DEBUGFS static int iwl_mvm_d3_test_open(struct inode *inode, struct file *file) { diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 896e560f5a82..df2f121aff55 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -1209,6 +1209,7 @@ static void iwl_mvm_restart_cleanup(struct iwl_mvm *mvm) int __iwl_mvm_mac_start(struct iwl_mvm *mvm) { + bool fast_resume = false; int ret; lockdep_assert_held(&mvm->mutex); @@ -1234,6 +1235,30 @@ int __iwl_mvm_mac_start(struct iwl_mvm *mvm) mvm->nvm_data = NULL; } +#ifdef CONFIG_PM + /* fast_resume will be cleared by iwl_mvm_fast_resume */ + fast_resume = mvm->fast_resume; + + if (fast_resume) { + ret = iwl_mvm_fast_resume(mvm); + if (ret) { + iwl_mvm_stop_device(mvm); + /* iwl_mvm_up() will be called further down */ + } else { + /* + * We clear IWL_MVM_STATUS_FIRMWARE_RUNNING upon + * mac_down() so that debugfs will stop honoring + * requests after we flush all the workers. + * Set the IWL_MVM_STATUS_FIRMWARE_RUNNING bit again + * now that we are back. This is a bit abusing the + * flag since the firmware wasn't really ever stopped, + * but this still serves the purpose. + */ + set_bit(IWL_MVM_STATUS_FIRMWARE_RUNNING, &mvm->status); + } + } +#endif /* CONFIG_PM */ + if (test_bit(IWL_MVM_STATUS_HW_RESTART_REQUESTED, &mvm->status)) { /* * Now convert the HW_RESTART_REQUESTED flag to IN_HW_RESTART @@ -1244,7 +1269,10 @@ int __iwl_mvm_mac_start(struct iwl_mvm *mvm) /* Clean up some internal and mac80211 state on restart */ iwl_mvm_restart_cleanup(mvm); } - ret = iwl_mvm_up(mvm); + + /* we also want to load the firmware if fast_resume failed */ + if (!fast_resume || ret) + ret = iwl_mvm_up(mvm); iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_POST_INIT, NULL); @@ -1327,7 +1355,7 @@ void iwl_mvm_mac_reconfig_complete(struct ieee80211_hw *hw, } } -void __iwl_mvm_mac_stop(struct iwl_mvm *mvm) +void __iwl_mvm_mac_stop(struct iwl_mvm *mvm, bool suspend) { lockdep_assert_held(&mvm->mutex); @@ -1343,7 +1371,11 @@ void __iwl_mvm_mac_stop(struct iwl_mvm *mvm) if (!iwl_mvm_has_new_station_api(mvm->fw)) iwl_mvm_rm_aux_sta(mvm); - iwl_mvm_stop_device(mvm); + if (suspend && + mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) + iwl_mvm_fast_suspend(mvm); + else + iwl_mvm_stop_device(mvm); iwl_mvm_async_handlers_purge(mvm); /* async_handlers_list is empty and will stay empty: HW is stopped */ @@ -1412,7 +1444,7 @@ void iwl_mvm_mac_stop(struct ieee80211_hw *hw, bool suspend) iwl_mvm_mei_set_sw_rfkill_state(mvm); mutex_lock(&mvm->mutex); - __iwl_mvm_mac_stop(mvm); + __iwl_mvm_mac_stop(mvm, suspend); mutex_unlock(&mvm->mutex); /* diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 54c3553db219..a57f4738a8c8 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -1161,6 +1161,7 @@ struct iwl_mvm { struct ieee80211_channel **nd_channels; int n_nd_channels; bool net_detect; + bool fast_resume; u8 offload_tid; #ifdef CONFIG_IWLWIFI_DEBUGFS bool d3_wake_sysassert; @@ -1739,7 +1740,7 @@ struct iwl_rate_info { u8 ieee; /* MAC header: IWL_RATE_6M_IEEE, etc. */ }; -void __iwl_mvm_mac_stop(struct iwl_mvm *mvm); +void __iwl_mvm_mac_stop(struct iwl_mvm *mvm, bool suspend); int __iwl_mvm_mac_start(struct iwl_mvm *mvm); /****************** @@ -2261,11 +2262,22 @@ extern const struct file_operations iwl_dbgfs_d3_test_ops; #ifdef CONFIG_PM void iwl_mvm_set_last_nonqos_seq(struct iwl_mvm *mvm, struct ieee80211_vif *vif); +void iwl_mvm_fast_suspend(struct iwl_mvm *mvm); +int iwl_mvm_fast_resume(struct iwl_mvm *mvm); #else static inline void iwl_mvm_set_last_nonqos_seq(struct iwl_mvm *mvm, struct ieee80211_vif *vif) { } + +static inline void iwl_mvm_fast_suspend(struct iwl_mvm *mvm) +{ +} + +static inline int iwl_mvm_fast_resume(struct iwl_mvm *mvm) +{ + return 0; +} #endif void iwl_mvm_set_wowlan_qos_seq(struct iwl_mvm_sta *mvm_ap_sta, struct iwl_wowlan_config_cmd *cmd); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c index 45b431ffbc97..718184be19b3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tt.c @@ -299,7 +299,7 @@ static void check_exit_ctkill(struct work_struct *work) ret = iwl_mvm_get_temp(mvm, &temp); - __iwl_mvm_mac_stop(mvm); + __iwl_mvm_mac_stop(mvm, false); if (ret) goto reschedule; From patchwork Tue Jun 18 16:44:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13702727 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C93813C807 for ; Tue, 18 Jun 2024 16:44:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729068; cv=none; b=Ip0cB+7dAwA0ILDem0ulKOUtZB9R7FGtPHWxp/uc14Bvbm4v8sArHHwN8sJlCfRJEvZbicfLzuQatup/jliPSMT9vVlobegCMsCXEG4frHt9nZRJX5B6dCB34GMR7SlrjAWJdjcLH78+djneTKFvrN/Vu0+zCsgpz8WYy7QBIxE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729068; c=relaxed/simple; bh=JlCzq2C5AxN42wAMTePATTHirh2nRx1fGe+4k+aJu+Y=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TrAvcC3xoJPFE8eqaCtfVFO/aUq+f575bu9oZbE1sPAirr+//YW4YI3ZQr21hFp0tqrqCcW2E2ydCasPhWZW57UQp8SD8hb6dOuGK6FLLsg9WN/1Y7YW7Pch4RmN0uDA57Z/GJwz3iv6xDpvZImRVTdk9FEC88lom2fGuoYwcaM= 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=nvVCJjt5; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="nvVCJjt5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718729066; x=1750265066; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=JlCzq2C5AxN42wAMTePATTHirh2nRx1fGe+4k+aJu+Y=; b=nvVCJjt5QT3cAgo4MNsFNevKMcCrs0ETU5Wkzxd50+aMOIdWCpqMTeGO U4K1Kkjdz8EUkXl50V71XG/nnxvwNZyyrR5YACzHk1cazASu6egisqDls r9SOIYlg2pMi6NwaIYc+ZyQ6pnEDwC4rd5maYD60wVQwmq6GmXKvQq/C1 /kozVuZqCquqhvGnglMbB5NyjXP6a+eOjgEfoOqQ7O8miQAgx5rP24FVs btMqbdDDAUqvE2dh9a3pX1H5GPR+gqWwY6nXeWjH996t89ZY4rzuuluXK Z8yTMT9TpR9xFEP2IIfwgDUxFsZxV2V5tWOkcsOu5wQidApNGZXwOkVdo w==; X-CSE-ConnectionGUID: ekf2xCp7Rqy4P5RK/5JfsQ== X-CSE-MsgGUID: o6sj3ZimR06zvd5vrjbw2g== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26257169" X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="26257169" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:26 -0700 X-CSE-ConnectionGUID: G0RHw4zCT6ivfGZgqvtk9w== X-CSE-MsgGUID: AJng66LkRkKxU22HsE7F6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="42306507" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:25 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 02/11] wifi: iwlwifi: mvm: remove IWL_MVM_PARSE_NVM Date: Tue, 18 Jun 2024 19:44:04 +0300 Message-Id: <20240618194245.bded22049fae.I980c4a941d769f93cf74bfc90a7d7d9fb384dea1@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240618164413.2416719-1-miriam.rachel.korenblit@intel.com> References: <20240618164413.2416719-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 debug is not in use anymore. Remove it. Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg --- drivers/net/wireless/intel/iwlwifi/mvm/constants.h | 1 - drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 10 +--------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/constants.h b/drivers/net/wireless/intel/iwlwifi/mvm/constants.h index 1abe9e9fd46b..c4c1e67b9ac7 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/constants.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/constants.h @@ -56,7 +56,6 @@ #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_PARSE_NVM 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/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index b8a785032513..36ed08f20f80 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -686,14 +686,6 @@ static int iwl_run_unified_mvm_ucode(struct iwl_mvm *mvm) goto error; } - if (IWL_MVM_PARSE_NVM && !mvm->nvm_data) { - ret = iwl_nvm_init(mvm); - if (ret) { - IWL_ERR(mvm, "Failed to read NVM: %d\n", ret); - goto error; - } - } - ret = iwl_mvm_send_cmd_pdu(mvm, WIDE_ID(REGULATORY_AND_NVM_GROUP, NVM_ACCESS_COMPLETE), CMD_SEND_IN_RFKILL, @@ -718,7 +710,7 @@ static int iwl_run_unified_mvm_ucode(struct iwl_mvm *mvm) return ret; /* Read the NVM only at driver load time, no need to do this twice */ - if (!IWL_MVM_PARSE_NVM && !mvm->nvm_data) { + if (!mvm->nvm_data) { mvm->nvm_data = iwl_get_nvm(mvm->trans, mvm->fw, mvm->set_tx_ant, mvm->set_rx_ant); if (IS_ERR(mvm->nvm_data)) { From patchwork Tue Jun 18 16:44:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13702728 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C72CA13C9CF for ; Tue, 18 Jun 2024 16:44:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729069; cv=none; b=Erivh4GDACP1/SftFitI8Yaghkclgsr+NoLl2VmZeWEY5WpIQNb+RYLuYTeBv0KK0JsRowZNk/Xo0KFLYUh+r7kvp+DQ9YArBZSF2wDTwysk831rYXe3i9zaSDCDfdxJwJGl/LpQTdfzVqTOAs+2hsXW+Qbh0P5duZXM9U2ONRw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729069; c=relaxed/simple; bh=6SW33UqNdIzLG7eqtDXfdldWNFO3cVYy4JFiVxd+rso=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=q8ei/zvKWvzqZUVOVxCf/n7ZONNj2WdUQW6yYP3BZI70Db5dJrlub3/uohMZ6jeYbt1IzniTmAAl6CuL9HSXQWWAJwcWli3JFU1tSPtlfhHbkC7KzDtHXM7gxP8TNwV5UF9Cjz4VxkbzgxxQoo6+ydCYjEzd1WtxHuRIgNvKVVw= 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=YZCNjpjj; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YZCNjpjj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718729067; x=1750265067; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6SW33UqNdIzLG7eqtDXfdldWNFO3cVYy4JFiVxd+rso=; b=YZCNjpjjTjr0SsKlPSaMGi+Zo8IJL0+vF/B8Fepqml1ecalATznmxgo4 AR01LmOzkss4VcBU5/Wr8Gi/huQiW9V4jaiAN5iJIAG/Ft2B5RmtOnQNl md0NgE8Eye6ftApYZkdXFfGjGBhvfIbN1SO6UpLAHrDyhN+NE4MJJjDRO yabzOXIWJFbxDzTskrnIbrjo9eCJnhmjmcUGYgp8QUteI+syVX1A3sNeW h4zv0BnLXcP/mTWwjVPqDsyrBzMTk3Lz2NWOqsFqW+xxrL35zt97LmUHD KZOS4DvIeF1bJzmClf6ez93LVKC6D3dGREHBKoXkNQUfEVZj8Fjx3V4z0 A==; X-CSE-ConnectionGUID: nsfH4PBhQSeUlZb3qrfJ7Q== X-CSE-MsgGUID: 1hJpGv8WRj+7J7QhTq7VsQ== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26257173" X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="26257173" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:27 -0700 X-CSE-ConnectionGUID: 4HSHSG9IQ/6FRkiuQhQxGA== X-CSE-MsgGUID: Apnxrl8hT42P5TXVMxnb+A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="42306512" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:26 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 03/11] wifi: iwlwifi: trans: remove unused function parameter Date: Tue, 18 Jun 2024 19:44:05 +0300 Message-Id: <20240618194245.1aa8bf13aea9.I9662c10c1db545dd8849af4bb4ab47708d4548d8@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240618164413.2416719-1-miriam.rachel.korenblit@intel.com> References: <20240618164413.2416719-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_trans_pcie_gen2_fw_alive doesn't use the scd_addr parameter, it was there only because we needed the functio to have a prototype same as iwl_trans_ops::fw_alive callback. But now the ops is removed so no reason to keep the parameter. Signed-off-by: Miri Korenblit Reviewed-by: Emmanuel Grumbach --- drivers/net/wireless/intel/iwlwifi/iwl-trans.c | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.c b/drivers/net/wireless/intel/iwlwifi/iwl-trans.c index eeee5c35668e..bd21bbe7e7e3 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.c @@ -359,7 +359,7 @@ void iwl_trans_fw_alive(struct iwl_trans *trans, u32 scd_addr) trans->state = IWL_TRANS_FW_ALIVE; if (trans->trans_cfg->gen2) - iwl_trans_pcie_gen2_fw_alive(trans, scd_addr); + iwl_trans_pcie_gen2_fw_alive(trans); else iwl_trans_pcie_fw_alive(trans, scd_addr); } diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h index 3ce626c93651..2040e00c744a 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/internal.h +++ b/drivers/net/wireless/intel/iwlwifi/pcie/internal.h @@ -1095,7 +1095,7 @@ void iwl_pcie_alloc_fw_monitor(struct iwl_trans *trans, u8 max_power); /* transport gen 2 exported functions */ int iwl_trans_pcie_gen2_start_fw(struct iwl_trans *trans, const struct fw_img *fw, bool run_in_rfkill); -void iwl_trans_pcie_gen2_fw_alive(struct iwl_trans *trans, u32 scd_addr); +void iwl_trans_pcie_gen2_fw_alive(struct iwl_trans *trans); int iwl_trans_pcie_gen2_send_hcmd(struct iwl_trans *trans, struct iwl_host_cmd *cmd); void iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans); diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c index c1446d550b4f..18dda89b7985 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c @@ -339,7 +339,7 @@ static void iwl_pcie_get_rf_name(struct iwl_trans *trans) pos += scnprintf(buf + pos, buflen - pos, "\n"); } -void iwl_trans_pcie_gen2_fw_alive(struct iwl_trans *trans, u32 scd_addr) +void iwl_trans_pcie_gen2_fw_alive(struct iwl_trans *trans) { struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); From patchwork Tue Jun 18 16:44:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13702729 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1850B13DB98 for ; Tue, 18 Jun 2024 16:44:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729070; cv=none; b=kaGMeVBgLCciX2yOsnmeku5cbzf0vHEBGtnl9iMFRZTJ0bOJJ46wnmpNFdtMpjJjzOnj4X1wEGJ8zQVRTW8UmxNzzfZUylRPDVo0HJrYAfuSA4S4ukI+HH482cTBisqcXPjuCtA5dnwmI51vunHJkIrQKKfhbSXsKt91Xv+bRSM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729070; c=relaxed/simple; bh=LFuItK/QRVy3ktGi248XWZegSSWBDONjTeI1Lveksc8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gCR1RSMx+KPUBwYrnge2ScXuFXaCi+bvpXiFRo9qP9Jq2JlbeN4vGWHah1eGklaExsXb38cl9HYVNTNnnW3BZgXuK+D5f0AQ8VrpVbj9cx6jYemweelGV5DXM6ifHnjfBj2BwMunokWUVurPNWMdTQU+TdZuLqWJcHwjQhvxNZA= 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=GncoKCCa; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GncoKCCa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718729069; x=1750265069; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=LFuItK/QRVy3ktGi248XWZegSSWBDONjTeI1Lveksc8=; b=GncoKCCaoqk4S6Tze2yoQV1z09EnBrZLqAvt3KXfICOIhoYCPLxlRZFZ AmEQV6zUNqcdd6Qs+jPmbLXh8bfoLC/4oLPPThRbEFEjDwoy1oVRmxpyC Gqk0FmaNQlvFuwzlasBFXIoiKPreP0FYIOEb/g3K9+PmJSg8fnUnoH8tJ xsJ8Ct12v2LnXch4XUeJKRSD3jrpRx3oFa4+if1y83tSHn1LusEYy0laD IelZ0wZTm3aH60ZjtBANVrTuqnDOS1XlOwYnHbp7s2Lt2zSkMCmmy0Atl msEiEWM9vx8kf/5/AV2vjTa6M5Fyunl9gGeRK/C3Cft6NxGvzNZHDhy87 g==; X-CSE-ConnectionGUID: 0YVYeIwtTqm/AnqT4PIiGw== X-CSE-MsgGUID: rRZyYjaJSHyFNYdy0ApOUw== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26257175" X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="26257175" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:29 -0700 X-CSE-ConnectionGUID: Cw5q7xM8THK/fbviMHfu9w== X-CSE-MsgGUID: To3mok0LTTGQw4d/Xn3W3w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="42306513" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:28 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH 04/11] wifi: iwlwifi: bump FW API to 92 for BZ/SC devices Date: Tue, 18 Jun 2024 19:44:06 +0300 Message-Id: <20240618194245.433cfbb6f042.I914da5bd0e2ed25148726f9fb55e7a60b895edfd@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240618164413.2416719-1-miriam.rachel.korenblit@intel.com> References: <20240618164413.2416719-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 92 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 e3d3abfc5fe4..3b6b8b410be5 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 91 +#define IWL_BZ_UCODE_API_MAX 92 /* 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 7ad3322a3305..4ccb0b7bdc20 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 91 +#define IWL_SC_UCODE_API_MAX 92 /* Lowest firmware API version supported */ #define IWL_SC_UCODE_API_MIN 90 From patchwork Tue Jun 18 16:44:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13702730 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C0F213DB98 for ; Tue, 18 Jun 2024 16:44:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729074; cv=none; b=YSKNrf1cIDV4nQk0GMRDrwjh5tozDKri0eW98zBBHh+RTRIHKVqhKQDLJEyXfgvctDXC9TeFMBst5SsRgXfMGtqoh6osO8MBK7FvYjkDCV3eAIxzNZDINkFNsdsk5GZAwQh/OzkQwzgEtmvBo9of0sAhjA+ONfPF7AACpOeRjNM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729074; c=relaxed/simple; bh=bZBx8rHpovzKPCAvOuvDNTLW3qpNmAz7gwGaWrciFjI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WFre9CF37k/MoCnvr3h4HD8QB2Qwb3G0rRRHRdz576M3f74NPEaU6b0+DAGFozndnUrLREVuYDGlBnnVvutRgoZ+hGVFHiH/+y3V+zxSaKV6WhTE19pg1xLCpCnFZbYBq7d6j3l+sqjMRVa4d/dFPBpQFvZyffaB8gpWaw3et4w= 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=beDJIs8o; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="beDJIs8o" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718729072; x=1750265072; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bZBx8rHpovzKPCAvOuvDNTLW3qpNmAz7gwGaWrciFjI=; b=beDJIs8oNY/B7SH9j6yKXa5aGk2P6fy9I5mDjLjuEqXO0Qbg+eFdzjZD B4Q4JuNcdYMPxdaLCq9OGEymk2NhundmJdc/KpZP083j/sVRj0g3AYwNp mA6T8UYH05BsbnwlY0R+PMZYun52zwg8LNR6RIBbMUdoiwCt/J6XNHQQ3 OpYhp9lr3ZrqTQIqY7VtnhgWhlX/pJMOBlZhgE/1nYt2TZGpn9q304pNS I5A6/W1KEyy6TkjXxLutPCcw+Zw8Cbw0qdwpLVuUvfaT/TwMmYx00ghyM 3oZ6K664bkE+3cbwKL55fzM31Vz27PK5giGqrOUgQmG0284/urgmdX/Kk Q==; X-CSE-ConnectionGUID: Q+XWVyK3TAyOiecjbj1VQw== X-CSE-MsgGUID: +Muwq8wjSR2DpInYS3RRDQ== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26257182" X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="26257182" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:30 -0700 X-CSE-ConnectionGUID: 4vMDhH8uSWeeaxjszhsmUw== X-CSE-MsgGUID: Rm+JX+GORZGyvyjx46ZGgA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="42306522" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:29 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach , Johannes Berg Subject: [PATCH 05/11] wifi: iwlwifi: don't assume op_mode_nic_config exists Date: Tue, 18 Jun 2024 19:44:07 +0300 Message-Id: <20240618194245.718983e7b832.I02fb130aa3d2044958cba7dced357031b92e33bb@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240618164413.2416719-1-miriam.rachel.korenblit@intel.com> References: <20240618164413.2416719-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 The new op_mode won't have this callback. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit Reviewed-by: Johannes Berg --- drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h b/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h index 1ca82f3e4ebf..595fa6ddf084 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-op-mode.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2005-2014, 2018-2021 Intel Corporation + * Copyright (C) 2005-2014, 2018-2021, 2024 Intel Corporation * Copyright (C) 2013-2014 Intel Mobile Communications GmbH * Copyright (C) 2015 Intel Deutschland GmbH */ @@ -185,7 +185,8 @@ static inline void iwl_op_mode_cmd_queue_full(struct iwl_op_mode *op_mode) static inline void iwl_op_mode_nic_config(struct iwl_op_mode *op_mode) { might_sleep(); - op_mode->ops->nic_config(op_mode); + if (op_mode->ops->nic_config) + op_mode->ops->nic_config(op_mode); } static inline void iwl_op_mode_wimax_active(struct iwl_op_mode *op_mode) From patchwork Tue Jun 18 16:44:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13702731 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B93C143C4D for ; Tue, 18 Jun 2024 16:44:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729074; cv=none; b=HQcwpFRyDYoNksKzfepGJDDel8cQMVUQqBhMgKiV/1QjYkF2v13BSvlW2IiwVDaNc8BDp5exWMPrJGbJXThXcUTLWkUkTJpmKr+UrdbvVrKj5JfRBwRMkEXIrzOEkcbWRHoPkjyy8UIRY/HfOF+aQJYe7TBGFAI7oLhMbCEfZBY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729074; c=relaxed/simple; bh=L7+YJirJdyN/71kR/kzISMlh890mmMMWF2m8a5k2T2s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TC5JyVfW+iI0X+YOtcsazLL7nMX4Kyl2zMO27OH9HWA6mlDy+69muzEM4jnVcSkBVBTDRHSN17PMjTphQzRuxLaJcqA1Cr4XV1BaKQKQE4v4bToBu2DZO+Oax8i2TU9Kg9thHyWadL3oxEIkC0Y1GIJLMVCQaPzjh+HPRCcIzYw= 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=ENcmyMg2; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ENcmyMg2" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718729073; x=1750265073; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=L7+YJirJdyN/71kR/kzISMlh890mmMMWF2m8a5k2T2s=; b=ENcmyMg2uOjDb3iAUali41NmpasPUNOq86bwgcvfDgv1mLWFQSgzHYsT ArrQnqeGxj+D/XwdwBmJYltF4Sup51Ft5lMASbTA9smnbV7F7uLWr1FdD ukNl9T2XMVQrmeP8YnBp4f0J8SuGsG6UziMu3dY9cTyP3qtwylOC2/KzL tBUB/68z2ppC3sknmUB5+zRsTCm761zmqZotylNR1Z9Elw9F0mttRcP7h zLtDcZexsWtfv8qgrbZDz5F0oq5h2PTSd/PMbfs0L9BwiA+qNSrdAlPep S1eZJLtFNlq8vanmvZd1A5rwXIAA66Ehp202K+kktVs2wMt2HGQBWrieq A==; X-CSE-ConnectionGUID: 7Jjv6+mASTyWMDa4OVrIDQ== X-CSE-MsgGUID: VGdajU50TUSV2IlSdngxDA== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26257185" X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="26257185" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:32 -0700 X-CSE-ConnectionGUID: +JcJoHhFSjGdNyb1Vo878Q== X-CSE-MsgGUID: vHClCOcrS6+Dz0bGEU0dEQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="42306527" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:31 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Emmanuel Grumbach Subject: [PATCH 06/11] wifi: iwlwifi: trans: remove unused status bits Date: Tue, 18 Jun 2024 19:44:08 +0300 Message-Id: <20240618194245.cd26318d9513.I035ec7f3f022cdc19a650eca3b89455e3b5eca18@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240618164413.2416719-1-miriam.rachel.korenblit@intel.com> References: <20240618164413.2416719-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 Those bits are never used. Signed-off-by: Emmanuel Grumbach Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h index 006eb51a705f..ac8f8ff5a99d 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h @@ -291,9 +291,6 @@ enum iwl_d3_status { * @STATUS_RFKILL_HW: the actual HW state of the RF-kill switch * @STATUS_RFKILL_OPMODE: RF-kill state reported to opmode * @STATUS_FW_ERROR: the fw is in error state - * @STATUS_TRANS_GOING_IDLE: shutting down the trans, only special commands - * are sent - * @STATUS_TRANS_IDLE: the trans is idle - general commands are not to be sent * @STATUS_TRANS_DEAD: trans is dead - avoid any read/write operation * @STATUS_SUPPRESS_CMD_ERROR_ONCE: suppress "FW error in SYNC CMD" once, * e.g. for testing @@ -306,8 +303,6 @@ enum iwl_trans_status { STATUS_RFKILL_HW, STATUS_RFKILL_OPMODE, STATUS_FW_ERROR, - STATUS_TRANS_GOING_IDLE, - STATUS_TRANS_IDLE, STATUS_TRANS_DEAD, STATUS_SUPPRESS_CMD_ERROR_ONCE, }; From patchwork Tue Jun 18 16:44:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13702732 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 678501442F5 for ; Tue, 18 Jun 2024 16:44:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729076; cv=none; b=XYpAcdGCiVn2b5LyugfFT/7i7DXmWyk/Z7Z98AmU3OzTKSwZ1MurGeFUkKsTqzwG1dU2iKa9mYkwWsYm5F8W/SxPfBopZOLoXMOB89uPqr9BpuWE3/6R6wpMQzmUZekG9s0+XaGfu3RvYLKbMHiMv2Ic9lKgukJ5/i9QAdz7nMw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729076; c=relaxed/simple; bh=DJmqUu0TjgW3De/1qvBGWjgOoOYB0ZK0viHsFWXTp0M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EIwGqrddBdPe8hrftvSJ6xvKFZwOhQkfnGfvjygeVS1irLx1KwlXZxxNUBeo1FzFQAVoLxjwfRVnq8RMrekMwAqS8MNWcsAizXcF8mCtdsKPpJnMBaOTrGurExjaPlsoI1ibGahifZjrpM51bdp0oocvkHMBvwOVXNqgFYzxCgw= 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=iWzhpdvv; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="iWzhpdvv" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718729074; x=1750265074; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DJmqUu0TjgW3De/1qvBGWjgOoOYB0ZK0viHsFWXTp0M=; b=iWzhpdvvM0j06UvGqAuSyGjVhdrrHgkeMcPV8oM95VfRWRzpQtdHQKag qsPX3uvGFbNU2h1xF2LRqgRqq2GG17vlPK0QEnUZ/PT/Xu9lhwPWe3j+h PNv3D2Z5h+UDs7HZsC7WwH5uZoEvMOYD14PI/lgUW99VCUzWb6QSSs8Hi JQLiibGdj4j8AI1rbM57x0egQiNbvI1QviT4z5jfhYKDQcoYrxGdpYONB gz5UiduPdInFpp9HxfYUL6LjVtKukI3+i7O11C501pWrLFBtXXu7eOaHK NiYdWKOBsQTAT89NKyMTvaq0W/4vKGLaoLYv2803F/thqsscz8O0q7mKw w==; X-CSE-ConnectionGUID: Y3mWtYhORMCPumUEFLBg6w== X-CSE-MsgGUID: XwsLC8LvR9iPpaAB7RlYDQ== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26257191" X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="26257191" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:34 -0700 X-CSE-ConnectionGUID: IbNGLKALR0GqsRrWXZ2a6w== X-CSE-MsgGUID: nbs6wXXDQfCK46o8S8k1SQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="42306530" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:33 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 07/11] wifi: iwlwifi: mvm: dissolve iwl_mvm_mac_remove_interface_common() Date: Tue, 18 Jun 2024 19:44:09 +0300 Message-Id: <20240618194245.adf54ab5bc4a.I90339f152bba73b622e05063d16ae914ae20053f@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240618164413.2416719-1-miriam.rachel.korenblit@intel.com> References: <20240618164413.2416719-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 Since the function isn't actually common (any more), just dissolve it. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index df2f121aff55..52171900813a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -1886,12 +1886,8 @@ void iwl_mvm_prepare_mac_removal(struct iwl_mvm *mvm, cancel_delayed_work_sync(&mvmvif->csa_work); } -/* This function is doing the common part of removing the interface for - * both - MLD and non-MLD modes. Returns true if removing the interface - * is done - */ -static bool iwl_mvm_mac_remove_interface_common(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) +static void iwl_mvm_mac_remove_interface(struct ieee80211_hw *hw, + struct ieee80211_vif *vif) { struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); @@ -1939,21 +1935,10 @@ static bool iwl_mvm_mac_remove_interface_common(struct ieee80211_hw *hw, mvm->noa_duration = 0; } #endif - return true; + goto out; } iwl_mvm_power_update_mac(mvm); - return false; -} - -static void iwl_mvm_mac_remove_interface(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) -{ - struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); - struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); - - if (iwl_mvm_mac_remove_interface_common(hw, vif)) - goto out; /* Before the interface removal, mac80211 would cancel the ROC, and the * ROC worker would be scheduled if needed. The worker would be flushed From patchwork Tue Jun 18 16:44:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13702733 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8D61143C4D for ; Tue, 18 Jun 2024 16:44:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729077; cv=none; b=iTewAKH93D4JLw7wEXPKpAbG79Q2J4Nh+7SXYl+THeR6oPbVtCabgvwhBbuV2xNULrE5UraUt4sRmW3taNyZQ5HQ0mZUIcquuwFZA88UggG3CyJJOZ30Bp2P3XgcTrd40hDjjMFZd29t9kxs17O34QQTIv6wYWFyv3in++SHbOw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729077; c=relaxed/simple; bh=OYDQe5w90xYMxLpBYWFRuCXqAxCY3UWkGc+olyn7tiE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LN3gYTbKJgJYyM9+a1SnKfvQJRIRmXtinpzJ++sbYM/ncUw38VSIvNKZeZhlTnX5sLdHh/cl5woLmueFwrMuwGVmC6E57Gu8eDbnLlH0VaEu4uythiQSeYloQF8Mbng3v76HqAj2UjlFWRtvkCngg0mnzUl0HLEN3LIdCboA+/M= 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=YmmsjoBa; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YmmsjoBa" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718729076; x=1750265076; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=OYDQe5w90xYMxLpBYWFRuCXqAxCY3UWkGc+olyn7tiE=; b=YmmsjoBa5TZ+iyIZlI4qdjbGp8pX5k4i0UtFXgiZ37xP+94HagGkVGza ZOrI1AcELfeJWRTE9qgqtmPp01kc2Ir6TDCmkP5hKksQJogV8A6WQW19j wJotx2iStDWdwNxn9JtzM8YKUBLKWt0ejzL8+Tu/QrI8GiD1fAozDgcXZ wFg8DszbEGmF1oGGVCybJYf/txl0ML93HtB4W0pQt42nTAWv7V7nLKsWX sB+wrgB7J4zjG9cSTz9UkbTVFJtw49Vh2dvfbyD/SJEKafLrKOOOVoto+ JT6DO0uI9EkrN/3UX9TzTUwYNlQoV/bIXTtB7oE9IQRD0a6aG1rPM/UGz g==; X-CSE-ConnectionGUID: paclhtsgTvqqHAFK7nnutA== X-CSE-MsgGUID: 1S6gASp5SMmAdSKOw6QFuA== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26257202" X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="26257202" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:35 -0700 X-CSE-ConnectionGUID: MFEBluLmSz6FK4IOIZnbvw== X-CSE-MsgGUID: qzDC2BjARsi1CRywuPxmaQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="42306535" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:34 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ilan Peer Subject: [PATCH 08/11] wifi: iwlwifi: mvm: Fix associated initiator key setting Date: Tue, 18 Jun 2024 19:44:10 +0300 Message-Id: <20240618194245.be2a5327554d.Ie53220b075dacb23a8d073f6008aafd339368592@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240618164413.2416719-1-miriam.rachel.korenblit@intel.com> References: <20240618164413.2416719-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 When setting the keys for secure measurement with an AP the station is associated with, the TK should only be referenced and not copied. In addition set the cipher only when the correct station is found. Fixes: 626be4bf99f6 ("wifi: iwlwifi: mvm: modify iwl_mvm_ftm_set_secured_ranging() parameters") Signed-off-by: Ilan Peer Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c index 00d447e40cc6..afd90a52d4ec 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c @@ -732,10 +732,7 @@ static void iter(struct ieee80211_hw *hw, WARN_ON(!sta->mfp); - if (WARN_ON(key->keylen > sizeof(target->tk))) - return; - - memcpy(target->tk, key->key, key->keylen); + target->tk = key->key; *target->cipher = iwl_mvm_cipher_to_location_cipher(key->cipher); WARN_ON(*target->cipher == IWL_LOCATION_CIPHER_INVALID); } @@ -774,9 +771,7 @@ iwl_mvm_ftm_set_secured_ranging(struct iwl_mvm *mvm, struct ieee80211_vif *vif, !memcmp(vif->bss_conf.bssid, bssid, ETH_ALEN)) { struct iwl_mvm_ftm_iter_data target; - target.cipher = cipher; target.bssid = bssid; - target.tk = tk; ieee80211_iter_keys(mvm->hw, vif, iter, &target); } else { memcpy(tk, entry->tk, sizeof(entry->tk)); From patchwork Tue Jun 18 16:44:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13702734 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A7DB1442F5 for ; Tue, 18 Jun 2024 16:44:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729078; cv=none; b=javVL51W5mUEm7vHi9DU9Kn+qNMPGE9nQQcFQNkLUH7b16GDsXvMF8Hi88gWGyrmcwE4ifPj+5GVCJdAGV/gmuHKORrmDE4a72/S0cCo89JjIxgCTaVNZGCeazUXAk5jdqBlURIa2RimFQMBaHfMfmM1WZ9sIG0KRF/y2gizE04= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729078; c=relaxed/simple; bh=2up0Q3kEQHzPVrv2A85hasp0oaLoqxXGHnteVvqcPkY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ngPtSN0SlSA0zs/poOttcHiaUq3gKe+UO0kCNzmxMpe26g/qzeeMfNvpbb6ChunX9AqJW7krZE7iw2Y+NJXQHIQ2RtXAM6miKrQ0RSxycjEKTCgUoqdIvDrnwb+D4z3P97cEno3+LkLbp46NrMMZQHkPQC3pB+8Mw9rXJ3qygmc= 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=mkm/BlMq; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mkm/BlMq" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718729077; x=1750265077; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2up0Q3kEQHzPVrv2A85hasp0oaLoqxXGHnteVvqcPkY=; b=mkm/BlMqPme1iNHUchoKuUGHQp0EDkK953KKMjUGDkXY2fjP6vsgey69 Z2CdrZW47rAsR0FLJODgbG9MuKGtQ04qSHpwheKO4rQyhwsqYjM5UpeqF h1dh796AwEOoRjBLuriT6nhdl/PQZeo12pIDyVzv1CKVUBHSbbTOMXB/W DBGtyts2tAcHnB+GNrRoc3I8BNTZAbmdKCVhIiz2IzD69t0BWFJCWjNXI TGwffDuSd08fdVl/W1SSCNqGGvhdlJxJtmJ9m0GFRhxfDgDc+0oepiTO4 Jd4XRCHpYYwPIL7euYDHz8eFUdy73Zuy4PeczgsEOcK4uMZuAHUOasyHZ w==; X-CSE-ConnectionGUID: Bih+ouepRfGzrXJ8rCNbnA== X-CSE-MsgGUID: ckkpVa+sQ06dNi5zhFn+1w== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26257206" X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="26257206" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:37 -0700 X-CSE-ConnectionGUID: BNWkEw3bRaaoVdOI0vhWNQ== X-CSE-MsgGUID: c9pEMOZZQzm7OQu5Xmd9Kg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="42306543" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:36 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 09/11] wifi: iwlwifi: mvm: rename 'pldr_sync' Date: Tue, 18 Jun 2024 19:44:11 +0300 Message-Id: <20240618194245.ccf849642af8.I01dded6b2393771b7baf8b4b17336784d987c7c2@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240618164413.2416719-1-miriam.rachel.korenblit@intel.com> References: <20240618164413.2416719-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 PLDR (product level device reset) is a Windows term, and is something the driver triggers there, AFAICT. Really what 'pldr_sync' here wants to capture is whether or not the firmware will/may do a product reset during initialization, which makes the device drop off the bus, requiring a rescan. If this is the case, obviously the init will fail/time out, so we don't want to report all kinds of errors etc., hence this tracking variable. Rename it to 'fw_product_reset' to capture the meaning better. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 12 ++++++------ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 7 ++++++- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c index 36ed08f20f80..0a8bd957bd6c 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c @@ -408,7 +408,7 @@ static int iwl_mvm_load_ucode_wait_alive(struct iwl_mvm *mvm, UREG_LMAC2_CURRENT_PC)); } - if (ret == -ETIMEDOUT && !mvm->pldr_sync) + if (ret == -ETIMEDOUT && !mvm->fw_product_reset) iwl_fw_dbg_error_collect(&mvm->fwrt, FW_DBG_TRIGGER_ALIVE_TIMEOUT); @@ -627,8 +627,8 @@ static int iwl_run_unified_mvm_ucode(struct iwl_mvm *mvm) if (mvm->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_AX210) { sb_cfg = iwl_read_umac_prph(mvm->trans, SB_MODIFY_CFG_FLAG); /* if needed, we'll reset this on our way out later */ - mvm->pldr_sync = sb_cfg == SB_CFG_RESIDES_IN_ROM; - if (mvm->pldr_sync && iwl_mei_pldr_req()) + mvm->fw_product_reset = sb_cfg == SB_CFG_RESIDES_IN_ROM; + if (mvm->fw_product_reset && iwl_mei_pldr_req()) return -EBUSY; } @@ -647,7 +647,7 @@ static int iwl_run_unified_mvm_ucode(struct iwl_mvm *mvm) IWL_ERR(mvm, "Failed to start RT ucode: %d\n", ret); /* if we needed reset then fail here, but notify and remove */ - if (mvm->pldr_sync) { + if (mvm->fw_product_reset) { iwl_mei_alive_notif(false); iwl_trans_pcie_remove(mvm->trans, true); } @@ -1407,14 +1407,14 @@ int iwl_mvm_up(struct iwl_mvm *mvm) ret = iwl_mvm_load_rt_fw(mvm); if (ret) { IWL_ERR(mvm, "Failed to start RT ucode: %d\n", ret); - if (ret != -ERFKILL && !mvm->pldr_sync) + if (ret != -ERFKILL && !mvm->fw_product_reset) iwl_fw_dbg_error_collect(&mvm->fwrt, FW_DBG_TRIGGER_DRIVER); goto error; } /* FW loaded successfully */ - mvm->pldr_sync = false; + mvm->fw_product_reset = false; iwl_fw_disable_dbg_asserts(&mvm->fwrt); iwl_get_shared_mem_conf(&mvm->fwrt); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index a57f4738a8c8..4c027cf68a2b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -1325,7 +1325,12 @@ struct iwl_mvm { bool sta_remove_requires_queue_remove; bool mld_api_is_used; - bool pldr_sync; + /* + * Indicates that firmware will do a product reset (and then + * therefore fail to load) when we start it (due to OTP burn), + * if so don't dump errors etc. since this is expected. + */ + bool fw_product_reset; struct iwl_time_sync_data time_sync; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index f8a4fefede8d..008fe5fece87 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c @@ -875,7 +875,7 @@ static int iwl_mvm_start_get_nvm(struct iwl_mvm *mvm) IWL_ERR(mvm, "Failed to run INIT ucode: %d\n", ret); /* no longer need this regardless of failure or not */ - mvm->pldr_sync = false; + mvm->fw_product_reset = false; return ret; } From patchwork Tue Jun 18 16:44:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13702735 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01E82143C4D for ; Tue, 18 Jun 2024 16:44:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729080; cv=none; b=c9ydW1zpWYmjhbDV3toEwbVzjIe/K5XYEwXThg8BsyxUfrr92NP867e8IYWy+dOvG82XmIjKxNUecqC79a/Wp6U/0LnfU4cCS7i7dCmTkKwIkqnNle/SKW0bPbZTO6knmR8xGa/DJ7hSbQpv2ZWawX3HsLGOLAsB19UIp6KsD+0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729080; c=relaxed/simple; bh=ukVGpbVmYHzttJPq1+P2VrqPMsGENnbz/fi8BS+CMvY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VAS2sIDQFBxNFszCaFdLmO/EpJC0zZCDNxn8PLyXRodUlRFM6O5MFz/JW7kilbmdc6swYQzdeVq4MWc3ti93ZBQ7AKSjwjsTCTk7yecZ6vqybdLgq+b8OU65UiF53n3LFB6gpCmoWaYCGgT1yzQoEq5fMNK1Y1BIKEspbxazreg= 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=HF21RM9w; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HF21RM9w" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718729079; x=1750265079; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ukVGpbVmYHzttJPq1+P2VrqPMsGENnbz/fi8BS+CMvY=; b=HF21RM9wedIaMKtu8ZPz2j8wncpDNuQ4Ic+P+UdVEepMKAXVmhXO0ipi b5mdvtSF7yRQditR/32uUDrGQNCJ4mQpxH34hAXsnL38TRjajBKBfHyeH Z2X+JjbpApsURm1WLHK9lDtQih0JoQX4cQqG4pfGW18x/Oxqf/EJF8U67 6T9yiLMKcQg8kDixcUdOMbQ+eimiM1BbsgGqpiww4TVNJNPrKY6NDBCot j3ldOkf4s/6Z3GB3NO7UVS7I0KPFqp42nPqx6Yie4SrZ9eaEk+gEZzpRL AhA52F1WX2xTEtLfWbXDejmnjWFCmS4WR3KSzGFc/0QlQNsP0KGZHprFo A==; X-CSE-ConnectionGUID: YJTf8+bsSsGIbLRWoIuacQ== X-CSE-MsgGUID: zrrdRv9ZTZGeHMPI9dqyYQ== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26257209" X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="26257209" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:38 -0700 X-CSE-ConnectionGUID: Lu1gi4YrSmubv78lLHVPtQ== X-CSE-MsgGUID: 61F+VQbMRkmsb2Hqc1D1Zw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="42306552" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:37 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 10/11] wifi: iwlwifi: mei: clarify iwl_mei_pldr_req() docs Date: Tue, 18 Jun 2024 19:44:12 +0300 Message-Id: <20240618194245.ca2c55121a04.I889cd47210367ca9110411472ee696b796a37ab5@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240618164413.2416719-1-miriam.rachel.korenblit@intel.com> References: <20240618164413.2416719-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Johannes Berg This isn't related to whether or not "fw can be loaded", but rather requesting that ME go into a state where doing a product reset is safe. This is related to FW load only in the specific case of where it's used today in iwlmvm, notably when it's known that the firmware itself will (or at least may) do a product reset during load. Clarify the documentation. I was tempted to rename things too, but on the ME side it really is also called PLDR (which is a Windows term and may not even match the complete behaviour since doing a full product reset from the driver also requires calling an ACPI method first.) So keep the name aligned with ME. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h | 7 +++++-- 1 file changed, 5 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 ee48b86674a6..4900de3cc0d3 100644 --- a/drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h +++ b/drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h @@ -456,8 +456,11 @@ void iwl_mei_device_state(bool up); /** * iwl_mei_pldr_req() - must be called before loading the fw * - * Return: 0 if the PLDR flow was successful and the fw can be loaded, negative - * value otherwise. + * Requests from the ME that it releases its potential bus access to + * the WiFi NIC so that the device can safely undergo product reset. + * + * Return: 0 if the request was successful and the device can be + * reset, a negative error value otherwise */ int iwl_mei_pldr_req(void); From patchwork Tue Jun 18 16:44:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Korenblit, Miriam Rachel" X-Patchwork-Id: 13702736 X-Patchwork-Delegate: johannes@sipsolutions.net Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 966A01442F5 for ; Tue, 18 Jun 2024 16:44:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729082; cv=none; b=rI24Rnm6G16dRaR6LLbKbN+5BbkoMgQS6uKxM1QmEc/svhdmUiYFQQkidmk8RkpRE8NjsXZuUKHc4S03uBMuLDzznCbC8WUpcZ479paX3LNMaHSHBIqs5e+90aM72iUEyLE+Tbyt+h7Lwri7KhrX0TD2sK7f/cJdNWQH6cvboXo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718729082; c=relaxed/simple; bh=qZ6o2wBujyHW31PDxWJJbFd1QnIAOTUd0Ggvs7sHMeE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uCqeWwNKaXaa/K+BVgkaClCU4UHm9ZW3a8QQ5xgQ6ecI3pNuhSx8KJCiIgORtnoX0OFa+fhYtmAcieBKhnAi9YpHRW+6zfgvgYohuqR8EgM2NOCuYcOI1vQfPsViYrKOFCDqhJJL3lFoXRbt77csIo384/hU84dVITwMJuFjAqo= 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=LF2pbDxB; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LF2pbDxB" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1718729080; x=1750265080; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qZ6o2wBujyHW31PDxWJJbFd1QnIAOTUd0Ggvs7sHMeE=; b=LF2pbDxBFlJP/594IgxpL9waJzMpHTEG1t+EgyqGAahoiOnTHfm/KSNJ oMERYqgKaojPCozOHkYOu8m75F2EXgsk1HIzBNwxW/be0cPKoW+isIg50 no4AlUo8WrRTHM1G51lqgl++/bbbtAU3pBOpXPmnjnu+iNZSNUVtefJyn PMhvTkSgoF/Tr8dYhLIb4jLUc+IbqBR/jzW+g9Yh4s8yYqYXO1Pbv7/xY 2v24iqMPafWKdZPNLYigLLlpDfVQbbHhJ8Kc5WUX/nd8GuYw1Wr4pwpC3 eAjxB/ku72pFnFCmdPPuIeZqys9phtRXl6vz6XzSUe93gkU9sZbq4THQf w==; X-CSE-ConnectionGUID: jgDT35HmS4alnE2lIizfDQ== X-CSE-MsgGUID: C07QulkWTduDASQiyzYbZw== X-IronPort-AV: E=McAfee;i="6700,10204,11107"; a="26257216" X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="26257216" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:40 -0700 X-CSE-ConnectionGUID: cFkoLQKnTgOJZCIreKoPpQ== X-CSE-MsgGUID: vmYRWGgeRHCjdGRMgGu+GA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,247,1712646000"; d="scan'208";a="42306558" Received: from weis0040.iil.intel.com ([10.12.217.108]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2024 09:44:39 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 11/11] wifi: iwlwifi: mvm: enable VLP AP on VLP channels Date: Tue, 18 Jun 2024 19:44:13 +0300 Message-Id: <20240618194245.e15f24fc6bc8.I33ed7d141fec731e79370ba6c7cfbe28776944a0@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240618164413.2416719-1-miriam.rachel.korenblit@intel.com> References: <20240618164413.2416719-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 If channels are marked VLP, then we're actually also allowed to be VLP AP/GO. Enable this. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c index 712dabb30acc..c2656dee5a86 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c +++ b/drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c @@ -370,7 +370,9 @@ static u32 iwl_get_channel_flags(u8 ch_num, int ch_idx, enum nl80211_band band, flags |= IEEE80211_CHAN_IR_CONCURRENT; /* Set the AP type for the UHB case. */ - if (!(nvm_flags & NVM_CHANNEL_VLP)) + if (nvm_flags & NVM_CHANNEL_VLP) + flags |= IEEE80211_CHAN_ALLOW_6GHZ_VLP_AP; + else flags |= IEEE80211_CHAN_NO_6GHZ_VLP_CLIENT; if (!(nvm_flags & NVM_CHANNEL_AFC)) flags |= IEEE80211_CHAN_NO_6GHZ_AFC_CLIENT; @@ -1661,7 +1663,9 @@ static u32 iwl_nvm_get_regdom_bw_flags(const u16 *nvm_chan, /* Set the AP type for the UHB case. */ if (uats_enabled) { - if (!(nvm_flags & NVM_CHANNEL_VLP)) + if (nvm_flags & NVM_CHANNEL_VLP) + flags |= NL80211_RRF_ALLOW_6GHZ_VLP_AP; + else flags |= NL80211_RRF_NO_6GHZ_VLP_CLIENT; if (!(nvm_flags & NVM_CHANNEL_AFC))