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

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->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 iwl_trans_fw_alive(mvm->trans, alive_data.scd_base_addr); in iwl_mvm_load_ucode_wait_alive()
427 ret = iwl_pnvm_load(mvm->trans, &mvm->notif_wait, in iwl_mvm_load_ucode_wait_alive()
428 &mvm->fw->ucode_capa); in iwl_mvm_load_ucode_wait_alive()
431 iwl_fw_set_current_image(&mvm->fwrt, old_type); 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_reset(mvm->trans, in iwl_run_unified_mvm_ucode()
651 iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_AFTER_ALIVE, in iwl_run_unified_mvm_ucode()
654 if (mvm->trans->trans_cfg->device_family >= IWL_DEVICE_FAMILY_BZ) in iwl_run_unified_mvm_ucode()
655 mvm->trans->step_urm = !!(iwl_read_umac_prph(mvm->trans, in iwl_run_unified_mvm_ucode()
673 if (mvm->nvm_file_name) { in iwl_run_unified_mvm_ucode()
674 ret = iwl_read_external_nvm(mvm->trans, mvm->nvm_file_name, in iwl_run_unified_mvm_ucode()
675 mvm->nvm_sections); in iwl_run_unified_mvm_ucode()
701 ret = iwl_wait_notification(&mvm->notif_wait, &init_wait, in iwl_run_unified_mvm_ucode()
707 if (!mvm->nvm_data) { in iwl_run_unified_mvm_ucode()
708 mvm->nvm_data = iwl_get_nvm(mvm->trans, mvm->fw, in iwl_run_unified_mvm_ucode()
709 mvm->set_tx_ant, mvm->set_rx_ant); in iwl_run_unified_mvm_ucode()
710 if (IS_ERR(mvm->nvm_data)) { in iwl_run_unified_mvm_ucode()
711 ret = PTR_ERR(mvm->nvm_data); in iwl_run_unified_mvm_ucode()
712 mvm->nvm_data = NULL; in iwl_run_unified_mvm_ucode()
718 mvm->rfkill_safe_init_done = true; in iwl_run_unified_mvm_ucode()
723 iwl_remove_notification(&mvm->notif_wait, &init_wait); in iwl_run_unified_mvm_ucode()
739 lockdep_assert_held(&mvm->mutex); in iwl_run_init_mvm_ucode()
741 mvm->rfkill_safe_init_done = false; in iwl_run_init_mvm_ucode()
743 iwl_init_notification_wait(&mvm->notif_wait, in iwl_run_init_mvm_ucode()
748 mvm->phy_db); in iwl_run_init_mvm_ucode()
750 iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_EARLY, NULL); in iwl_run_init_mvm_ucode()
759 if (mvm->trans->trans_cfg->device_family < IWL_DEVICE_FAMILY_8000) { in iwl_run_init_mvm_ucode()
766 if (!mvm->nvm_data) { in iwl_run_init_mvm_ucode()
775 if (mvm->nvm_file_name) { in iwl_run_init_mvm_ucode()
781 WARN_ONCE(mvm->nvm_data->nvm_version < mvm->trans->cfg->nvm_ver, in iwl_run_init_mvm_ucode()
783 mvm->nvm_data->nvm_version, mvm->trans->cfg->nvm_ver); in iwl_run_init_mvm_ucode()
795 mvm->rfkill_safe_init_done = true; in iwl_run_init_mvm_ucode()
813 ret = iwl_wait_notification(&mvm->notif_wait, &calib_wait, in iwl_run_init_mvm_ucode()
829 iwl_remove_notification(&mvm->notif_wait, &calib_wait); in iwl_run_init_mvm_ucode()
831 mvm->rfkill_safe_init_done = false; in iwl_run_init_mvm_ucode()
832 if (!mvm->nvm_data) { in iwl_run_init_mvm_ucode()
833 /* we want to debug INIT and we have no NVM - fake */ in iwl_run_init_mvm_ucode()
834 mvm->nvm_data = kzalloc(sizeof(struct iwl_nvm_data) + in iwl_run_init_mvm_ucode()
838 if (!mvm->nvm_data) in iwl_run_init_mvm_ucode()
839 return -ENOMEM; in iwl_run_init_mvm_ucode()
840 mvm->nvm_data->bands[0].channels = mvm->nvm_data->channels; in iwl_run_init_mvm_ucode()
841 mvm->nvm_data->bands[0].n_channels = 1; in iwl_run_init_mvm_ucode()
842 mvm->nvm_data->bands[0].n_bitrates = 1; in iwl_run_init_mvm_ucode()
843 mvm->nvm_data->bands[0].bitrates = in iwl_run_init_mvm_ucode()
844 (void *)(mvm->nvm_data->channels + 1); in iwl_run_init_mvm_ucode()
845 mvm->nvm_data->bands[0].bitrates->hw_value = 10; in iwl_run_init_mvm_ucode()
857 if (!mvm->trans->ltr_enabled) in iwl_mvm_config_ltr()
877 u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, 3); in iwl_mvm_sar_select_profile()
885 cpu_to_le32(mvm->fwrt.reduced_power_flags); in iwl_mvm_sar_select_profile()
894 cmd.v7.flags = cpu_to_le32(mvm->fwrt.reduced_power_flags); in iwl_mvm_sar_select_profile()
901 } else if (fw_has_api(&mvm->fw->ucode_capa, in iwl_mvm_sar_select_profile()
906 } else if (fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_sar_select_profile()
925 ret = iwl_sar_fill_profile(&mvm->fwrt, per_chain, in iwl_mvm_sar_select_profile()
950 u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd.id, in iwl_mvm_get_sar_geo_profile()
953 /* the ops field is at the same spot for all versions, so set in v1 */ in iwl_mvm_get_sar_geo_profile()
963 else if (fw_has_api(&mvm->fwrt.fw->ucode_capa, in iwl_mvm_get_sar_geo_profile()
969 if (!iwl_sar_geo_support(&mvm->fwrt)) in iwl_mvm_get_sar_geo_profile()
970 return -EOPNOTSUPP; in iwl_mvm_get_sar_geo_profile()
980 resp = (void *)cmd.resp_pkt->data; in iwl_mvm_get_sar_geo_profile()
981 ret = le32_to_cpu(resp->profile_idx); in iwl_mvm_get_sar_geo_profile()
984 ret = -EIO; in iwl_mvm_get_sar_geo_profile()
999 u8 cmd_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, in iwl_mvm_sar_geo_init()
1011 /* the ops field is at the same spot for all versions, so set in v1 */ in iwl_mvm_sar_geo_init()
1014 /* Only set to South Korea if the table revision is 1 */ in iwl_mvm_sar_geo_init()
1015 if (mvm->fwrt.geo_rev == 1) in iwl_mvm_sar_geo_init()
1033 } else if (fw_has_api(&mvm->fwrt.fw->ucode_capa, in iwl_mvm_sar_geo_init()
1054 ret = iwl_sar_geo_fill_table(&mvm->fwrt, &cmd.v1.table[0][0], in iwl_mvm_sar_geo_init()
1072 ret = iwl_fill_ppag_table(&mvm->fwrt, &cmd, &cmd_size); in iwl_mvm_ppag_send_cmd()
1091 if (!(iwl_is_ppag_approved(&mvm->fwrt))) in iwl_mvm_ppag_init()
1116 int fw_ver = iwl_fw_lookup_cmd_ver(mvm->fw, cmd_id, in iwl_mvm_tas_init()
1133 if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_TAS_CFG)) { in iwl_mvm_tas_init()
1138 ret = iwl_bios_get_tas_table(&mvm->fwrt, &data); in iwl_mvm_tas_init()
1195 if (fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_tas_init()
1221 int ret = iwl_bios_get_dsm(&mvm->fwrt, DSM_FUNC_RFI_CONFIG, &value); in iwl_mvm_eval_dsm_rfi()
1254 ret = iwl_fill_lari_config(&mvm->fwrt, &cmd, &cmd_size); in iwl_mvm_lari_cfg()
1271 iwl_acpi_get_guid_lock_status(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1274 ret = iwl_bios_get_ppag_table(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1282 ret = iwl_bios_get_wrds_table(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1291 if (!iwl_bios_get_wgds_table(&mvm->fwrt)) { in iwl_mvm_get_bios_tables()
1302 ret = iwl_bios_get_ewrd_table(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1311 if (iwl_sar_geo_support(&mvm->fwrt)) { in iwl_mvm_get_bios_tables()
1312 ret = iwl_bios_get_wgds_table(&mvm->fwrt); in iwl_mvm_get_bios_tables()
1321 iwl_acpi_get_phy_filters(&mvm->fwrt, &mvm->phy_filters); in iwl_mvm_get_bios_tables()
1323 if (iwl_bios_get_eckv(&mvm->fwrt, &mvm->ext_clock_valid)) in iwl_mvm_get_bios_tables()
1330 if (vif->type == NL80211_IFTYPE_STATION) in iwl_mvm_disconnect_iterator()
1336 u32 error_log_size = mvm->fw->ucode_capa.error_log_size; in iwl_mvm_send_recovery_cmd()
1356 if (!mvm->error_recovery_buf) in iwl_mvm_send_recovery_cmd()
1359 host_cmd.data[1] = mvm->error_recovery_buf; in iwl_mvm_send_recovery_cmd()
1366 kfree(mvm->error_recovery_buf); in iwl_mvm_send_recovery_cmd()
1367 mvm->error_recovery_buf = NULL; in iwl_mvm_send_recovery_cmd()
1381 ieee80211_iterate_interfaces(mvm->hw, 0, in iwl_mvm_send_recovery_cmd()
1407 iwl_fw_dbg_stop_sync(&mvm->fwrt); in iwl_mvm_load_rt_fw()
1408 iwl_trans_stop_device(mvm->trans); in iwl_mvm_load_rt_fw()
1409 ret = iwl_trans_start_hw(mvm->trans); in iwl_mvm_load_rt_fw()
1413 mvm->rfkill_safe_init_done = false; in iwl_mvm_load_rt_fw()
1418 mvm->rfkill_safe_init_done = true; in iwl_mvm_load_rt_fw()
1420 iwl_dbg_tlv_time_point(&mvm->fwrt, IWL_FW_INI_TIME_POINT_AFTER_ALIVE, in iwl_mvm_load_rt_fw()
1423 return iwl_init_paging(&mvm->fwrt, mvm->fwrt.cur_fw_img); in iwl_mvm_load_rt_fw()
1431 lockdep_assert_wiphy(mvm->hw->wiphy); in iwl_mvm_up()
1432 lockdep_assert_held(&mvm->mutex); in iwl_mvm_up()
1434 ret = iwl_trans_start_hw(mvm->trans); in iwl_mvm_up()
1441 if (ret != -ERFKILL && !mvm->fw_product_reset) in iwl_mvm_up()
1442 iwl_fw_dbg_error_collect(&mvm->fwrt, in iwl_mvm_up()
1448 mvm->fw_product_reset = false; in iwl_mvm_up()
1450 iwl_fw_disable_dbg_asserts(&mvm->fwrt); in iwl_mvm_up()
1451 iwl_get_shared_mem_conf(&mvm->fwrt); in iwl_mvm_up()
1457 if (!iwl_trans_dbg_ini_valid(mvm->trans)) { in iwl_mvm_up()
1458 mvm->fwrt.dump.conf = FW_DBG_INVALID; in iwl_mvm_up()
1460 if (mvm->fw->dbg.dest_tlv) in iwl_mvm_up()
1461 mvm->fwrt.dump.conf = FW_DBG_START_FROM_ALIVE; in iwl_mvm_up()
1462 iwl_fw_start_dbg_conf(&mvm->fwrt, FW_DBG_START_FROM_ALIVE); in iwl_mvm_up()
1471 ret = iwl_send_phy_db_data(mvm->phy_db); in iwl_mvm_up()
1483 if (fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_up()
1485 ret = iwl_set_soc_latency(&mvm->fwrt); in iwl_mvm_up()
1493 ret = iwl_configure_rxq(&mvm->fwrt); in iwl_mvm_up()
1506 /* init the fw <-> mac80211 STA mapping */ in iwl_mvm_up()
1507 for (i = 0; i < mvm->fw->ucode_capa.num_stations; i++) { in iwl_mvm_up()
1508 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[i], NULL); in iwl_mvm_up()
1509 RCU_INIT_POINTER(mvm->fw_id_to_link_sta[i], NULL); in iwl_mvm_up()
1513 RCU_INIT_POINTER(mvm->link_id_to_link_conf[i], NULL); in iwl_mvm_up()
1515 mvm->tdls_cs.peer.sta_id = IWL_INVALID_STA; in iwl_mvm_up()
1517 /* reset quota debouncing buffer - 0xff will yield invalid data */ in iwl_mvm_up()
1518 memset(&mvm->last_quota_cmd, 0xff, sizeof(mvm->last_quota_cmd)); in iwl_mvm_up()
1520 if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_DQA_SUPPORT)) { in iwl_mvm_up()
1532 if (!iwl_mvm_has_new_station_api(mvm->fw)) { in iwl_mvm_up()
1545 sband = mvm->hw->wiphy->bands[i++]; in iwl_mvm_up()
1548 ret = -ENODEV; in iwl_mvm_up()
1553 /* in order to give the responsibility of ct-kill and in iwl_mvm_up()
1572 mvm->cooling_dev.cur_state); in iwl_mvm_up()
1578 if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_SET_LTR_GEN2)) in iwl_mvm_up()
1586 * RTNL is not taken during Ct-kill, but we don't need to scan/Tx in iwl_mvm_up()
1589 if (!test_bit(IWL_MVM_STATUS_HW_CTKILL, &mvm->status)) { in iwl_mvm_up()
1595 if (fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_UMAC_SCAN)) { in iwl_mvm_up()
1596 mvm->scan_type = IWL_SCAN_TYPE_NOT_SET; in iwl_mvm_up()
1597 mvm->hb_scan_type = IWL_SCAN_TYPE_NOT_SET; in iwl_mvm_up()
1603 if (test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)) { in iwl_mvm_up()
1606 if (mvm->time_sync.active) in iwl_mvm_up()
1607 iwl_mvm_time_sync_config(mvm, mvm->time_sync.peer_addr, in iwl_mvm_up()
1612 if (!mvm->ptp_data.ptp_clock) in iwl_mvm_up()
1651 lockdep_assert_wiphy(mvm->hw->wiphy); in iwl_mvm_load_d3_fw()
1652 lockdep_assert_held(&mvm->mutex); in iwl_mvm_load_d3_fw()
1654 ret = iwl_trans_start_hw(mvm->trans); in iwl_mvm_load_d3_fw()
1669 ret = iwl_send_phy_db_data(mvm->phy_db); in iwl_mvm_load_d3_fw()
1677 /* init the fw <-> mac80211 STA mapping */ in iwl_mvm_load_d3_fw()
1678 for (i = 0; i < mvm->fw->ucode_capa.num_stations; i++) { in iwl_mvm_load_d3_fw()
1679 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[i], NULL); in iwl_mvm_load_d3_fw()
1680 RCU_INIT_POINTER(mvm->fw_id_to_link_sta[i], NULL); in iwl_mvm_load_d3_fw()
1683 if (!iwl_mvm_has_new_station_api(mvm->fw)) { in iwl_mvm_load_d3_fw()
1707 struct iwl_mfuart_load_notif *mfuart_notif = (void *)pkt->data; in iwl_mvm_rx_mfuart_notif()
1711 le32_to_cpu(mfuart_notif->installed_ver), in iwl_mvm_rx_mfuart_notif()
1712 le32_to_cpu(mfuart_notif->external_ver), in iwl_mvm_rx_mfuart_notif()
1713 le32_to_cpu(mfuart_notif->status), in iwl_mvm_rx_mfuart_notif()
1714 le32_to_cpu(mfuart_notif->duration)); in iwl_mvm_rx_mfuart_notif()
1719 le32_to_cpu(mfuart_notif->image_size)); in iwl_mvm_rx_mfuart_notif()