Lines Matching full:vif
88 struct ieee80211_vif *vif,
770 if (!sta && info->control.vif->type == NL80211_IFTYPE_STATION && in iwl_mvm_mac_tx()
780 rcu_dereference(info->control.vif->link_conf[link_id]); in iwl_mvm_mac_tx()
886 iwl_mvm_ampdu_check_trigger(struct iwl_mvm *mvm, struct ieee80211_vif *vif, in iwl_mvm_ampdu_check_trigger() argument
893 trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, ieee80211_vif_to_wdev(vif), in iwl_mvm_ampdu_check_trigger()
931 struct ieee80211_vif *vif, in iwl_mvm_mac_ampdu_action() argument
954 if (iwl_mvm_vif_from_mac80211(vif)->deflink.ap_sta_id == in iwl_mvm_mac_ampdu_action()
957 u16 macid = iwl_mvm_vif_from_mac80211(vif)->id; in iwl_mvm_mac_ampdu_action()
961 mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_ampdu_action()
980 ret = iwl_mvm_sta_tx_agg_start(mvm, vif, sta, tid, ssn); in iwl_mvm_mac_ampdu_action()
983 ret = iwl_mvm_sta_tx_agg_stop(mvm, vif, sta, tid); in iwl_mvm_mac_ampdu_action()
987 ret = iwl_mvm_sta_tx_agg_flush(mvm, vif, sta, tid); in iwl_mvm_mac_ampdu_action()
990 ret = iwl_mvm_sta_tx_agg_oper(mvm, vif, sta, tid, in iwl_mvm_mac_ampdu_action()
1005 iwl_mvm_ampdu_check_trigger(mvm, vif, sta, tid, in iwl_mvm_mac_ampdu_action()
1014 struct ieee80211_vif *vif) in iwl_mvm_cleanup_iterator() argument
1017 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_cleanup_iterator()
1049 struct ieee80211_vif *vif; in iwl_mvm_cleanup_sta_iterator() local
1053 vif = mvm_sta->vif; in iwl_mvm_cleanup_sta_iterator()
1064 if (mvm_link_sta && !(vif->active_links & BIT(link_id))) { in iwl_mvm_cleanup_sta_iterator()
1366 int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif, in iwl_mvm_set_tx_power() argument
1374 cpu_to_le32(iwl_mvm_vif_from_mac80211(vif)->id), in iwl_mvm_set_tx_power()
1403 struct ieee80211_vif *vif) in iwl_mvm_post_channel_switch() argument
1405 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_post_channel_switch()
1411 if (vif->type == NL80211_IFTYPE_STATION) { in iwl_mvm_post_channel_switch()
1425 iwl_mvm_mld_mac_ctxt_changed(mvm, vif, false); in iwl_mvm_post_channel_switch()
1427 iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); in iwl_mvm_post_channel_switch()
1431 ret = iwl_mvm_enable_beacon_filter(mvm, vif, 0); in iwl_mvm_post_channel_switch()
1435 iwl_mvm_stop_session_protection(mvm, vif); in iwl_mvm_post_channel_switch()
1452 struct ieee80211_vif *vif) in iwl_mvm_abort_channel_switch() argument
1455 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_abort_channel_switch()
1476 iwl_mvm_remove_csa_period(mvm, vif); in iwl_mvm_abort_channel_switch()
1485 iwl_mvm_post_channel_switch(hw, vif); in iwl_mvm_abort_channel_switch()
1491 struct ieee80211_vif *vif; in iwl_mvm_channel_switch_disconnect_wk() local
1494 vif = container_of((void *)mvmvif, struct ieee80211_vif, drv_priv); in iwl_mvm_channel_switch_disconnect_wk()
1497 ieee80211_chswitch_done(vif, false); in iwl_mvm_channel_switch_disconnect_wk()
1523 struct ieee80211_vif *vif) in iwl_mvm_alloc_bcast_mcast_sta() argument
1525 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_alloc_bcast_mcast_sta()
1530 ret = iwl_mvm_alloc_bcast_sta(mvm, vif); in iwl_mvm_alloc_bcast_mcast_sta()
1540 vif->type, in iwl_mvm_alloc_bcast_mcast_sta()
1556 struct ieee80211_vif *vif) in iwl_mvm_mac_add_interface() argument
1559 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_add_interface()
1583 ret = iwl_mvm_mac_ctxt_init(mvm, vif); in iwl_mvm_mac_add_interface()
1587 rcu_assign_pointer(mvm->vif_id_to_mac[mvmvif->id], vif); in iwl_mvm_mac_add_interface()
1590 if (vif->type == NL80211_IFTYPE_NAN) { in iwl_mvm_mac_add_interface()
1606 if (vif->type == NL80211_IFTYPE_AP || in iwl_mvm_mac_add_interface()
1607 vif->type == NL80211_IFTYPE_ADHOC) { in iwl_mvm_mac_add_interface()
1608 iwl_mvm_vif_dbgfs_register(mvm, vif); in iwl_mvm_mac_add_interface()
1615 ret = iwl_mvm_mac_ctxt_add(mvm, vif); in iwl_mvm_mac_add_interface()
1624 ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0); in iwl_mvm_mac_add_interface()
1629 vif->type == NL80211_IFTYPE_STATION && !vif->p2p) { in iwl_mvm_mac_add_interface()
1631 vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER | in iwl_mvm_mac_add_interface()
1635 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) in iwl_mvm_mac_add_interface()
1636 mvm->p2p_device_vif = vif; in iwl_mvm_mac_add_interface()
1638 iwl_mvm_tcm_add_vif(mvm, vif); in iwl_mvm_mac_add_interface()
1640 if (vif->type == NL80211_IFTYPE_MONITOR) { in iwl_mvm_mac_add_interface()
1643 iwl_mvm_chandef_get_primary_80(&vif->bss_conf.chandef); in iwl_mvm_mac_add_interface()
1646 iwl_mvm_vif_dbgfs_register(mvm, vif); in iwl_mvm_mac_add_interface()
1649 vif->type == NL80211_IFTYPE_STATION && !vif->p2p && in iwl_mvm_mac_add_interface()
1651 iwl_mei_set_nic_info(vif->addr, mvm->nvm_data->hw_addr); in iwl_mvm_mac_add_interface()
1652 iwl_mei_set_netdev(ieee80211_vif_to_wdev(vif)->netdev); in iwl_mvm_mac_add_interface()
1653 mvm->csme_vif = vif; in iwl_mvm_mac_add_interface()
1657 if (!ret && (vif->type == NL80211_IFTYPE_AP || in iwl_mvm_mac_add_interface()
1658 vif->type == NL80211_IFTYPE_ADHOC)) in iwl_mvm_mac_add_interface()
1659 ret = iwl_mvm_alloc_bcast_mcast_sta(mvm, vif); in iwl_mvm_mac_add_interface()
1665 vif->driver_flags &= ~(IEEE80211_VIF_BEACON_FILTER | in iwl_mvm_mac_add_interface()
1670 iwl_mvm_mac_ctxt_remove(mvm, vif); in iwl_mvm_mac_add_interface()
1678 struct ieee80211_vif *vif) in iwl_mvm_prepare_mac_removal() argument
1680 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_prepare_mac_removal()
1682 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_prepare_mac_removal()
1699 struct ieee80211_vif *vif) in iwl_mvm_mac_remove_interface_common() argument
1702 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_remove_interface_common()
1705 iwl_mvm_prepare_mac_removal(mvm, vif); in iwl_mvm_mac_remove_interface_common()
1707 if (!(vif->type == NL80211_IFTYPE_AP || in iwl_mvm_mac_remove_interface_common()
1708 vif->type == NL80211_IFTYPE_ADHOC)) in iwl_mvm_mac_remove_interface_common()
1709 iwl_mvm_tcm_rm_vif(mvm, vif); in iwl_mvm_mac_remove_interface_common()
1713 if (vif == mvm->csme_vif) { in iwl_mvm_mac_remove_interface_common()
1726 vif->driver_flags &= ~(IEEE80211_VIF_BEACON_FILTER | in iwl_mvm_mac_remove_interface_common()
1730 if (vif->bss_conf.ftm_responder) in iwl_mvm_mac_remove_interface_common()
1733 iwl_mvm_vif_dbgfs_clean(mvm, vif); in iwl_mvm_mac_remove_interface_common()
1739 if (vif->type == NL80211_IFTYPE_AP || in iwl_mvm_mac_remove_interface_common()
1740 vif->type == NL80211_IFTYPE_ADHOC) { in iwl_mvm_mac_remove_interface_common()
1742 if (vif == mvm->noa_vif) { in iwl_mvm_mac_remove_interface_common()
1755 struct ieee80211_vif *vif) in iwl_mvm_mac_remove_interface() argument
1758 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_remove_interface()
1760 if (iwl_mvm_mac_remove_interface_common(hw, vif)) in iwl_mvm_mac_remove_interface()
1768 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_mac_remove_interface()
1776 iwl_mvm_mac_ctxt_remove(mvm, vif); in iwl_mvm_mac_remove_interface()
1780 if (vif->type == NL80211_IFTYPE_MONITOR) in iwl_mvm_mac_remove_interface()
1784 if (vif->type == NL80211_IFTYPE_AP || in iwl_mvm_mac_remove_interface()
1785 vif->type == NL80211_IFTYPE_ADHOC) { in iwl_mvm_mac_remove_interface()
1787 iwl_mvm_dealloc_bcast_sta(mvm, vif); in iwl_mvm_mac_remove_interface()
1799 struct ieee80211_vif *vif) in iwl_mvm_mc_iface_iterator() argument
1815 if (vif->type != NL80211_IFTYPE_STATION || in iwl_mvm_mc_iface_iterator()
1816 !vif->cfg.assoc) in iwl_mvm_mc_iface_iterator()
1820 memcpy(cmd->bssid, vif->bss_conf.bssid, ETH_ALEN); in iwl_mvm_mc_iface_iterator()
1930 struct ieee80211_vif *vif, in iwl_mvm_config_iface_filter() argument
1941 if (vif->type != NL80211_IFTYPE_STATION || !vif->cfg.assoc || in iwl_mvm_config_iface_filter()
1942 !vif->p2p) in iwl_mvm_config_iface_filter()
1946 iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); in iwl_mvm_config_iface_filter()
1950 int iwl_mvm_update_mu_groups(struct iwl_mvm *mvm, struct ieee80211_vif *vif) in iwl_mvm_update_mu_groups() argument
1954 memcpy(cmd.membership_status, vif->bss_conf.mu_group.membership, in iwl_mvm_update_mu_groups()
1956 memcpy(cmd.user_position, vif->bss_conf.mu_group.position, in iwl_mvm_update_mu_groups()
1966 struct ieee80211_vif *vif) in iwl_mvm_mu_mimo_iface_iterator() argument
1968 if (vif->bss_conf.mu_mimo_owner) { in iwl_mvm_mu_mimo_iface_iterator()
1976 ieee80211_update_mu_groups(vif, 0, in iwl_mvm_mu_mimo_iface_iterator()
2295 bool iwl_mvm_is_nic_ack_enabled(struct iwl_mvm *mvm, struct ieee80211_vif *vif) in iwl_mvm_is_nic_ack_enabled() argument
2304 own_he_cap = ieee80211_get_he_iftype_cap_vif(sband, vif); in iwl_mvm_is_nic_ack_enabled()
2344 struct ieee80211_vif *vif, u8 sta_id) in iwl_mvm_cfg_he_sta() argument
2346 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_cfg_he_sta()
2350 .bss_color = vif->bss_conf.he_bss_color.color, in iwl_mvm_cfg_he_sta()
2351 .htc_trig_based_pkt_ext = vif->bss_conf.htc_trig_based_pkt_ext, in iwl_mvm_cfg_he_sta()
2353 cpu_to_le16(vif->bss_conf.frame_time_rts_th), in iwl_mvm_cfg_he_sta()
2427 if (vif->bss_conf.uora_exists) { in iwl_mvm_cfg_he_sta()
2431 vif->bss_conf.uora_ocw_range & 0x7; in iwl_mvm_cfg_he_sta()
2433 (vif->bss_conf.uora_ocw_range >> 3) & 0x7; in iwl_mvm_cfg_he_sta()
2436 if (!iwl_mvm_is_nic_ack_enabled(mvm, vif)) in iwl_mvm_cfg_he_sta()
2439 if (vif->bss_conf.nontransmitted) { in iwl_mvm_cfg_he_sta()
2442 vif->bss_conf.transmitter_bssid); in iwl_mvm_cfg_he_sta()
2444 vif->bss_conf.bssid_indicator; in iwl_mvm_cfg_he_sta()
2445 sta_ctxt_cmd.bssid_index = vif->bss_conf.bssid_index; in iwl_mvm_cfg_he_sta()
2446 sta_ctxt_cmd.ema_ap = vif->bss_conf.ema_ap; in iwl_mvm_cfg_he_sta()
2448 vif->bss_conf.profile_periodicity; in iwl_mvm_cfg_he_sta()
2496 void iwl_mvm_protect_assoc(struct iwl_mvm *mvm, struct ieee80211_vif *vif, in iwl_mvm_protect_assoc() argument
2516 iwl_mvm_schedule_session_protection(mvm, vif, 900, in iwl_mvm_protect_assoc()
2519 iwl_mvm_protect_session(mvm, vif, duration, in iwl_mvm_protect_assoc()
2525 struct ieee80211_vif *vif, in iwl_mvm_bss_info_changed_station_assoc() argument
2528 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_bss_info_changed_station_assoc()
2535 (changes & BSS_CHANGED_MU_GROUPS) && vif->bss_conf.mu_mimo_owner) { in iwl_mvm_bss_info_changed_station_assoc()
2536 ret = iwl_mvm_update_mu_groups(mvm, vif); in iwl_mvm_bss_info_changed_station_assoc()
2548 iwl_mvm_update_smps_on_active_links(mvm, vif, IWL_MVM_SMPS_REQ_TT, in iwl_mvm_bss_info_changed_station_assoc()
2558 struct ieee80211_vif *vif, in iwl_mvm_bss_info_changed_station_common() argument
2562 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_bss_info_changed_station_common()
2569 iwl_mvm_stop_session_protection(mvm, vif); in iwl_mvm_bss_info_changed_station_common()
2571 iwl_mvm_sf_update(mvm, vif, false); in iwl_mvm_bss_info_changed_station_common()
2572 WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, 0)); in iwl_mvm_bss_info_changed_station_common()
2593 ret = iwl_mvm_enable_beacon_filter(mvm, vif, 0); in iwl_mvm_bss_info_changed_station_common()
2601 iwl_mvm_update_link_smps(vif, link_conf); in iwl_mvm_bss_info_changed_station_common()
2605 struct ieee80211_vif *vif, in iwl_mvm_bss_info_changed_station() argument
2609 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_bss_info_changed_station()
2617 if (changes & BSS_CHANGED_ASSOC && vif->cfg.assoc) { in iwl_mvm_bss_info_changed_station()
2618 if ((vif->bss_conf.he_support && in iwl_mvm_bss_info_changed_station()
2620 (vif->bss_conf.eht_support && in iwl_mvm_bss_info_changed_station()
2622 iwl_mvm_cfg_he_sta(mvm, vif, mvmvif->deflink.ap_sta_id); in iwl_mvm_bss_info_changed_station()
2624 iwl_mvm_mac_ctxt_recalc_tsf_id(mvm, vif); in iwl_mvm_bss_info_changed_station()
2629 vif->cfg.assoc && in iwl_mvm_bss_info_changed_station()
2630 ((vif->bss_conf.he_support && in iwl_mvm_bss_info_changed_station()
2632 (vif->bss_conf.eht_support && in iwl_mvm_bss_info_changed_station()
2634 iwl_mvm_cfg_he_sta(mvm, vif, mvmvif->deflink.ap_sta_id); in iwl_mvm_bss_info_changed_station()
2645 ret = iwl_mvm_mac_ctxt_changed(mvm, vif, false, mvmvif->deflink.bssid); in iwl_mvm_bss_info_changed_station()
2647 IWL_ERR(mvm, "failed to update MAC %pM\n", vif->addr); in iwl_mvm_bss_info_changed_station()
2651 mvmvif->associated = vif->cfg.assoc; in iwl_mvm_bss_info_changed_station()
2654 if (vif->cfg.assoc) { in iwl_mvm_bss_info_changed_station()
2689 u32 dur = (11 * vif->bss_conf.beacon_int) / 10; in iwl_mvm_bss_info_changed_station()
2690 iwl_mvm_protect_session(mvm, vif, dur, dur, in iwl_mvm_bss_info_changed_station()
2694 !vif->bss_conf.dtim_period) { in iwl_mvm_bss_info_changed_station()
2705 iwl_mvm_protect_assoc(mvm, vif, 0); in iwl_mvm_bss_info_changed_station()
2708 iwl_mvm_sf_update(mvm, vif, false); in iwl_mvm_bss_info_changed_station()
2709 iwl_mvm_power_vif_assoc(mvm, vif); in iwl_mvm_bss_info_changed_station()
2710 if (vif->p2p) { in iwl_mvm_bss_info_changed_station()
2711 iwl_mvm_update_smps(mvm, vif, in iwl_mvm_bss_info_changed_station()
2721 ret = iwl_mvm_sf_update(mvm, vif, false); in iwl_mvm_bss_info_changed_station()
2729 * station has been added, but before the vif is set in iwl_mvm_bss_info_changed_station()
2731 * then configure the vif. Since the vif is not in iwl_mvm_bss_info_changed_station()
2738 iwl_mvm_sec_key_remove_ap(mvm, vif, in iwl_mvm_bss_info_changed_station()
2745 ret = iwl_mvm_rm_sta_id(mvm, vif, in iwl_mvm_bss_info_changed_station()
2760 ret = iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); in iwl_mvm_bss_info_changed_station()
2764 vif->addr); in iwl_mvm_bss_info_changed_station()
2767 iwl_mvm_bss_info_changed_station_assoc(mvm, vif, changes); in iwl_mvm_bss_info_changed_station()
2770 iwl_mvm_bss_info_changed_station_common(mvm, vif, &vif->bss_conf, in iwl_mvm_bss_info_changed_station()
2775 struct ieee80211_vif *vif, in iwl_mvm_start_ap_ibss_common() argument
2779 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_start_ap_ibss_common()
2798 *ret = __iwl_mvm_mac_set_key(hw, SET_KEY, vif, NULL, key); in iwl_mvm_start_ap_ibss_common()
2803 if (vif->type == NL80211_IFTYPE_AP && !vif->p2p) { in iwl_mvm_start_ap_ibss_common()
2816 struct ieee80211_vif *vif, in iwl_mvm_start_ap_ibss() argument
2820 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_start_ap_ibss()
2830 if (vif->type == NL80211_IFTYPE_AP) in iwl_mvm_start_ap_ibss()
2831 iwl_mvm_mac_ctxt_recalc_tsf_id(mvm, vif); in iwl_mvm_start_ap_ibss()
2839 ret = iwl_mvm_mac_ctxt_add(mvm, vif); in iwl_mvm_start_ap_ibss()
2844 ret = iwl_mvm_mac_ctxt_beacon_changed(mvm, vif, link_conf); in iwl_mvm_start_ap_ibss()
2849 ret = iwl_mvm_mac_ctxt_beacon_changed(mvm, vif, link_conf); in iwl_mvm_start_ap_ibss()
2854 ret = iwl_mvm_mac_ctxt_add(mvm, vif); in iwl_mvm_start_ap_ibss()
2860 ret = iwl_mvm_binding_add_vif(mvm, vif); in iwl_mvm_start_ap_ibss()
2872 ret = iwl_mvm_add_mcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
2879 ret = iwl_mvm_send_add_bcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
2881 iwl_mvm_rm_mcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
2889 ret = iwl_mvm_send_add_bcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
2892 ret = iwl_mvm_add_mcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
2894 iwl_mvm_send_rm_bcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
2899 if (iwl_mvm_start_ap_ibss_common(hw, vif, &ret)) in iwl_mvm_start_ap_ibss()
2906 /* Need to update the P2P Device MAC (only GO, IBSS is single vif) */ in iwl_mvm_start_ap_ibss()
2907 if (vif->p2p && mvm->p2p_device_vif) in iwl_mvm_start_ap_ibss()
2916 iwl_mvm_ftm_restart_responder(mvm, vif, &vif->bss_conf); in iwl_mvm_start_ap_ibss()
2923 iwl_mvm_send_rm_bcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
2924 iwl_mvm_rm_mcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
2926 iwl_mvm_binding_remove_vif(mvm, vif); in iwl_mvm_start_ap_ibss()
2928 iwl_mvm_mac_ctxt_remove(mvm, vif); in iwl_mvm_start_ap_ibss()
2935 struct ieee80211_vif *vif, in iwl_mvm_start_ap() argument
2938 return iwl_mvm_start_ap_ibss(hw, vif, link_conf); in iwl_mvm_start_ap()
2942 struct ieee80211_vif *vif) in iwl_mvm_start_ibss() argument
2944 return iwl_mvm_start_ap_ibss(hw, vif, &vif->bss_conf); in iwl_mvm_start_ibss()
2949 struct ieee80211_vif *vif) in iwl_mvm_stop_ap_ibss_common() argument
2951 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_stop_ap_ibss_common()
2955 iwl_mvm_prepare_mac_removal(mvm, vif); in iwl_mvm_stop_ap_ibss_common()
2958 if (rcu_access_pointer(mvm->csa_vif) == vif) { in iwl_mvm_stop_ap_ibss_common()
2965 if (rcu_access_pointer(mvm->csa_tx_blocked_vif) == vif) { in iwl_mvm_stop_ap_ibss_common()
2973 if (vif->type == NL80211_IFTYPE_AP && !vif->p2p) { in iwl_mvm_stop_ap_ibss_common()
2983 struct ieee80211_vif *vif, in iwl_mvm_stop_ap_ibss() argument
2990 iwl_mvm_stop_ap_ibss_common(mvm, vif); in iwl_mvm_stop_ap_ibss()
2992 /* Need to update the P2P Device MAC (only GO, IBSS is single vif) */ in iwl_mvm_stop_ap_ibss()
2993 if (vif->p2p && mvm->p2p_device_vif) in iwl_mvm_stop_ap_ibss()
2998 iwl_mvm_ftm_responder_clear(mvm, vif); in iwl_mvm_stop_ap_ibss()
3009 iwl_mvm_rm_mcast_sta(mvm, vif); in iwl_mvm_stop_ap_ibss()
3010 iwl_mvm_send_rm_bcast_sta(mvm, vif); in iwl_mvm_stop_ap_ibss()
3012 iwl_mvm_rm_mcast_sta(mvm, vif); in iwl_mvm_stop_ap_ibss()
3013 iwl_mvm_binding_remove_vif(mvm, vif); in iwl_mvm_stop_ap_ibss()
3017 iwl_mvm_mac_ctxt_remove(mvm, vif); in iwl_mvm_stop_ap_ibss()
3023 struct ieee80211_vif *vif, in iwl_mvm_stop_ap() argument
3026 iwl_mvm_stop_ap_ibss(hw, vif, link_conf); in iwl_mvm_stop_ap()
3030 struct ieee80211_vif *vif) in iwl_mvm_stop_ibss() argument
3032 iwl_mvm_stop_ap_ibss(hw, vif, &vif->bss_conf); in iwl_mvm_stop_ibss()
3037 struct ieee80211_vif *vif, in iwl_mvm_bss_info_changed_ap_ibss() argument
3041 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_bss_info_changed_ap_ibss()
3049 iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL)) in iwl_mvm_bss_info_changed_ap_ibss()
3050 IWL_ERR(mvm, "failed to update MAC %pM\n", vif->addr); in iwl_mvm_bss_info_changed_ap_ibss()
3054 iwl_mvm_mac_ctxt_beacon_changed(mvm, vif, &vif->bss_conf)) in iwl_mvm_bss_info_changed_ap_ibss()
3058 int ret = iwl_mvm_ftm_start_responder(mvm, vif, &vif->bss_conf); in iwl_mvm_bss_info_changed_ap_ibss()
3068 struct ieee80211_vif *vif, in iwl_mvm_bss_info_changed() argument
3077 iwl_mvm_bss_info_changed_common(hw, vif, bss_conf, &callbacks, in iwl_mvm_bss_info_changed()
3083 struct ieee80211_vif *vif, in iwl_mvm_bss_info_changed_common() argument
3092 if (changes & BSS_CHANGED_IDLE && !vif->cfg.idle) in iwl_mvm_bss_info_changed_common()
3095 switch (vif->type) { in iwl_mvm_bss_info_changed_common()
3097 callbacks->bss_info_changed_sta(mvm, vif, bss_conf, changes); in iwl_mvm_bss_info_changed_common()
3101 callbacks->bss_info_changed_ap_ibss(mvm, vif, bss_conf, in iwl_mvm_bss_info_changed_common()
3106 iwl_mvm_update_mu_groups(mvm, vif); in iwl_mvm_bss_info_changed_common()
3116 iwl_mvm_set_tx_power(mvm, vif, bss_conf->txpower); in iwl_mvm_bss_info_changed_common()
3122 int iwl_mvm_mac_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_mac_hw_scan() argument
3133 ret = iwl_mvm_reg_scan_start(mvm, vif, &hw_req->req, &hw_req->ies); in iwl_mvm_mac_hw_scan()
3140 struct ieee80211_vif *vif) in iwl_mvm_mac_cancel_hw_scan() argument
3248 void iwl_mvm_mac_sta_notify(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_mac_sta_notify() argument
3274 if (!mvmsta->vif || in iwl_mvm_sta_pm_notif()
3275 mvmsta->vif->type != NL80211_IFTYPE_AP) { in iwl_mvm_sta_pm_notif()
3308 struct ieee80211_vif *vif, in iwl_mvm_sta_pre_rcu_remove() argument
3345 static void iwl_mvm_check_uapsd(struct iwl_mvm *mvm, struct ieee80211_vif *vif, in iwl_mvm_check_uapsd() argument
3353 mdata = &mvm->tcm.data[iwl_mvm_vif_from_mac80211(vif)->id]; in iwl_mvm_check_uapsd()
3361 if (vif->p2p && !iwl_mvm_is_p2p_scm_uapsd_supported(mvm)) { in iwl_mvm_check_uapsd()
3362 vif->driver_flags &= ~IEEE80211_VIF_SUPPORTS_UAPSD; in iwl_mvm_check_uapsd()
3366 if (!vif->p2p && in iwl_mvm_check_uapsd()
3368 vif->driver_flags &= ~IEEE80211_VIF_SUPPORTS_UAPSD; in iwl_mvm_check_uapsd()
3374 vif->driver_flags &= ~IEEE80211_VIF_SUPPORTS_UAPSD; in iwl_mvm_check_uapsd()
3379 vif->driver_flags |= IEEE80211_VIF_SUPPORTS_UAPSD; in iwl_mvm_check_uapsd()
3384 struct ieee80211_vif *vif, u8 *peer_addr, in iwl_mvm_tdls_check_trigger() argument
3390 trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, ieee80211_vif_to_wdev(vif), in iwl_mvm_tdls_check_trigger()
3436 struct ieee80211_vif *vif, in iwl_mvm_check_he_obss_narrow_bw_ru() argument
3440 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_check_he_obss_narrow_bw_ru()
3466 struct ieee80211_vif *vif) in iwl_mvm_reset_cca_40mhz_workaround() argument
3471 if (vif->type != NL80211_IFTYPE_STATION) in iwl_mvm_reset_cca_40mhz_workaround()
3486 he_cap = ieee80211_get_he_iftype_cap_vif(sband, vif); in iwl_mvm_reset_cca_40mhz_workaround()
3498 struct ieee80211_vif *vif, in iwl_mvm_mei_host_associated() argument
3502 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mei_host_associated()
3504 .ssid_len = vif->cfg.ssid_len, in iwl_mvm_mei_host_associated()
3514 if (!vif->bss_conf.chandef.chan) in iwl_mvm_mei_host_associated()
3517 conn_info.channel = vif->bss_conf.chandef.chan->hw_value; in iwl_mvm_mei_host_associated()
3560 memcpy(conn_info.ssid, vif->cfg.ssid, vif->cfg.ssid_len); in iwl_mvm_mei_host_associated()
3561 memcpy(conn_info.bssid, vif->bss_conf.bssid, ETH_ALEN); in iwl_mvm_mei_host_associated()
3569 struct ieee80211_vif *vif, in iwl_mvm_mac_ctxt_changed_wrapper() argument
3572 return iwl_mvm_mac_ctxt_changed(mvm, vif, force_assoc_off, NULL); in iwl_mvm_mac_ctxt_changed_wrapper()
3576 struct ieee80211_vif *vif, in iwl_mvm_mac_sta_state() argument
3588 return iwl_mvm_mac_sta_state_common(hw, vif, sta, old_state, new_state, in iwl_mvm_mac_sta_state()
3594 * (2) if a link is valid in sta then it's valid in vif (can
3598 struct ieee80211_vif *vif, in iwl_mvm_rs_rate_init_all_links() argument
3601 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_rs_rate_init_all_links()
3606 link_conf_dereference_check(vif, link_id); in iwl_mvm_rs_rate_init_all_links()
3613 iwl_mvm_rs_rate_init(mvm, vif, sta, conf, link_sta, in iwl_mvm_rs_rate_init_all_links()
3621 struct ieee80211_vif *vif, in iwl_mvm_vif_conf_from_sta() argument
3634 for_each_sta_active_link(vif, sta, link_sta, link_id) { in iwl_mvm_vif_conf_from_sta()
3636 link_conf_dereference_protected(vif, link_id); in iwl_mvm_vif_conf_from_sta()
3655 struct ieee80211_vif *vif, in iwl_mvm_vif_set_he_support() argument
3659 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_vif_set_he_support()
3663 for_each_sta_active_link(vif, sta, link_sta, link_id) { in iwl_mvm_vif_set_he_support()
3665 link_conf_dereference_protected(vif, link_id); in iwl_mvm_vif_set_he_support()
3675 iwl_mvm_check_he_obss_narrow_bw_ru(hw, vif, in iwl_mvm_vif_set_he_support()
3684 struct ieee80211_vif *vif, in iwl_mvm_sta_state_notexist_to_none() argument
3688 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_sta_state_notexist_to_none()
3695 if (vif->type == NL80211_IFTYPE_STATION && in iwl_mvm_sta_state_notexist_to_none()
3696 !iwl_mvm_vif_conf_from_sta(mvm, vif, sta)) in iwl_mvm_sta_state_notexist_to_none()
3700 (vif->p2p || in iwl_mvm_sta_state_notexist_to_none()
3707 ret = callbacks->add_sta(mvm, vif, sta); in iwl_mvm_sta_state_notexist_to_none()
3709 iwl_mvm_recalc_tdls_state(mvm, vif, true); in iwl_mvm_sta_state_notexist_to_none()
3710 iwl_mvm_tdls_check_trigger(mvm, vif, sta->addr, in iwl_mvm_sta_state_notexist_to_none()
3717 for_each_sta_active_link(vif, sta, link_sta, i) in iwl_mvm_sta_state_notexist_to_none()
3722 if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) in iwl_mvm_sta_state_notexist_to_none()
3736 iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); in iwl_mvm_sta_state_notexist_to_none()
3744 struct ieee80211_vif *vif, in iwl_mvm_sta_state_auth_to_assoc() argument
3748 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_sta_state_auth_to_assoc()
3755 if (vif->type == NL80211_IFTYPE_AP) { in iwl_mvm_sta_state_auth_to_assoc()
3756 iwl_mvm_vif_set_he_support(hw, vif, sta, false); in iwl_mvm_sta_state_auth_to_assoc()
3758 callbacks->mac_ctxt_changed(mvm, vif, false); in iwl_mvm_sta_state_auth_to_assoc()
3764 ((vif->bss_conf.he_support && in iwl_mvm_sta_state_auth_to_assoc()
3766 (vif->bss_conf.eht_support && in iwl_mvm_sta_state_auth_to_assoc()
3768 iwl_mvm_cfg_he_sta(mvm, vif, mvm_sta->deflink.sta_id); in iwl_mvm_sta_state_auth_to_assoc()
3769 } else if (vif->type == NL80211_IFTYPE_STATION) { in iwl_mvm_sta_state_auth_to_assoc()
3770 iwl_mvm_vif_set_he_support(hw, vif, sta, true); in iwl_mvm_sta_state_auth_to_assoc()
3772 callbacks->mac_ctxt_changed(mvm, vif, false); in iwl_mvm_sta_state_auth_to_assoc()
3777 for_each_sta_active_link(vif, sta, link_sta, link_id) { in iwl_mvm_sta_state_auth_to_assoc()
3779 link_conf_dereference_protected(vif, link_id); in iwl_mvm_sta_state_auth_to_assoc()
3786 iwl_mvm_link_changed(mvm, vif, link_conf, in iwl_mvm_sta_state_auth_to_assoc()
3794 iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); in iwl_mvm_sta_state_auth_to_assoc()
3796 return callbacks->update_sta(mvm, vif, sta); in iwl_mvm_sta_state_auth_to_assoc()
3801 struct ieee80211_vif *vif, in iwl_mvm_sta_state_assoc_to_authorized() argument
3805 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_sta_state_assoc_to_authorized()
3815 iwl_mvm_tdls_check_trigger(mvm, vif, sta->addr, in iwl_mvm_sta_state_assoc_to_authorized()
3819 WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif, 0)); in iwl_mvm_sta_state_assoc_to_authorized()
3823 callbacks->mac_ctxt_changed(mvm, vif, false); in iwl_mvm_sta_state_assoc_to_authorized()
3824 iwl_mvm_mei_host_associated(mvm, vif, mvm_sta); in iwl_mvm_sta_state_assoc_to_authorized()
3833 int ret = callbacks->update_sta(mvm, vif, sta); in iwl_mvm_sta_state_assoc_to_authorized()
3839 iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); in iwl_mvm_sta_state_assoc_to_authorized()
3846 struct ieee80211_vif *vif, in iwl_mvm_sta_state_authorized_to_assoc() argument
3850 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_sta_state_authorized_to_assoc()
3860 iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); in iwl_mvm_sta_state_authorized_to_assoc()
3870 iwl_mvm_disable_beacon_filter(mvm, vif, 0); in iwl_mvm_sta_state_authorized_to_assoc()
3878 struct ieee80211_vif *vif, in iwl_mvm_mac_sta_state_common() argument
3885 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_sta_state_common()
3920 iwl_mvm_reset_cca_40mhz_workaround(mvm, vif); in iwl_mvm_mac_sta_state_common()
3933 for_each_sta_active_link(vif, sta, link_sta, link_id) { in iwl_mvm_mac_sta_state_common()
3946 ret = iwl_mvm_sta_state_notexist_to_none(mvm, vif, sta, in iwl_mvm_mac_sta_state_common()
3957 iwl_mvm_check_uapsd(mvm, vif, sta->addr); in iwl_mvm_mac_sta_state_common()
3961 ret = iwl_mvm_sta_state_auth_to_assoc(hw, mvm, vif, sta, in iwl_mvm_mac_sta_state_common()
3965 ret = iwl_mvm_sta_state_assoc_to_authorized(mvm, vif, sta, in iwl_mvm_mac_sta_state_common()
3969 ret = iwl_mvm_sta_state_authorized_to_assoc(mvm, vif, sta, in iwl_mvm_mac_sta_state_common()
3973 if (vif->type == NL80211_IFTYPE_AP) { in iwl_mvm_mac_sta_state_common()
3975 callbacks->mac_ctxt_changed(mvm, vif, false); in iwl_mvm_mac_sta_state_common()
3976 } else if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) in iwl_mvm_mac_sta_state_common()
3977 iwl_mvm_stop_session_protection(mvm, vif); in iwl_mvm_mac_sta_state_common()
3984 if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) { in iwl_mvm_mac_sta_state_common()
3985 iwl_mvm_stop_session_protection(mvm, vif); in iwl_mvm_mac_sta_state_common()
3988 ret = callbacks->rm_sta(mvm, vif, sta); in iwl_mvm_mac_sta_state_common()
3990 iwl_mvm_recalc_tdls_state(mvm, vif, false); in iwl_mvm_mac_sta_state_common()
3991 iwl_mvm_tdls_check_trigger(mvm, vif, sta->addr, in iwl_mvm_mac_sta_state_common()
4026 void iwl_mvm_sta_rc_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_sta_rc_update() argument
4034 iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); in iwl_mvm_sta_rc_update()
4036 if (vif->type == NL80211_IFTYPE_STATION && in iwl_mvm_sta_rc_update()
4038 iwl_mvm_sf_update(mvm, vif, false); in iwl_mvm_sta_rc_update()
4042 struct ieee80211_vif *vif, in iwl_mvm_mac_conf_tx() argument
4047 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_conf_tx()
4055 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_mac_conf_tx()
4059 ret = iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); in iwl_mvm_mac_conf_tx()
4067 struct ieee80211_vif *vif, in iwl_mvm_mac_mgd_prepare_tx() argument
4073 iwl_mvm_protect_assoc(mvm, vif, info->duration); in iwl_mvm_mac_mgd_prepare_tx()
4078 struct ieee80211_vif *vif, in iwl_mvm_mac_mgd_complete_tx() argument
4088 iwl_mvm_stop_session_protection(mvm, vif); in iwl_mvm_mac_mgd_complete_tx()
4093 struct ieee80211_vif *vif, in iwl_mvm_mac_sched_scan_start() argument
4103 if (!vif->cfg.idle) { in iwl_mvm_mac_sched_scan_start()
4108 ret = iwl_mvm_sched_scan_start(mvm, vif, req, ies, IWL_MVM_SCAN_SCHED); in iwl_mvm_mac_sched_scan_start()
4116 struct ieee80211_vif *vif) in iwl_mvm_mac_sched_scan_stop() argument
4145 struct ieee80211_vif *vif, in __iwl_mvm_mac_set_key() argument
4149 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in __iwl_mvm_mac_set_key()
4167 } else if (vif->type == NL80211_IFTYPE_STATION) { in __iwl_mvm_mac_set_key()
4187 if (vif->type == NL80211_IFTYPE_STATION) in __iwl_mvm_mac_set_key()
4199 if (vif->type == NL80211_IFTYPE_STATION && in __iwl_mvm_mac_set_key()
4204 if ((vif->type == NL80211_IFTYPE_ADHOC || in __iwl_mvm_mac_set_key()
4205 vif->type == NL80211_IFTYPE_AP) && !sta) { in __iwl_mvm_mac_set_key()
4303 ret = iwl_mvm_sec_key_add(mvm, vif, sta, key); in __iwl_mvm_mac_set_key()
4305 ret = iwl_mvm_set_sta_key(mvm, vif, sta, key, key_offset); in __iwl_mvm_mac_set_key()
4328 if (vif->type == NL80211_IFTYPE_STATION && in __iwl_mvm_mac_set_key()
4365 ret = iwl_mvm_sec_key_del(mvm, vif, sta, key); in __iwl_mvm_mac_set_key()
4367 ret = iwl_mvm_remove_sta_key(mvm, vif, sta, key); in __iwl_mvm_mac_set_key()
4377 struct ieee80211_vif *vif, struct ieee80211_sta *sta, in iwl_mvm_mac_set_key() argument
4384 ret = __iwl_mvm_mac_set_key(hw, cmd, vif, sta, key); in iwl_mvm_mac_set_key()
4391 struct ieee80211_vif *vif, in iwl_mvm_mac_update_tkip_key() argument
4401 iwl_mvm_update_tkip_key(mvm, vif, keyconf, sta, iv32, phase1key); in iwl_mvm_mac_update_tkip_key()
4446 struct ieee80211_vif *vif, in iwl_mvm_send_aux_roc_cmd() argument
4450 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_send_aux_roc_cmd()
4454 u32 dtim_interval = vif->bss_conf.dtim_period * in iwl_mvm_send_aux_roc_cmd()
4455 vif->bss_conf.beacon_int; in iwl_mvm_send_aux_roc_cmd()
4488 if (vif->cfg.assoc) { in iwl_mvm_send_aux_roc_cmd()
4510 memcpy(tail->node_addr, vif->addr, ETH_ALEN); in iwl_mvm_send_aux_roc_cmd()
4521 te_data->vif = vif; in iwl_mvm_send_aux_roc_cmd()
4585 static int iwl_mvm_roc_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif) in iwl_mvm_roc_link() argument
4591 ret = iwl_mvm_binding_add_vif(mvm, vif); in iwl_mvm_roc_link()
4598 return iwl_mvm_add_p2p_bcast_sta(mvm, vif); in iwl_mvm_roc_link()
4602 struct ieee80211_vif *vif, in iwl_mvm_roc() argument
4612 return iwl_mvm_roc_common(hw, vif, channel, duration, type, &ops); in iwl_mvm_roc()
4616 int iwl_mvm_roc_common(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_roc_common() argument
4622 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_roc_common()
4639 switch (vif->type) { in iwl_mvm_roc_common()
4647 vif, duration); in iwl_mvm_roc_common()
4653 IWL_ERR(mvm, "ROC: Invalid vif type=%u\n", vif->type); in iwl_mvm_roc_common()
4703 ret = ops->link(mvm, vif); in iwl_mvm_roc_common()
4707 ret = iwl_mvm_start_p2p_roc(mvm, vif, duration, type); in iwl_mvm_roc_common()
4715 struct ieee80211_vif *vif) in iwl_mvm_cancel_roc() argument
4722 iwl_mvm_stop_roc(mvm, vif); in iwl_mvm_cancel_roc()
4735 struct ieee80211_vif *vif) in iwl_mvm_ftm_responder_chanctx_iter() argument
4739 if (rcu_access_pointer(vif->bss_conf.chanctx_conf) == data->ctx && in iwl_mvm_ftm_responder_chanctx_iter()
4740 vif->type == NL80211_IFTYPE_AP && vif->bss_conf.ftmr_params) in iwl_mvm_ftm_responder_chanctx_iter()
4874 struct ieee80211_vif *vif, in __iwl_mvm_assign_vif_chanctx_common() argument
4880 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in __iwl_mvm_assign_vif_chanctx_common()
4886 switch (vif->type) { in __iwl_mvm_assign_vif_chanctx_common()
4915 struct ieee80211_vif *vif, in __iwl_mvm_assign_vif_chanctx() argument
4920 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in __iwl_mvm_assign_vif_chanctx()
4926 if (__iwl_mvm_assign_vif_chanctx_common(mvm, vif, ctx, in __iwl_mvm_assign_vif_chanctx()
4930 ret = iwl_mvm_binding_add_vif(mvm, vif); in __iwl_mvm_assign_vif_chanctx()
4944 if (vif->type == NL80211_IFTYPE_MONITOR) { in __iwl_mvm_assign_vif_chanctx()
4950 ret = iwl_mvm_add_snif_sta(mvm, vif); in __iwl_mvm_assign_vif_chanctx()
4957 if (vif->type == NL80211_IFTYPE_AP) { in __iwl_mvm_assign_vif_chanctx()
4959 iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); in __iwl_mvm_assign_vif_chanctx()
4962 if (vif->type == NL80211_IFTYPE_STATION) { in __iwl_mvm_assign_vif_chanctx()
4972 u32 duration = 3 * vif->bss_conf.beacon_int; in __iwl_mvm_assign_vif_chanctx()
4977 iwl_mvm_protect_session(mvm, vif, duration, duration, in __iwl_mvm_assign_vif_chanctx()
4978 vif->bss_conf.beacon_int / 2, in __iwl_mvm_assign_vif_chanctx()
4988 iwl_mvm_binding_remove_vif(mvm, vif); in __iwl_mvm_assign_vif_chanctx()
4997 struct ieee80211_vif *vif, in iwl_mvm_assign_vif_chanctx() argument
5005 ret = __iwl_mvm_assign_vif_chanctx(mvm, vif, link_conf, ctx, false); in iwl_mvm_assign_vif_chanctx()
5018 struct ieee80211_vif *vif, in __iwl_mvm_unassign_vif_chanctx_common() argument
5021 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in __iwl_mvm_unassign_vif_chanctx_common()
5027 switch (vif->type) { in __iwl_mvm_unassign_vif_chanctx_common()
5045 rcu_assign_pointer(mvm->csa_tx_blocked_vif, vif); in __iwl_mvm_unassign_vif_chanctx_common()
5056 struct ieee80211_vif *vif, in __iwl_mvm_unassign_vif_chanctx() argument
5061 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in __iwl_mvm_unassign_vif_chanctx()
5064 if (__iwl_mvm_unassign_vif_chanctx_common(mvm, vif, switching_chanctx)) in __iwl_mvm_unassign_vif_chanctx()
5067 if (vif->type == NL80211_IFTYPE_MONITOR) in __iwl_mvm_unassign_vif_chanctx()
5068 iwl_mvm_rm_snif_sta(mvm, vif); in __iwl_mvm_unassign_vif_chanctx()
5071 if (vif->type == NL80211_IFTYPE_STATION && switching_chanctx) { in __iwl_mvm_unassign_vif_chanctx()
5072 disabled_vif = vif; in __iwl_mvm_unassign_vif_chanctx()
5075 iwl_mvm_mac_ctxt_changed(mvm, vif, true, NULL); in __iwl_mvm_unassign_vif_chanctx()
5079 iwl_mvm_binding_remove_vif(mvm, vif); in __iwl_mvm_unassign_vif_chanctx()
5090 struct ieee80211_vif *vif, in iwl_mvm_unassign_vif_chanctx() argument
5097 __iwl_mvm_unassign_vif_chanctx(mvm, vif, link_conf, ctx, false); in iwl_mvm_unassign_vif_chanctx()
5109 ops->__unassign_vif_chanctx(mvm, vifs[0].vif, vifs[0].link_conf, in iwl_mvm_switch_vif_chanctx_swap()
5119 ret = ops->__assign_vif_chanctx(mvm, vifs[0].vif, vifs[0].link_conf, in iwl_mvm_switch_vif_chanctx_swap()
5142 if (ops->__assign_vif_chanctx(mvm, vifs[0].vif, vifs[0].link_conf, in iwl_mvm_switch_vif_chanctx_swap()
5168 ops->__unassign_vif_chanctx(mvm, vifs[0].vif, vifs[0].link_conf, in iwl_mvm_switch_vif_chanctx_reassign()
5171 ret = ops->__assign_vif_chanctx(mvm, vifs[0].vif, vifs[0].link_conf, in iwl_mvm_switch_vif_chanctx_reassign()
5182 if (ops->__assign_vif_chanctx(mvm, vifs[0].vif, vifs[0].link_conf, in iwl_mvm_switch_vif_chanctx_reassign()
5211 /* we only support a single-vif right now */ in iwl_mvm_switch_vif_chanctx_common()
5256 if (!mvm_sta || !mvm_sta->vif) { in iwl_mvm_set_tim()
5257 IWL_ERR(mvm, "Station is not associated to a vif\n"); in iwl_mvm_set_tim()
5261 return iwl_mvm_mac_ctxt_beacon_changed(mvm, mvm_sta->vif, in iwl_mvm_set_tim()
5262 &mvm_sta->vif->bss_conf); in iwl_mvm_set_tim()
5273 struct ieee80211_vif *vif, in __iwl_mvm_mac_testmode_cmd() argument
5290 if (!vif || vif->type != NL80211_IFTYPE_AP || !vif->p2p || in __iwl_mvm_mac_testmode_cmd()
5291 !vif->bss_conf.enable_beacon || in __iwl_mvm_mac_testmode_cmd()
5296 if (noa_duration >= vif->bss_conf.beacon_int) in __iwl_mvm_mac_testmode_cmd()
5300 mvm->noa_vif = vif; in __iwl_mvm_mac_testmode_cmd()
5304 /* must be associated client vif - ignore authorized */ in __iwl_mvm_mac_testmode_cmd()
5305 if (!vif || vif->type != NL80211_IFTYPE_STATION || in __iwl_mvm_mac_testmode_cmd()
5306 !vif->cfg.assoc || !vif->bss_conf.dtim_period || in __iwl_mvm_mac_testmode_cmd()
5311 return iwl_mvm_enable_beacon_filter(mvm, vif, 0); in __iwl_mvm_mac_testmode_cmd()
5312 return iwl_mvm_disable_beacon_filter(mvm, vif, 0); in __iwl_mvm_mac_testmode_cmd()
5319 struct ieee80211_vif *vif, in iwl_mvm_mac_testmode_cmd() argument
5326 err = __iwl_mvm_mac_testmode_cmd(mvm, vif, data, len); in iwl_mvm_mac_testmode_cmd()
5333 void iwl_mvm_channel_switch(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_channel_switch() argument
5347 struct ieee80211_vif *vif, in iwl_mvm_schedule_client_csa() argument
5350 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_schedule_client_csa()
5364 DIV_ROUND_UP(chsw->delay, vif->bss_conf.beacon_int); in iwl_mvm_schedule_client_csa()
5373 struct ieee80211_vif *vif, in iwl_mvm_old_pre_chan_sw_sta() argument
5376 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_old_pre_chan_sw_sta()
5389 ((vif->bss_conf.beacon_int * (chsw->count - 1) - in iwl_mvm_old_pre_chan_sw_sta()
5393 iwl_mvm_csa_client_absent(mvm, vif); in iwl_mvm_old_pre_chan_sw_sta()
5396 int ret = iwl_mvm_disable_beacon_filter(mvm, vif, 0); in iwl_mvm_old_pre_chan_sw_sta()
5402 iwl_mvm_schedule_csa_period(mvm, vif, vif->bss_conf.beacon_int, in iwl_mvm_old_pre_chan_sw_sta()
5410 struct ieee80211_vif *vif, in iwl_mvm_pre_channel_switch() argument
5415 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_pre_channel_switch()
5426 ieee80211_vif_to_wdev(vif), in iwl_mvm_pre_channel_switch()
5429 switch (vif->type) { in iwl_mvm_pre_channel_switch()
5447 rcu_assign_pointer(mvm->csa_vif, vif); in iwl_mvm_pre_channel_switch()
5473 if (!vif->cfg.assoc || !vif->bss_conf.dtim_period) { in iwl_mvm_pre_channel_switch()
5487 chsw->count * vif->bss_conf.beacon_int > in iwl_mvm_pre_channel_switch()
5495 ret = iwl_mvm_old_pre_chan_sw_sta(mvm, vif, chsw); in iwl_mvm_pre_channel_switch()
5499 iwl_mvm_schedule_client_csa(mvm, vif, chsw); in iwl_mvm_pre_channel_switch()
5525 struct ieee80211_vif *vif, in iwl_mvm_channel_switch_rx_beacon() argument
5529 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_channel_switch_rx_beacon()
5556 iwl_mvm_abort_channel_switch(hw, vif); in iwl_mvm_channel_switch_rx_beacon()
5557 ieee80211_chswitch_done(vif, false); in iwl_mvm_channel_switch_rx_beacon()
5615 void iwl_mvm_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_mac_flush() argument
5626 if (!vif) { in iwl_mvm_mac_flush()
5635 mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_flush()
5645 if (mvmsta->vif != vif) in iwl_mvm_mac_flush()
5678 void iwl_mvm_mac_flush_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_mac_flush_sta() argument
5688 for_each_sta_active_link(vif, sta, link_sta, link_id) { in iwl_mvm_mac_flush_sta()
5887 struct ieee80211_vif *vif, in iwl_mvm_mac_sta_statistics() argument
5892 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_sta_statistics()
5908 if (!(vif->driver_flags & IEEE80211_VIF_BEACON_FILTER)) in iwl_mvm_mac_sta_statistics()
5911 if (!vif->cfg.assoc) in iwl_mvm_mac_sta_statistics()
5936 struct ieee80211_vif *vif, in iwl_mvm_event_mlme_callback_ini() argument
5956 struct ieee80211_vif *vif, in iwl_mvm_event_mlme_callback() argument
5970 iwl_mvm_event_mlme_callback_ini(mvm, vif, &event->u.mlme); in iwl_mvm_event_mlme_callback()
5974 trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, ieee80211_vif_to_wdev(vif), in iwl_mvm_event_mlme_callback()
6008 struct ieee80211_vif *vif, in iwl_mvm_event_bar_rx_callback() argument
6014 trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, ieee80211_vif_to_wdev(vif), in iwl_mvm_event_bar_rx_callback()
6031 struct ieee80211_vif *vif, in iwl_mvm_mac_event_callback() argument
6038 iwl_mvm_event_mlme_callback(mvm, vif, event); in iwl_mvm_mac_event_callback()
6041 iwl_mvm_event_bar_rx_callback(mvm, vif, event); in iwl_mvm_mac_event_callback()
6044 iwl_mvm_event_frame_timeout_callback(mvm, vif, event->u.ba.sta, in iwl_mvm_mac_event_callback()
6123 struct ieee80211_vif *vif, in iwl_mvm_mac_get_ftm_responder_stats() argument
6127 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_get_ftm_responder_stats()
6129 if (vif->p2p || vif->type != NL80211_IFTYPE_AP || in iwl_mvm_mac_get_ftm_responder_stats()
6130 !mvmvif->ap_ibss_active || !vif->bss_conf.ftm_responder) in iwl_mvm_mac_get_ftm_responder_stats()
6150 int iwl_mvm_start_pmsr(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_start_pmsr() argument
6157 ret = iwl_mvm_ftm_start(mvm, vif, request); in iwl_mvm_start_pmsr()
6163 void iwl_mvm_abort_pmsr(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_abort_pmsr() argument
6200 struct ieee80211_vif *vif, in iwl_mvm_set_hw_timestamp() argument