Lines Matching +full:wifi +full:- +full:firmware

1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
3 * Copyright (C) 2024-2025 Intel Corporation
11 #include "iwl-trans.h"
12 #include "iwl-op-mode.h"
14 #include "fw/notif-wait.h"
17 #include "fw/api/mac-cfg.h"
19 #include "fw/api/phy-ctxt.h"
37 #include "ftm-initiator.h"
44 * the WiFi-7 features. MLD stands for multi-link device. Note that there are
45 * devices that do not support WiFi-7 or even WiFi 6E and yet use iwlmld, but
46 * the firmware APIs used in this driver are WiFi-7 compatible.
49 * mac80211's APIs into commands for the firmware and, of course, notifications
50 * from the firmware to mac80211's APIs. An op_mode must implement the
51 * interface defined in iwl-op-mode.h to interact with the transport layer
60 * relies on cfg80211's wiphy->mtx and takes the lock when needed. All the
62 * part is trivial, but also notifications that are received from the firmware
83 * - struct iwl_mld (matches mac80211's struct ieee80211_hw)
85 * - struct iwl_mld_vif (matches macu80211's struct ieee80211_vif)
89 * - struct iwl_mld_sta (matches mac80211's struct ieee80211_sta)
93 * Each object has properties that can survive a firmware reset or not.
94 * Asynchronous firmware notifications can declare themselves as dependent on a
102 * struct iwl_mld - MLD op mode
115 * @monitor.ampdu_ref: the id of the A-MPDU for sniffer
116 * @monitor.ampdu_toggle: the state of the previous packet to track A-MPDU
125 * re-allocated during a restart, so make sure to free it in restart
142 * When &async_handlers_wk runs - it runs these handlers one by one.
149 * @running: true if the firmware is running
150 * @do_not_dump_once: true if firmware dump must be prevented once
161 * @mcc_src: the source id of the MCC, comes from the firmware
166 * supported by the firmware is reached, preventing firmware asserts.
172 * from firmware upon fw/hw error and sent back to the firmware in
176 * TX rate_n_flags for non-STA mgmt frames (toggles on every TX failure).
177 * @low_latency: low-latency manager.
181 * firmware indicated about having transmitted the last beacon, i.e.
286 memset((void *)&(_ptr)->zeroed_on_hw_restart, 0, \
287 sizeof((_ptr)->zeroed_on_hw_restart))
294 CLEANUP_STRUCT(&mld->scan); in iwl_cleanup_mld()
297 mld->fw_status.in_d3 = false; in iwl_cleanup_mld()
309 * struct iwl_mld_mod_params - module parameters for iwlmld
320 ((struct iwl_mld *)(_iwl_op_mode)->op_mode_specific)
323 IWL_OP_MODE_GET_MLD((struct iwl_op_mode *)((_hw)->priv))
341 mld->radio_kill.ct = state; in iwl_mld_set_ctkill()
343 wiphy_rfkill_set_hw_state(mld->wiphy, in iwl_mld_set_ctkill()
344 mld->radio_kill.hw || mld->radio_kill.ct); in iwl_mld_set_ctkill()
349 mld->radio_kill.hw = state; in iwl_mld_set_hwkill()
351 wiphy_rfkill_set_hw_state(mld->wiphy, in iwl_mld_set_hwkill()
352 mld->radio_kill.hw || mld->radio_kill.ct); in iwl_mld_set_hwkill()
357 u8 tx_ant = mld->fw->valid_tx_ant; in iwl_mld_get_valid_tx_ant()
359 if (mld->nvm_data && mld->nvm_data->valid_tx_ant) in iwl_mld_get_valid_tx_ant()
360 tx_ant &= mld->nvm_data->valid_tx_ant; in iwl_mld_get_valid_tx_ant()
367 u8 rx_ant = mld->fw->valid_rx_ant; in iwl_mld_get_valid_rx_ant()
369 if (mld->nvm_data && mld->nvm_data->valid_rx_ant) in iwl_mld_get_valid_rx_ant()
370 rx_ant &= mld->nvm_data->valid_rx_ant; in iwl_mld_get_valid_rx_ant()
417 return is_lb ? rate : -1; in iwl_mld_legacy_hw_idx_to_mac80211_idx()
425 * which can't acquire the wiphy->mutex.
426 * @RX_HANDLER_ASYNC: If the handler needs to hold wiphy->mutex
428 * it will be called from a worker with wiphy->mutex held.
498 u8 arr_sz = ARRAY_SIZE(mld->fw_id_to_##_mac80211_type); \
501 arr_sz = mld->fw->ucode_capa.num_stations; \
504 arr_sz = mld->fw->ucode_capa.num_links; \
507 if (rcu_access_pointer(mld->fw_id_to_##_mac80211_type[idx])) \
511 rcu_assign_pointer(mld->fw_id_to_##_mac80211_type[idx], mac80211_ptr); \
514 return -ENOSPC; \
520 if (IWL_FW_CHECK(mld, fw_link_id >= mld->fw->ucode_capa.num_links, in iwl_mld_fw_id_to_link_conf()
524 return wiphy_dereference(mld->wiphy, in iwl_mld_fw_id_to_link_conf()
525 mld->fw_id_to_bss_conf[fw_link_id]); in iwl_mld_fw_id_to_link_conf()
561 if (!fw_has_capa(&mld->fw->ucode_capa, in iwl_mld_get_lmac_id()
571 return mld->fw_status.in_hw_restart && in iwl_mld_error_before_recovery()
572 !iwl_trans_fw_running(mld->trans); in iwl_mld_error_before_recovery()