Lines Matching +full:umac +full:- +full:reset

1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
3 * Copyright (C) 2012-2014, 2018-2025 Intel Corporation
4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5 * Copyright (C) 2016-2017 Intel Deutschland GmbH
11 #include "iwl-trans.h"
12 #include "iwl-op-mode.h"
14 #include "iwl-debug.h"
15 #include "iwl-prph.h"
23 #include "iwl-phy-db.h"
24 #include "iwl-modparams.h"
25 #include "iwl-nvm-parse.h"
26 #include "time-sync.h"
60 if (mvm->trans->info.num_rxqs == 1) in iwl_send_rss_cfg_cmd()
66 1 + (i % (mvm->trans->info.num_rxqs - 1)); in iwl_send_rss_cfg_cmd()
93 struct iwl_mfu_assert_dump_notif *mfu_dump_notif = (void *)pkt->data; in iwl_mvm_mfu_assert_dump_notif()
95 if (mfu_dump_notif->index_num == 0) in iwl_mvm_mfu_assert_dump_notif()
97 le32_to_cpu(mfu_dump_notif->assert_id)); in iwl_mvm_mfu_assert_dump_notif()
107 struct iwl_umac_alive *umac; in iwl_alive_fn() local
112 u32 version = iwl_fw_lookup_notif_ver(mvm->fw, LEGACY_GROUP, in iwl_alive_fn()
123 palive = (void *)pkt->data; in iwl_alive_fn()
125 umac = &palive->umac_data; in iwl_alive_fn()
126 lmac1 = &palive->lmac_data[0]; in iwl_alive_fn()
127 lmac2 = &palive->lmac_data[1]; in iwl_alive_fn()
128 status = le16_to_cpu(palive->status); in iwl_alive_fn()
130 BUILD_BUG_ON(sizeof(palive->sku_id.data) != in iwl_alive_fn()
131 sizeof(alive_data->sku_id)); in iwl_alive_fn()
132 memcpy(alive_data->sku_id, palive->sku_id.data, in iwl_alive_fn()
133 sizeof(palive->sku_id.data)); in iwl_alive_fn()
136 le32_to_cpu(alive_data->sku_id[0]), in iwl_alive_fn()
137 le32_to_cpu(alive_data->sku_id[1]), in iwl_alive_fn()
138 le32_to_cpu(alive_data->sku_id[2])); in iwl_alive_fn()
140 mvm->trans->dbg.imr_data.imr_enable = in iwl_alive_fn()
141 le32_to_cpu(palive->imr.enabled); in iwl_alive_fn()
142 mvm->trans->dbg.imr_data.imr_size = in iwl_alive_fn()
143 le32_to_cpu(palive->imr.size); in iwl_alive_fn()
144 mvm->trans->dbg.imr_data.imr2sram_remainbyte = in iwl_alive_fn()
145 mvm->trans->dbg.imr_data.imr_size; in iwl_alive_fn()
146 mvm->trans->dbg.imr_data.imr_base_addr = in iwl_alive_fn()
147 palive->imr.base_addr; in iwl_alive_fn()
148 mvm->trans->dbg.imr_data.imr_curr_addr = in iwl_alive_fn()
149 le64_to_cpu(mvm->trans->dbg.imr_data.imr_base_addr); in iwl_alive_fn()
151 mvm->trans->dbg.imr_data.imr_enable, in iwl_alive_fn()
152 mvm->trans->dbg.imr_data.imr_size, in iwl_alive_fn()
153 le64_to_cpu(mvm->trans->dbg.imr_data.imr_base_addr)); in iwl_alive_fn()
155 if (!mvm->trans->dbg.imr_data.imr_enable) { in iwl_alive_fn()
156 for (i = 0; i < ARRAY_SIZE(mvm->trans->dbg.active_regions); i++) { in iwl_alive_fn()
160 reg_tlv = mvm->trans->dbg.active_regions[i]; in iwl_alive_fn()
164 reg = (void *)reg_tlv->data; in iwl_alive_fn()
170 if (reg->type == IWL_FW_INI_REGION_DRAM_IMR) { in iwl_alive_fn()
171 mvm->trans->dbg.unsupported_region_msk |= BIT(i); in iwl_alive_fn()
179 (void *)pkt->data; in iwl_alive_fn()
185 palive_v8->platform_id); in iwl_alive_fn()
194 palive3 = (void *)pkt->data; in iwl_alive_fn()
195 umac = &palive3->umac_data; in iwl_alive_fn()
196 lmac1 = &palive3->lmac_data; in iwl_alive_fn()
197 status = le16_to_cpu(palive3->status); in iwl_alive_fn()
206 le32_to_cpu(lmac1->dbg_ptrs.error_event_table_ptr); in iwl_alive_fn()
207 iwl_fw_lmac1_set_alive_err_table(mvm->trans, lmac_error_event_table); in iwl_alive_fn()
210 mvm->trans->dbg.lmac_error_event_table[1] = in iwl_alive_fn()
211 le32_to_cpu(lmac2->dbg_ptrs.error_event_table_ptr); in iwl_alive_fn()
213 umac_error_table = le32_to_cpu(umac->dbg_ptrs.error_info_addr) & in iwl_alive_fn()
218 mvm->trans->mac_cfg->base->min_umac_error_event_table) { in iwl_alive_fn()
219 iwl_fw_umac_set_alive_err_table(mvm->trans, in iwl_alive_fn()
225 (mvm->fwrt.cur_fw_img == IWL_UCODE_INIT) ? in iwl_alive_fn()
230 alive_data->valid = status == IWL_ALIVE_STATUS_OK; in iwl_alive_fn()
234 status, lmac1->ver_type, lmac1->ver_subtype); in iwl_alive_fn()
240 "UMAC version: Major - 0x%x, Minor - 0x%x\n", in iwl_alive_fn()
241 le32_to_cpu(umac->umac_major), in iwl_alive_fn()
242 le32_to_cpu(umac->umac_minor)); in iwl_alive_fn()
244 iwl_fwrt_update_fw_versions(&mvm->fwrt, lmac1, umac); in iwl_alive_fn()
252 WARN_ON(pkt->hdr.cmd != INIT_COMPLETE_NOTIF); in iwl_wait_init_complete()
262 if (pkt->hdr.cmd != CALIB_RES_NOTIF_PHY_DB) { in iwl_wait_phy_db_entry()
263 WARN_ON(pkt->hdr.cmd != INIT_COMPLETE_NOTIF); in iwl_wait_phy_db_entry()
277 struct iwl_trans *trans = mvm->trans; in iwl_mvm_print_pd_notification()
278 enum iwl_device_family device_family = trans->mac_cfg->device_family; in iwl_mvm_print_pd_notification()
301 enum iwl_ucode_type old_type = mvm->fwrt.cur_fw_img; in iwl_mvm_load_ucode_wait_alive()
309 iwl_fw_dbg_conf_usniffer(mvm->fw, FW_DBG_START_FROM_ALIVE) && in iwl_mvm_load_ucode_wait_alive()
310 !(fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_load_ucode_wait_alive()
313 iwl_fw_set_current_image(&mvm->fwrt, ucode_type); in iwl_mvm_load_ucode_wait_alive()
314 clear_bit(IWL_MVM_STATUS_FIRMWARE_RUNNING, &mvm->status); in iwl_mvm_load_ucode_wait_alive()
316 iwl_init_notification_wait(&mvm->notif_wait, &alive_wait, in iwl_mvm_load_ucode_wait_alive()
325 ret = iwl_trans_start_fw(mvm->trans, mvm->fw, ucode_type, in iwl_mvm_load_ucode_wait_alive()
328 iwl_fw_set_current_image(&mvm->fwrt, old_type); in iwl_mvm_load_ucode_wait_alive()
329 iwl_remove_notification(&mvm->notif_wait, &alive_wait); in iwl_mvm_load_ucode_wait_alive()
337 ret = iwl_wait_notification(&mvm->notif_wait, &alive_wait, in iwl_mvm_load_ucode_wait_alive()
340 if (mvm->trans->mac_cfg->device_family == in iwl_mvm_load_ucode_wait_alive()
344 iwl_read_umac_prph(mvm->trans, WFPM_ARC1_PD_NOTIFICATION)); in iwl_mvm_load_ucode_wait_alive()
346 iwl_read_umac_prph(mvm->trans, WFPM_LMAC2_PD_NOTIFICATION)); in iwl_mvm_load_ucode_wait_alive()
348 iwl_read_umac_prph(mvm->trans, SB_MODIFY_CFG_FLAG)); in iwl_mvm_load_ucode_wait_alive()
350 iwl_read_prph(mvm->trans, CNVI_SCU_SEQ_DATA_DW9)); in iwl_mvm_load_ucode_wait_alive()
354 struct iwl_trans *trans = mvm->trans; in iwl_mvm_load_ucode_wait_alive()
357 if (trans->mac_cfg->device_family >= in iwl_mvm_load_ucode_wait_alive()
364 } else if (trans->mac_cfg->device_family >= in iwl_mvm_load_ucode_wait_alive()
374 /* LMAC/UMAC PC info */ in iwl_mvm_load_ucode_wait_alive()
375 if (trans->mac_cfg->device_family >= in iwl_mvm_load_ucode_wait_alive()
377 pc_data = trans->dbg.pc_data; in iwl_mvm_load_ucode_wait_alive()
378 for (count = 0; count < trans->dbg.num_pc; in iwl_mvm_load_ucode_wait_alive()
381 pc_data->pc_name, in iwl_mvm_load_ucode_wait_alive()
382 pc_data->pc_address); in iwl_mvm_load_ucode_wait_alive()
383 } else if (trans->mac_cfg->device_family >= in iwl_mvm_load_ucode_wait_alive()
385 IWL_ERR(mvm, "UMAC PC: 0x%x\n", in iwl_mvm_load_ucode_wait_alive()
397 if (ret == -ETIMEDOUT && !mvm->fw_product_reset) in iwl_mvm_load_ucode_wait_alive()
398 iwl_fw_dbg_error_collect(&mvm->fwrt, in iwl_mvm_load_ucode_wait_alive()
401 iwl_fw_set_current_image(&mvm->fwrt, old_type); in iwl_mvm_load_ucode_wait_alive()
407 iwl_fw_set_current_image(&mvm->fwrt, old_type); in iwl_mvm_load_ucode_wait_alive()
408 return -EIO; in iwl_mvm_load_ucode_wait_alive()
414 iwl_trans_fw_alive(mvm->trans); in iwl_mvm_load_ucode_wait_alive()
416 ret = iwl_pnvm_load(mvm->trans, &mvm->notif_wait, in iwl_mvm_load_ucode_wait_alive()
417 mvm->fw, alive_data.sku_id); in iwl_mvm_load_ucode_wait_alive()
420 iwl_fw_set_current_image(&mvm->fwrt, old_type); in iwl_mvm_load_ucode_wait_alive()
433 memset(&mvm->queue_info, 0, sizeof(mvm->queue_info)); in iwl_mvm_load_ucode_wait_alive()
440 mvm->queue_info[IWL_MVM_DQA_CMD_QUEUE].tid_bitmap = in iwl_mvm_load_ucode_wait_alive()
443 set_bit(IWL_MVM_STATUS_FIRMWARE_RUNNING, &mvm->status); in iwl_mvm_load_ucode_wait_alive()
445 iwl_fw_set_dbg_rec_on(&mvm->fwrt); in iwl_mvm_load_ucode_wait_alive()
449 * For pre-MLD API (MLD API doesn't use the timestamps): in iwl_mvm_load_ucode_wait_alive()
455 if (!mvm->mld_api_is_used) in iwl_mvm_load_ucode_wait_alive()
456 cfg80211_bss_flush(mvm->hw->wiphy); in iwl_mvm_load_ucode_wait_alive()
465 *phy_filters = mvm->fwrt.phy_filters; in iwl_mvm_phy_filter_init()
477 .data[0] = &mvm->fwrt.uats_table, in iwl_mvm_uats_init()
478 .len[0] = sizeof(mvm->fwrt.uats_table), in iwl_mvm_uats_init()
482 if (mvm->trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_AX210) { in iwl_mvm_uats_init()
487 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd.id, in iwl_mvm_uats_init()
496 iwl_uefi_get_uats_table(mvm->trans, &mvm->fwrt); in iwl_mvm_uats_init()
498 if (!mvm->fwrt.uats_valid) in iwl_mvm_uats_init()
517 .data[0] = &mvm->fwrt.sgom_table, in iwl_mvm_sgom_init()
518 .len[0] = sizeof(mvm->fwrt.sgom_table), in iwl_mvm_sgom_init()
522 if (!mvm->fwrt.sgom_enabled) { in iwl_mvm_sgom_init()
527 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd.id, in iwl_mvm_sgom_init()
547 enum iwl_ucode_type ucode_type = mvm->fwrt.cur_fw_img; in iwl_send_phy_cfg_cmd()
552 !mvm->trans->cfg->tx_with_siso_diversity) in iwl_send_phy_cfg_cmd()
555 if (mvm->trans->cfg->tx_with_siso_diversity) { in iwl_send_phy_cfg_cmd()
569 cpu_to_le32(mvm->trans->mac_cfg->extra_phy_cfg_flags); in iwl_send_phy_cfg_cmd()
572 mvm->fw->default_calib[ucode_type].event_trigger; in iwl_send_phy_cfg_cmd()
574 mvm->fw->default_calib[ucode_type].flow_trigger; in iwl_send_phy_cfg_cmd()
576 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, in iwl_send_phy_cfg_cmd()
601 if (mvm->trans->cfg->tx_with_siso_diversity) in iwl_run_unified_mvm_ucode()
604 lockdep_assert_held(&mvm->mutex); in iwl_run_unified_mvm_ucode()
606 mvm->rfkill_safe_init_done = false; in iwl_run_unified_mvm_ucode()
608 if (mvm->trans->mac_cfg->device_family == IWL_DEVICE_FAMILY_AX210) { in iwl_run_unified_mvm_ucode()
609 sb_cfg = iwl_read_umac_prph(mvm->trans, SB_MODIFY_CFG_FLAG); in iwl_run_unified_mvm_ucode()
610 /* if needed, we'll reset this on our way out later */ in iwl_run_unified_mvm_ucode()
611 mvm->fw_product_reset = sb_cfg == SB_CFG_RESIDES_IN_ROM; in iwl_run_unified_mvm_ucode()
612 if (mvm->fw_product_reset && iwl_mei_pldr_req()) in iwl_run_unified_mvm_ucode()
613 return -EBUSY; in iwl_run_unified_mvm_ucode()
616 iwl_init_notification_wait(&mvm->notif_wait, in iwl_run_unified_mvm_ucode()
623 iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_EARLY, NULL); in iwl_run_unified_mvm_ucode()
630 /* if we needed reset then fail here, but notify and remove */ in iwl_run_unified_mvm_ucode()
631 if (mvm->fw_product_reset) { in iwl_run_unified_mvm_ucode()
633 iwl_trans_pcie_reset(mvm->trans, in iwl_run_unified_mvm_ucode()
639 iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_AFTER_ALIVE, in iwl_run_unified_mvm_ucode()
656 if (mvm->nvm_file_name) { in iwl_run_unified_mvm_ucode()
657 ret = iwl_read_external_nvm(mvm->trans, mvm->nvm_file_name, in iwl_run_unified_mvm_ucode()
658 mvm->nvm_sections); in iwl_run_unified_mvm_ucode()
684 ret = iwl_wait_notification(&mvm->notif_wait, &init_wait, in iwl_run_unified_mvm_ucode()
690 if (!mvm->nvm_data) { in iwl_run_unified_mvm_ucode()
691 mvm->nvm_data = iwl_get_nvm(mvm->trans, mvm->fw, in iwl_run_unified_mvm_ucode()
692 mvm->set_tx_ant, mvm->set_rx_ant); in iwl_run_unified_mvm_ucode()
693 if (IS_ERR(mvm->nvm_data)) { in iwl_run_unified_mvm_ucode()
694 ret = PTR_ERR(mvm->nvm_data); in iwl_run_unified_mvm_ucode()
695 mvm->nvm_data = NULL; in iwl_run_unified_mvm_ucode()
701 mvm->rfkill_safe_init_done = true; in iwl_run_unified_mvm_ucode()
706 iwl_remove_notification(&mvm->notif_wait, &init_wait); in iwl_run_unified_mvm_ucode()
722 lockdep_assert_held(&mvm->mutex); in iwl_run_init_mvm_ucode()
724 mvm->rfkill_safe_init_done = false; in iwl_run_init_mvm_ucode()
726 iwl_init_notification_wait(&mvm->notif_wait, in iwl_run_init_mvm_ucode()
731 mvm->phy_db); in iwl_run_init_mvm_ucode()
733 iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_EARLY, NULL); in iwl_run_init_mvm_ucode()
742 if (mvm->trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_8000) { in iwl_run_init_mvm_ucode()
749 if (!mvm->nvm_data) { in iwl_run_init_mvm_ucode()
758 if (mvm->nvm_file_name) { in iwl_run_init_mvm_ucode()
764 WARN_ONCE(mvm->nvm_data->nvm_version < mvm->trans->cfg->nvm_ver, in iwl_run_init_mvm_ucode()
766 mvm->nvm_data->nvm_version, mvm->trans->cfg->nvm_ver); in iwl_run_init_mvm_ucode()
778 mvm->rfkill_safe_init_done = true; in iwl_run_init_mvm_ucode()
796 ret = iwl_wait_notification(&mvm->notif_wait, &calib_wait, in iwl_run_init_mvm_ucode()
812 iwl_remove_notification(&mvm->notif_wait, &calib_wait); in iwl_run_init_mvm_ucode()
814 mvm->rfkill_safe_init_done = false; in iwl_run_init_mvm_ucode()
815 if (!mvm->nvm_data) { in iwl_run_init_mvm_ucode()
816 /* we want to debug INIT and we have no NVM - fake */ in iwl_run_init_mvm_ucode()
817 mvm->nvm_data = kzalloc(sizeof(struct iwl_nvm_data) + in iwl_run_init_mvm_ucode()
821 if (!mvm->nvm_data) in iwl_run_init_mvm_ucode()
822 return -ENOMEM; in iwl_run_init_mvm_ucode()
823 mvm->nvm_data->bands[0].channels = mvm->nvm_data->channels; in iwl_run_init_mvm_ucode()
824 mvm->nvm_data->bands[0].n_channels = 1; in iwl_run_init_mvm_ucode()
825 mvm->nvm_data->bands[0].n_bitrates = 1; in iwl_run_init_mvm_ucode()
826 mvm->nvm_data->bands[0].bitrates = in iwl_run_init_mvm_ucode()
827 (void *)(mvm->nvm_data->channels + 1); in iwl_run_init_mvm_ucode()
828 mvm->nvm_data->bands[0].bitrates->hw_value = 10; in iwl_run_init_mvm_ucode()
840 if (!mvm->trans->ltr_enabled) in iwl_mvm_config_ltr()
860 u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, 3); in iwl_mvm_sar_select_profile()
868 cpu_to_le32(mvm->fwrt.reduced_power_flags); in iwl_mvm_sar_select_profile()
877 cmd.v8.flags = cpu_to_le32(mvm->fwrt.reduced_power_flags); in iwl_mvm_sar_select_profile()
878 } else if (fw_has_api(&mvm->fw->ucode_capa, in iwl_mvm_sar_select_profile()
883 } else if (fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_sar_select_profile()
902 ret = iwl_sar_fill_profile(&mvm->fwrt, per_chain, in iwl_mvm_sar_select_profile()
927 u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd.id, in iwl_mvm_get_sar_geo_profile()
940 else if (fw_has_api(&mvm->fwrt.fw->ucode_capa, in iwl_mvm_get_sar_geo_profile()
946 if (!iwl_sar_geo_support(&mvm->fwrt)) in iwl_mvm_get_sar_geo_profile()
947 return -EOPNOTSUPP; in iwl_mvm_get_sar_geo_profile()
957 resp = (void *)cmd.resp_pkt->data; in iwl_mvm_get_sar_geo_profile()
958 ret = le32_to_cpu(resp->profile_idx); in iwl_mvm_get_sar_geo_profile()
961 ret = -EIO; in iwl_mvm_get_sar_geo_profile()
976 u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, in iwl_mvm_sar_geo_init()
992 if (mvm->fwrt.geo_rev == 1) in iwl_mvm_sar_geo_init()
1010 } else if (fw_has_api(&mvm->fwrt.fw->ucode_capa, in iwl_mvm_sar_geo_init()
1031 ret = iwl_sar_geo_fill_table(&mvm->fwrt, &cmd.v1.table[0][0], in iwl_mvm_sar_geo_init()
1049 ret = iwl_fill_ppag_table(&mvm->fwrt, &cmd, &cmd_size); in iwl_mvm_ppag_send_cmd()
1068 if (!(iwl_is_ppag_approved(&mvm->fwrt))) in iwl_mvm_ppag_init()
1077 int fw_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, in iwl_mvm_tas_init()
1094 if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TAS_CFG)) { in iwl_mvm_tas_init()
1099 ret = iwl_bios_get_tas_table(&mvm->fwrt, &data); in iwl_mvm_tas_init()
1156 if (fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_tas_init()
1183 ret = iwl_fill_lari_config(&mvm->fwrt, &cmd, &cmd_size); in iwl_mvm_lari_cfg()
1200 iwl_acpi_get_guid_lock_status(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1203 ret = iwl_bios_get_ppag_table(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1211 ret = iwl_bios_get_wrds_table(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1220 if (!iwl_bios_get_wgds_table(&mvm->fwrt)) { in iwl_mvm_get_bios_tables()
1231 ret = iwl_bios_get_ewrd_table(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1240 if (iwl_sar_geo_support(&mvm->fwrt)) { in iwl_mvm_get_bios_tables()
1241 ret = iwl_bios_get_wgds_table(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1250 iwl_acpi_get_phy_filters(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1252 if (iwl_bios_get_eckv(&mvm->fwrt, &mvm->ext_clock_valid)) in iwl_mvm_get_bios_tables()
1259 if (vif->type == NL80211_IFTYPE_STATION) in iwl_mvm_disconnect_iterator()
1265 u32 error_log_size = mvm->fw->ucode_capa.error_log_size; in iwl_mvm_send_recovery_cmd()
1284 /* no buf was allocated while HW reset */ in iwl_mvm_send_recovery_cmd()
1285 if (!mvm->error_recovery_buf) in iwl_mvm_send_recovery_cmd()
1288 host_cmd.data[1] = mvm->error_recovery_buf; in iwl_mvm_send_recovery_cmd()
1295 kfree(mvm->error_recovery_buf); in iwl_mvm_send_recovery_cmd()
1296 mvm->error_recovery_buf = NULL; in iwl_mvm_send_recovery_cmd()
1310 ieee80211_iterate_interfaces(mvm->hw, 0, in iwl_mvm_send_recovery_cmd()
1336 iwl_fw_dbg_stop_sync(&mvm->fwrt); in iwl_mvm_load_rt_fw()
1337 iwl_trans_stop_device(mvm->trans); in iwl_mvm_load_rt_fw()
1338 ret = iwl_trans_start_hw(mvm->trans); in iwl_mvm_load_rt_fw()
1342 mvm->rfkill_safe_init_done = false; in iwl_mvm_load_rt_fw()
1347 mvm->rfkill_safe_init_done = true; in iwl_mvm_load_rt_fw()
1349 iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_AFTER_ALIVE, in iwl_mvm_load_rt_fw()
1352 return iwl_init_paging(&mvm->fwrt, mvm->fwrt.cur_fw_img); in iwl_mvm_load_rt_fw()
1360 lockdep_assert_wiphy(mvm->hw->wiphy); in iwl_mvm_up()
1361 lockdep_assert_held(&mvm->mutex); in iwl_mvm_up()
1363 ret = iwl_trans_start_hw(mvm->trans); in iwl_mvm_up()
1370 if (ret != -ERFKILL && !mvm->fw_product_reset) in iwl_mvm_up()
1371 iwl_fw_dbg_error_collect(&mvm->fwrt, in iwl_mvm_up()
1377 mvm->fw_product_reset = false; in iwl_mvm_up()
1379 iwl_fw_disable_dbg_asserts(&mvm->fwrt); in iwl_mvm_up()
1380 iwl_get_shared_mem_conf(&mvm->fwrt); in iwl_mvm_up()
1386 if (!iwl_trans_dbg_ini_valid(mvm->trans)) { in iwl_mvm_up()
1387 mvm->fwrt.dump.conf = FW_DBG_INVALID; in iwl_mvm_up()
1389 if (mvm->fw->dbg.dest_tlv) in iwl_mvm_up()
1390 mvm->fwrt.dump.conf = FW_DBG_START_FROM_ALIVE; in iwl_mvm_up()
1391 iwl_fw_start_dbg_conf(&mvm->fwrt, FW_DBG_START_FROM_ALIVE); in iwl_mvm_up()
1400 ret = iwl_send_phy_db_data(mvm->phy_db); in iwl_mvm_up()
1412 if (fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_up()
1414 ret = iwl_set_soc_latency(&mvm->fwrt); in iwl_mvm_up()
1422 ret = iwl_configure_rxq(&mvm->fwrt); in iwl_mvm_up()
1435 /* init the fw <-> mac80211 STA mapping */ in iwl_mvm_up()
1436 for (i = 0; i < mvm->fw->ucode_capa.num_stations; i++) { in iwl_mvm_up()
1437 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[i], NULL); in iwl_mvm_up()
1438 RCU_INIT_POINTER(mvm->fw_id_to_link_sta[i], NULL); in iwl_mvm_up()
1441 mvm->tdls_cs.peer.sta_id = IWL_INVALID_STA; in iwl_mvm_up()
1443 /* reset quota debouncing buffer - 0xff will yield invalid data */ in iwl_mvm_up()
1444 memset(&mvm->last_quota_cmd, 0xff, sizeof(mvm->last_quota_cmd)); in iwl_mvm_up()
1446 if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_DQA_SUPPORT)) { in iwl_mvm_up()
1458 if (!iwl_mvm_has_new_station_api(mvm->fw)) { in iwl_mvm_up()
1471 sband = mvm->hw->wiphy->bands[i++]; in iwl_mvm_up()
1474 ret = -ENODEV; in iwl_mvm_up()
1479 /* in order to give the responsibility of ct-kill and in iwl_mvm_up()
1498 mvm->cooling_dev.cur_state); in iwl_mvm_up()
1504 if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_SET_LTR_GEN2)) in iwl_mvm_up()
1512 * RTNL is not taken during Ct-kill, but we don't need to scan/Tx in iwl_mvm_up()
1515 if (!test_bit(IWL_MVM_STATUS_HW_CTKILL, &mvm->status)) { in iwl_mvm_up()
1521 if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_UMAC_SCAN)) { in iwl_mvm_up()
1522 mvm->scan_type = IWL_SCAN_TYPE_NOT_SET; in iwl_mvm_up()
1523 mvm->hb_scan_type = IWL_SCAN_TYPE_NOT_SET; in iwl_mvm_up()
1529 if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) { in iwl_mvm_up()
1532 if (mvm->time_sync.active) in iwl_mvm_up()
1533 iwl_mvm_time_sync_config(mvm, mvm->time_sync.peer_addr, in iwl_mvm_up()
1538 if (!mvm->ptp_data.ptp_clock) in iwl_mvm_up()
1560 if (iwl_rfi_is_enabled_in_bios(&mvm->fwrt)) in iwl_mvm_up()
1577 lockdep_assert_wiphy(mvm->hw->wiphy); in iwl_mvm_load_d3_fw()
1578 lockdep_assert_held(&mvm->mutex); in iwl_mvm_load_d3_fw()
1580 ret = iwl_trans_start_hw(mvm->trans); in iwl_mvm_load_d3_fw()
1595 ret = iwl_send_phy_db_data(mvm->phy_db); in iwl_mvm_load_d3_fw()
1603 /* init the fw <-> mac80211 STA mapping */ in iwl_mvm_load_d3_fw()
1604 for (i = 0; i < mvm->fw->ucode_capa.num_stations; i++) { in iwl_mvm_load_d3_fw()
1605 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[i], NULL); in iwl_mvm_load_d3_fw()
1606 RCU_INIT_POINTER(mvm->fw_id_to_link_sta[i], NULL); in iwl_mvm_load_d3_fw()
1609 if (!iwl_mvm_has_new_station_api(mvm->fw)) { in iwl_mvm_load_d3_fw()
1633 struct iwl_mfuart_load_notif *mfuart_notif = (void *)pkt->data; in iwl_mvm_rx_mfuart_notif()
1637 le32_to_cpu(mfuart_notif->installed_ver), in iwl_mvm_rx_mfuart_notif()
1638 le32_to_cpu(mfuart_notif->external_ver), in iwl_mvm_rx_mfuart_notif()
1639 le32_to_cpu(mfuart_notif->status), in iwl_mvm_rx_mfuart_notif()
1640 le32_to_cpu(mfuart_notif->duration)); in iwl_mvm_rx_mfuart_notif()
1645 le32_to_cpu(mfuart_notif->image_size)); in iwl_mvm_rx_mfuart_notif()