Lines Matching +full:queue +full:- +full:pkt +full:- +full:tx

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"
62 if (vif == data->vif)
81 switch (data->vif->type) {
91 if (vif->type != NL80211_IFTYPE_AP ||
92 data->preferred_tsf != NUM_TSF_IDS ||
93 !test_bit(mvmvif->tsf_id, data->available_tsf_ids))
96 min_bi = min(data->vif->bss_conf.beacon_int,
97 vif->bss_conf.beacon_int);
102 if ((data->vif->bss_conf.beacon_int -
103 vif->bss_conf.beacon_int) % min_bi == 0) {
104 data->preferred_tsf = mvmvif->tsf_id;
119 if ((vif->type != NL80211_IFTYPE_AP &&
120 vif->type != NL80211_IFTYPE_STATION) ||
121 data->preferred_tsf != NUM_TSF_IDS ||
122 !test_bit(mvmvif->tsf_id, data->available_tsf_ids))
125 min_bi = min(data->vif->bss_conf.beacon_int,
126 vif->bss_conf.beacon_int);
131 if ((data->vif->bss_conf.beacon_int -
132 vif->bss_conf.beacon_int) % min_bi == 0) {
133 data->preferred_tsf = mvmvif->tsf_id;
154 __clear_bit(mvmvif->tsf_id, data->available_tsf_ids);
156 if (data->preferred_tsf == mvmvif->tsf_id)
157 data->preferred_tsf = NUM_TSF_IDS;
166 /* Iterator may already find the interface being added -- skip it */
167 if (vif == data->vif) {
168 data->found_vif = true;
178 __clear_bit(mvmvif->id, data->available_mac_ids);
191 .available_tsf_ids = { (1 << NUM_TSF_IDS) - 1 },
197 mvm->hw, IEEE80211_IFACE_ITER_RESUME_ALL,
201 mvmvif->tsf_id = data.preferred_tsf;
202 else if (!test_bit(mvmvif->tsf_id, data.available_tsf_ids))
203 mvmvif->tsf_id = find_first_bit(data.available_tsf_ids,
213 .available_mac_ids = { (1 << NUM_MAC_INDEX_DRIVER) - 1 },
214 .available_tsf_ids = { (1 << NUM_TSF_IDS) - 1 },
221 lockdep_assert_held(&mvm->mutex);
239 /* MAC ID 0 should be used only for the managed/IBSS vif with non-MLO
242 if (!mvm->mld_api_is_used) {
243 switch (vif->type) {
247 if (!vif->p2p)
256 mvm->hw, IEEE80211_IFACE_ITER_RESUME_ALL,
273 if (WARN_ON_ONCE(test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)))
274 return -EBUSY;
276 mvmvif->id = find_first_bit(data.available_mac_ids,
278 if (mvmvif->id == NUM_MAC_INDEX_DRIVER) {
279 IWL_ERR(mvm, "Failed to init MAC context - no free ID!\n");
280 ret = -EIO;
285 mvmvif->tsf_id = data.preferred_tsf;
287 mvmvif->tsf_id = find_first_bit(data.available_tsf_ids,
289 if (mvmvif->tsf_id == NUM_TSF_IDS) {
290 IWL_ERR(mvm, "Failed to init MAC context - no free TSF!\n");
291 ret = -EIO;
295 mvmvif->color = 0;
297 INIT_LIST_HEAD(&mvmvif->time_event_data.list);
298 mvmvif->time_event_data.id = TE_MAX;
299 mvmvif->roc_activity = ROC_NUM_ACTIVITIES;
301 mvmvif->deflink.bcast_sta.sta_id = IWL_MVM_INVALID_STA;
302 mvmvif->deflink.mcast_sta.sta_id = IWL_MVM_INVALID_STA;
303 mvmvif->deflink.ap_sta_id = IWL_MVM_INVALID_STA;
306 if (vif->type == NL80211_IFTYPE_P2P_DEVICE)
309 /* Allocate the CAB queue for softAP and GO interfaces */
310 if (vif->type == NL80211_IFTYPE_AP ||
311 vif->type == NL80211_IFTYPE_ADHOC) {
314 * queue value (when queue is enabled).
316 mvmvif->deflink.cab_queue = IWL_MVM_DQA_GCAST_QUEUE;
320 mvmvif->deflink.smps_requests[i] = IEEE80211_SMPS_AUTOMATIC;
335 unsigned long basic = vif->bss_conf.basic_rates;
342 sband = mvm->hw->wiphy->bands[band];
345 int hw = sband->bitrates[i].hw_value;
347 ofdm |= BIT(hw - IWL_FIRST_OFDM_RATE);
364 * and 6 Mbps because the 802.11-2007 standard says in 9.6:
392 * - if no CCK rates are basic, it must be ERP since there must
395 * - if 11M is a basic rate, it must be ERP as well, so add 5.5M
396 * - if 5.5M is basic, 1M and 2M are mandatory
397 * - if 2M is basic, 1M is mandatory
398 * - if 1M is basic, that's the only valid ACK rate.
423 chanctx = rcu_dereference(link_conf->chanctx_conf);
424 iwl_mvm_ack_rates(mvm, vif, chanctx ? chanctx->def.chan->band
441 u8 protection_mode = link_conf->ht_operation_mode &
443 bool ht_enabled = !!(link_conf->ht_operation_mode &
446 if (link_conf->use_cts_prot)
450 link_conf->use_cts_prot,
451 link_conf->ht_operation_mode);
458 * See section 9.23.3.1 of IEEE 80211-2012.
470 if (link_conf->chanreq.oper.width > NL80211_CHAN_WIDTH_20)
486 mvmvif->link[link_conf->link_id];
497 cpu_to_le16(mvm_link->queue_params[i].cw_min);
499 cpu_to_le16(mvm_link->queue_params[i].cw_max);
501 cpu_to_le16(mvm_link->queue_params[i].txop * 32);
502 ac[ucode_ac].aifsn = mvm_link->queue_params[i].aifs;
506 if (link_conf->qos)
509 if (link_conf->chanreq.oper.width != NL80211_CHAN_WIDTH_20_NOHT)
517 switch (vif->type) {
519 if (vif->p2p)
549 const u8 *bssid = bssid_override ?: vif->bss_conf.bssid;
552 cmd->id_and_color = cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id,
553 mvmvif->color));
554 cmd->action = cpu_to_le32(action);
555 cmd->mac_type = cpu_to_le32(iwl_mvm_get_mac_type(vif));
557 cmd->tsf_id = cpu_to_le32(mvmvif->tsf_id);
559 memcpy(cmd->node_addr, vif->addr, ETH_ALEN);
562 memcpy(cmd->bssid_addr, bssid, ETH_ALEN);
564 eth_broadcast_addr(cmd->bssid_addr);
566 iwl_mvm_set_fw_basic_rates(mvm, vif, &vif->bss_conf, &cmd->cck_rates,
567 &cmd->ofdm_rates);
569 cmd->cck_short_preamble =
570 cpu_to_le32(vif->bss_conf.use_short_preamble ?
572 cmd->short_slot =
573 cpu_to_le32(vif->bss_conf.use_short_slot ?
576 cmd->filter_flags = 0;
578 iwl_mvm_set_fw_qos_params(mvm, vif, &vif->bss_conf, cmd->ac,
579 &cmd->qos_flags);
583 iwl_mvm_set_fw_protection_flags(mvm, vif, &vif->bss_conf,
584 &cmd->protection_flags,
595 le32_to_cpu(cmd->action), ret);
614 * same offset in the frame -- the TSF is at the first symbol
621 dtim_offs = link_conf->sync_dtim_count *
622 link_conf->beacon_int;
627 cpu_to_le64(link_conf->sync_tsf + dtim_offs);
629 cpu_to_le32(link_conf->sync_device_ts + dtim_offs);
631 cpu_to_le32(link_conf->sync_device_ts);
643 &vif->bss_conf.p2p_noa_attr;
645 return cpu_to_le32(noa->oppps_ctwindow &
654 if (vif->bss_conf.twt_requester && IWL_MVM_USE_TWT)
656 if (vif->bss_conf.twt_protected)
658 if (vif->bss_conf.twt_broadcast)
672 WARN_ON(vif->type != NL80211_IFTYPE_STATION);
683 if (vif->p2p) {
693 if (vif->cfg.assoc && vif->bss_conf.dtim_period &&
697 iwl_mvm_set_fw_dtim_tbtt(mvm, vif, &vif->bss_conf,
698 &ctxt_sta->dtim_tsf,
699 &ctxt_sta->dtim_time,
700 &ctxt_sta->assoc_beacon_arrive_time);
702 ctxt_sta->is_assoc = cpu_to_le32(1);
704 if (!mvmvif->authorized &&
705 fw_has_capa(&mvm->fw->ucode_capa,
707 ctxt_sta->data_policy |=
710 ctxt_sta->is_assoc = cpu_to_le32(0);
718 ctxt_sta->bi = cpu_to_le32(vif->bss_conf.beacon_int);
719 ctxt_sta->dtim_interval = cpu_to_le32(vif->bss_conf.beacon_int *
720 vif->bss_conf.dtim_period);
722 ctxt_sta->listen_interval = cpu_to_le32(mvm->hw->conf.listen_interval);
723 ctxt_sta->assoc_id = cpu_to_le32(vif->cfg.aid);
725 if (vif->probe_req_reg && vif->cfg.assoc && vif->p2p)
728 if (vif->bss_conf.he_support && !iwlwifi_mod_params.disable_11ax) {
730 ctxt_sta->data_policy |=
746 WARN_ON(vif->type != NL80211_IFTYPE_MONITOR);
756 ieee80211_hw_set(mvm->hw, RX_INCLUDES_FCS);
759 * the queue mask is only relevant for old TX API, and
760 * mvm->snif_queue isn't set here (it's still set to
764 tfd_queue_msk = BIT(mvm->snif_queue);
767 ret = iwl_mvm_allocate_int_sta(mvm, &mvm->snif_sta, tfd_queue_msk,
768 vif->type, IWL_STA_GENERAL_PURPOSE);
782 WARN_ON(vif->type != NL80211_IFTYPE_ADHOC);
791 cmd.ibss.bi = cpu_to_le32(vif->bss_conf.beacon_int);
794 cmd.ibss.beacon_template = cpu_to_le32(mvmvif->id);
808 if (vif->type == NL80211_IFTYPE_AP && vif->p2p &&
809 mvmvif->ap_ibss_active)
810 data->go_active = true;
827 mvm->hw, IEEE80211_IFACE_ITER_RESUME_ALL,
839 WARN_ON(vif->type != NL80211_IFTYPE_P2P_DEVICE);
860 * variable-length part of the beacon. */
861 tim_idx = mgmt->u.beacon.variable - beacon;
863 /* Parse variable-length elements of beacon to find WLAN_EID_TIM */
864 while ((tim_idx < (frame_size - 2)) &&
869 if ((tim_idx < (frame_size - 1)) && (beacon[tim_idx] == WLAN_EID_TIM)) {
882 if (WARN_ON_ONCE(frame_size <= (mgmt->u.beacon.variable - beacon)))
885 frame_size -= mgmt->u.beacon.variable - beacon;
887 ie = cfg80211_find_ie(eid, mgmt->u.beacon.variable, frame_size);
891 return ie - beacon;
900 unsigned long basic = vif->bss_conf.basic_rates;
902 u32 link_id = u32_get_bits(info->control.flags,
904 u8 band = info->band;
909 for (i = 0; i < ARRAY_SIZE(mvmvif->link); i++) {
910 if (!mvmvif->link[i])
922 link_conf = rcu_dereference(vif->link_conf[link_id]);
924 basic = link_conf->basic_rates;
925 if (link_conf->chanreq.oper.chan)
926 band = link_conf->chanreq.oper.chan->band;
931 sband = mvm->hw->wiphy->bands[band];
933 u16 hw = sband->bitrates[i].hw_value;
943 if (band == NL80211_BAND_2GHZ && !vif->p2p &&
944 vif->type != NL80211_IFTYPE_P2P_DEVICE &&
945 !(info->flags & IEEE80211_TX_CTL_NO_CCK_RATE)) {
978 mvm->hw->wiphy->bands[info->band];
979 u32 legacy = vif->bss_conf.beacon_tx_rate.control[info->band].legacy;
983 u32 rate = ffs(legacy) - 1;
985 return sband->bitrates[rate].hw_value;
994 struct iwl_tx_cmd *tx)
1003 /* Set up TX command fields */
1004 tx->len = cpu_to_le16((u16)beacon->len);
1005 tx->sta_id = mvmvif->deflink.bcast_sta.sta_id;
1006 tx->life_time = cpu_to_le32(TX_CMD_LIFE_TIME_INFINITE);
1009 iwl_mvm_bt_coex_tx_prio(mvm, (void *)beacon->data, info, 0) <<
1011 tx->tx_flags = cpu_to_le32(tx_flags);
1013 if (!fw_has_capa(&mvm->fw->ucode_capa,
1015 iwl_mvm_toggle_tx_ant(mvm, &mvm->mgmt_last_antenna_idx);
1017 tx->rate_n_flags =
1018 cpu_to_le32(BIT(mvm->mgmt_last_antenna_idx) <<
1024 tx->rate_n_flags |=
1025 cpu_to_le32(iwl_mvm_mac80211_idx_to_hwrate(mvm->fw, rate));
1027 tx->rate_n_flags |= cpu_to_le32(RATE_MCS_CCK_MSK_V1);
1043 cmd.len[1] = beacon->len;
1044 cmd.data[1] = beacon->data;
1057 iwl_mvm_mac_ctxt_set_tx(mvm, vif, beacon, &beacon_cmd.tx);
1059 beacon_cmd.template_id = cpu_to_le32((u32)mvmvif->id);
1061 if (vif->type == NL80211_IFTYPE_AP)
1064 beacon->data, beacon->len);
1077 iwl_mvm_mac_ctxt_set_tx(mvm, vif, beacon, &beacon_cmd.tx);
1079 beacon_cmd.template_id = cpu_to_le32((u32)mvmvif->id);
1081 if (vif->type == NL80211_IFTYPE_AP)
1084 beacon->data, beacon->len);
1087 cpu_to_le32(iwl_mvm_find_ie_offset(beacon->data,
1089 beacon->len));
1091 cpu_to_le32(iwl_mvm_find_ie_offset(beacon->data,
1093 beacon->len));
1105 if (cfg80211_channel_is_psc(ctx->def.chan))
1108 return (ctx->def.chan->band == NL80211_BAND_6GHZ &&
1109 ctx->def.width >= NL80211_CHAN_WIDTH_80);
1124 flags = iwl_mvm_mac_ctxt_get_beacon_flags(mvm->fw, rate);
1128 ctx = rcu_dereference(link_conf->chanctx_conf);
1129 channel = ieee80211_frequency_to_channel(ctx->def.chan->center_freq);
1132 flags |= iwl_fw_lookup_cmd_ver(mvm->fw, BEACON_TEMPLATE_CMD,
1137 cpu_to_le32(~crc32_le(~0, vif->cfg.ssid,
1138 vif->cfg.ssid_len));
1143 beacon_cmd.byte_cnt = cpu_to_le16((u16)beacon->len);
1145 if (WARN_ON(!mvmvif->link[link_conf->link_id]))
1146 return -EINVAL;
1148 if (iwl_fw_lookup_cmd_ver(mvm->fw, BEACON_TEMPLATE_CMD, 0) > 12)
1150 cpu_to_le32(mvmvif->link[link_conf->link_id]->fw_link_id);
1152 beacon_cmd.link_id = cpu_to_le32((u32)mvmvif->id);
1154 if (vif->type == NL80211_IFTYPE_AP)
1157 beacon->data, beacon->len);
1160 cpu_to_le32(iwl_mvm_find_ie_offset(beacon->data,
1162 beacon->len));
1164 cpu_to_le32(iwl_mvm_find_ie_offset(beacon->data,
1166 beacon->len));
1168 if (vif->type == NL80211_IFTYPE_AP &&
1169 iwl_fw_lookup_cmd_ver(mvm->fw, BEACON_TEMPLATE_CMD, 0) >= 14)
1171 cpu_to_le32(iwl_mvm_find_ie_offset(beacon->data,
1173 beacon->len));
1185 return -EINVAL;
1190 if (!fw_has_capa(&mvm->fw->ucode_capa,
1194 if (fw_has_api(&mvm->fw->ucode_capa,
1210 WARN_ON(vif->type != NL80211_IFTYPE_AP &&
1211 vif->type != NL80211_IFTYPE_ADHOC);
1213 beacon = ieee80211_beacon_get_template(mvm->hw, vif, NULL,
1214 link_conf->link_id);
1216 return -ENOMEM;
1219 if (mvm->beacon_inject_active) {
1221 return -EBUSY;
1243 if (vif->type != NL80211_IFTYPE_STATION || !vif->cfg.assoc)
1247 if (vif->p2p && data->beacon_device_ts)
1250 data->beacon_device_ts = vif->bss_conf.sync_device_ts;
1251 data->beacon_int = vif->bss_conf.beacon_int;
1267 * wake-ups.
1270 if (mvmvif->ap_assoc_sta_count || !mvm->drop_bcn_ap_mode) {
1295 cmd->ac[IWL_MVM_TX_FIFO_VO].fifos_mask |= BIT(IWL_MVM_TX_FIFO_MCAST);
1298 &cmd->filter_flags,
1302 ctxt_ap->bi = cpu_to_le32(vif->bss_conf.beacon_int);
1303 ctxt_ap->dtim_interval = cpu_to_le32(vif->bss_conf.beacon_int *
1304 vif->bss_conf.dtim_period);
1306 if (!fw_has_api(&mvm->fw->ucode_capa,
1308 ctxt_ap->mcast_qid = cpu_to_le32(mvmvif->deflink.cab_queue);
1312 * just modify the MAC then we should keep the time -- the firmware
1322 mvm->hw, IEEE80211_IFACE_ITER_RESUME_ALL,
1327 mvmvif->ap_beacon_time = data.beacon_device_ts +
1331 mvmvif->ap_beacon_time = iwl_mvm_get_systime(mvm);
1335 ctxt_ap->beacon_time = cpu_to_le32(mvmvif->ap_beacon_time);
1336 ctxt_ap->beacon_tsf = 0; /* unused */
1339 ctxt_ap->beacon_template = cpu_to_le32(mvmvif->id);
1348 WARN_ON(vif->type != NL80211_IFTYPE_AP || vif->p2p);
1365 struct ieee80211_p2p_noa_attr *noa = &vif->bss_conf.p2p_noa_attr;
1367 WARN_ON(vif->type != NL80211_IFTYPE_AP || !vif->p2p);
1376 cmd.go.ctwin = cpu_to_le32(noa->oppps_ctwindow &
1379 cpu_to_le32(!!(noa->oppps_ctwindow &
1389 switch (vif->type) {
1395 if (!vif->p2p)
1409 return -EOPNOTSUPP;
1417 if (WARN_ONCE(mvmvif->uploaded, "Adding active MAC %pM/%d\n",
1418 vif->addr, ieee80211_vif_type_p2p(vif)))
1419 return -EIO;
1429 mvmvif->uploaded = true;
1438 if (WARN_ONCE(!mvmvif->uploaded, "Changing inactive MAC %pM/%d\n",
1439 vif->addr, ieee80211_vif_type_p2p(vif)))
1440 return -EIO;
1452 if (WARN_ONCE(!mvmvif->uploaded, "Removing inactive MAC %pM/%d\n",
1453 vif->addr, ieee80211_vif_type_p2p(vif)))
1454 return -EIO;
1458 cmd.id_and_color = cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id,
1459 mvmvif->color));
1466 mvmvif->uploaded = false;
1468 if (vif->type == NL80211_IFTYPE_MONITOR) {
1469 __clear_bit(IEEE80211_HW_RX_INCLUDES_FCS, mvm->hw->flags);
1484 if (!tx_success && !mvmvif->csa_countdown)
1487 mvmvif->csa_countdown = true;
1493 &csa_vif->bss_conf);
1494 if (csa_vif->p2p &&
1495 !iwl_mvm_te_scheduled(&mvmvif->time_event_data) && gp2 &&
1498 csa_vif->bss_conf.beacon_int -
1503 IWL_MVM_CHANNEL_SWITCH_TIME_GO -
1507 } else if (!iwl_mvm_te_scheduled(&mvmvif->time_event_data)) {
1510 RCU_INIT_POINTER(mvm->csa_vif, NULL);
1517 struct iwl_rx_packet *pkt = rxb_addr(rxb);
1518 unsigned int pkt_len = iwl_rx_packet_payload_len(pkt);
1519 struct iwl_extended_beacon_notif *beacon = (void *)pkt->data;
1520 struct iwl_extended_beacon_notif_v5 *beacon_v5 = (void *)pkt->data;
1526 lockdep_assert_held(&mvm->mutex);
1528 mvm->ap_last_beacon_gp2 = le32_to_cpu(beacon->gp2);
1532 &beacon_v5->beacon_notify_hdr;
1537 mvm->ibss_manager = beacon_v5->ibss_mgr_status != 0;
1539 status = le16_to_cpu(agg_status->status) & TX_STATUS_MSK;
1542 status, beacon_notify_hdr->failure_frame,
1543 le64_to_cpu(beacon->tsf),
1544 mvm->ap_last_beacon_gp2,
1545 le32_to_cpu(beacon_notify_hdr->initial_rate));
1550 mvm->ibss_manager = beacon->ibss_mgr_status != 0;
1551 status = le32_to_cpu(beacon->status) & TX_STATUS_MSK;
1554 status, le64_to_cpu(beacon->tsf),
1555 mvm->ap_last_beacon_gp2);
1558 csa_vif = rcu_dereference_protected(mvm->csa_vif,
1559 lockdep_is_held(&mvm->mutex));
1560 if (unlikely(csa_vif && csa_vif->bss_conf.csa_active))
1561 iwl_mvm_csa_count_down(mvm, csa_vif, mvm->ap_last_beacon_gp2,
1564 tx_blocked_vif = rcu_dereference_protected(mvm->csa_tx_blocked_vif,
1565 lockdep_is_held(&mvm->mutex));
1575 if (!mvm->csa_tx_block_bcn_timeout)
1576 mvm->csa_tx_block_bcn_timeout =
1579 mvm->csa_tx_block_bcn_timeout--;
1581 /* Check if the timeout is expired, and unblock tx */
1582 if (mvm->csa_tx_block_bcn_timeout == 0) {
1584 RCU_INIT_POINTER(mvm->csa_tx_blocked_vif, NULL);
1592 struct iwl_rx_packet *pkt = rxb_addr(rxb);
1593 struct iwl_missed_beacons_notif *mb = (void *)pkt->data;
1600 u32 id = le32_to_cpu(mb->link_id);
1601 union iwl_dbg_tlv_tp_data tp_data = { .fw_pkt = pkt };
1603 int link_id = -1;
1604 u8 notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, LEGACY_GROUP,
1618 vif = bss_conf->vif;
1619 link_id = bss_conf->link_id;
1626 le32_to_cpu(mb->consec_missed_beacons),
1627 le32_to_cpu(mb->consec_missed_beacons_since_last_rx),
1628 le32_to_cpu(mb->num_recvd_beacons),
1629 le32_to_cpu(mb->num_expected_beacons));
1638 mvm->trans->dbg.dump_file_name_ext_valid = true;
1639 snprintf(mvm->trans->dbg.dump_file_name_ext, IWL_FW_INI_MAX_NAME,
1642 rx_missed_bcon = le32_to_cpu(mb->consec_missed_beacons);
1644 le32_to_cpu(mb->consec_missed_beacons_since_last_rx);
1660 link_id >= 0 && hweight16(vif->active_links) > 1) {
1670 iwl_dbg_tlv_time_point(&mvm->fwrt,
1673 trigger = iwl_fw_dbg_trigger_on(&mvm->fwrt, ieee80211_vif_to_wdev(vif),
1678 bcon_trig = (void *)trigger->data;
1679 stop_trig_missed_bcon = le32_to_cpu(bcon_trig->stop_consec_missed_bcon);
1681 le32_to_cpu(bcon_trig->stop_consec_missed_bcon_since_rx);
1688 iwl_fw_dbg_collect_trig(&mvm->fwrt, trigger, NULL);
1690 iwl_fw_dbg_collect_trig(&mvm->fwrt, trigger, "");
1697 struct iwl_rx_packet *pkt = rxb_addr(rxb);
1698 unsigned int pkt_len = iwl_rx_packet_payload_len(pkt);
1699 struct iwl_stored_beacon_notif_common *sb = (void *)pkt->data;
1703 u32 size = le32_to_cpu(sb->byte_count);
1704 int ver = iwl_fw_lookup_cmd_ver(mvm->fw,
1711 /* handle per-version differences */
1713 struct iwl_stored_beacon_notif_v2 *sb_v2 = (void *)pkt->data;
1718 data = sb_v2->data;
1720 struct iwl_stored_beacon_notif_v3 *sb_v3 = (void *)pkt->data;
1725 data = sb_v3->data;
1736 rx_status.mactime = le64_to_cpu(sb->tsf);
1739 rx_status.device_timestamp = le32_to_cpu(sb->system_time);
1741 (sb->band & cpu_to_le16(RX_RES_PHY_FLAGS_BAND_24)) ?
1744 ieee80211_channel_to_frequency(le16_to_cpu(sb->channel),
1752 ieee80211_rx_napi(mvm->hw, NULL, skb, NULL);
1758 struct iwl_rx_packet *pkt = rxb_addr(rxb);
1759 struct iwl_probe_resp_data_notif *notif = (void *)pkt->data;
1761 u32 id = le32_to_cpu(notif->mac_id);
1766 notif->noa_active, notif->csa_counter);
1778 memcpy(&new_data->notif, notif, sizeof(new_data->notif));
1781 new_data->noa_len = sizeof(struct ieee80211_vendor_ie) +
1782 sizeof(new_data->notif.noa_attr) - 1;
1788 if (new_data->notif.noa_attr.len_low ==
1790 new_data->noa_len -= sizeof(struct ieee80211_p2p_noa_desc);
1792 old_data = rcu_dereference_protected(mvmvif->deflink.probe_resp_data,
1793 lockdep_is_held(&mvmvif->mvm->mutex));
1794 rcu_assign_pointer(mvmvif->deflink.probe_resp_data, new_data);
1799 if (notif->csa_counter != IWL_PROBE_RESP_DATA_NO_CSA &&
1800 notif->csa_counter >= 1)
1801 ieee80211_beacon_set_cntdwn(vif, notif->csa_counter);
1807 struct iwl_rx_packet *pkt = rxb_addr(rxb);
1814 u8 notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, MAC_CONF_GROUP,
1821 struct iwl_channel_switch_start_notif_v1 *notif = (void *)pkt->data;
1824 id_n_color = le32_to_cpu(notif->id_and_color);
1832 csa_active = vif->bss_conf.csa_active;
1834 struct iwl_channel_switch_start_notif *notif = (void *)pkt->data;
1835 u32 link_id = le32_to_cpu(notif->link_id);
1843 mac_link_id = bss_conf->link_id;
1844 vif = bss_conf->vif;
1845 csa_active = bss_conf->csa_active;
1850 id_n_color = FW_CMD_ID_AND_COLOR(mvmvif->id, mvmvif->color);
1852 switch (vif->type) {
1854 csa_vif = rcu_dereference(mvm->csa_vif);
1855 if (WARN_ON(!csa_vif || !csa_vif->bss_conf.csa_active ||
1860 csa_id = FW_CMD_ID_AND_COLOR(csa_mvmvif->id, csa_mvmvif->color);
1868 schedule_delayed_work(&mvm->cs_tx_unblock_dwork,
1870 csa_vif->bss_conf.beacon_int));
1876 RCU_INIT_POINTER(mvm->csa_vif, NULL);
1883 if (iwl_fw_lookup_notif_ver(mvm->fw, MAC_CONF_GROUP,
1892 cancel_delayed_work(&mvmvif->csa_work);
1907 struct iwl_rx_packet *pkt = rxb_addr(rxb);
1908 struct iwl_channel_switch_error_notif *notif = (void *)pkt->data;
1910 u32 id = le32_to_cpu(notif->link_id);
1911 u32 csa_err_mask = le32_to_cpu(notif->csa_err_mask);
1932 struct iwl_rx_packet *pkt = rxb_addr(rxb);
1933 struct iwl_missed_vap_notif *mb = (void *)pkt->data;
1935 u32 id = le32_to_cpu(mb->mac_id);
1939 le32_to_cpu(mb->mac_id),
1940 mb->num_beacon_intervals_elapsed,
1941 mb->profile_periodicity);