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
126 * re-allocated during a restart, so make sure to free it in restart
143 * When &async_handlers_wk runs - it runs these handlers one by one.
150 * @running: true if the firmware is running
151 * @do_not_dump_once: true if firmware dump must be prevented once
167 * @mcc_src: the source id of the MCC, comes from the firmware
172 * supported by the firmware is reached, preventing firmware asserts.
178 * from firmware upon fw/hw error and sent back to the firmware in
182 * TX rate_n_flags for non-STA mgmt frames (toggles on every TX failure).
184 * @low_latency: low-latency manager.
188 * firmware indicated about having transmitted the last beacon, i.e.
301 memset((void *)&(_ptr)->zeroed_on_hw_restart, 0, \
302 sizeof((_ptr)->zeroed_on_hw_restart))
309 CLEANUP_STRUCT(&mld->scan); in iwl_cleanup_mld()
312 mld->fw_status.in_d3 = false; in iwl_cleanup_mld()
324 * struct iwl_mld_mod_params - module parameters for iwlmld
335 ((struct iwl_mld *)(_iwl_op_mode)->op_mode_specific)
338 IWL_OP_MODE_GET_MLD((struct iwl_op_mode *)((_hw)->priv))
356 mld->radio_kill.ct = state; in iwl_mld_set_ctkill()
358 wiphy_rfkill_set_hw_state(mld->wiphy, in iwl_mld_set_ctkill()
359 mld->radio_kill.hw || mld->radio_kill.ct); in iwl_mld_set_ctkill()
364 mld->radio_kill.hw = state; in iwl_mld_set_hwkill()
366 wiphy_rfkill_set_hw_state(mld->wiphy, in iwl_mld_set_hwkill()
367 mld->radio_kill.hw || mld->radio_kill.ct); in iwl_mld_set_hwkill()
372 u8 tx_ant = mld->fw->valid_tx_ant; in iwl_mld_get_valid_tx_ant()
374 if (mld->nvm_data && mld->nvm_data->valid_tx_ant) in iwl_mld_get_valid_tx_ant()
375 tx_ant &= mld->nvm_data->valid_tx_ant; in iwl_mld_get_valid_tx_ant()
382 u8 rx_ant = mld->fw->valid_rx_ant; in iwl_mld_get_valid_rx_ant()
384 if (mld->nvm_data && mld->nvm_data->valid_rx_ant) in iwl_mld_get_valid_rx_ant()
385 rx_ant &= mld->nvm_data->valid_rx_ant; in iwl_mld_get_valid_rx_ant()
432 return is_lb ? rate : -1; in iwl_mld_legacy_hw_idx_to_mac80211_idx()
440 * which can't acquire the wiphy->mutex.
441 * @RX_HANDLER_ASYNC: If the handler needs to hold wiphy->mutex
443 * it will be called from a worker with wiphy->mutex held.
513 u8 arr_sz = ARRAY_SIZE(mld->fw_id_to_##_mac80211_type); \
516 arr_sz = mld->fw->ucode_capa.num_stations; \
519 arr_sz = mld->fw->ucode_capa.num_links; \
522 if (rcu_access_pointer(mld->fw_id_to_##_mac80211_type[idx])) \
526 rcu_assign_pointer(mld->fw_id_to_##_mac80211_type[idx], mac80211_ptr); \
529 return -ENOSPC; \
535 if (IWL_FW_CHECK(mld, fw_link_id >= mld->fw->ucode_capa.num_links, in iwl_mld_fw_id_to_link_conf()
539 return wiphy_dereference(mld->wiphy, in iwl_mld_fw_id_to_link_conf()
540 mld->fw_id_to_bss_conf[fw_link_id]); in iwl_mld_fw_id_to_link_conf()
576 if (!fw_has_capa(&mld->fw->ucode_capa, in iwl_mld_get_lmac_id()
586 return mld->fw_status.in_hw_restart && in iwl_mld_error_before_recovery()
587 !iwl_trans_fw_running(mld->trans); in iwl_mld_error_before_recovery()