Lines Matching +full:rates +full:- +full:ofdm

1 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
3 * Copyright (C) 2012-2014, 2018-2024 Intel Corporation
4 * Copyright (C) 2013-2014 Intel Mobile Communications GmbH
5 * Copyright (C) 2015-2017 Intel Deutschland GmbH
10 #include "iwl-io.h"
11 #include "iwl-prph.h"
12 #include "fw-api.h"
14 #include "time-event.h"
15 #include "iwl-utils.h"
63 if (vif == data->vif) in iwl_mvm_mac_tsf_id_iter()
82 switch (data->vif->type) { in iwl_mvm_mac_tsf_id_iter()
92 if (vif->type != NL80211_IFTYPE_AP || in iwl_mvm_mac_tsf_id_iter()
93 data->preferred_tsf != NUM_TSF_IDS || in iwl_mvm_mac_tsf_id_iter()
94 !test_bit(mvmvif->tsf_id, data->available_tsf_ids)) in iwl_mvm_mac_tsf_id_iter()
97 min_bi = min(data->vif->bss_conf.beacon_int, in iwl_mvm_mac_tsf_id_iter()
98 vif->bss_conf.beacon_int); in iwl_mvm_mac_tsf_id_iter()
103 if ((data->vif->bss_conf.beacon_int - in iwl_mvm_mac_tsf_id_iter()
104 vif->bss_conf.beacon_int) % min_bi == 0) { in iwl_mvm_mac_tsf_id_iter()
105 data->preferred_tsf = mvmvif->tsf_id; in iwl_mvm_mac_tsf_id_iter()
120 if ((vif->type != NL80211_IFTYPE_AP && in iwl_mvm_mac_tsf_id_iter()
121 vif->type != NL80211_IFTYPE_STATION) || in iwl_mvm_mac_tsf_id_iter()
122 data->preferred_tsf != NUM_TSF_IDS || in iwl_mvm_mac_tsf_id_iter()
123 !test_bit(mvmvif->tsf_id, data->available_tsf_ids)) in iwl_mvm_mac_tsf_id_iter()
126 min_bi = min(data->vif->bss_conf.beacon_int, in iwl_mvm_mac_tsf_id_iter()
127 vif->bss_conf.beacon_int); in iwl_mvm_mac_tsf_id_iter()
132 if ((data->vif->bss_conf.beacon_int - in iwl_mvm_mac_tsf_id_iter()
133 vif->bss_conf.beacon_int) % min_bi == 0) { in iwl_mvm_mac_tsf_id_iter()
134 data->preferred_tsf = mvmvif->tsf_id; in iwl_mvm_mac_tsf_id_iter()
155 __clear_bit(mvmvif->tsf_id, data->available_tsf_ids); in iwl_mvm_mac_tsf_id_iter()
157 if (data->preferred_tsf == mvmvif->tsf_id) in iwl_mvm_mac_tsf_id_iter()
158 data->preferred_tsf = NUM_TSF_IDS; in iwl_mvm_mac_tsf_id_iter()
167 /* Iterator may already find the interface being added -- skip it */ in iwl_mvm_mac_iface_iterator()
168 if (vif == data->vif) { in iwl_mvm_mac_iface_iterator()
169 data->found_vif = true; in iwl_mvm_mac_iface_iterator()
179 __clear_bit(mvmvif->id, data->available_mac_ids); in iwl_mvm_mac_iface_iterator()
192 .available_tsf_ids = { (1 << NUM_TSF_IDS) - 1 }, in iwl_mvm_mac_ctxt_recalc_tsf_id()
198 mvm->hw, IEEE80211_IFACE_ITER_RESUME_ALL, in iwl_mvm_mac_ctxt_recalc_tsf_id()
202 mvmvif->tsf_id = data.preferred_tsf; in iwl_mvm_mac_ctxt_recalc_tsf_id()
203 else if (!test_bit(mvmvif->tsf_id, data.available_tsf_ids)) in iwl_mvm_mac_ctxt_recalc_tsf_id()
204 mvmvif->tsf_id = find_first_bit(data.available_tsf_ids, in iwl_mvm_mac_ctxt_recalc_tsf_id()
214 .available_mac_ids = { (1 << NUM_MAC_INDEX_DRIVER) - 1 }, in iwl_mvm_mac_ctxt_init()
215 .available_tsf_ids = { (1 << NUM_TSF_IDS) - 1 }, in iwl_mvm_mac_ctxt_init()
222 lockdep_assert_held(&mvm->mutex); in iwl_mvm_mac_ctxt_init()
240 /* MAC ID 0 should be used only for the managed/IBSS vif with non-MLO in iwl_mvm_mac_ctxt_init()
243 if (!mvm->mld_api_is_used) { in iwl_mvm_mac_ctxt_init()
244 switch (vif->type) { in iwl_mvm_mac_ctxt_init()
248 if (!vif->p2p) in iwl_mvm_mac_ctxt_init()
257 mvm->hw, IEEE80211_IFACE_ITER_RESUME_ALL, in iwl_mvm_mac_ctxt_init()
274 if (WARN_ON_ONCE(test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status))) in iwl_mvm_mac_ctxt_init()
275 return -EBUSY; in iwl_mvm_mac_ctxt_init()
277 mvmvif->id = find_first_bit(data.available_mac_ids, in iwl_mvm_mac_ctxt_init()
279 if (mvmvif->id == NUM_MAC_INDEX_DRIVER) { in iwl_mvm_mac_ctxt_init()
280 IWL_ERR(mvm, "Failed to init MAC context - no free ID!\n"); in iwl_mvm_mac_ctxt_init()
281 ret = -EIO; in iwl_mvm_mac_ctxt_init()
286 mvmvif->tsf_id = data.preferred_tsf; in iwl_mvm_mac_ctxt_init()
288 mvmvif->tsf_id = find_first_bit(data.available_tsf_ids, in iwl_mvm_mac_ctxt_init()
290 if (mvmvif->tsf_id == NUM_TSF_IDS) { in iwl_mvm_mac_ctxt_init()
291 IWL_ERR(mvm, "Failed to init MAC context - no free TSF!\n"); in iwl_mvm_mac_ctxt_init()
292 ret = -EIO; in iwl_mvm_mac_ctxt_init()
296 mvmvif->color = 0; in iwl_mvm_mac_ctxt_init()
298 INIT_LIST_HEAD(&mvmvif->time_event_data.list); in iwl_mvm_mac_ctxt_init()
299 mvmvif->time_event_data.id = TE_MAX; in iwl_mvm_mac_ctxt_init()
300 mvmvif->roc_activity = ROC_NUM_ACTIVITIES; in iwl_mvm_mac_ctxt_init()
302 iwl_mvm_init_link(&mvmvif->deflink); in iwl_mvm_mac_ctxt_init()
305 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) in iwl_mvm_mac_ctxt_init()
309 if (vif->type == NL80211_IFTYPE_AP || in iwl_mvm_mac_ctxt_init()
310 vif->type == NL80211_IFTYPE_ADHOC) { in iwl_mvm_mac_ctxt_init()
315 mvmvif->deflink.cab_queue = IWL_MVM_DQA_GCAST_QUEUE; in iwl_mvm_mac_ctxt_init()
331 unsigned long basic = vif->bss_conf.basic_rates; in iwl_mvm_ack_rates()
335 u8 ofdm = 0; in iwl_mvm_ack_rates() local
338 sband = mvm->hw->wiphy->bands[band]; in iwl_mvm_ack_rates()
341 int hw = sband->bitrates[i].hw_value; in iwl_mvm_ack_rates()
343 ofdm |= BIT(hw - IWL_FIRST_OFDM_RATE); in iwl_mvm_ack_rates()
356 * Now we've got the basic rates as bitmaps in the ofdm and cck in iwl_mvm_ack_rates()
358 * be all the right rates in the bitmap. E.g. if the only basic in iwl_mvm_ack_rates()
359 * rates are 5.5 Mbps and 11 Mbps, we still need to add 1 Mbps in iwl_mvm_ack_rates()
360 * and 6 Mbps because the 802.11-2007 standard says in 9.6: in iwl_mvm_ack_rates()
374 * As a consequence, we need to add all mandatory rates that are in iwl_mvm_ack_rates()
375 * lower than all of the basic rates to these bitmaps. in iwl_mvm_ack_rates()
379 ofdm |= IWL_RATE_BIT_MSK(24) >> IWL_FIRST_OFDM_RATE; in iwl_mvm_ack_rates()
381 ofdm |= IWL_RATE_BIT_MSK(12) >> IWL_FIRST_OFDM_RATE; in iwl_mvm_ack_rates()
383 ofdm |= IWL_RATE_BIT_MSK(6) >> IWL_FIRST_OFDM_RATE; in iwl_mvm_ack_rates()
388 * - if no CCK rates are basic, it must be ERP since there must in iwl_mvm_ack_rates()
389 * be some basic rates at all, so they're OFDM => ERP PHY in iwl_mvm_ack_rates()
391 * - if 11M is a basic rate, it must be ERP as well, so add 5.5M in iwl_mvm_ack_rates()
392 * - if 5.5M is basic, 1M and 2M are mandatory in iwl_mvm_ack_rates()
393 * - if 2M is basic, 1M is mandatory in iwl_mvm_ack_rates()
394 * - if 1M is basic, that's the only valid ACK rate. in iwl_mvm_ack_rates()
396 * any lower rates to the ACK rate bitmap. in iwl_mvm_ack_rates()
408 *ofdm_rates = ofdm; in iwl_mvm_ack_rates()
419 phy_ctxt = link_info->phy_ctxt; in iwl_mvm_set_fw_basic_rates()
420 if (phy_ctxt && phy_ctxt->channel) in iwl_mvm_set_fw_basic_rates()
421 band = phy_ctxt->channel->band; in iwl_mvm_set_fw_basic_rates()
436 u8 protection_mode = link_conf->ht_operation_mode & in iwl_mvm_set_fw_protection_flags()
438 bool ht_enabled = !!(link_conf->ht_operation_mode & in iwl_mvm_set_fw_protection_flags()
441 if (link_conf->use_cts_prot) in iwl_mvm_set_fw_protection_flags()
445 link_conf->use_cts_prot, in iwl_mvm_set_fw_protection_flags()
446 link_conf->ht_operation_mode); in iwl_mvm_set_fw_protection_flags()
453 * See section 9.23.3.1 of IEEE 80211-2012. in iwl_mvm_set_fw_protection_flags()
465 if (link_conf->chanreq.oper.width > NL80211_CHAN_WIDTH_20) in iwl_mvm_set_fw_protection_flags()
481 mvmvif->link[link_conf->link_id]; in iwl_mvm_set_fw_qos_params()
492 cpu_to_le16(mvm_link->queue_params[i].cw_min); in iwl_mvm_set_fw_qos_params()
494 cpu_to_le16(mvm_link->queue_params[i].cw_max); in iwl_mvm_set_fw_qos_params()
496 cpu_to_le16(mvm_link->queue_params[i].txop * 32); in iwl_mvm_set_fw_qos_params()
497 ac[ucode_ac].aifsn = mvm_link->queue_params[i].aifs; in iwl_mvm_set_fw_qos_params()
501 if (link_conf->qos) in iwl_mvm_set_fw_qos_params()
504 if (link_conf->chanreq.oper.width != NL80211_CHAN_WIDTH_20_NOHT) in iwl_mvm_set_fw_qos_params()
512 switch (vif->type) { in iwl_mvm_get_mac_type()
514 if (vif->p2p) in iwl_mvm_get_mac_type()
544 const u8 *bssid = bssid_override ?: vif->bss_conf.bssid; in iwl_mvm_mac_ctxt_cmd_common()
547 cmd->id_and_color = cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id, in iwl_mvm_mac_ctxt_cmd_common()
548 mvmvif->color)); in iwl_mvm_mac_ctxt_cmd_common()
549 cmd->action = cpu_to_le32(action); in iwl_mvm_mac_ctxt_cmd_common()
550 cmd->mac_type = cpu_to_le32(iwl_mvm_get_mac_type(vif)); in iwl_mvm_mac_ctxt_cmd_common()
552 cmd->tsf_id = cpu_to_le32(mvmvif->tsf_id); in iwl_mvm_mac_ctxt_cmd_common()
554 memcpy(cmd->node_addr, vif->addr, ETH_ALEN); in iwl_mvm_mac_ctxt_cmd_common()
557 memcpy(cmd->bssid_addr, bssid, ETH_ALEN); in iwl_mvm_mac_ctxt_cmd_common()
559 eth_broadcast_addr(cmd->bssid_addr); in iwl_mvm_mac_ctxt_cmd_common()
561 iwl_mvm_set_fw_basic_rates(mvm, vif, &mvmvif->deflink, &cmd->cck_rates, in iwl_mvm_mac_ctxt_cmd_common()
562 &cmd->ofdm_rates); in iwl_mvm_mac_ctxt_cmd_common()
564 cmd->cck_short_preamble = in iwl_mvm_mac_ctxt_cmd_common()
565 cpu_to_le32(vif->bss_conf.use_short_preamble ? in iwl_mvm_mac_ctxt_cmd_common()
567 cmd->short_slot = in iwl_mvm_mac_ctxt_cmd_common()
568 cpu_to_le32(vif->bss_conf.use_short_slot ? in iwl_mvm_mac_ctxt_cmd_common()
571 cmd->filter_flags = 0; in iwl_mvm_mac_ctxt_cmd_common()
573 iwl_mvm_set_fw_qos_params(mvm, vif, &vif->bss_conf, cmd->ac, in iwl_mvm_mac_ctxt_cmd_common()
574 &cmd->qos_flags); in iwl_mvm_mac_ctxt_cmd_common()
578 iwl_mvm_set_fw_protection_flags(mvm, vif, &vif->bss_conf, in iwl_mvm_mac_ctxt_cmd_common()
579 &cmd->protection_flags, in iwl_mvm_mac_ctxt_cmd_common()
590 le32_to_cpu(cmd->action), ret); in iwl_mvm_mac_ctxt_send_cmd()
609 * same offset in the frame -- the TSF is at the first symbol in iwl_mvm_set_fw_dtim_tbtt()
616 dtim_offs = link_conf->sync_dtim_count * in iwl_mvm_set_fw_dtim_tbtt()
617 link_conf->beacon_int; in iwl_mvm_set_fw_dtim_tbtt()
622 cpu_to_le64(link_conf->sync_tsf + dtim_offs); in iwl_mvm_set_fw_dtim_tbtt()
624 cpu_to_le32(link_conf->sync_device_ts + dtim_offs); in iwl_mvm_set_fw_dtim_tbtt()
626 cpu_to_le32(link_conf->sync_device_ts); in iwl_mvm_set_fw_dtim_tbtt()
638 &vif->bss_conf.p2p_noa_attr; in iwl_mvm_mac_ctxt_cmd_p2p_sta_get_oppps_ctwin()
640 return cpu_to_le32(noa->oppps_ctwindow & in iwl_mvm_mac_ctxt_cmd_p2p_sta_get_oppps_ctwin()
649 if (vif->bss_conf.twt_requester && IWL_MVM_USE_TWT) in iwl_mvm_mac_ctxt_cmd_sta_get_twt_policy()
651 if (vif->bss_conf.twt_protected) in iwl_mvm_mac_ctxt_cmd_sta_get_twt_policy()
653 if (vif->bss_conf.twt_broadcast) in iwl_mvm_mac_ctxt_cmd_sta_get_twt_policy()
667 WARN_ON(vif->type != NL80211_IFTYPE_STATION); in iwl_mvm_mac_ctxt_cmd_sta()
678 if (vif->p2p) { in iwl_mvm_mac_ctxt_cmd_sta()
688 if (vif->cfg.assoc && vif->bss_conf.dtim_period && in iwl_mvm_mac_ctxt_cmd_sta()
692 iwl_mvm_set_fw_dtim_tbtt(mvm, vif, &vif->bss_conf, in iwl_mvm_mac_ctxt_cmd_sta()
693 &ctxt_sta->dtim_tsf, in iwl_mvm_mac_ctxt_cmd_sta()
694 &ctxt_sta->dtim_time, in iwl_mvm_mac_ctxt_cmd_sta()
695 &ctxt_sta->assoc_beacon_arrive_time); in iwl_mvm_mac_ctxt_cmd_sta()
697 ctxt_sta->is_assoc = cpu_to_le32(1); in iwl_mvm_mac_ctxt_cmd_sta()
699 if (!mvmvif->authorized && in iwl_mvm_mac_ctxt_cmd_sta()
700 fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_mac_ctxt_cmd_sta()
702 ctxt_sta->data_policy |= in iwl_mvm_mac_ctxt_cmd_sta()
705 ctxt_sta->is_assoc = cpu_to_le32(0); in iwl_mvm_mac_ctxt_cmd_sta()
713 ctxt_sta->bi = cpu_to_le32(vif->bss_conf.beacon_int); in iwl_mvm_mac_ctxt_cmd_sta()
714 ctxt_sta->dtim_interval = cpu_to_le32(vif->bss_conf.beacon_int * in iwl_mvm_mac_ctxt_cmd_sta()
715 vif->bss_conf.dtim_period); in iwl_mvm_mac_ctxt_cmd_sta()
717 ctxt_sta->listen_interval = cpu_to_le32(mvm->hw->conf.listen_interval); in iwl_mvm_mac_ctxt_cmd_sta()
718 ctxt_sta->assoc_id = cpu_to_le32(vif->cfg.aid); in iwl_mvm_mac_ctxt_cmd_sta()
720 if (vif->probe_req_reg && vif->cfg.assoc && vif->p2p) in iwl_mvm_mac_ctxt_cmd_sta()
723 if (vif->bss_conf.he_support && !iwlwifi_mod_params.disable_11ax) { in iwl_mvm_mac_ctxt_cmd_sta()
725 ctxt_sta->data_policy |= in iwl_mvm_mac_ctxt_cmd_sta()
741 WARN_ON(vif->type != NL80211_IFTYPE_MONITOR); in iwl_mvm_mac_ctxt_cmd_listener()
751 ieee80211_hw_set(mvm->hw, RX_INCLUDES_FCS); in iwl_mvm_mac_ctxt_cmd_listener()
755 * mvm->snif_queue isn't set here (it's still set to in iwl_mvm_mac_ctxt_cmd_listener()
759 tfd_queue_msk = BIT(mvm->snif_queue); in iwl_mvm_mac_ctxt_cmd_listener()
762 ret = iwl_mvm_allocate_int_sta(mvm, &mvm->snif_sta, tfd_queue_msk, in iwl_mvm_mac_ctxt_cmd_listener()
763 vif->type, IWL_STA_GENERAL_PURPOSE); in iwl_mvm_mac_ctxt_cmd_listener()
777 WARN_ON(vif->type != NL80211_IFTYPE_ADHOC); in iwl_mvm_mac_ctxt_cmd_ibss()
786 cmd.ibss.bi = cpu_to_le32(vif->bss_conf.beacon_int); in iwl_mvm_mac_ctxt_cmd_ibss()
789 cmd.ibss.beacon_template = cpu_to_le32(mvmvif->id); in iwl_mvm_mac_ctxt_cmd_ibss()
803 if (vif->type == NL80211_IFTYPE_AP && vif->p2p && in iwl_mvm_go_iterator()
804 mvmvif->ap_ibss_active) in iwl_mvm_go_iterator()
805 data->go_active = true; in iwl_mvm_go_iterator()
822 mvm->hw, IEEE80211_IFACE_ITER_RESUME_ALL, in iwl_mac_ctxt_p2p_dev_has_extended_disc()
834 WARN_ON(vif->type != NL80211_IFTYPE_P2P_DEVICE); in iwl_mvm_mac_ctxt_cmd_p2p_device()
855 * variable-length part of the beacon. */ in iwl_mvm_mac_ctxt_set_tim()
856 tim_idx = mgmt->u.beacon.variable - beacon; in iwl_mvm_mac_ctxt_set_tim()
858 /* Parse variable-length elements of beacon to find WLAN_EID_TIM */ in iwl_mvm_mac_ctxt_set_tim()
859 while ((tim_idx < (frame_size - 2)) && in iwl_mvm_mac_ctxt_set_tim()
864 if ((tim_idx < (frame_size - 1)) && (beacon[tim_idx] == WLAN_EID_TIM)) { in iwl_mvm_mac_ctxt_set_tim()
878 unsigned long basic = vif->bss_conf.basic_rates; in iwl_mvm_mac_ctxt_get_lowest_rate()
880 u32 link_id = u32_get_bits(info->control.flags, in iwl_mvm_mac_ctxt_get_lowest_rate()
882 u8 band = info->band; in iwl_mvm_mac_ctxt_get_lowest_rate()
887 for (i = 0; i < ARRAY_SIZE(mvmvif->link); i++) { in iwl_mvm_mac_ctxt_get_lowest_rate()
888 if (!mvmvif->link[i]) in iwl_mvm_mac_ctxt_get_lowest_rate()
900 link_conf = rcu_dereference(vif->link_conf[link_id]); in iwl_mvm_mac_ctxt_get_lowest_rate()
902 basic = link_conf->basic_rates; in iwl_mvm_mac_ctxt_get_lowest_rate()
903 if (link_conf->chanreq.oper.chan) in iwl_mvm_mac_ctxt_get_lowest_rate()
904 band = link_conf->chanreq.oper.chan->band; in iwl_mvm_mac_ctxt_get_lowest_rate()
909 sband = mvm->hw->wiphy->bands[band]; in iwl_mvm_mac_ctxt_get_lowest_rate()
911 u16 hw = sband->bitrates[i].hw_value; in iwl_mvm_mac_ctxt_get_lowest_rate()
921 if (band == NL80211_BAND_2GHZ && !vif->p2p && in iwl_mvm_mac_ctxt_get_lowest_rate()
922 vif->type != NL80211_IFTYPE_P2P_DEVICE && in iwl_mvm_mac_ctxt_get_lowest_rate()
923 !(info->flags & IEEE80211_TX_CTL_NO_CCK_RATE)) { in iwl_mvm_mac_ctxt_get_lowest_rate()
956 mvm->hw->wiphy->bands[info->band]; in iwl_mvm_mac_ctxt_get_beacon_rate()
957 u32 legacy = vif->bss_conf.beacon_tx_rate.control[info->band].legacy; in iwl_mvm_mac_ctxt_get_beacon_rate()
961 u32 rate = ffs(legacy) - 1; in iwl_mvm_mac_ctxt_get_beacon_rate()
963 return sband->bitrates[rate].hw_value; in iwl_mvm_mac_ctxt_get_beacon_rate()
982 tx->len = cpu_to_le16((u16)beacon->len); in iwl_mvm_mac_ctxt_set_tx()
983 tx->sta_id = mvmvif->deflink.bcast_sta.sta_id; in iwl_mvm_mac_ctxt_set_tx()
984 tx->life_time = cpu_to_le32(TX_CMD_LIFE_TIME_INFINITE); in iwl_mvm_mac_ctxt_set_tx()
987 iwl_mvm_bt_coex_tx_prio(mvm, (void *)beacon->data, info, 0) << in iwl_mvm_mac_ctxt_set_tx()
989 tx->tx_flags = cpu_to_le32(tx_flags); in iwl_mvm_mac_ctxt_set_tx()
991 if (!fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_mac_ctxt_set_tx()
993 iwl_mvm_toggle_tx_ant(mvm, &mvm->mgmt_last_antenna_idx); in iwl_mvm_mac_ctxt_set_tx()
995 tx->rate_n_flags = in iwl_mvm_mac_ctxt_set_tx()
996 cpu_to_le32(BIT(mvm->mgmt_last_antenna_idx) << in iwl_mvm_mac_ctxt_set_tx()
1002 tx->rate_n_flags |= in iwl_mvm_mac_ctxt_set_tx()
1003 cpu_to_le32(iwl_mvm_mac80211_idx_to_hwrate(mvm->fw, rate)); in iwl_mvm_mac_ctxt_set_tx()
1005 tx->rate_n_flags |= cpu_to_le32(RATE_MCS_CCK_MSK_V1); in iwl_mvm_mac_ctxt_set_tx()
1021 cmd.len[1] = beacon->len; in iwl_mvm_mac_ctxt_send_beacon_cmd()
1022 cmd.data[1] = beacon->data; in iwl_mvm_mac_ctxt_send_beacon_cmd()
1037 beacon_cmd.template_id = cpu_to_le32((u32)mvmvif->id); in iwl_mvm_mac_ctxt_send_beacon_v6()
1039 if (vif->type == NL80211_IFTYPE_AP) in iwl_mvm_mac_ctxt_send_beacon_v6()
1042 beacon->data, beacon->len); in iwl_mvm_mac_ctxt_send_beacon_v6()
1057 beacon_cmd.template_id = cpu_to_le32((u32)mvmvif->id); in iwl_mvm_mac_ctxt_send_beacon_v7()
1059 if (vif->type == NL80211_IFTYPE_AP) in iwl_mvm_mac_ctxt_send_beacon_v7()
1062 beacon->data, beacon->len); in iwl_mvm_mac_ctxt_send_beacon_v7()
1065 cpu_to_le32(iwl_find_ie_offset(beacon->data, in iwl_mvm_mac_ctxt_send_beacon_v7()
1067 beacon->len)); in iwl_mvm_mac_ctxt_send_beacon_v7()
1069 cpu_to_le32(iwl_find_ie_offset(beacon->data, in iwl_mvm_mac_ctxt_send_beacon_v7()
1071 beacon->len)); in iwl_mvm_mac_ctxt_send_beacon_v7()
1081 if (vif->type != NL80211_IFTYPE_AP || IWL_MVM_DISABLE_AP_FILS) in iwl_mvm_enable_fils()
1084 if (cfg80211_channel_is_psc(ctx->def.chan)) in iwl_mvm_enable_fils()
1087 return (ctx->def.chan->band == NL80211_BAND_6GHZ && in iwl_mvm_enable_fils()
1088 ctx->def.width >= NL80211_CHAN_WIDTH_80); in iwl_mvm_enable_fils()
1103 flags = iwl_mvm_mac_ctxt_get_beacon_flags(mvm->fw, rate); in iwl_mvm_mac_ctxt_send_beacon_v9()
1107 ctx = rcu_dereference(link_conf->chanctx_conf); in iwl_mvm_mac_ctxt_send_beacon_v9()
1108 channel = ieee80211_frequency_to_channel(ctx->def.chan->center_freq); in iwl_mvm_mac_ctxt_send_beacon_v9()
1111 flags |= iwl_fw_lookup_cmd_ver(mvm->fw, BEACON_TEMPLATE_CMD, in iwl_mvm_mac_ctxt_send_beacon_v9()
1116 cpu_to_le32(~crc32_le(~0, vif->cfg.ssid, in iwl_mvm_mac_ctxt_send_beacon_v9()
1117 vif->cfg.ssid_len)); in iwl_mvm_mac_ctxt_send_beacon_v9()
1122 beacon_cmd.byte_cnt = cpu_to_le16((u16)beacon->len); in iwl_mvm_mac_ctxt_send_beacon_v9()
1124 if (WARN_ON(!mvmvif->link[link_conf->link_id])) in iwl_mvm_mac_ctxt_send_beacon_v9()
1125 return -EINVAL; in iwl_mvm_mac_ctxt_send_beacon_v9()
1127 if (iwl_fw_lookup_cmd_ver(mvm->fw, BEACON_TEMPLATE_CMD, 0) > 12) in iwl_mvm_mac_ctxt_send_beacon_v9()
1129 cpu_to_le32(mvmvif->link[link_conf->link_id]->fw_link_id); in iwl_mvm_mac_ctxt_send_beacon_v9()
1131 beacon_cmd.link_id = cpu_to_le32((u32)mvmvif->id); in iwl_mvm_mac_ctxt_send_beacon_v9()
1133 if (vif->type == NL80211_IFTYPE_AP) in iwl_mvm_mac_ctxt_send_beacon_v9()
1136 beacon->data, beacon->len); in iwl_mvm_mac_ctxt_send_beacon_v9()
1139 cpu_to_le32(iwl_find_ie_offset(beacon->data, in iwl_mvm_mac_ctxt_send_beacon_v9()
1141 beacon->len)); in iwl_mvm_mac_ctxt_send_beacon_v9()
1143 cpu_to_le32(iwl_find_ie_offset(beacon->data, in iwl_mvm_mac_ctxt_send_beacon_v9()
1145 beacon->len)); in iwl_mvm_mac_ctxt_send_beacon_v9()
1147 if (vif->type == NL80211_IFTYPE_AP && in iwl_mvm_mac_ctxt_send_beacon_v9()
1148 iwl_fw_lookup_cmd_ver(mvm->fw, BEACON_TEMPLATE_CMD, 0) >= 14) in iwl_mvm_mac_ctxt_send_beacon_v9()
1150 cpu_to_le32(iwl_find_ie_offset(beacon->data, in iwl_mvm_mac_ctxt_send_beacon_v9()
1152 beacon->len)); in iwl_mvm_mac_ctxt_send_beacon_v9()
1164 return -EINVAL; in iwl_mvm_mac_ctxt_send_beacon()
1169 if (!fw_has_capa(&mvm->fw->ucode_capa, in iwl_mvm_mac_ctxt_send_beacon()
1173 if (fw_has_api(&mvm->fw->ucode_capa, in iwl_mvm_mac_ctxt_send_beacon()
1189 WARN_ON(vif->type != NL80211_IFTYPE_AP && in iwl_mvm_mac_ctxt_beacon_changed()
1190 vif->type != NL80211_IFTYPE_ADHOC); in iwl_mvm_mac_ctxt_beacon_changed()
1192 beacon = ieee80211_beacon_get_template(mvm->hw, vif, NULL, in iwl_mvm_mac_ctxt_beacon_changed()
1193 link_conf->link_id); in iwl_mvm_mac_ctxt_beacon_changed()
1195 return -ENOMEM; in iwl_mvm_mac_ctxt_beacon_changed()
1198 if (mvm->beacon_inject_active) { in iwl_mvm_mac_ctxt_beacon_changed()
1200 return -EBUSY; in iwl_mvm_mac_ctxt_beacon_changed()
1222 if (vif->type != NL80211_IFTYPE_STATION || !vif->cfg.assoc) in iwl_mvm_mac_ap_iterator()
1226 if (vif->p2p && data->beacon_device_ts) in iwl_mvm_mac_ap_iterator()
1229 data->beacon_device_ts = vif->bss_conf.sync_device_ts; in iwl_mvm_mac_ap_iterator()
1230 data->beacon_int = vif->bss_conf.beacon_int; in iwl_mvm_mac_ap_iterator()
1246 * wake-ups. in iwl_mvm_mac_ctxt_cmd_ap_set_filter_flags()
1249 if (mvmvif->ap_assoc_sta_count || !mvm->drop_bcn_ap_mode) { in iwl_mvm_mac_ctxt_cmd_ap_set_filter_flags()
1274 cmd->ac[IWL_MVM_TX_FIFO_VO].fifos_mask |= BIT(IWL_MVM_TX_FIFO_MCAST); in iwl_mvm_mac_ctxt_cmd_fill_ap()
1277 &cmd->filter_flags, in iwl_mvm_mac_ctxt_cmd_fill_ap()
1281 ctxt_ap->bi = cpu_to_le32(vif->bss_conf.beacon_int); in iwl_mvm_mac_ctxt_cmd_fill_ap()
1282 ctxt_ap->dtim_interval = cpu_to_le32(vif->bss_conf.beacon_int * in iwl_mvm_mac_ctxt_cmd_fill_ap()
1283 vif->bss_conf.dtim_period); in iwl_mvm_mac_ctxt_cmd_fill_ap()
1285 if (!fw_has_api(&mvm->fw->ucode_capa, in iwl_mvm_mac_ctxt_cmd_fill_ap()
1287 ctxt_ap->mcast_qid = cpu_to_le32(mvmvif->deflink.cab_queue); in iwl_mvm_mac_ctxt_cmd_fill_ap()
1291 * just modify the MAC then we should keep the time -- the firmware in iwl_mvm_mac_ctxt_cmd_fill_ap()
1301 mvm->hw, IEEE80211_IFACE_ITER_RESUME_ALL, in iwl_mvm_mac_ctxt_cmd_fill_ap()
1306 mvmvif->ap_beacon_time = data.beacon_device_ts + in iwl_mvm_mac_ctxt_cmd_fill_ap()
1310 mvmvif->ap_beacon_time = iwl_mvm_get_systime(mvm); in iwl_mvm_mac_ctxt_cmd_fill_ap()
1314 ctxt_ap->beacon_time = cpu_to_le32(mvmvif->ap_beacon_time); in iwl_mvm_mac_ctxt_cmd_fill_ap()
1315 ctxt_ap->beacon_tsf = 0; /* unused */ in iwl_mvm_mac_ctxt_cmd_fill_ap()
1318 ctxt_ap->beacon_template = cpu_to_le32(mvmvif->id); in iwl_mvm_mac_ctxt_cmd_fill_ap()
1327 WARN_ON(vif->type != NL80211_IFTYPE_AP || vif->p2p); in iwl_mvm_mac_ctxt_cmd_ap()
1344 struct ieee80211_p2p_noa_attr *noa = &vif->bss_conf.p2p_noa_attr; in iwl_mvm_mac_ctxt_cmd_go()
1346 WARN_ON(vif->type != NL80211_IFTYPE_AP || !vif->p2p); in iwl_mvm_mac_ctxt_cmd_go()
1355 cmd.go.ctwin = cpu_to_le32(noa->oppps_ctwindow & in iwl_mvm_mac_ctxt_cmd_go()
1358 cpu_to_le32(!!(noa->oppps_ctwindow & in iwl_mvm_mac_ctxt_cmd_go()
1368 switch (vif->type) { in iwl_mvm_mac_ctx_send()
1374 if (!vif->p2p) in iwl_mvm_mac_ctx_send()
1388 return -EOPNOTSUPP; in iwl_mvm_mac_ctx_send()
1396 if (WARN_ONCE(mvmvif->uploaded, "Adding active MAC %pM/%d\n", in iwl_mvm_mac_ctxt_add()
1397 vif->addr, ieee80211_vif_type_p2p(vif))) in iwl_mvm_mac_ctxt_add()
1398 return -EIO; in iwl_mvm_mac_ctxt_add()
1408 mvmvif->uploaded = true; in iwl_mvm_mac_ctxt_add()
1417 if (WARN_ONCE(!mvmvif->uploaded, "Changing inactive MAC %pM/%d\n", in iwl_mvm_mac_ctxt_changed()
1418 vif->addr, ieee80211_vif_type_p2p(vif))) in iwl_mvm_mac_ctxt_changed()
1419 return -EIO; in iwl_mvm_mac_ctxt_changed()
1431 if (WARN_ONCE(!mvmvif->uploaded, "Removing inactive MAC %pM/%d\n", in iwl_mvm_mac_ctxt_remove()
1432 vif->addr, ieee80211_vif_type_p2p(vif))) in iwl_mvm_mac_ctxt_remove()
1433 return -EIO; in iwl_mvm_mac_ctxt_remove()
1437 cmd.id_and_color = cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id, in iwl_mvm_mac_ctxt_remove()
1438 mvmvif->color)); in iwl_mvm_mac_ctxt_remove()
1445 mvmvif->uploaded = false; in iwl_mvm_mac_ctxt_remove()
1447 if (vif->type == NL80211_IFTYPE_MONITOR) { in iwl_mvm_mac_ctxt_remove()
1448 __clear_bit(IEEE80211_HW_RX_INCLUDES_FCS, mvm->hw->flags); in iwl_mvm_mac_ctxt_remove()
1463 if (!tx_success && !mvmvif->csa_countdown) in iwl_mvm_csa_count_down()
1466 mvmvif->csa_countdown = true; in iwl_mvm_csa_count_down()
1472 &csa_vif->bss_conf); in iwl_mvm_csa_count_down()
1473 if (csa_vif->p2p && in iwl_mvm_csa_count_down()
1474 !iwl_mvm_te_scheduled(&mvmvif->time_event_data) && gp2 && in iwl_mvm_csa_count_down()
1477 csa_vif->bss_conf.beacon_int - in iwl_mvm_csa_count_down()
1482 IWL_MVM_CHANNEL_SWITCH_TIME_GO - in iwl_mvm_csa_count_down()
1486 } else if (!iwl_mvm_te_scheduled(&mvmvif->time_event_data)) { in iwl_mvm_csa_count_down()
1489 RCU_INIT_POINTER(mvm->csa_vif, NULL); in iwl_mvm_csa_count_down()
1498 struct iwl_extended_beacon_notif *beacon = (void *)pkt->data; in iwl_mvm_rx_beacon_notif()
1499 struct iwl_extended_beacon_notif_v5 *beacon_v5 = (void *)pkt->data; in iwl_mvm_rx_beacon_notif()
1505 lockdep_assert_held(&mvm->mutex); in iwl_mvm_rx_beacon_notif()
1507 mvm->ap_last_beacon_gp2 = le32_to_cpu(beacon->gp2); in iwl_mvm_rx_beacon_notif()
1511 &beacon_v5->beacon_notify_hdr; in iwl_mvm_rx_beacon_notif()
1516 mvm->ibss_manager = beacon_v5->ibss_mgr_status != 0; in iwl_mvm_rx_beacon_notif()
1518 status = le16_to_cpu(agg_status->status) & TX_STATUS_MSK; in iwl_mvm_rx_beacon_notif()
1521 status, beacon_notify_hdr->failure_frame, in iwl_mvm_rx_beacon_notif()
1522 le64_to_cpu(beacon->tsf), in iwl_mvm_rx_beacon_notif()
1523 mvm->ap_last_beacon_gp2, in iwl_mvm_rx_beacon_notif()
1524 le32_to_cpu(beacon_notify_hdr->initial_rate)); in iwl_mvm_rx_beacon_notif()
1529 mvm->ibss_manager = beacon->ibss_mgr_status != 0; in iwl_mvm_rx_beacon_notif()
1530 status = le32_to_cpu(beacon->status) & TX_STATUS_MSK; in iwl_mvm_rx_beacon_notif()
1533 status, le64_to_cpu(beacon->tsf), in iwl_mvm_rx_beacon_notif()
1534 mvm->ap_last_beacon_gp2); in iwl_mvm_rx_beacon_notif()
1537 csa_vif = rcu_dereference_protected(mvm->csa_vif, in iwl_mvm_rx_beacon_notif()
1538 lockdep_is_held(&mvm->mutex)); in iwl_mvm_rx_beacon_notif()
1539 if (unlikely(csa_vif && csa_vif->bss_conf.csa_active)) in iwl_mvm_rx_beacon_notif()
1540 iwl_mvm_csa_count_down(mvm, csa_vif, mvm->ap_last_beacon_gp2, in iwl_mvm_rx_beacon_notif()
1543 tx_blocked_vif = rcu_dereference_protected(mvm->csa_tx_blocked_vif, in iwl_mvm_rx_beacon_notif()
1544 lockdep_is_held(&mvm->mutex)); in iwl_mvm_rx_beacon_notif()
1554 if (!mvm->csa_tx_block_bcn_timeout) in iwl_mvm_rx_beacon_notif()
1555 mvm->csa_tx_block_bcn_timeout = in iwl_mvm_rx_beacon_notif()
1558 mvm->csa_tx_block_bcn_timeout--; in iwl_mvm_rx_beacon_notif()
1561 if (mvm->csa_tx_block_bcn_timeout == 0) { in iwl_mvm_rx_beacon_notif()
1563 RCU_INIT_POINTER(mvm->csa_tx_blocked_vif, NULL); in iwl_mvm_rx_beacon_notif()
1579 u32 id = le32_to_cpu(mb->link_id); in iwl_mvm_handle_missed_beacons_notif()
1582 int link_id = -1; in iwl_mvm_handle_missed_beacons_notif()
1583 u8 notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, LEGACY_GROUP, in iwl_mvm_handle_missed_beacons_notif()
1586 u8 new_notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, MAC_CONF_GROUP, in iwl_mvm_handle_missed_beacons_notif()
1601 bss_conf = &vif->bss_conf; in iwl_mvm_handle_missed_beacons_notif()
1608 vif = bss_conf->vif; in iwl_mvm_handle_missed_beacons_notif()
1609 link_id = bss_conf->link_id; in iwl_mvm_handle_missed_beacons_notif()
1616 le32_to_cpu(mb->consec_missed_beacons), in iwl_mvm_handle_missed_beacons_notif()
1617 le32_to_cpu(mb->consec_missed_beacons_since_last_rx)); in iwl_mvm_handle_missed_beacons_notif()
1626 mvm->trans->dbg.dump_file_name_ext_valid = true; in iwl_mvm_handle_missed_beacons_notif()
1627 snprintf(mvm->trans->dbg.dump_file_name_ext, IWL_FW_INI_MAX_NAME, in iwl_mvm_handle_missed_beacons_notif()
1630 rx_missed_bcon = le32_to_cpu(mb->consec_missed_beacons); in iwl_mvm_handle_missed_beacons_notif()
1632 le32_to_cpu(mb->consec_missed_beacons_since_last_rx); in iwl_mvm_handle_missed_beacons_notif()
1647 } else if (link_id >= 0 && hweight16(vif->active_links) > 1) { in iwl_mvm_handle_missed_beacons_notif()
1649 bss_conf->bss_param_ch_cnt_link_id; in iwl_mvm_handle_missed_beacons_notif()
1654 le32_to_cpu(mb->other_link_id) == IWL_MVM_FW_LINK_ID_INVALID, in iwl_mvm_handle_missed_beacons_notif()
1656 vif->active_links)) in iwl_mvm_handle_missed_beacons_notif()
1658 le32_to_cpu(mb->consec_missed_beacons_other_link); in iwl_mvm_handle_missed_beacons_notif()
1680 /* try to switch links, no-op if we don't have MLO */ in iwl_mvm_handle_missed_beacons_notif()
1684 iwl_dbg_tlv_time_point(&mvm->fwrt, in iwl_mvm_handle_missed_beacons_notif()
1687 trigger = iwl_fw_dbg_trigger_on(&mvm->fwrt, ieee80211_vif_to_wdev(vif), in iwl_mvm_handle_missed_beacons_notif()
1692 bcon_trig = (void *)trigger->data; in iwl_mvm_handle_missed_beacons_notif()
1693 stop_trig_missed_bcon = le32_to_cpu(bcon_trig->stop_consec_missed_bcon); in iwl_mvm_handle_missed_beacons_notif()
1695 le32_to_cpu(bcon_trig->stop_consec_missed_bcon_since_rx); in iwl_mvm_handle_missed_beacons_notif()
1701 iwl_fw_dbg_collect_trig(&mvm->fwrt, trigger, NULL); in iwl_mvm_handle_missed_beacons_notif()
1709 iwl_mvm_handle_missed_beacons_notif(mvm, (const void *)pkt->data, pkt); in iwl_mvm_rx_missed_beacons_notif()
1717 (const void *)pkt->data; in iwl_mvm_rx_missed_beacons_notif_legacy()
1719 .link_id = mb_v4->link_id, in iwl_mvm_rx_missed_beacons_notif_legacy()
1720 .consec_missed_beacons = mb_v4->consec_missed_beacons, in iwl_mvm_rx_missed_beacons_notif_legacy()
1722 mb_v4->consec_missed_beacons_since_last_rx, in iwl_mvm_rx_missed_beacons_notif_legacy()
1734 struct iwl_stored_beacon_notif_common *sb = (void *)pkt->data; in iwl_mvm_rx_stored_beacon_notif()
1738 u32 size = le32_to_cpu(sb->byte_count); in iwl_mvm_rx_stored_beacon_notif()
1739 int ver = iwl_fw_lookup_cmd_ver(mvm->fw, in iwl_mvm_rx_stored_beacon_notif()
1746 /* handle per-version differences */ in iwl_mvm_rx_stored_beacon_notif()
1748 struct iwl_stored_beacon_notif_v2 *sb_v2 = (void *)pkt->data; in iwl_mvm_rx_stored_beacon_notif()
1753 data = sb_v2->data; in iwl_mvm_rx_stored_beacon_notif()
1755 struct iwl_stored_beacon_notif *sb_v3 = (void *)pkt->data; in iwl_mvm_rx_stored_beacon_notif()
1760 data = sb_v3->data; in iwl_mvm_rx_stored_beacon_notif()
1771 rx_status.mactime = le64_to_cpu(sb->tsf); in iwl_mvm_rx_stored_beacon_notif()
1774 rx_status.device_timestamp = le32_to_cpu(sb->system_time); in iwl_mvm_rx_stored_beacon_notif()
1776 (sb->band & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ? in iwl_mvm_rx_stored_beacon_notif()
1779 ieee80211_channel_to_frequency(le16_to_cpu(sb->channel), in iwl_mvm_rx_stored_beacon_notif()
1787 ieee80211_rx_napi(mvm->hw, NULL, skb, NULL); in iwl_mvm_rx_stored_beacon_notif()
1794 struct iwl_probe_resp_data_notif *notif = (void *)pkt->data; in iwl_mvm_probe_resp_data_notif()
1796 u32 id = le32_to_cpu(notif->mac_id); in iwl_mvm_probe_resp_data_notif()
1801 notif->noa_active, notif->csa_counter); in iwl_mvm_probe_resp_data_notif()
1813 memcpy(&new_data->notif, notif, sizeof(new_data->notif)); in iwl_mvm_probe_resp_data_notif()
1816 new_data->noa_len = sizeof(struct ieee80211_vendor_ie) + in iwl_mvm_probe_resp_data_notif()
1817 sizeof(new_data->notif.noa_attr) - 1; in iwl_mvm_probe_resp_data_notif()
1823 if (new_data->notif.noa_attr.len_low == in iwl_mvm_probe_resp_data_notif()
1825 new_data->noa_len -= sizeof(struct ieee80211_p2p_noa_desc); in iwl_mvm_probe_resp_data_notif()
1827 old_data = rcu_dereference_protected(mvmvif->deflink.probe_resp_data, in iwl_mvm_probe_resp_data_notif()
1828 lockdep_is_held(&mvmvif->mvm->mutex)); in iwl_mvm_probe_resp_data_notif()
1829 rcu_assign_pointer(mvmvif->deflink.probe_resp_data, new_data); in iwl_mvm_probe_resp_data_notif()
1834 if (notif->csa_counter != IWL_PROBE_RESP_DATA_NO_CSA && in iwl_mvm_probe_resp_data_notif()
1835 notif->csa_counter >= 1) in iwl_mvm_probe_resp_data_notif()
1836 ieee80211_beacon_set_cntdwn(vif, notif->csa_counter); in iwl_mvm_probe_resp_data_notif()
1849 u8 notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, MAC_CONF_GROUP, in iwl_mvm_channel_switch_start_notif()
1856 struct iwl_channel_switch_start_notif_v1 *notif = (void *)pkt->data; in iwl_mvm_channel_switch_start_notif()
1859 id_n_color = le32_to_cpu(notif->id_and_color); in iwl_mvm_channel_switch_start_notif()
1867 csa_active = vif->bss_conf.csa_active; in iwl_mvm_channel_switch_start_notif()
1869 struct iwl_channel_switch_start_notif *notif = (void *)pkt->data; in iwl_mvm_channel_switch_start_notif()
1870 u32 link_id = le32_to_cpu(notif->link_id); in iwl_mvm_channel_switch_start_notif()
1878 mac_link_id = bss_conf->link_id; in iwl_mvm_channel_switch_start_notif()
1879 vif = bss_conf->vif; in iwl_mvm_channel_switch_start_notif()
1880 csa_active = bss_conf->csa_active; in iwl_mvm_channel_switch_start_notif()
1885 id_n_color = FW_CMD_ID_AND_COLOR(mvmvif->id, mvmvif->color); in iwl_mvm_channel_switch_start_notif()
1887 switch (vif->type) { in iwl_mvm_channel_switch_start_notif()
1889 csa_vif = rcu_dereference(mvm->csa_vif); in iwl_mvm_channel_switch_start_notif()
1890 if (WARN_ON(!csa_vif || !csa_vif->bss_conf.csa_active || in iwl_mvm_channel_switch_start_notif()
1895 csa_id = FW_CMD_ID_AND_COLOR(csa_mvmvif->id, csa_mvmvif->color); in iwl_mvm_channel_switch_start_notif()
1903 schedule_delayed_work(&mvm->cs_tx_unblock_dwork, in iwl_mvm_channel_switch_start_notif()
1905 csa_vif->bss_conf.beacon_int)); in iwl_mvm_channel_switch_start_notif()
1911 RCU_INIT_POINTER(mvm->csa_vif, NULL); in iwl_mvm_channel_switch_start_notif()
1918 if (iwl_fw_lookup_notif_ver(mvm->fw, MAC_CONF_GROUP, in iwl_mvm_channel_switch_start_notif()
1927 cancel_delayed_work(&mvmvif->csa_work); in iwl_mvm_channel_switch_start_notif()
1943 struct iwl_channel_switch_error_notif *notif = (void *)pkt->data; in iwl_mvm_channel_switch_error_notif()
1945 u32 id = le32_to_cpu(notif->link_id); in iwl_mvm_channel_switch_error_notif()
1946 u32 csa_err_mask = le32_to_cpu(notif->csa_err_mask); in iwl_mvm_channel_switch_error_notif()
1968 struct iwl_missed_vap_notif *mb = (void *)pkt->data; in iwl_mvm_rx_missed_vap_notif()
1970 u32 id = le32_to_cpu(mb->mac_id); in iwl_mvm_rx_missed_vap_notif()
1974 le32_to_cpu(mb->mac_id), in iwl_mvm_rx_missed_vap_notif()
1975 mb->num_beacon_intervals_elapsed, in iwl_mvm_rx_missed_vap_notif()
1976 mb->profile_periodicity); in iwl_mvm_rx_missed_vap_notif()