Lines Matching +full:pm +full:- +full:api

1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
3 * Copyright (C) 2024-2025 Intel Corporation
26 #include "ftm-initiator.h"
28 #include "fw/api/scan.h"
29 #include "fw/api/context.h"
30 #include "fw/api/filter.h"
31 #include "fw/api/sta.h"
32 #include "fw/api/tdls.h"
34 #include "fw/api/d3.h"
36 #include "iwl-trans.h"
111 struct wiphy *wiphy = mld->wiphy; in iwl_mld_hw_set_addresses()
115 memcpy(mld->addresses[0].addr, mld->nvm_data->hw_addr, ETH_ALEN); in iwl_mld_hw_set_addresses()
116 wiphy->addresses = mld->addresses; in iwl_mld_hw_set_addresses()
117 wiphy->n_addresses = 1; in iwl_mld_hw_set_addresses()
120 if (mld->nvm_data->n_hw_addrs > 1) in iwl_mld_hw_set_addresses()
121 num_addrs = min(mld->nvm_data->n_hw_addrs, in iwl_mld_hw_set_addresses()
125 memcpy(mld->addresses[i].addr, in iwl_mld_hw_set_addresses()
126 mld->addresses[i - 1].addr, in iwl_mld_hw_set_addresses()
128 mld->addresses[i].addr[ETH_ALEN - 1]++; in iwl_mld_hw_set_addresses()
129 wiphy->n_addresses++; in iwl_mld_hw_set_addresses()
135 struct wiphy *wiphy = mld->wiphy; in iwl_mld_hw_set_channels()
136 struct ieee80211_supported_band *bands = mld->nvm_data->bands; in iwl_mld_hw_set_channels()
138 wiphy->bands[NL80211_BAND_2GHZ] = &bands[NL80211_BAND_2GHZ]; in iwl_mld_hw_set_channels()
139 wiphy->bands[NL80211_BAND_5GHZ] = &bands[NL80211_BAND_5GHZ]; in iwl_mld_hw_set_channels()
142 wiphy->bands[NL80211_BAND_6GHZ] = &bands[NL80211_BAND_6GHZ]; in iwl_mld_hw_set_channels()
147 struct ieee80211_hw *hw = mld->hw; in iwl_mld_hw_set_security()
163 hw->wiphy->n_cipher_suites = ARRAY_SIZE(mld_ciphers); in iwl_mld_hw_set_security()
164 hw->wiphy->cipher_suites = mld_ciphers; in iwl_mld_hw_set_security()
167 wiphy_ext_feature_set(hw->wiphy, in iwl_mld_hw_set_security()
173 struct wiphy *wiphy = mld->wiphy; in iwl_mld_hw_set_antennas()
175 wiphy->available_antennas_tx = iwl_mld_get_valid_tx_ant(mld); in iwl_mld_hw_set_antennas()
176 wiphy->available_antennas_rx = iwl_mld_get_valid_rx_ant(mld); in iwl_mld_hw_set_antennas()
182 struct wiphy *wiphy = mld->wiphy; in iwl_mld_hw_set_pm()
184 if (!device_can_wakeup(mld->trans->dev)) in iwl_mld_hw_set_pm()
190 mld->wowlan.flags |= WIPHY_WOWLAN_MAGIC_PKT | in iwl_mld_hw_set_pm()
199 mld->wowlan.n_patterns = IWL_WOWLAN_MAX_PATTERNS; in iwl_mld_hw_set_pm()
200 mld->wowlan.pattern_min_len = IWL_WOWLAN_MIN_PATTERN_LEN; in iwl_mld_hw_set_pm()
201 mld->wowlan.pattern_max_len = IWL_WOWLAN_MAX_PATTERN_LEN; in iwl_mld_hw_set_pm()
202 mld->wowlan.max_nd_match_sets = IWL_SCAN_MAX_PROFILES_V2; in iwl_mld_hw_set_pm()
204 wiphy->wowlan = &mld->wowlan; in iwl_mld_hw_set_pm()
210 struct ieee80211_hw *hw = mld->hw; in iwl_mac_hw_set_radiotap()
212 hw->radiotap_mcs_details |= IEEE80211_RADIOTAP_MCS_HAVE_FEC | in iwl_mac_hw_set_radiotap()
215 hw->radiotap_vht_details |= IEEE80211_RADIOTAP_VHT_KNOWN_STBC | in iwl_mac_hw_set_radiotap()
218 hw->radiotap_timestamp.units_pos = in iwl_mac_hw_set_radiotap()
223 hw->radiotap_timestamp.accuracy = 22; in iwl_mac_hw_set_radiotap()
228 struct ieee80211_hw *hw = mld->hw; in iwl_mac_hw_set_flags()
260 struct ieee80211_hw *hw = mld->hw; in iwl_mac_hw_set_wiphy()
261 struct wiphy *wiphy = hw->wiphy; in iwl_mac_hw_set_wiphy()
262 const struct iwl_ucode_capabilities *ucode_capa = &mld->fw->ucode_capa; in iwl_mac_hw_set_wiphy()
264 snprintf(wiphy->fw_version, in iwl_mac_hw_set_wiphy()
265 sizeof(wiphy->fw_version), in iwl_mac_hw_set_wiphy()
266 "%.31s", mld->fw->fw_version); in iwl_mac_hw_set_wiphy()
268 wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | in iwl_mac_hw_set_wiphy()
275 wiphy->features |= NL80211_FEATURE_SCHED_SCAN_RANDOM_MAC_ADDR | in iwl_mac_hw_set_wiphy()
287 wiphy->flags |= WIPHY_FLAG_IBSS_RSN | in iwl_mac_hw_set_wiphy()
295 if (mld->nvm_data->sku_cap_11be_enable && in iwl_mac_hw_set_wiphy()
299 wiphy->flags |= WIPHY_FLAG_SUPPORTS_MLO; in iwl_mac_hw_set_wiphy()
304 wiphy->max_sched_scan_plan_iterations = 254; in iwl_mac_hw_set_wiphy()
305 wiphy->max_sched_scan_ie_len = iwl_mld_scan_max_template_size(); in iwl_mac_hw_set_wiphy()
306 wiphy->max_scan_ie_len = iwl_mld_scan_max_template_size(); in iwl_mac_hw_set_wiphy()
307 wiphy->max_sched_scan_ssids = PROBE_OPTION_MAX; in iwl_mac_hw_set_wiphy()
308 wiphy->max_scan_ssids = PROBE_OPTION_MAX; in iwl_mac_hw_set_wiphy()
309 wiphy->max_sched_scan_plans = IWL_MAX_SCHED_SCAN_PLANS; in iwl_mac_hw_set_wiphy()
310 wiphy->max_sched_scan_reqs = 1; in iwl_mac_hw_set_wiphy()
311 wiphy->max_sched_scan_plan_interval = U16_MAX; in iwl_mac_hw_set_wiphy()
312 wiphy->max_match_sets = IWL_SCAN_MAX_PROFILES_V2; in iwl_mac_hw_set_wiphy()
314 wiphy->max_remain_on_channel_duration = 10000; in iwl_mac_hw_set_wiphy()
316 wiphy->hw_version = mld->trans->info.hw_id; in iwl_mac_hw_set_wiphy()
318 wiphy->hw_timestamp_max_peers = 1; in iwl_mac_hw_set_wiphy()
320 wiphy->iface_combinations = iwl_mld_iface_combinations; in iwl_mac_hw_set_wiphy()
321 wiphy->n_iface_combinations = ARRAY_SIZE(iwl_mld_iface_combinations); in iwl_mac_hw_set_wiphy()
338 wiphy->iftype_ext_capab = NULL; in iwl_mac_hw_set_wiphy()
339 wiphy->num_iftype_ext_capab = 0; in iwl_mac_hw_set_wiphy()
342 wiphy->iftype_ext_capab = iftypes_ext_capa; in iwl_mac_hw_set_wiphy()
343 wiphy->num_iftype_ext_capab = ARRAY_SIZE(iftypes_ext_capa); in iwl_mac_hw_set_wiphy()
350 wiphy->flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT; in iwl_mac_hw_set_wiphy()
352 wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; in iwl_mac_hw_set_wiphy()
357 struct ieee80211_hw *hw = mld->hw; in iwl_mac_hw_set_misc()
359 hw->queues = IEEE80211_NUM_ACS; in iwl_mac_hw_set_misc()
361 hw->netdev_features = NETIF_F_HIGHDMA | NETIF_F_SG; in iwl_mac_hw_set_misc()
362 hw->netdev_features |= mld->trans->mac_cfg->base->features; in iwl_mac_hw_set_misc()
364 hw->max_tx_fragments = mld->trans->info.max_skb_frags; in iwl_mac_hw_set_misc()
365 hw->max_listen_interval = IWL_MLD_CONN_LISTEN_INTERVAL; in iwl_mac_hw_set_misc()
367 hw->uapsd_max_sp_len = IEEE80211_WMM_IE_STA_QOSINFO_SP_ALL; in iwl_mac_hw_set_misc()
368 hw->uapsd_queues = IEEE80211_WMM_IE_STA_QOSINFO_AC_VO | in iwl_mac_hw_set_misc()
373 hw->chanctx_data_size = sizeof(struct iwl_mld_phy); in iwl_mac_hw_set_misc()
374 hw->vif_data_size = sizeof(struct iwl_mld_vif); in iwl_mac_hw_set_misc()
375 hw->sta_data_size = sizeof(struct iwl_mld_sta); in iwl_mac_hw_set_misc()
376 hw->txq_data_size = sizeof(struct iwl_mld_txq); in iwl_mac_hw_set_misc()
382 hw->max_rx_aggregation_subframes = IEEE80211_MAX_AMPDU_BUF_EHT / 2; in iwl_mac_hw_set_misc()
391 (iwl_fw_lookup_cmd_ver(mld->fw, TX_CMD, 0) >= 11) + in iwl_mld_hw_verify_preconditions()
392 (iwl_fw_lookup_notif_ver(mld->fw, DATA_PATH_GROUP, in iwl_mld_hw_verify_preconditions()
394 (iwl_fw_lookup_notif_ver(mld->fw, LEGACY_GROUP, in iwl_mld_hw_verify_preconditions()
396 (iwl_fw_lookup_notif_ver(mld->fw, DATA_PATH_GROUP, in iwl_mld_hw_verify_preconditions()
398 (iwl_fw_lookup_notif_ver(mld->fw, LONG_GROUP, TX_CMD, 0) >= 9); in iwl_mld_hw_verify_preconditions()
402 return -EINVAL; in iwl_mld_hw_verify_preconditions()
406 if (WARN_ON(!mld->nvm_data->sku_cap_11ax_enable)) in iwl_mld_hw_verify_preconditions()
407 return -EINVAL; in iwl_mld_hw_verify_preconditions()
410 if (WARN_ON(!mld->nvm_data->lar_enabled)) in iwl_mld_hw_verify_preconditions()
411 return -EINVAL; in iwl_mld_hw_verify_preconditions()
417 if (WARN_ON(iwl_fw_lookup_cmd_ver(mld->fw, in iwl_mld_hw_verify_preconditions()
420 return -EINVAL; in iwl_mld_hw_verify_preconditions()
431 return -EINVAL; in iwl_mld_register_hw()
443 SET_IEEE80211_DEV(mld->hw, mld->trans->dev); in iwl_mld_register_hw()
445 return ieee80211_register_hw(mld->hw); in iwl_mld_register_hw()
453 struct ieee80211_sta *sta = control->sta; in iwl_mld_mac80211_tx()
455 struct ieee80211_hdr *hdr = (void *)skb->data; in iwl_mld_mac80211_tx()
456 u32 link_id = u32_get_bits(info->control.flags, in iwl_mld_mac80211_tx()
462 if (ieee80211_is_mgmt(hdr->frame_control) && sta && in iwl_mld_mac80211_tx()
464 !ieee80211_is_probe_resp(hdr->frame_control)) { in iwl_mld_mac80211_tx()
467 rcu_dereference(sta->link[link_id]); in iwl_mld_mac80211_tx()
469 rcu_dereference(info->control.vif->link_conf[link_id]); in iwl_mld_mac80211_tx()
478 memcpy(mgmt->da, link_sta->addr, ETH_ALEN); in iwl_mld_mac80211_tx()
479 memcpy(mgmt->sa, link_conf->addr, ETH_ALEN); in iwl_mld_mac80211_tx()
480 memcpy(mgmt->bssid, link_conf->bssid, ETH_ALEN); in iwl_mld_mac80211_tx()
491 ieee80211_iterate_interfaces(mld->hw, IEEE80211_IFACE_ITER_ACTIVE, in iwl_mld_restart_cleanup()
494 ieee80211_iterate_stations_atomic(mld->hw, in iwl_mld_restart_cleanup()
507 lockdep_assert_wiphy(mld->wiphy); in iwl_mld_mac80211_start()
516 in_d3 = mld->fw_status.in_d3; in iwl_mld_mac80211_start()
527 mld->fw_status.in_hw_restart = false; in iwl_mld_mac80211_start()
532 if (mld->fw_status.in_hw_restart) { in iwl_mld_mac80211_start()
543 mld->scan.last_start_time_jiffies = jiffies; in iwl_mld_mac80211_start()
545 iwl_dbg_tlv_time_point(&mld->fwrt, IWL_FW_INI_TIME_POINT_POST_INIT, in iwl_mld_mac80211_start()
547 iwl_dbg_tlv_time_point(&mld->fwrt, IWL_FW_INI_TIME_POINT_PERIODIC, in iwl_mld_mac80211_start()
556 mld->fw_status.in_hw_restart = false; in iwl_mld_mac80211_start()
566 lockdep_assert_wiphy(mld->wiphy); in iwl_mld_mac80211_stop()
568 wiphy_work_cancel(mld->wiphy, &mld->add_txqs_wk); in iwl_mld_mac80211_stop()
580 mld->fw_status.in_hw_restart = false; in iwl_mld_mac80211_stop()
585 for (int i = 0; i < ARRAY_SIZE(mld->scan.uid_status); i++) in iwl_mld_mac80211_stop()
586 if (WARN_ONCE(mld->scan.uid_status[i], in iwl_mld_mac80211_stop()
588 i, mld->scan.uid_status[i], mld->scan.status)) in iwl_mld_mac80211_stop()
589 mld->scan.uid_status[i] = 0; in iwl_mld_mac80211_stop()
606 lockdep_assert_wiphy(mld->wiphy); in iwl_mld_mac80211_add_interface()
618 ret = iwl_mld_add_link(mld, &vif->bss_conf); in iwl_mld_mac80211_add_interface()
622 if (vif->type == NL80211_IFTYPE_STATION) { in iwl_mld_mac80211_add_interface()
623 vif->driver_flags |= IEEE80211_VIF_REMOVE_AP_AFTER_DISASSOC; in iwl_mld_mac80211_add_interface()
624 if (!vif->p2p) in iwl_mld_mac80211_add_interface()
625 vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER | in iwl_mld_mac80211_add_interface()
629 if (vif->p2p || iwl_fw_lookup_cmd_ver(mld->fw, PHY_CONTEXT_CMD, 0) < 5) in iwl_mld_mac80211_add_interface()
630 vif->driver_flags |= IEEE80211_VIF_IGNORE_OFDMA_WIDER_BW; in iwl_mld_mac80211_add_interface()
636 if (vif->type == NL80211_IFTYPE_STATION && in iwl_mld_mac80211_add_interface()
640 if (vif->type == NL80211_IFTYPE_MONITOR) { in iwl_mld_mac80211_add_interface()
641 mld->monitor.on = true; in iwl_mld_mac80211_add_interface()
642 ieee80211_hw_set(mld->hw, RX_INCLUDES_FCS); in iwl_mld_mac80211_add_interface()
645 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) in iwl_mld_mac80211_add_interface()
646 mld->p2p_device_vif = vif; in iwl_mld_mac80211_add_interface()
661 lockdep_assert_wiphy(mld->wiphy); in iwl_mld_mac80211_remove_interface()
664 vif->driver_flags &= ~(IEEE80211_VIF_BEACON_FILTER | in iwl_mld_mac80211_remove_interface()
667 if (vif->type == NL80211_IFTYPE_MONITOR) { in iwl_mld_mac80211_remove_interface()
668 __clear_bit(IEEE80211_HW_RX_INCLUDES_FCS, mld->hw->flags); in iwl_mld_mac80211_remove_interface()
669 mld->monitor.on = false; in iwl_mld_mac80211_remove_interface()
672 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) in iwl_mld_mac80211_remove_interface()
673 mld->p2p_device_vif = NULL; in iwl_mld_mac80211_remove_interface()
675 iwl_mld_remove_link(mld, &vif->bss_conf); in iwl_mld_mac80211_remove_interface()
678 debugfs_remove(iwl_mld_vif_from_mac80211(vif)->dbgfs_slink); in iwl_mld_mac80211_remove_interface()
679 iwl_mld_vif_from_mac80211(vif)->dbgfs_slink = NULL; in iwl_mld_mac80211_remove_interface()
694 struct iwl_mld *mld = mc_data->mld; in iwl_mld_mc_iface_iterator()
695 struct iwl_mcast_filter_cmd *cmd = mld->mcast_filter_cmd; in iwl_mld_mc_iface_iterator()
703 if (WARN_ON_ONCE(mc_data->port_id >= MAX_PORT_ID_NUM)) in iwl_mld_mc_iface_iterator()
706 if (vif->type != NL80211_IFTYPE_STATION || !vif->cfg.assoc) in iwl_mld_mc_iface_iterator()
709 cmd->port_id = mc_data->port_id++; in iwl_mld_mc_iface_iterator()
710 ether_addr_copy(cmd->bssid, vif->bss_conf.bssid); in iwl_mld_mc_iface_iterator()
711 len = roundup(sizeof(*cmd) + cmd->count * ETH_ALEN, 4); in iwl_mld_mc_iface_iterator()
727 if (WARN_ON_ONCE(!mld->mcast_filter_cmd)) in iwl_mld_recalc_multicast_filter()
730 ieee80211_iterate_active_interfaces(mld->hw, in iwl_mld_recalc_multicast_filter()
757 cmd->pass_all = 1; in iwl_mld_mac80211_prepare_multicast()
762 IWL_DEBUG_MAC80211(mld, "mcast addr (%d): %pM\n", in iwl_mld_mac80211_prepare_multicast()
763 cmd->count, addr->addr); in iwl_mld_mac80211_prepare_multicast()
764 ether_addr_copy(&cmd->addr_list[cmd->count * ETH_ALEN], in iwl_mld_mac80211_prepare_multicast()
765 addr->addr); in iwl_mld_mac80211_prepare_multicast()
766 cmd->count++; in iwl_mld_mac80211_prepare_multicast()
783 kfree(mld->mcast_filter_cmd); in iwl_mld_mac80211_configure_filter()
784 mld->mcast_filter_cmd = cmd; in iwl_mld_mac80211_configure_filter()
790 cmd->pass_all = !!(*total_flags & FIF_ALLMULTI); in iwl_mld_mac80211_configure_filter()
792 if (cmd->pass_all) in iwl_mld_mac80211_configure_filter()
793 cmd->count = 0; in iwl_mld_mac80211_configure_filter()
807 if (likely(mld_txq->status.allocated) || !txq->sta) { in iwl_mld_mac80211_wake_tx_queue()
813 if (txq->tid != IEEE80211_NUM_TIDS && txq->tid >= IWL_MAX_TID_COUNT) { in iwl_mld_mac80211_wake_tx_queue()
814 IWL_DEBUG_MAC80211(mld, "TID %d is not supported\n", txq->tid); in iwl_mld_mac80211_wake_tx_queue()
820 spin_lock_bh(&mld->add_txqs_lock); in iwl_mld_mac80211_wake_tx_queue()
822 if (list_empty(&mld_txq->list) && in iwl_mld_mac80211_wake_tx_queue()
824 !mld_txq->status.allocated) { in iwl_mld_mac80211_wake_tx_queue()
825 list_add_tail(&mld_txq->list, &mld->txqs_to_add); in iwl_mld_mac80211_wake_tx_queue()
826 wiphy_work_queue(mld->wiphy, &mld->add_txqs_wk); in iwl_mld_mac80211_wake_tx_queue()
828 spin_unlock_bh(&mld->add_txqs_lock); in iwl_mld_mac80211_wake_tx_queue()
833 lockdep_assert_wiphy(mld->wiphy); in iwl_mld_teardown_tdls_peers()
835 for (int i = 0; i < mld->fw->ucode_capa.num_stations; i++) { in iwl_mld_teardown_tdls_peers()
839 link_sta = wiphy_dereference(mld->wiphy, in iwl_mld_teardown_tdls_peers()
840 mld->fw_id_to_link_sta[i]); in iwl_mld_teardown_tdls_peers()
844 if (!link_sta->sta->tdls) in iwl_mld_teardown_tdls_peers()
847 mld_sta = iwl_mld_sta_from_mac80211(link_sta->sta); in iwl_mld_teardown_tdls_peers()
849 ieee80211_tdls_oper_request(mld_sta->vif, link_sta->addr, in iwl_mld_teardown_tdls_peers()
868 phy->mld = mld; in iwl_mld_add_chanctx()
869 phy->fw_id = fw_id; in iwl_mld_add_chanctx()
870 phy->chandef = *iwl_mld_get_chandef_from_chanctx(mld, ctx); in iwl_mld_add_chanctx()
874 mld->used_phy_ids &= ~BIT(phy->fw_id); in iwl_mld_add_chanctx()
878 if (hweight8(mld->used_phy_ids) > 1) in iwl_mld_add_chanctx()
892 mld->used_phy_ids &= ~BIT(phy->fw_id); in iwl_mld_remove_chanctx()
915 if (chandef->chan == phy->chandef.chan && in iwl_mld_change_chanctx()
916 chandef->center_freq1 == phy->chandef.center_freq1 && in iwl_mld_change_chanctx()
917 chandef->punctured == phy->chandef.punctured) { in iwl_mld_change_chanctx()
918 /* Check if we are toggling between HT and non-HT, no-op */ in iwl_mld_change_chanctx()
919 if (phy->chandef.width == chandef->width || in iwl_mld_change_chanctx()
920 (phy->chandef.width <= NL80211_CHAN_WIDTH_20 && in iwl_mld_change_chanctx()
921 chandef->width <= NL80211_CHAN_WIDTH_20)) in iwl_mld_change_chanctx()
936 if (chandef->width == NL80211_CHAN_WIDTH_320) in iwl_mld_chandef_get_primary_80()
938 else if (chandef->width == NL80211_CHAN_WIDTH_160) in iwl_mld_chandef_get_primary_80()
944 data_start = chandef->center_freq1 - bw / 2; in iwl_mld_chandef_get_primary_80()
946 control_start = chandef->chan->center_freq - 10; in iwl_mld_chandef_get_primary_80()
948 return (control_start - data_start) / 80; in iwl_mld_chandef_get_primary_80()
960 if (!mld_vif->ap_sta || !vif->cfg.assoc) in iwl_mld_can_activate_link()
963 mld_sta = iwl_mld_sta_from_mac80211(mld_vif->ap_sta); in iwl_mld_can_activate_link()
969 link_sta = wiphy_dereference(mld->wiphy, mld_sta->link[link->link_id]); in iwl_mld_can_activate_link()
972 return link_sta && link_sta->in_fw; in iwl_mld_can_activate_link()
986 lockdep_assert_wiphy(mld->wiphy); in iwl_mld_assign_vif_chanctx()
989 return -EINVAL; in iwl_mld_assign_vif_chanctx()
992 if (!rcu_access_pointer(mld_link->chan_ctx)) { in iwl_mld_assign_vif_chanctx()
995 /* Track addition of non-BSS link */ in iwl_mld_assign_vif_chanctx()
1004 if (vif->type == NL80211_IFTYPE_AP) { in iwl_mld_assign_vif_chanctx()
1008 IWL_ERR(mld, "failed to update MAC %pM\n", vif->addr); in iwl_mld_assign_vif_chanctx()
1009 return -EINVAL; in iwl_mld_assign_vif_chanctx()
1013 rcu_assign_pointer(mld_link->chan_ctx, ctx); in iwl_mld_assign_vif_chanctx()
1019 vif->driver_flags |= IEEE80211_VIF_EML_ACTIVE; in iwl_mld_assign_vif_chanctx()
1020 mld_vif->emlsr.last_entry_ts = jiffies; in iwl_mld_assign_vif_chanctx()
1022 if (vif->active_links & BIT(mld_vif->emlsr.selected_links)) in iwl_mld_assign_vif_chanctx()
1023 mld_vif->emlsr.primary = mld_vif->emlsr.selected_primary; in iwl_mld_assign_vif_chanctx()
1025 mld_vif->emlsr.primary = __ffs(vif->active_links); in iwl_mld_assign_vif_chanctx()
1027 iwl_dbg_tlv_time_point(&mld->fwrt, IWL_FW_INI_TIME_ESR_LINK_UP, in iwl_mld_assign_vif_chanctx()
1040 * doing a link switch here - we cannot initialize it before since in iwl_mld_assign_vif_chanctx()
1043 * able to TX on the link, i.e. when active. (task=link-switch) in iwl_mld_assign_vif_chanctx()
1053 if (vif->type == NL80211_IFTYPE_STATION) in iwl_mld_assign_vif_chanctx()
1056 if (vif->type == NL80211_IFTYPE_MONITOR) { in iwl_mld_assign_vif_chanctx()
1061 mld->monitor.p80 = in iwl_mld_assign_vif_chanctx()
1062 iwl_mld_chandef_get_primary_80(&vif->bss_conf.chanreq.oper); in iwl_mld_assign_vif_chanctx()
1068 if (mld_link->active) in iwl_mld_assign_vif_chanctx()
1071 RCU_INIT_POINTER(mld_link->chan_ctx, NULL); in iwl_mld_assign_vif_chanctx()
1089 /* Track removal of non-BSS link */ in iwl_mld_unassign_vif_chanctx()
1091 iwl_mld_emlsr_check_non_bss_block(mld, -1); in iwl_mld_unassign_vif_chanctx()
1095 if (vif->type == NL80211_IFTYPE_MONITOR) in iwl_mld_unassign_vif_chanctx()
1100 vif->driver_flags &= ~IEEE80211_VIF_EML_ACTIVE; in iwl_mld_unassign_vif_chanctx()
1102 iwl_dbg_tlv_time_point(&mld->fwrt, in iwl_mld_unassign_vif_chanctx()
1107 RCU_INIT_POINTER(mld_link->chan_ctx, NULL); in iwl_mld_unassign_vif_chanctx()
1109 /* in the non-MLO case, remove/re-add the link to clean up FW state. in iwl_mld_unassign_vif_chanctx()
1112 if (!ieee80211_vif_is_mld(vif) && !mld_vif->ap_sta && in iwl_mld_unassign_vif_chanctx()
1113 !WARN_ON_ONCE(vif->cfg.assoc) && in iwl_mld_unassign_vif_chanctx()
1114 vif->type != NL80211_IFTYPE_AP && !mld->fw_status.in_hw_restart) { in iwl_mld_unassign_vif_chanctx()
1163 if (changes & BSS_CHANGED_QOS && vif->cfg.assoc && link_conf->qos) in iwl_mld_link_changed_mapping()
1177 has_he = link_conf->he_support && !iwlwifi_mod_params.disable_11ax; in iwl_mld_link_changed_mapping()
1178 has_eht = link_conf->eht_support && !iwlwifi_mod_params.disable_11be; in iwl_mld_link_changed_mapping()
1180 if (vif->cfg.assoc && (has_he || has_eht)) { in iwl_mld_link_changed_mapping()
1223 sizeof(link_conf->mu_group.membership)); in iwl_mld_update_mu_groups()
1225 sizeof(link_conf->mu_group.position)); in iwl_mld_update_mu_groups()
1227 memcpy(cmd.membership_status, link_conf->mu_group.membership, in iwl_mld_update_mu_groups()
1229 memcpy(cmd.user_position, link_conf->mu_group.position, in iwl_mld_update_mu_groups()
1246 switch (vif->type) { in iwl_mld_mac80211_link_info_changed()
1275 iwl_mld_set_tx_power(mld, link_conf, link_conf->txpower); in iwl_mld_mac80211_link_info_changed()
1283 iwl_fw_lookup_cmd_ver(mld->fw, MAC_PM_POWER_TABLE, 0) < 2; in iwl_mld_smps_workaround()
1288 /* Send the device-level power commands since the in iwl_mld_smps_workaround()
1292 if (mld_vif->ps_disabled == !enable) in iwl_mld_smps_workaround()
1295 mld_vif->ps_disabled = !enable; in iwl_mld_smps_workaround()
1308 lockdep_assert_wiphy(mld->wiphy); in iwl_mld_mac80211_vif_cfg_changed()
1310 if (vif->type != NL80211_IFTYPE_STATION) in iwl_mld_mac80211_vif_cfg_changed()
1318 if (vif->cfg.assoc) { in iwl_mld_mac80211_vif_cfg_changed()
1333 iwl_mld_smps_workaround(mld, vif, vif->cfg.ps); in iwl_mld_mac80211_vif_cfg_changed()
1348 if (WARN_ON(!hw_req->req.n_channels || in iwl_mld_mac80211_hw_scan()
1349 hw_req->req.n_channels > in iwl_mld_mac80211_hw_scan()
1350 mld->fw->ucode_capa.n_scan_channels)) in iwl_mld_mac80211_hw_scan()
1351 return -EINVAL; in iwl_mld_mac80211_hw_scan()
1353 ret = iwl_mld_regular_scan_start(mld, vif, &hw_req->req, &hw_req->ies); in iwl_mld_mac80211_hw_scan()
1377 if (mld->scan.status & IWL_MLD_SCAN_REGULAR) { in iwl_mld_mac80211_cancel_hw_scan()
1409 if (!(mld->scan.status & IWL_MLD_SCAN_SCHED)) in iwl_mld_mac80211_sched_scan_stop()
1423 mld->fw_status.in_hw_restart = false; in iwl_mld_mac80211_reconfig_complete()
1425 iwl_trans_finish_sw_reset(mld->trans); in iwl_mld_mac80211_reconfig_complete()
1427 if (!list_empty(&mld->txqs_to_add)) in iwl_mld_mac80211_reconfig_complete()
1428 wiphy_work_queue(mld->wiphy, &mld->add_txqs_wk); in iwl_mld_mac80211_reconfig_complete()
1448 if (info->was_assoc) in iwl_mld_mac80211_mgd_prepare_tx()
1451 if (info->duration > duration) in iwl_mld_mac80211_mgd_prepare_tx()
1452 duration = info->duration; in iwl_mld_mac80211_mgd_prepare_tx()
1456 info->link_id); in iwl_mld_mac80211_mgd_prepare_tx()
1473 if (info->success && info->subtype == IEEE80211_STYPE_AUTH) in iwl_mld_mac_mgd_complete_tx()
1485 WARN_ON(info->success && in iwl_mld_mac_mgd_complete_tx()
1486 (info->subtype == IEEE80211_STYPE_ASSOC_REQ || in iwl_mld_mac_mgd_complete_tx()
1487 info->subtype == IEEE80211_STYPE_REASSOC_REQ) && in iwl_mld_mac_mgd_complete_tx()
1488 !vif->cfg.assoc); in iwl_mld_mac_mgd_complete_tx()
1490 iwl_mld_cancel_session_protection(mld, vif, info->link_id); in iwl_mld_mac_mgd_complete_tx()
1503 lockdep_assert_wiphy(mld->wiphy); in iwl_mld_mac80211_conf_tx()
1507 return -EINVAL; in iwl_mld_mac80211_conf_tx()
1509 link->queue_params[ac] = *params; in iwl_mld_mac80211_conf_tx()
1514 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) in iwl_mld_mac80211_conf_tx()
1515 iwl_mld_change_link_in_fw(mld, &vif->bss_conf, in iwl_mld_mac80211_conf_tx()
1523 vif->driver_flags &= ~IEEE80211_VIF_SUPPORTS_UAPSD; in iwl_mld_set_uapsd()
1525 if (vif->type != NL80211_IFTYPE_STATION) in iwl_mld_set_uapsd()
1528 if (vif->p2p && in iwl_mld_set_uapsd()
1530 vif->driver_flags |= IEEE80211_VIF_SUPPORTS_UAPSD; in iwl_mld_set_uapsd()
1532 if (!vif->p2p && in iwl_mld_set_uapsd()
1534 vif->driver_flags |= IEEE80211_VIF_SUPPORTS_UAPSD; in iwl_mld_set_uapsd()
1541 lockdep_assert_wiphy(mld->wiphy); in iwl_mld_tdls_sta_count()
1543 for (int i = 0; i < mld->fw->ucode_capa.num_stations; i++) { in iwl_mld_tdls_sta_count()
1546 link_sta = wiphy_dereference(mld->wiphy, in iwl_mld_tdls_sta_count()
1547 mld->fw_id_to_link_sta[i]); in iwl_mld_tdls_sta_count()
1551 if (!link_sta->sta->tdls) in iwl_mld_tdls_sta_count()
1569 ies = rcu_dereference(bss->ies); in iwl_mld_check_he_obss_narrow_bw_ru_iter()
1570 elem = cfg80211_find_elem(WLAN_EID_EXT_CAPABILITY, ies->data, in iwl_mld_check_he_obss_narrow_bw_ru_iter()
1571 ies->len); in iwl_mld_check_he_obss_narrow_bw_ru_iter()
1573 if (!elem || elem->datalen < 10 || in iwl_mld_check_he_obss_narrow_bw_ru_iter()
1574 !(elem->data[10] & in iwl_mld_check_he_obss_narrow_bw_ru_iter()
1588 if (WARN_ON_ONCE(!link_conf->chanreq.oper.chan)) in iwl_mld_check_he_obss_narrow_bw_ru()
1591 if (!(link_conf->chanreq.oper.chan->flags & IEEE80211_CHAN_RADAR)) { in iwl_mld_check_he_obss_narrow_bw_ru()
1592 mld_link->he_ru_2mhz_block = false; in iwl_mld_check_he_obss_narrow_bw_ru()
1596 cfg80211_bss_iter(mld->wiphy, &link_conf->chanreq.oper, in iwl_mld_check_he_obss_narrow_bw_ru()
1600 * tolerate 26-tone RU UL OFDMA transmissions using HE TB PPDU. in iwl_mld_check_he_obss_narrow_bw_ru()
1602 mld_link->he_ru_2mhz_block = !tolerated; in iwl_mld_check_he_obss_narrow_bw_ru()
1621 if (link_sta->he_cap.has_he) in iwl_mld_link_set_2mhz_block()
1639 if (sta->tdls) { in iwl_mld_move_sta_state_up()
1640 if (vif->p2p || hweight8(mld->used_phy_ids) != 1) in iwl_mld_move_sta_state_up()
1641 return -EBUSY; in iwl_mld_move_sta_state_up()
1645 return -EBUSY; in iwl_mld_move_sta_state_up()
1652 /* just added first TDLS STA, so disable PM */ in iwl_mld_move_sta_state_up()
1653 if (sta->tdls && tdls_count == 0) in iwl_mld_move_sta_state_up()
1656 if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) in iwl_mld_move_sta_state_up()
1657 mld_vif->ap_sta = sta; in iwl_mld_move_sta_state_up()
1659 /* Initialize TLC here already - this really tells in iwl_mld_move_sta_state_up()
1680 if (vif->type == NL80211_IFTYPE_STATION) in iwl_mld_move_sta_state_up()
1685 if (vif->type == NL80211_IFTYPE_AP) { in iwl_mld_move_sta_state_up()
1689 if (++mld_vif->num_associated_stas == 1) in iwl_mld_move_sta_state_up()
1699 if (!sta->tdls) { in iwl_mld_move_sta_state_up()
1700 mld_vif->authorized = true; in iwl_mld_move_sta_state_up()
1702 /* Ensure any block due to a non-BSS link is synced */ in iwl_mld_move_sta_state_up()
1706 if (!mld->fw_status.in_hw_restart && in iwl_mld_move_sta_state_up()
1708 iwl_mld_block_emlsr(mld_vif->mld, vif, in iwl_mld_move_sta_state_up()
1717 iwl_mld_smps_workaround(mld, vif, vif->cfg.ps); in iwl_mld_move_sta_state_up()
1723 if (!sta->mfp) in iwl_mld_move_sta_state_up()
1731 return -EINVAL; in iwl_mld_move_sta_state_up()
1745 if (!sta->tdls) { in iwl_mld_move_sta_state_down()
1746 mld_vif->authorized = false; in iwl_mld_move_sta_state_down()
1748 memset(&mld_vif->emlsr.zeroed_on_not_authorized, 0, in iwl_mld_move_sta_state_down()
1749 sizeof(mld_vif->emlsr.zeroed_on_not_authorized)); in iwl_mld_move_sta_state_down()
1751 wiphy_delayed_work_cancel(mld->wiphy, in iwl_mld_move_sta_state_down()
1752 &mld_vif->emlsr.prevent_done_wk); in iwl_mld_move_sta_state_down()
1753 wiphy_delayed_work_cancel(mld->wiphy, in iwl_mld_move_sta_state_down()
1754 &mld_vif->emlsr.tmp_non_bss_done_wk); in iwl_mld_move_sta_state_down()
1755 wiphy_work_cancel(mld->wiphy, &mld_vif->emlsr.unblock_tpt_wk); in iwl_mld_move_sta_state_down()
1756 wiphy_delayed_work_cancel(mld->wiphy, in iwl_mld_move_sta_state_down()
1757 &mld_vif->emlsr.check_tpt_wk); in iwl_mld_move_sta_state_down()
1769 if (vif->type == NL80211_IFTYPE_AP && in iwl_mld_move_sta_state_down()
1770 !WARN_ON(!mld_vif->num_associated_stas)) { in iwl_mld_move_sta_state_down()
1774 if (--mld_vif->num_associated_stas == 0) in iwl_mld_move_sta_state_down()
1785 if (sta->tdls && iwl_mld_tdls_sta_count(mld) == 0) { in iwl_mld_move_sta_state_down()
1786 /* just removed last TDLS STA, so enable PM */ in iwl_mld_move_sta_state_down()
1790 return -EINVAL; in iwl_mld_move_sta_state_down()
1804 IWL_DEBUG_MAC80211(mld, "station %pM state change %d->%d\n", in iwl_mld_mac80211_sta_state()
1805 sta->addr, old_state, new_state); in iwl_mld_mac80211_sta_state()
1807 mld_sta->sta_state = new_state; in iwl_mld_mac80211_sta_state()
1826 for (int i = 0; i < mld->fw->ucode_capa.num_stations; i++) { in iwl_mld_mac80211_flush()
1828 wiphy_dereference(mld->wiphy, in iwl_mld_mac80211_flush()
1829 mld->fw_id_to_link_sta[i]); in iwl_mld_mac80211_flush()
1835 if (vif && vif != iwl_mld_sta_from_mac80211(link_sta->sta)->vif) in iwl_mld_mac80211_flush()
1839 iwl_mld_flush_sta_txqs(mld, link_sta->sta); in iwl_mld_mac80211_flush()
1841 iwl_mld_wait_sta_txqs_empty(mld, link_sta->sta); in iwl_mld_mac80211_flush()
1860 struct ieee80211_sta *sta = params->sta; in iwl_mld_mac80211_ampdu_action()
1861 enum ieee80211_ampdu_mlme_action action = params->action; in iwl_mld_mac80211_ampdu_action()
1862 u16 tid = params->tid; in iwl_mld_mac80211_ampdu_action()
1863 u16 ssn = params->ssn; in iwl_mld_mac80211_ampdu_action()
1864 u16 buf_size = params->buf_size; in iwl_mld_mac80211_ampdu_action()
1865 u16 timeout = params->timeout; in iwl_mld_mac80211_ampdu_action()
1868 IWL_DEBUG_HT(mld, "A-MPDU action on addr %pM tid: %d action: %d\n", in iwl_mld_mac80211_ampdu_action()
1869 sta->addr, tid, action); in iwl_mld_mac80211_ampdu_action()
1874 ret = -EINVAL; in iwl_mld_mac80211_ampdu_action()
1885 * devices, since all support TX A-MPDU offload in hardware. in iwl_mld_mac80211_ampdu_action()
1889 return -EINVAL; in iwl_mld_mac80211_ampdu_action()
1897 u8 protocol = ip_hdr(skb)->protocol; in iwl_mld_can_hw_csum()
1910 if (skb->protocol != htons(ETH_P_IP)) in iwl_mld_mac80211_can_aggregate()
1914 * capability, ensuring consistent HW or SW csum handling in A-MSDU. in iwl_mld_mac80211_can_aggregate()
1937 link_conf_dereference_check(vif, link_sta->link_id); in iwl_mld_sta_rc_update()
1951 device_set_wakeup_enable(mld->trans->dev, enabled); in iwl_mld_set_wakeup()
1966 iwl_fw_runtime_suspend(&mld->fwrt); in iwl_mld_suspend()
1971 mld->trans->state = IWL_TRANS_NO_FW; in iwl_mld_suspend()
1972 set_bit(STATUS_FW_ERROR, &mld->trans->status); in iwl_mld_suspend()
1992 iwl_fw_runtime_resume(&mld->fwrt); in iwl_mld_resume()
2005 u8 num_rx_queues = mld->trans->info.num_rxqs; in iwl_mld_alloc_ptk_pn()
2006 int keyidx = key->keyidx; in iwl_mld_alloc_ptk_pn()
2009 if (WARN_ON(keyidx >= ARRAY_SIZE(mld_sta->ptk_pn))) in iwl_mld_alloc_ptk_pn()
2010 return -EINVAL; in iwl_mld_alloc_ptk_pn()
2012 WARN_ON(rcu_access_pointer(mld_sta->ptk_pn[keyidx])); in iwl_mld_alloc_ptk_pn()
2016 return -ENOMEM; in iwl_mld_alloc_ptk_pn()
2021 memcpy((*ptk_pn)->q[q].pn[tid], seq.ccmp.pn, in iwl_mld_alloc_ptk_pn()
2025 rcu_assign_pointer(mld_sta->ptk_pn[keyidx], *ptk_pn); in iwl_mld_alloc_ptk_pn()
2039 int keyidx = key->keyidx; in iwl_mld_set_key_add()
2043 key->hw_key_idx = STA_KEY_IDX_INVALID; in iwl_mld_set_key_add()
2045 switch (key->cipher) { in iwl_mld_set_key_add()
2049 return -EOPNOTSUPP; in iwl_mld_set_key_add()
2051 if (vif->type == NL80211_IFTYPE_STATION) { in iwl_mld_set_key_add()
2052 key->flags |= IEEE80211_KEY_FLAG_PUT_MIC_SPACE; in iwl_mld_set_key_add()
2056 return -EOPNOTSUPP; in iwl_mld_set_key_add()
2065 return -EOPNOTSUPP; in iwl_mld_set_key_add()
2068 if (vif->type == NL80211_IFTYPE_STATION && in iwl_mld_set_key_add()
2070 rcu_assign_pointer(mld_vif->bigtks[keyidx - 6], key); in iwl_mld_set_key_add()
2077 if ((vif->type == NL80211_IFTYPE_ADHOC || in iwl_mld_set_key_add()
2078 vif->type == NL80211_IFTYPE_AP) && !sta && in iwl_mld_set_key_add()
2079 !mld_vif->ap_ibss_active) in iwl_mld_set_key_add()
2082 if (!mld->fw_status.in_hw_restart && mld_sta && in iwl_mld_set_key_add()
2083 key->flags & IEEE80211_KEY_FLAG_PAIRWISE && in iwl_mld_set_key_add()
2084 (key->cipher == WLAN_CIPHER_SUITE_CCMP || in iwl_mld_set_key_add()
2085 key->cipher == WLAN_CIPHER_SUITE_GCMP || in iwl_mld_set_key_add()
2086 key->cipher == WLAN_CIPHER_SUITE_GCMP_256)) { in iwl_mld_set_key_add()
2092 IWL_DEBUG_MAC80211(mld, "set hwcrypto key (sta:%pM, id:%d)\n", in iwl_mld_set_key_add()
2093 sta ? sta->addr : NULL, keyidx); in iwl_mld_set_key_add()
2099 RCU_INIT_POINTER(mld_sta->ptk_pn[keyidx], NULL); in iwl_mld_set_key_add()
2103 return -EOPNOTSUPP; in iwl_mld_set_key_add()
2117 int keyidx = key->keyidx; in iwl_mld_set_key_remove()
2119 if (vif->type == NL80211_IFTYPE_STATION && in iwl_mld_set_key_remove()
2121 RCU_INIT_POINTER(mld_vif->bigtks[keyidx - 6], NULL); in iwl_mld_set_key_remove()
2123 if (mld_sta && key->flags & IEEE80211_KEY_FLAG_PAIRWISE && in iwl_mld_set_key_remove()
2124 (key->cipher == WLAN_CIPHER_SUITE_CCMP || in iwl_mld_set_key_remove()
2125 key->cipher == WLAN_CIPHER_SUITE_GCMP || in iwl_mld_set_key_remove()
2126 key->cipher == WLAN_CIPHER_SUITE_GCMP_256)) { in iwl_mld_set_key_remove()
2129 if (WARN_ON(keyidx >= ARRAY_SIZE(mld_sta->ptk_pn))) in iwl_mld_set_key_remove()
2132 ptk_pn = wiphy_dereference(mld->wiphy, in iwl_mld_set_key_remove()
2133 mld_sta->ptk_pn[keyidx]); in iwl_mld_set_key_remove()
2134 RCU_INIT_POINTER(mld_sta->ptk_pn[keyidx], NULL); in iwl_mld_set_key_remove()
2139 /* if this key was stored to be added later to the FW - free it here */ in iwl_mld_set_key_remove()
2140 if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) in iwl_mld_set_key_remove()
2144 if (key->hw_key_idx == STA_KEY_IDX_INVALID) in iwl_mld_set_key_remove()
2165 ret = -EOPNOTSUPP; in iwl_mld_mac80211_set_key()
2172 ret = -EINVAL; in iwl_mld_mac80211_set_key()
2187 iwl_mld_link_dereference_check(mld_vif, chsw->link_id); in iwl_mld_pre_channel_switch()
2191 lockdep_assert_wiphy(mld->wiphy); in iwl_mld_pre_channel_switch()
2194 return -EINVAL; in iwl_mld_pre_channel_switch()
2197 chsw->chandef.center_freq1); in iwl_mld_pre_channel_switch()
2205 if (chsw->link_id == primary && chsw->block_tx) in iwl_mld_pre_channel_switch()
2214 * In multi-link scenarios, we can learn about the CSA from in iwl_mld_pre_channel_switch()
2217 * Since we want to de-activate the link that got a CSA with mode=1, in iwl_mld_pre_channel_switch()
2222 mld_link->silent_deactivation = chsw->block_tx; in iwl_mld_pre_channel_switch()
2252 lockdep_assert_wiphy(mld->wiphy); in iwl_mld_post_channel_switch()
2254 WARN_ON(mld_link->silent_deactivation); in iwl_mld_post_channel_switch()
2269 mld_link->silent_deactivation = false; in iwl_mld_abort_channel_switch()
2349 /* we only support a single-vif right now */ in iwl_mld_switch_vif_chanctx()
2351 return -EOPNOTSUPP; in iwl_mld_switch_vif_chanctx()
2361 ret = -EOPNOTSUPP; in iwl_mld_switch_vif_chanctx()
2378 lockdep_assert_wiphy(mld->wiphy); in iwl_mld_sta_pre_rcu_remove()
2381 * so here we already invalidate our internal RCU-protected in iwl_mld_sta_pre_rcu_remove()
2388 RCU_INIT_POINTER(mld->fw_id_to_link_sta[mld_link_sta->fw_id], in iwl_mld_sta_pre_rcu_remove()
2391 if (sta == mld_vif->ap_sta) in iwl_mld_sta_pre_rcu_remove()
2392 mld_vif->ap_sta = NULL; in iwl_mld_sta_pre_rcu_remove()
2405 link_conf = wiphy_dereference(hw->wiphy, vif->link_conf[link_id]); in iwl_mld_mac80211_mgd_protect_tdls_discover()
2411 duration = 2 * link_conf->dtim_period * link_conf->beacon_int; in iwl_mld_mac80211_mgd_protect_tdls_discover()
2445 lockdep_assert_wiphy(mld->wiphy); in iwl_mld_change_vif_links()
2448 * No bits designate non-MLO mode. We can handle MLO exit/enter by in iwl_mld_change_vif_links()
2450 * Note that mac80211 does such a non-MLO to MLO switch during restart in iwl_mld_change_vif_links()
2454 if (old_links == 0 && !mld->fw_status.in_hw_restart) in iwl_mld_change_vif_links()
2469 err = -EINVAL; in iwl_mld_change_vif_links()
2483 mld_vif->emlsr.primary = new_links ? __ffs(new_links) : 0; in iwl_mld_change_vif_links()
2489 if (old_links == 0 && mld->fw_status.in_hw_restart) in iwl_mld_change_vif_links()
2526 return iwl_mld_start_ap_ibss(hw, vif, &vif->bss_conf); in iwl_mld_mac80211_join_ibss()
2532 return iwl_mld_stop_ap_ibss(hw, vif, &vif->bss_conf); in iwl_mld_mac80211_leave_ibss()
2539 return mld->ibss_manager; in iwl_mld_mac80211_tx_last_beacon()
2565 if (!hwts->macaddr) in iwl_mld_set_hw_timestamp()
2566 return -EOPNOTSUPP; in iwl_mld_set_hw_timestamp()
2568 if (hwts->enable) in iwl_mld_set_hw_timestamp()
2572 return iwl_mld_time_sync_config(mld, hwts->macaddr, protocols); in iwl_mld_set_hw_timestamp()
2591 map = neg_ttlm->downlink[0]; in iwl_mld_can_neg_ttlm()
2593 if (neg_ttlm->downlink[i] != neg_ttlm->uplink[i] || in iwl_mld_can_neg_ttlm()
2594 neg_ttlm->uplink[i] != map) in iwl_mld_can_neg_ttlm()