Lines Matching +full:fw +full:- +full:cfg

1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
3 * Copyright (C) 2005-2014, 2018-2023 Intel Corporation
4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5 * Copyright (C) 2016-2017 Intel Deutschland GmbH
15 #include "iwl-debug.h"
16 #include "iwl-config.h"
17 #include "fw/img.h"
18 #include "iwl-op-mode.h"
20 #include "fw/api/cmdhdr.h"
21 #include "fw/api/txq.h"
22 #include "fw/api/dbg-tlv.h"
23 #include "iwl-dbg-tlv.h"
26 * DOC: Transport layer - what is it ?
63 #define FH_RSCSR_FRAME_SIZE_MSK 0x00003FFF /* bits 0-13 */
79 * 28-27: Reserved
85 * 21-16: RX queue
86 * 15-14: Reserved
87 * 13-00: RX frame size
96 return le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK; in iwl_rx_packet_len()
101 return iwl_rx_packet_len(pkt) - sizeof(pkt->hdr); in iwl_rx_packet_payload_len()
105 * enum CMD_MODE - how to send the host commands ?
110 * @CMD_SEND_IN_RFKILL: Send the command even if the NIC is in RF-kill.
114 * trans->system_pm_mode to IWL_PLAT_PM_MODE_D3.
147 u8 payload_wide[DEF_CMD_PAYLOAD_SIZE -
155 * struct iwl_device_tx_cmd - buffer for TX command
175 * enum iwl_hcmd_dataflag - flag for each one of the chunks of the command
205 * struct iwl_host_cmd - Host command to the uCode
231 free_pages(cmd->_rx_page_addr, cmd->_rx_page_order); in iwl_free_resp()
244 return (void *)((unsigned long)page_address(r->_page) + r->_offset); in rxb_addr()
249 return r->_offset; in rxb_offset()
254 r->_page_stolen = true; in rxb_steal_page()
255 get_page(r->_page); in rxb_steal_page()
256 return r->_page; in rxb_steal_page()
261 __free_pages(r->_page, r->_rx_page_order); in iwl_free_rxb()
266 #define IWL_MASK(lo, hi) ((1 << (hi)) | ((1 << (hi)) - (1 << (lo))))
282 * enum iwl_d3_status - WoWLAN image/device status
297 * @STATUS_RFKILL_HW: the actual HW state of the RF-kill switch
298 * @STATUS_RFKILL_OPMODE: RF-kill state reported to opmode
299 * @STATUS_FW_ERROR: the fw is in error state
300 * @STATUS_TRANS_DEAD: trans is dead - avoid any read/write operation
301 * @STATUS_SUPPRESS_CMD_ERROR_ONCE: suppress "FW error in SYNC CMD" once,
330 return -1; in iwl_trans_get_rb_size_order()
369 * struct iwl_dump_sanitize_ops - dump sanitization operations
383 * struct iwl_trans_config - transport configuration
394 * @rx_buf_size: RX buffer size needed for A-MSDUs
402 * @cb_data_offs: offset inside skb->cb to store transport data at, must have
444 * struct iwl_trans_rxq_dma_data - RX queue DMA data
457 /* maximal number of DRAM MAP entries supported by FW */
461 * struct iwl_pnvm_image - contains info about the parsed pnvm image
476 * enum iwl_trans_state - state of the transport layer
479 * @IWL_TRANS_FW_STARTED: FW was started, but not alive yet
480 * @IWL_TRANS_FW_ALIVE: FW has sent an alive response
491 * In system-wide power management the entire platform goes into a low
497 * mode is dictated by the wake-on-WLAN configuration.
501 * - D0: the device is fully powered and the host is awake;
502 * - D3: the device is in low power mode and only reacts to
503 * specific events (e.g. magic-packet received or scan
511 * enum iwl_plat_pm_mode - platform power management mode
514 * behavior when in system-wide suspend (i.e WoWLAN).
517 * device. In system-wide suspend mode, it means that the all
529 * @IWL_INI_CFG_STATE_NOT_LOADED: no debug cfg was given
530 * @IWL_INI_CFG_STATE_LOADED: debug cfg was found and loaded
531 * @IWL_INI_CFG_STATE_CORRUPTED: debug cfg was found and some of the TLVs
556 * struct iwl_dram_regions - DRAM regions container structure
561 * designed to show FW where all the payloads are.
570 * struct iwl_fw_mon - fw monitor per allocation id
580 * struct iwl_self_init_dram - dram data used by self init process
581 * @fw: lmac and umac dram data
587 struct iwl_dram_data *fw; member
594 * struct iwl_imr_data - imr dram data used during debug process
595 * @imr_enable: imr enable status received from fw
596 * @imr_size: imr dram size received from fw
601 * @imr_base_addr: imr address received from fw
616 * struct iwl_pc_data - program counter details
626 * struct iwl_trans_debug - transport debug related data
629 * @rec_on: true iff there is a fw debug recording currently active
639 * @internal_ini_cfg: internal debug cfg state. Uses &enum iwl_ini_cfg_state
640 * @external_ini_cfg: external debug cfg state. Uses &enum iwl_ini_cfg_state
644 * @hw_error: equals true if hw error interrupt was received from the FW
715 /* sg_offset is valid if it is non-zero */
745 * struct iwl_txq - Tx Queue for DMA
748 * the writeback -- this is DMA memory and an array holding one buffer
758 * @wd_timeout: queue watchdog timeout (jiffies) - per queue
763 * @write_ptr: 1-st empty entry (index) host_w
821 * struct iwl_trans - transport common data
825 * @trans_cfg: the trans-specific configuration part
826 * @cfg: pointer to the configuration
829 * @status: a bit-mask of transport status flags
837 * @hw_id: a u32 with the ID of the device / sub-device.
857 * @dev_cmd_pool: pool for Tx cmd allocation - for internal use only.
867 * @init_dram: FW initialization DMA data
868 * @system_pm_mode: the system-wide power management mode in use.
886 const struct iwl_cfg *cfg; member
964 int iwl_trans_start_fw(struct iwl_trans *trans, const struct fw_img *fw,
982 return kmem_cache_zalloc(trans->dev_cmd_pool, GFP_ATOMIC); in iwl_trans_alloc_tx_cmd()
990 kmem_cache_free(trans->dev_cmd_pool, dev_cmd); in iwl_trans_free_tx_cmd()
1005 const struct iwl_trans_txq_scd_cfg *cfg,
1024 struct iwl_trans_txq_scd_cfg cfg = { in iwl_trans_txq_enable() local
1032 iwl_trans_txq_enable_cfg(trans, queue, ssn, &cfg, queue_wdg_timeout); in iwl_trans_txq_enable()
1039 struct iwl_trans_txq_scd_cfg cfg = { in iwl_trans_ac_txq_enable() local
1041 .sta_id = -1, in iwl_trans_ac_txq_enable()
1047 iwl_trans_txq_enable_cfg(trans, queue, 0, &cfg, queue_wdg_timeout); in iwl_trans_ac_txq_enable()
1124 if (WARN_ON_ONCE(!trans->op_mode)) in iwl_trans_fw_error()
1127 /* prevent double restarts due to the same erroneous FW */ in iwl_trans_fw_error()
1128 if (!test_and_set_bit(STATUS_FW_ERROR, &trans->status)) { in iwl_trans_fw_error()
1129 trans->state = IWL_TRANS_NO_FW; in iwl_trans_fw_error()
1130 iwl_op_mode_nic_error(trans->op_mode, sync); in iwl_trans_fw_error()
1136 return trans->state == IWL_TRANS_FW_ALIVE; in iwl_trans_fw_running()
1160 return trans->dbg.internal_ini_cfg != IWL_INI_CFG_STATE_NOT_LOADED || in iwl_trans_dbg_ini_valid()
1161 trans->dbg.external_ini_cfg != IWL_INI_CFG_STATE_NOT_LOADED; in iwl_trans_dbg_ini_valid()