Lines Matching defs:vif
47 struct ieee80211_vif *vif;
55 struct ieee80211_vif *vif)
58 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
62 if (vif == data->vif)
81 switch (data->vif->type) {
91 if (vif->type != NL80211_IFTYPE_AP ||
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) {
119 if ((vif->type != NL80211_IFTYPE_AP &&
120 vif->type != NL80211_IFTYPE_STATION) ||
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) {
161 struct ieee80211_vif *vif)
164 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
167 if (vif == data->vif) {
181 iwl_mvm_mac_tsf_id_iter(_data, mac, vif);
185 struct ieee80211_vif *vif)
187 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
190 .vif = vif,
207 int iwl_mvm_mac_ctxt_init(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
209 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
212 .vif = vif,
239 /* MAC ID 0 should be used only for the managed/IBSS vif with non-MLO
243 switch (vif->type) {
247 if (!vif->p2p)
262 * the vif being added already.
306 if (vif->type == NL80211_IFTYPE_P2P_DEVICE)
310 if (vif->type == NL80211_IFTYPE_AP ||
311 vif->type == NL80211_IFTYPE_ADHOC) {
330 struct ieee80211_vif *vif,
335 unsigned long basic = vif->bss_conf.basic_rates;
415 void iwl_mvm_set_fw_basic_rates(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
424 iwl_mvm_ack_rates(mvm, vif, chanctx ? chanctx->def.chan->band
435 struct ieee80211_vif *vif,
480 void iwl_mvm_set_fw_qos_params(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
484 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
513 int iwl_mvm_get_mac_type(struct ieee80211_vif *vif)
517 switch (vif->type) {
519 if (vif->p2p)
543 struct ieee80211_vif *vif,
548 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
549 const u8 *bssid = bssid_override ?: vif->bss_conf.bssid;
555 cmd->mac_type = cpu_to_le32(iwl_mvm_get_mac_type(vif));
559 memcpy(cmd->node_addr, vif->addr, ETH_ALEN);
566 iwl_mvm_set_fw_basic_rates(mvm, vif, &vif->bss_conf, &cmd->cck_rates,
570 cpu_to_le32(vif->bss_conf.use_short_preamble ?
573 cpu_to_le32(vif->bss_conf.use_short_slot ?
578 iwl_mvm_set_fw_qos_params(mvm, vif, &vif->bss_conf, cmd->ac,
583 iwl_mvm_set_fw_protection_flags(mvm, vif, &vif->bss_conf,
599 void iwl_mvm_set_fw_dtim_tbtt(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
640 struct ieee80211_vif *vif)
643 &vif->bss_conf.p2p_noa_attr;
650 struct ieee80211_vif *vif)
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)
665 struct ieee80211_vif *vif,
672 WARN_ON(vif->type != NL80211_IFTYPE_STATION);
675 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, bssid_override, action);
683 if (vif->p2p) {
685 iwl_mvm_mac_ctxt_cmd_p2p_sta_get_oppps_ctwin(mvm, vif);
693 if (vif->cfg.assoc && vif->bss_conf.dtim_period &&
695 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
697 iwl_mvm_set_fw_dtim_tbtt(mvm, vif, &vif->bss_conf,
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);
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) {
731 cpu_to_le32(iwl_mvm_mac_ctxt_cmd_sta_get_twt_policy(mvm, vif));
739 struct ieee80211_vif *vif,
746 WARN_ON(vif->type != NL80211_IFTYPE_MONITOR);
748 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, NULL, action);
768 vif->type, IWL_STA_GENERAL_PURPOSE);
776 struct ieee80211_vif *vif,
779 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
782 WARN_ON(vif->type != NL80211_IFTYPE_ADHOC);
784 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, NULL, action);
791 cmd.ibss.bi = cpu_to_le32(vif->bss_conf.beacon_int);
803 static void iwl_mvm_go_iterator(void *_data, u8 *mac, struct ieee80211_vif *vif)
806 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
808 if (vif->type == NL80211_IFTYPE_AP && vif->p2p &&
814 struct ieee80211_vif *vif)
834 struct ieee80211_vif *vif,
839 WARN_ON(vif->type != NL80211_IFTYPE_P2P_DEVICE);
841 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, NULL, action);
844 iwl_mac_ctxt_p2p_dev_has_extended_disc(mvm, vif);
896 struct ieee80211_vif *vif)
898 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
900 unsigned long basic = vif->bss_conf.basic_rates;
908 if (link_id == IEEE80211_LINK_UNSPECIFIED && ieee80211_vif_is_mld(vif)) {
922 link_conf = rcu_dereference(vif->link_conf[link_id]);
943 if (band == NL80211_BAND_2GHZ && !vif->p2p &&
944 vif->type != NL80211_IFTYPE_P2P_DEVICE &&
975 struct ieee80211_vif *vif)
979 u32 legacy = vif->bss_conf.beacon_tx_rate.control[info->band].legacy;
988 return iwl_mvm_mac_ctxt_get_lowest_rate(mvm, info, vif);
992 struct ieee80211_vif *vif,
996 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1022 rate = iwl_mvm_mac_ctxt_get_beacon_rate(mvm, info, vif);
1051 struct ieee80211_vif *vif,
1054 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1057 iwl_mvm_mac_ctxt_set_tx(mvm, vif, beacon, &beacon_cmd.tx);
1061 if (vif->type == NL80211_IFTYPE_AP)
1071 struct ieee80211_vif *vif,
1074 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1077 iwl_mvm_mac_ctxt_set_tx(mvm, vif, beacon, &beacon_cmd.tx);
1081 if (vif->type == NL80211_IFTYPE_AP)
1113 struct ieee80211_vif *vif,
1117 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1120 u8 rate = iwl_mvm_mac_ctxt_get_beacon_rate(mvm, info, vif);
1137 cpu_to_le32(~crc32_le(~0, vif->cfg.ssid,
1138 vif->cfg.ssid_len));
1154 if (vif->type == NL80211_IFTYPE_AP)
1168 if (vif->type == NL80211_IFTYPE_AP &&
1180 struct ieee80211_vif *vif,
1192 return iwl_mvm_mac_ctxt_send_beacon_v6(mvm, vif, beacon);
1196 return iwl_mvm_mac_ctxt_send_beacon_v9(mvm, vif, beacon,
1199 return iwl_mvm_mac_ctxt_send_beacon_v7(mvm, vif, beacon);
1204 struct ieee80211_vif *vif,
1210 WARN_ON(vif->type != NL80211_IFTYPE_AP &&
1211 vif->type != NL80211_IFTYPE_ADHOC);
1213 beacon = ieee80211_beacon_get_template(mvm->hw, vif, NULL,
1225 ret = iwl_mvm_mac_ctxt_send_beacon(mvm, vif, beacon, link_conf);
1232 struct ieee80211_vif *vif;
1239 struct ieee80211_vif *vif)
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;
1282 struct ieee80211_vif *vif,
1287 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1290 .vif = vif,
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);
1343 struct ieee80211_vif *vif,
1348 WARN_ON(vif->type != NL80211_IFTYPE_AP || vif->p2p);
1351 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, NULL, action);
1354 iwl_mvm_mac_ctxt_cmd_fill_ap(mvm, vif, &cmd, &cmd.ap,
1361 struct ieee80211_vif *vif,
1365 struct ieee80211_p2p_noa_attr *noa = &vif->bss_conf.p2p_noa_attr;
1367 WARN_ON(vif->type != NL80211_IFTYPE_AP || !vif->p2p);
1370 iwl_mvm_mac_ctxt_cmd_common(mvm, vif, &cmd, NULL, action);
1373 iwl_mvm_mac_ctxt_cmd_fill_ap(mvm, vif, &cmd, &cmd.go.ap,
1385 static int iwl_mvm_mac_ctx_send(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
1389 switch (vif->type) {
1391 return iwl_mvm_mac_ctxt_cmd_sta(mvm, vif, action,
1395 if (!vif->p2p)
1396 return iwl_mvm_mac_ctxt_cmd_ap(mvm, vif, action);
1398 return iwl_mvm_mac_ctxt_cmd_go(mvm, vif, action);
1400 return iwl_mvm_mac_ctxt_cmd_listener(mvm, vif, action);
1402 return iwl_mvm_mac_ctxt_cmd_p2p_device(mvm, vif, action);
1404 return iwl_mvm_mac_ctxt_cmd_ibss(mvm, vif, action);
1412 int iwl_mvm_mac_ctxt_add(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
1414 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1418 vif->addr, ieee80211_vif_type_p2p(vif)))
1421 ret = iwl_mvm_mac_ctx_send(mvm, vif, FW_CTXT_ACTION_ADD,
1427 iwl_mvm_set_last_nonqos_seq(mvm, vif);
1433 int iwl_mvm_mac_ctxt_changed(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
1436 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1439 vif->addr, ieee80211_vif_type_p2p(vif)))
1442 return iwl_mvm_mac_ctx_send(mvm, vif, FW_CTXT_ACTION_MODIFY,
1446 int iwl_mvm_mac_ctxt_remove(struct iwl_mvm *mvm, struct ieee80211_vif *vif)
1448 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
1453 vif->addr, ieee80211_vif_type_p2p(vif)))
1468 if (vif->type == NL80211_IFTYPE_MONITOR) {
1598 struct ieee80211_vif *vif;
1610 vif = iwl_mvm_rcu_dereference_vif_id(mvm, id, false);
1618 vif = bss_conf->vif;
1631 if (!vif)
1634 mac_type = iwl_mvm_get_mac_type(vif);
1651 iwl_mvm_connection_loss(mvm, vif, "missed beacons");
1660 link_id >= 0 && hweight16(vif->active_links) > 1) {
1661 iwl_mvm_exit_esr(mvm, vif, IWL_MVM_ESR_EXIT_MISSED_BEACON,
1662 iwl_mvm_get_other_link(vif, link_id));
1665 ieee80211_beacon_loss(vif);
1667 ieee80211_cqm_beacon_loss_notify(vif, GFP_ATOMIC);
1673 trigger = iwl_fw_dbg_trigger_on(&mvm->fwrt, ieee80211_vif_to_wdev(vif),
1762 struct ieee80211_vif *vif;
1768 vif = iwl_mvm_rcu_dereference_vif_id(mvm, id, false);
1769 if (!vif)
1772 mvmvif = iwl_mvm_vif_from_mac80211(vif);
1801 ieee80211_beacon_set_cntdwn(vif, notif->csa_counter);
1808 struct ieee80211_vif *csa_vif, *vif;
1827 vif = iwl_mvm_rcu_dereference_vif_id(mvm, mac_id, true);
1828 if (!vif)
1832 csa_active = vif->bss_conf.csa_active;
1844 vif = bss_conf->vif;
1848 mvmvif = iwl_mvm_vif_from_mac80211(vif);
1852 switch (vif->type) {
1856 csa_vif != vif))
1862 "channel switch noa notification on unexpected vif (csa_vif=%d, notif=%d)",
1887 iwl_mvm_cancel_channel_switch(mvm, vif, id);
1891 iwl_mvm_csa_client_absent(mvm, vif);
1893 ieee80211_chswitch_done(vif, true, mac_link_id);
1909 struct ieee80211_vif *vif;
1914 vif = iwl_mvm_rcu_dereference_vif_id(mvm, id, true);
1915 if (!vif) {
1925 ieee80211_channel_switch_disconnect(vif, true);
1934 struct ieee80211_vif *vif;
1945 vif = iwl_mvm_rcu_dereference_vif_id(mvm, id, true);
1946 if (vif)
1947 iwl_mvm_connection_loss(mvm, vif, "missed vap beacon");