Lines Matching +full:fifo +full:- +full:watermark +full:- +full:aligned

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"
18 #include "iwl-op-mode.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
300 * @STATUS_TRANS_DEAD: trans is dead - avoid any read/write operation
335 return -1; in iwl_trans_get_rb_size_order()
374 * struct iwl_dump_sanitize_ops - dump sanitization operations
375 * @frob_txf: Scrub the TX FIFO data
388 * struct iwl_trans_config - transport configuration
393 * @cmd_fifo: the fifo for host commands
399 * @rx_buf_size: RX buffer size needed for A-MSDUs
407 * @cb_data_offs: offset inside skb->cb to store transport data at, must have
441 u8 fifo; member
449 * struct iwl_trans_rxq_dma_data - RX queue DMA data
466 * struct iwl_pnvm_image - contains info about the parsed pnvm image
481 * enum iwl_trans_state - state of the transport layer
496 * In system-wide power management the entire platform goes into a low
502 * mode is dictated by the wake-on-WLAN configuration.
506 * - D0: the device is fully powered and the host is awake;
507 * - D3: the device is in low power mode and only reacts to
508 * specific events (e.g. magic-packet received or scan
516 * enum iwl_plat_pm_mode - platform power management mode
519 * behavior when in system-wide suspend (i.e WoWLAN).
522 * device. In system-wide suspend mode, it means that the all
561 * struct iwl_dram_regions - DRAM regions container structure
575 * struct iwl_fw_mon - fw monitor per allocation id
585 * struct iwl_self_init_dram - dram data used by self init process
599 * struct iwl_imr_data - imr dram data used during debug process
621 * struct iwl_pc_data - program counter details
631 * struct iwl_trans_debug - transport debug related data
716 /* sg_offset is valid if it is non-zero */
746 * struct iwl_txq - Tx Queue for DMA
749 * the writeback -- this is DMA memory and an array holding one buffer
759 * @wd_timeout: queue watchdog timeout (jiffies) - per queue
764 * @write_ptr: 1-st empty entry (index) host_w
769 * @low_mark: low watermark, resume queue if free space more than this
770 * @high_mark: high watermark, stop queue if free space less than this
822 * struct iwl_trans - transport common data
826 * @trans_cfg: the trans-specific configuration part
830 * @status: a bit-mask of transport status flags
838 * @hw_id: a u32 with the ID of the device / sub-device.
858 * @dev_cmd_pool: pool for Tx cmd allocation - for internal use only.
869 * @system_pm_mode: the system-wide power management mode in use.
887 * or unknown (-1, so can still use it as a boolean safely)
973 /*Ensure that this pointer will always be aligned to sizeof pointer */
1007 return kmem_cache_zalloc(trans->dev_cmd_pool, GFP_ATOMIC); in iwl_trans_alloc_tx_cmd()
1015 kmem_cache_free(trans->dev_cmd_pool, dev_cmd); in iwl_trans_free_tx_cmd()
1045 int fifo, int sta_id, int tid, in iwl_trans_txq_enable() argument
1050 .fifo = fifo, in iwl_trans_txq_enable()
1061 void iwl_trans_ac_txq_enable(struct iwl_trans *trans, int queue, int fifo, in iwl_trans_ac_txq_enable() argument
1065 .fifo = fifo, in iwl_trans_ac_txq_enable()
1066 .sta_id = -1, in iwl_trans_ac_txq_enable()
1151 if (test_bit(STATUS_TRANS_DEAD, &trans->status)) in iwl_trans_schedule_reset()
1154 trans->restart.mode.type = type; in iwl_trans_schedule_reset()
1155 trans->restart.mode.context = IWL_ERR_CONTEXT_WORKER; in iwl_trans_schedule_reset()
1157 set_bit(STATUS_RESET_PENDING, &trans->status); in iwl_trans_schedule_reset()
1163 trans->restart.during_reset = test_bit(STATUS_IN_SW_RESET, in iwl_trans_schedule_reset()
1164 &trans->status); in iwl_trans_schedule_reset()
1165 queue_delayed_work(system_unbound_wq, &trans->restart.wk, 0); in iwl_trans_schedule_reset()
1171 if (WARN_ON_ONCE(!trans->op_mode)) in iwl_trans_fw_error()
1175 if (!test_and_set_bit(STATUS_FW_ERROR, &trans->status)) { in iwl_trans_fw_error()
1176 trans->state = IWL_TRANS_NO_FW; in iwl_trans_fw_error()
1177 iwl_op_mode_nic_error(trans->op_mode, type); in iwl_trans_fw_error()
1185 if (WARN_ON_ONCE(!trans->op_mode)) in iwl_trans_opmode_sw_reset()
1188 set_bit(STATUS_IN_SW_RESET, &trans->status); in iwl_trans_opmode_sw_reset()
1190 if (!trans->op_mode->ops->sw_reset || in iwl_trans_opmode_sw_reset()
1191 !trans->op_mode->ops->sw_reset(trans->op_mode, type)) in iwl_trans_opmode_sw_reset()
1192 clear_bit(STATUS_IN_SW_RESET, &trans->status); in iwl_trans_opmode_sw_reset()
1197 return trans->state == IWL_TRANS_FW_ALIVE; in iwl_trans_fw_running()
1221 return trans->dbg.internal_ini_cfg != IWL_INI_CFG_STATE_NOT_LOADED || in iwl_trans_dbg_ini_valid()
1222 trans->dbg.external_ini_cfg != IWL_INI_CFG_STATE_NOT_LOADED; in iwl_trans_dbg_ini_valid()
1229 clear_bit(STATUS_IN_SW_RESET, &trans->status); in iwl_trans_finish_sw_reset()
1265 /* keep last - special backoff value */