Lines Matching +full:south +full:- +full:field

1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
3 * Copyright (C) 2012-2014, 2018-2024 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->num_rx_queues == 1) in iwl_send_rss_cfg_cmd()
66 1 + (i % (mvm->trans->num_rx_queues - 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()
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()
124 mvm->trans->dbg.imr_data.imr_enable = in iwl_alive_fn()
125 le32_to_cpu(palive->imr.enabled); in iwl_alive_fn()
126 mvm->trans->dbg.imr_data.imr_size = in iwl_alive_fn()
127 le32_to_cpu(palive->imr.size); in iwl_alive_fn()
128 mvm->trans->dbg.imr_data.imr2sram_remainbyte = in iwl_alive_fn()
129 mvm->trans->dbg.imr_data.imr_size; in iwl_alive_fn()
130 mvm->trans->dbg.imr_data.imr_base_addr = in iwl_alive_fn()
131 palive->imr.base_addr; in iwl_alive_fn()
132 mvm->trans->dbg.imr_data.imr_curr_addr = in iwl_alive_fn()
133 le64_to_cpu(mvm->trans->dbg.imr_data.imr_base_addr); in iwl_alive_fn()
135 mvm->trans->dbg.imr_data.imr_enable, in iwl_alive_fn()
136 mvm->trans->dbg.imr_data.imr_size, in iwl_alive_fn()
137 le64_to_cpu(mvm->trans->dbg.imr_data.imr_base_addr)); in iwl_alive_fn()
139 if (!mvm->trans->dbg.imr_data.imr_enable) { in iwl_alive_fn()
140 for (i = 0; i < ARRAY_SIZE(mvm->trans->dbg.active_regions); i++) { in iwl_alive_fn()
144 reg_tlv = mvm->trans->dbg.active_regions[i]; in iwl_alive_fn()
148 reg = (void *)reg_tlv->data; in iwl_alive_fn()
154 if (reg->type == IWL_FW_INI_REGION_DRAM_IMR) { in iwl_alive_fn()
155 mvm->trans->dbg.unsupported_region_msk |= BIT(i); in iwl_alive_fn()
168 palive = (void *)pkt->data; in iwl_alive_fn()
169 umac = &palive->umac_data; in iwl_alive_fn()
170 lmac1 = &palive->lmac_data[0]; in iwl_alive_fn()
171 lmac2 = &palive->lmac_data[1]; in iwl_alive_fn()
172 status = le16_to_cpu(palive->status); in iwl_alive_fn()
174 mvm->trans->sku_id[0] = le32_to_cpu(palive->sku_id.data[0]); in iwl_alive_fn()
175 mvm->trans->sku_id[1] = le32_to_cpu(palive->sku_id.data[1]); in iwl_alive_fn()
176 mvm->trans->sku_id[2] = le32_to_cpu(palive->sku_id.data[2]); in iwl_alive_fn()
179 mvm->trans->sku_id[0], in iwl_alive_fn()
180 mvm->trans->sku_id[1], in iwl_alive_fn()
181 mvm->trans->sku_id[2]); in iwl_alive_fn()
188 palive = (void *)pkt->data; in iwl_alive_fn()
189 umac = &palive->umac_data; in iwl_alive_fn()
190 lmac1 = &palive->lmac_data[0]; in iwl_alive_fn()
191 lmac2 = &palive->lmac_data[1]; in iwl_alive_fn()
192 status = le16_to_cpu(palive->status); in iwl_alive_fn()
200 palive3 = (void *)pkt->data; in iwl_alive_fn()
201 umac = &palive3->umac_data; in iwl_alive_fn()
202 lmac1 = &palive3->lmac_data; in iwl_alive_fn()
203 status = le16_to_cpu(palive3->status); in iwl_alive_fn()
212 le32_to_cpu(lmac1->dbg_ptrs.error_event_table_ptr); in iwl_alive_fn()
213 iwl_fw_lmac1_set_alive_err_table(mvm->trans, lmac_error_event_table); in iwl_alive_fn()
216 mvm->trans->dbg.lmac_error_event_table[1] = in iwl_alive_fn()
217 le32_to_cpu(lmac2->dbg_ptrs.error_event_table_ptr); in iwl_alive_fn()
219 umac_error_table = le32_to_cpu(umac->dbg_ptrs.error_info_addr) & in iwl_alive_fn()
224 mvm->trans->cfg->min_umac_error_event_table) { in iwl_alive_fn()
225 iwl_fw_umac_set_alive_err_table(mvm->trans, in iwl_alive_fn()
231 (mvm->fwrt.cur_fw_img == IWL_UCODE_INIT) ? in iwl_alive_fn()
236 alive_data->scd_base_addr = le32_to_cpu(lmac1->dbg_ptrs.scd_base_ptr); in iwl_alive_fn()
237 alive_data->valid = status == IWL_ALIVE_STATUS_OK; in iwl_alive_fn()
241 status, lmac1->ver_type, lmac1->ver_subtype); in iwl_alive_fn()
247 "UMAC version: Major - 0x%x, Minor - 0x%x\n", in iwl_alive_fn()
248 le32_to_cpu(umac->umac_major), in iwl_alive_fn()
249 le32_to_cpu(umac->umac_minor)); in iwl_alive_fn()
251 iwl_fwrt_update_fw_versions(&mvm->fwrt, lmac1, umac); in iwl_alive_fn()
259 WARN_ON(pkt->hdr.cmd != INIT_COMPLETE_NOTIF); in iwl_wait_init_complete()
269 if (pkt->hdr.cmd != CALIB_RES_NOTIF_PHY_DB) { in iwl_wait_phy_db_entry()
270 WARN_ON(pkt->hdr.cmd != INIT_COMPLETE_NOTIF); in iwl_wait_phy_db_entry()
284 struct iwl_trans *trans = mvm->trans; in iwl_mvm_print_pd_notification()
285 enum iwl_device_family device_family = trans->trans_cfg->device_family; in iwl_mvm_print_pd_notification()
309 enum iwl_ucode_type old_type = mvm->fwrt.cur_fw_img; in iwl_mvm_load_ucode_wait_alive()
317 iwl_fw_dbg_conf_usniffer(mvm->fw, FW_DBG_START_FROM_ALIVE) && in iwl_mvm_load_ucode_wait_alive()
318 !(fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_load_ucode_wait_alive()
320 fw = iwl_get_ucode_image(mvm->fw, IWL_UCODE_REGULAR_USNIFFER); in iwl_mvm_load_ucode_wait_alive()
322 fw = iwl_get_ucode_image(mvm->fw, ucode_type); in iwl_mvm_load_ucode_wait_alive()
324 return -EINVAL; in iwl_mvm_load_ucode_wait_alive()
325 iwl_fw_set_current_image(&mvm->fwrt, ucode_type); in iwl_mvm_load_ucode_wait_alive()
326 clear_bit(IWL_MVM_STATUS_FIRMWARE_RUNNING, &mvm->status); in iwl_mvm_load_ucode_wait_alive()
328 iwl_init_notification_wait(&mvm->notif_wait, &alive_wait, in iwl_mvm_load_ucode_wait_alive()
337 ret = iwl_trans_start_fw(mvm->trans, fw, run_in_rfkill); in iwl_mvm_load_ucode_wait_alive()
339 iwl_fw_set_current_image(&mvm->fwrt, old_type); in iwl_mvm_load_ucode_wait_alive()
340 iwl_remove_notification(&mvm->notif_wait, &alive_wait); in iwl_mvm_load_ucode_wait_alive()
348 ret = iwl_wait_notification(&mvm->notif_wait, &alive_wait, in iwl_mvm_load_ucode_wait_alive()
351 if (mvm->trans->trans_cfg->device_family == in iwl_mvm_load_ucode_wait_alive()
355 iwl_read_umac_prph(mvm->trans, WFPM_ARC1_PD_NOTIFICATION)); in iwl_mvm_load_ucode_wait_alive()
357 iwl_read_umac_prph(mvm->trans, WFPM_LMAC2_PD_NOTIFICATION)); in iwl_mvm_load_ucode_wait_alive()
359 iwl_read_umac_prph(mvm->trans, SB_MODIFY_CFG_FLAG)); in iwl_mvm_load_ucode_wait_alive()
361 iwl_read_prph(mvm->trans, CNVI_SCU_SEQ_DATA_DW9)); in iwl_mvm_load_ucode_wait_alive()
365 struct iwl_trans *trans = mvm->trans; in iwl_mvm_load_ucode_wait_alive()
368 if (trans->trans_cfg->device_family >= in iwl_mvm_load_ucode_wait_alive()
375 } else if (trans->trans_cfg->device_family >= in iwl_mvm_load_ucode_wait_alive()
386 if (trans->trans_cfg->device_family >= in iwl_mvm_load_ucode_wait_alive()
388 pc_data = trans->dbg.pc_data; in iwl_mvm_load_ucode_wait_alive()
389 for (count = 0; count < trans->dbg.num_pc; in iwl_mvm_load_ucode_wait_alive()
392 pc_data->pc_name, in iwl_mvm_load_ucode_wait_alive()
393 pc_data->pc_address); in iwl_mvm_load_ucode_wait_alive()
394 } else if (trans->trans_cfg->device_family >= in iwl_mvm_load_ucode_wait_alive()
408 if (ret == -ETIMEDOUT && !mvm->fw_product_reset) in iwl_mvm_load_ucode_wait_alive()
409 iwl_fw_dbg_error_collect(&mvm->fwrt, in iwl_mvm_load_ucode_wait_alive()
412 iwl_fw_set_current_image(&mvm->fwrt, old_type); in iwl_mvm_load_ucode_wait_alive()
418 iwl_fw_set_current_image(&mvm->fwrt, old_type); in iwl_mvm_load_ucode_wait_alive()
419 return -EIO; in iwl_mvm_load_ucode_wait_alive()
425 ret = iwl_pnvm_load(mvm->trans, &mvm->notif_wait, in iwl_mvm_load_ucode_wait_alive()
426 &mvm->fw->ucode_capa); in iwl_mvm_load_ucode_wait_alive()
429 iwl_fw_set_current_image(&mvm->fwrt, old_type); in iwl_mvm_load_ucode_wait_alive()
433 iwl_trans_fw_alive(mvm->trans, alive_data.scd_base_addr); in iwl_mvm_load_ucode_wait_alive()
444 memset(&mvm->queue_info, 0, sizeof(mvm->queue_info)); in iwl_mvm_load_ucode_wait_alive()
451 mvm->queue_info[IWL_MVM_DQA_CMD_QUEUE].tid_bitmap = in iwl_mvm_load_ucode_wait_alive()
454 set_bit(IWL_MVM_STATUS_FIRMWARE_RUNNING, &mvm->status); in iwl_mvm_load_ucode_wait_alive()
456 iwl_fw_set_dbg_rec_on(&mvm->fwrt); in iwl_mvm_load_ucode_wait_alive()
460 * For pre-MLD API (MLD API doesn't use the timestamps): in iwl_mvm_load_ucode_wait_alive()
466 if (!mvm->mld_api_is_used) in iwl_mvm_load_ucode_wait_alive()
467 cfg80211_bss_flush(mvm->hw->wiphy); in iwl_mvm_load_ucode_wait_alive()
476 *phy_filters = mvm->phy_filters; in iwl_mvm_phy_filter_init()
488 .data[0] = &mvm->fwrt.uats_table, in iwl_mvm_uats_init()
489 .len[0] = sizeof(mvm->fwrt.uats_table), in iwl_mvm_uats_init()
493 if (mvm->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_AX210) { in iwl_mvm_uats_init()
498 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd.id, in iwl_mvm_uats_init()
507 ret = iwl_uefi_get_uats_table(mvm->trans, &mvm->fwrt); in iwl_mvm_uats_init()
529 .data[0] = &mvm->fwrt.sgom_table, in iwl_mvm_sgom_init()
530 .len[0] = sizeof(mvm->fwrt.sgom_table), in iwl_mvm_sgom_init()
534 if (!mvm->fwrt.sgom_enabled) { in iwl_mvm_sgom_init()
539 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd.id, in iwl_mvm_sgom_init()
559 enum iwl_ucode_type ucode_type = mvm->fwrt.cur_fw_img; in iwl_send_phy_cfg_cmd()
564 !mvm->trans->cfg->tx_with_siso_diversity) in iwl_send_phy_cfg_cmd()
567 if (mvm->trans->cfg->tx_with_siso_diversity) { in iwl_send_phy_cfg_cmd()
581 cpu_to_le32(mvm->trans->trans_cfg->extra_phy_cfg_flags); in iwl_send_phy_cfg_cmd()
584 mvm->fw->default_calib[ucode_type].event_trigger; in iwl_send_phy_cfg_cmd()
586 mvm->fw->default_calib[ucode_type].flow_trigger; in iwl_send_phy_cfg_cmd()
588 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, in iwl_send_phy_cfg_cmd()
613 if (mvm->trans->cfg->tx_with_siso_diversity) in iwl_run_unified_mvm_ucode()
616 lockdep_assert_held(&mvm->mutex); in iwl_run_unified_mvm_ucode()
618 mvm->rfkill_safe_init_done = false; in iwl_run_unified_mvm_ucode()
620 if (mvm->trans->trans_cfg->device_family == IWL_DEVICE_FAMILY_AX210) { in iwl_run_unified_mvm_ucode()
621 sb_cfg = iwl_read_umac_prph(mvm->trans, SB_MODIFY_CFG_FLAG); in iwl_run_unified_mvm_ucode()
623 mvm->fw_product_reset = sb_cfg == SB_CFG_RESIDES_IN_ROM; in iwl_run_unified_mvm_ucode()
624 if (mvm->fw_product_reset && iwl_mei_pldr_req()) in iwl_run_unified_mvm_ucode()
625 return -EBUSY; in iwl_run_unified_mvm_ucode()
628 iwl_init_notification_wait(&mvm->notif_wait, in iwl_run_unified_mvm_ucode()
635 iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_EARLY, NULL); in iwl_run_unified_mvm_ucode()
643 if (mvm->fw_product_reset) { in iwl_run_unified_mvm_ucode()
645 iwl_trans_pcie_remove(mvm->trans, true); in iwl_run_unified_mvm_ucode()
650 iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_AFTER_ALIVE, in iwl_run_unified_mvm_ucode()
653 if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_BZ) in iwl_run_unified_mvm_ucode()
654 mvm->trans->step_urm = !!(iwl_read_umac_prph(mvm->trans, in iwl_run_unified_mvm_ucode()
672 if (mvm->nvm_file_name) { in iwl_run_unified_mvm_ucode()
673 ret = iwl_read_external_nvm(mvm->trans, mvm->nvm_file_name, in iwl_run_unified_mvm_ucode()
674 mvm->nvm_sections); in iwl_run_unified_mvm_ucode()
700 ret = iwl_wait_notification(&mvm->notif_wait, &init_wait, in iwl_run_unified_mvm_ucode()
706 if (!mvm->nvm_data) { in iwl_run_unified_mvm_ucode()
707 mvm->nvm_data = iwl_get_nvm(mvm->trans, mvm->fw, in iwl_run_unified_mvm_ucode()
708 mvm->set_tx_ant, mvm->set_rx_ant); in iwl_run_unified_mvm_ucode()
709 if (IS_ERR(mvm->nvm_data)) { in iwl_run_unified_mvm_ucode()
710 ret = PTR_ERR(mvm->nvm_data); in iwl_run_unified_mvm_ucode()
711 mvm->nvm_data = NULL; in iwl_run_unified_mvm_ucode()
717 mvm->rfkill_safe_init_done = true; in iwl_run_unified_mvm_ucode()
722 iwl_remove_notification(&mvm->notif_wait, &init_wait); in iwl_run_unified_mvm_ucode()
738 lockdep_assert_held(&mvm->mutex); in iwl_run_init_mvm_ucode()
740 mvm->rfkill_safe_init_done = false; in iwl_run_init_mvm_ucode()
742 iwl_init_notification_wait(&mvm->notif_wait, in iwl_run_init_mvm_ucode()
747 mvm->phy_db); in iwl_run_init_mvm_ucode()
749 iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_EARLY, NULL); in iwl_run_init_mvm_ucode()
758 if (mvm->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_8000) { in iwl_run_init_mvm_ucode()
765 if (!mvm->nvm_data) { in iwl_run_init_mvm_ucode()
774 if (mvm->nvm_file_name) { in iwl_run_init_mvm_ucode()
780 WARN_ONCE(mvm->nvm_data->nvm_version < mvm->trans->cfg->nvm_ver, in iwl_run_init_mvm_ucode()
782 mvm->nvm_data->nvm_version, mvm->trans->cfg->nvm_ver); in iwl_run_init_mvm_ucode()
794 mvm->rfkill_safe_init_done = true; in iwl_run_init_mvm_ucode()
812 ret = iwl_wait_notification(&mvm->notif_wait, &calib_wait, in iwl_run_init_mvm_ucode()
828 iwl_remove_notification(&mvm->notif_wait, &calib_wait); in iwl_run_init_mvm_ucode()
830 mvm->rfkill_safe_init_done = false; in iwl_run_init_mvm_ucode()
831 if (!mvm->nvm_data) { in iwl_run_init_mvm_ucode()
832 /* we want to debug INIT and we have no NVM - fake */ in iwl_run_init_mvm_ucode()
833 mvm->nvm_data = kzalloc(sizeof(struct iwl_nvm_data) + in iwl_run_init_mvm_ucode()
837 if (!mvm->nvm_data) in iwl_run_init_mvm_ucode()
838 return -ENOMEM; in iwl_run_init_mvm_ucode()
839 mvm->nvm_data->bands[0].channels = mvm->nvm_data->channels; in iwl_run_init_mvm_ucode()
840 mvm->nvm_data->bands[0].n_channels = 1; in iwl_run_init_mvm_ucode()
841 mvm->nvm_data->bands[0].n_bitrates = 1; in iwl_run_init_mvm_ucode()
842 mvm->nvm_data->bands[0].bitrates = in iwl_run_init_mvm_ucode()
843 (void *)(mvm->nvm_data->channels + 1); in iwl_run_init_mvm_ucode()
844 mvm->nvm_data->bands[0].bitrates->hw_value = 10; in iwl_run_init_mvm_ucode()
856 if (!mvm->trans->ltr_enabled) in iwl_mvm_config_ltr()
876 u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, 3); in iwl_mvm_sar_select_profile()
884 cpu_to_le32(mvm->fwrt.reduced_power_flags); in iwl_mvm_sar_select_profile()
893 cmd.v7.flags = cpu_to_le32(mvm->fwrt.reduced_power_flags); in iwl_mvm_sar_select_profile()
900 } else if (fw_has_api(&mvm->fw->ucode_capa, in iwl_mvm_sar_select_profile()
905 } else if (fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_sar_select_profile()
924 ret = iwl_sar_fill_profile(&mvm->fwrt, per_chain, in iwl_mvm_sar_select_profile()
949 u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd.id, in iwl_mvm_get_sar_geo_profile()
952 /* the ops field is at the same spot for all versions, so set in v1 */ in iwl_mvm_get_sar_geo_profile()
962 else if (fw_has_api(&mvm->fwrt.fw->ucode_capa, in iwl_mvm_get_sar_geo_profile()
968 if (!iwl_sar_geo_support(&mvm->fwrt)) in iwl_mvm_get_sar_geo_profile()
969 return -EOPNOTSUPP; in iwl_mvm_get_sar_geo_profile()
979 resp = (void *)cmd.resp_pkt->data; in iwl_mvm_get_sar_geo_profile()
980 ret = le32_to_cpu(resp->profile_idx); in iwl_mvm_get_sar_geo_profile()
983 ret = -EIO; in iwl_mvm_get_sar_geo_profile()
998 u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, in iwl_mvm_sar_geo_init()
1010 /* the ops field is at the same spot for all versions, so set in v1 */ in iwl_mvm_sar_geo_init()
1013 /* Only set to South Korea if the table revision is 1 */ in iwl_mvm_sar_geo_init()
1014 if (mvm->fwrt.geo_rev == 1) in iwl_mvm_sar_geo_init()
1032 } else if (fw_has_api(&mvm->fwrt.fw->ucode_capa, in iwl_mvm_sar_geo_init()
1053 ret = iwl_sar_geo_fill_table(&mvm->fwrt, &cmd.v1.table[0][0], in iwl_mvm_sar_geo_init()
1071 ret = iwl_fill_ppag_table(&mvm->fwrt, &cmd, &cmd_size); in iwl_mvm_ppag_send_cmd()
1090 if (!(iwl_is_ppag_approved(&mvm->fwrt))) in iwl_mvm_ppag_init()
1128 if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TAS_CFG)) { in iwl_mvm_tas_init()
1133 ret = iwl_bios_get_tas_table(&mvm->fwrt, &data); in iwl_mvm_tas_init()
1164 fw_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, in iwl_mvm_tas_init()
1194 int ret = iwl_bios_get_dsm(&mvm->fwrt, DSM_FUNC_RFI_CONFIG, &value); in iwl_mvm_eval_dsm_rfi()
1227 ret = iwl_fill_lari_config(&mvm->fwrt, &cmd, &cmd_size); in iwl_mvm_lari_cfg()
1244 iwl_acpi_get_guid_lock_status(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1247 ret = iwl_bios_get_ppag_table(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1255 ret = iwl_bios_get_wrds_table(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1264 if (!iwl_bios_get_wgds_table(&mvm->fwrt)) { in iwl_mvm_get_bios_tables()
1275 ret = iwl_bios_get_ewrd_table(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1284 if (iwl_sar_geo_support(&mvm->fwrt)) { in iwl_mvm_get_bios_tables()
1285 ret = iwl_bios_get_wgds_table(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1294 iwl_acpi_get_phy_filters(&mvm->fwrt, &mvm->phy_filters); in iwl_mvm_get_bios_tables()
1296 if (iwl_bios_get_eckv(&mvm->fwrt, &mvm->ext_clock_valid)) in iwl_mvm_get_bios_tables()
1303 if (vif->type == NL80211_IFTYPE_STATION) in iwl_mvm_disconnect_iterator()
1309 u32 error_log_size = mvm->fw->ucode_capa.error_log_size; in iwl_mvm_send_recovery_cmd()
1329 if (!mvm->error_recovery_buf) in iwl_mvm_send_recovery_cmd()
1332 host_cmd.data[1] = mvm->error_recovery_buf; in iwl_mvm_send_recovery_cmd()
1339 kfree(mvm->error_recovery_buf); in iwl_mvm_send_recovery_cmd()
1340 mvm->error_recovery_buf = NULL; in iwl_mvm_send_recovery_cmd()
1354 ieee80211_iterate_interfaces(mvm->hw, 0, in iwl_mvm_send_recovery_cmd()
1380 iwl_fw_dbg_stop_sync(&mvm->fwrt); in iwl_mvm_load_rt_fw()
1381 iwl_trans_stop_device(mvm->trans); in iwl_mvm_load_rt_fw()
1382 ret = iwl_trans_start_hw(mvm->trans); in iwl_mvm_load_rt_fw()
1386 mvm->rfkill_safe_init_done = false; in iwl_mvm_load_rt_fw()
1391 mvm->rfkill_safe_init_done = true; in iwl_mvm_load_rt_fw()
1393 iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_AFTER_ALIVE, in iwl_mvm_load_rt_fw()
1396 return iwl_init_paging(&mvm->fwrt, mvm->fwrt.cur_fw_img); in iwl_mvm_load_rt_fw()
1404 lockdep_assert_held(&mvm->mutex); in iwl_mvm_up()
1406 ret = iwl_trans_start_hw(mvm->trans); in iwl_mvm_up()
1413 if (ret != -ERFKILL && !mvm->fw_product_reset) in iwl_mvm_up()
1414 iwl_fw_dbg_error_collect(&mvm->fwrt, in iwl_mvm_up()
1420 mvm->fw_product_reset = false; in iwl_mvm_up()
1422 iwl_fw_disable_dbg_asserts(&mvm->fwrt); in iwl_mvm_up()
1423 iwl_get_shared_mem_conf(&mvm->fwrt); in iwl_mvm_up()
1429 if (!iwl_trans_dbg_ini_valid(mvm->trans)) { in iwl_mvm_up()
1430 mvm->fwrt.dump.conf = FW_DBG_INVALID; in iwl_mvm_up()
1432 if (mvm->fw->dbg.dest_tlv) in iwl_mvm_up()
1433 mvm->fwrt.dump.conf = FW_DBG_START_FROM_ALIVE; in iwl_mvm_up()
1434 iwl_fw_start_dbg_conf(&mvm->fwrt, FW_DBG_START_FROM_ALIVE); in iwl_mvm_up()
1443 ret = iwl_send_phy_db_data(mvm->phy_db); in iwl_mvm_up()
1455 if (fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_up()
1457 ret = iwl_set_soc_latency(&mvm->fwrt); in iwl_mvm_up()
1465 ret = iwl_configure_rxq(&mvm->fwrt); in iwl_mvm_up()
1478 /* init the fw <-> mac80211 STA mapping */ in iwl_mvm_up()
1479 for (i = 0; i < mvm->fw->ucode_capa.num_stations; i++) { in iwl_mvm_up()
1480 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[i], NULL); in iwl_mvm_up()
1481 RCU_INIT_POINTER(mvm->fw_id_to_link_sta[i], NULL); in iwl_mvm_up()
1485 RCU_INIT_POINTER(mvm->link_id_to_link_conf[i], NULL); in iwl_mvm_up()
1487 mvm->tdls_cs.peer.sta_id = IWL_MVM_INVALID_STA; in iwl_mvm_up()
1489 /* reset quota debouncing buffer - 0xff will yield invalid data */ in iwl_mvm_up()
1490 memset(&mvm->last_quota_cmd, 0xff, sizeof(mvm->last_quota_cmd)); in iwl_mvm_up()
1492 if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_DQA_SUPPORT)) { in iwl_mvm_up()
1504 if (!iwl_mvm_has_new_station_api(mvm->fw)) { in iwl_mvm_up()
1517 sband = mvm->hw->wiphy->bands[i++]; in iwl_mvm_up()
1520 ret = -ENODEV; in iwl_mvm_up()
1525 /* in order to give the responsibility of ct-kill and in iwl_mvm_up()
1544 mvm->cooling_dev.cur_state); in iwl_mvm_up()
1550 if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_SET_LTR_GEN2)) in iwl_mvm_up()
1558 * RTNL is not taken during Ct-kill, but we don't need to scan/Tx in iwl_mvm_up()
1561 if (!test_bit(IWL_MVM_STATUS_HW_CTKILL, &mvm->status)) { in iwl_mvm_up()
1567 if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_UMAC_SCAN)) { in iwl_mvm_up()
1568 mvm->scan_type = IWL_SCAN_TYPE_NOT_SET; in iwl_mvm_up()
1569 mvm->hb_scan_type = IWL_SCAN_TYPE_NOT_SET; in iwl_mvm_up()
1575 if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) { in iwl_mvm_up()
1578 if (mvm->time_sync.active) in iwl_mvm_up()
1579 iwl_mvm_time_sync_config(mvm, mvm->time_sync.peer_addr, in iwl_mvm_up()
1584 if (!mvm->ptp_data.ptp_clock) in iwl_mvm_up()
1623 lockdep_assert_held(&mvm->mutex); in iwl_mvm_load_d3_fw()
1625 ret = iwl_trans_start_hw(mvm->trans); in iwl_mvm_load_d3_fw()
1640 ret = iwl_send_phy_db_data(mvm->phy_db); in iwl_mvm_load_d3_fw()
1648 /* init the fw <-> mac80211 STA mapping */ in iwl_mvm_load_d3_fw()
1649 for (i = 0; i < mvm->fw->ucode_capa.num_stations; i++) { in iwl_mvm_load_d3_fw()
1650 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[i], NULL); in iwl_mvm_load_d3_fw()
1651 RCU_INIT_POINTER(mvm->fw_id_to_link_sta[i], NULL); in iwl_mvm_load_d3_fw()
1654 if (!iwl_mvm_has_new_station_api(mvm->fw)) { in iwl_mvm_load_d3_fw()
1678 struct iwl_mfuart_load_notif *mfuart_notif = (void *)pkt->data; in iwl_mvm_rx_mfuart_notif()
1682 le32_to_cpu(mfuart_notif->installed_ver), in iwl_mvm_rx_mfuart_notif()
1683 le32_to_cpu(mfuart_notif->external_ver), in iwl_mvm_rx_mfuart_notif()
1684 le32_to_cpu(mfuart_notif->status), in iwl_mvm_rx_mfuart_notif()
1685 le32_to_cpu(mfuart_notif->duration)); in iwl_mvm_rx_mfuart_notif()
1690 le32_to_cpu(mfuart_notif->image_size)); in iwl_mvm_rx_mfuart_notif()