Lines Matching full:vif
101 struct ieee80211_vif *vif,
843 if (!sta && info->control.vif->type == NL80211_IFTYPE_STATION && in iwl_mvm_mac_tx()
853 rcu_dereference(info->control.vif->link_conf[link_id]); in iwl_mvm_mac_tx()
961 iwl_mvm_ampdu_check_trigger(struct iwl_mvm *mvm, struct ieee80211_vif *vif, in iwl_mvm_ampdu_check_trigger() argument
968 trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, ieee80211_vif_to_wdev(vif), in iwl_mvm_ampdu_check_trigger()
1006 struct ieee80211_vif *vif, in iwl_mvm_mac_ampdu_action() argument
1029 if (iwl_mvm_vif_from_mac80211(vif)->deflink.ap_sta_id == in iwl_mvm_mac_ampdu_action()
1032 u16 macid = iwl_mvm_vif_from_mac80211(vif)->id; in iwl_mvm_mac_ampdu_action()
1036 mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_ampdu_action()
1055 ret = iwl_mvm_sta_tx_agg_start(mvm, vif, sta, tid, ssn); in iwl_mvm_mac_ampdu_action()
1058 ret = iwl_mvm_sta_tx_agg_stop(mvm, vif, sta, tid); in iwl_mvm_mac_ampdu_action()
1062 ret = iwl_mvm_sta_tx_agg_flush(mvm, vif, sta, tid); in iwl_mvm_mac_ampdu_action()
1065 ret = iwl_mvm_sta_tx_agg_oper(mvm, vif, sta, tid, in iwl_mvm_mac_ampdu_action()
1080 iwl_mvm_ampdu_check_trigger(mvm, vif, sta, tid, in iwl_mvm_mac_ampdu_action()
1089 struct ieee80211_vif *vif) in iwl_mvm_cleanup_iterator() argument
1092 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_cleanup_iterator()
1109 vif->driver_flags &= ~IEEE80211_VIF_EML_ACTIVE; in iwl_mvm_cleanup_iterator()
1132 struct ieee80211_vif *vif; in iwl_mvm_cleanup_sta_iterator() local
1136 vif = mvm_sta->vif; in iwl_mvm_cleanup_sta_iterator()
1147 if (mvm_link_sta && !(vif->active_links & BIT(link_id))) { in iwl_mvm_cleanup_sta_iterator()
1477 int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif, in iwl_mvm_set_tx_power() argument
1485 cpu_to_le32(iwl_mvm_vif_from_mac80211(vif)->id), in iwl_mvm_set_tx_power()
1499 cpu_to_le32(iwl_mvm_vif_from_mac80211(vif)->id); in iwl_mvm_set_tx_power()
1548 struct ieee80211_vif *vif, in iwl_mvm_post_channel_switch() argument
1551 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_post_channel_switch()
1557 if (vif->type == NL80211_IFTYPE_STATION) { in iwl_mvm_post_channel_switch()
1573 iwl_mvm_mld_mac_ctxt_changed(mvm, vif, false); in iwl_mvm_post_channel_switch()
1575 iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); in iwl_mvm_post_channel_switch()
1579 ret = iwl_mvm_enable_beacon_filter(mvm, vif); in iwl_mvm_post_channel_switch()
1583 iwl_mvm_stop_session_protection(mvm, vif); in iwl_mvm_post_channel_switch()
1585 } else if (vif->type == NL80211_IFTYPE_AP && mvmvif->csa_blocks_tx) { in iwl_mvm_post_channel_switch()
1587 iwl_mvm_txq_from_mac80211(vif->txq); in iwl_mvm_post_channel_switch()
1592 iwl_mvm_mac_itxq_xmit(hw, vif->txq); in iwl_mvm_post_channel_switch()
1612 struct ieee80211_vif *vif, in iwl_mvm_abort_channel_switch() argument
1616 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_abort_channel_switch()
1637 iwl_mvm_remove_csa_period(mvm, vif); in iwl_mvm_abort_channel_switch()
1647 iwl_mvm_post_channel_switch(hw, vif, &vif->bss_conf); in iwl_mvm_abort_channel_switch()
1653 struct ieee80211_vif *vif; in iwl_mvm_channel_switch_disconnect_wk() local
1656 vif = container_of((void *)mvmvif, struct ieee80211_vif, drv_priv); in iwl_mvm_channel_switch_disconnect_wk()
1659 ieee80211_chswitch_done(vif, false, 0); in iwl_mvm_channel_switch_disconnect_wk()
1685 struct ieee80211_vif *vif) in iwl_mvm_alloc_bcast_mcast_sta() argument
1687 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_alloc_bcast_mcast_sta()
1692 ret = iwl_mvm_alloc_bcast_sta(mvm, vif); in iwl_mvm_alloc_bcast_mcast_sta()
1702 vif->type, in iwl_mvm_alloc_bcast_mcast_sta()
1712 struct ieee80211_vif *vif = in iwl_mvm_prevent_esr_done_wk() local
1716 iwl_mvm_unblock_esr(mvm, vif, IWL_MVM_ESR_BLOCKED_PREVENTION); in iwl_mvm_prevent_esr_done_wk()
1723 struct ieee80211_vif *vif = in iwl_mvm_mlo_int_scan_wk() local
1727 iwl_mvm_int_mlo_scan(mvmvif->mvm, vif); in iwl_mvm_mlo_int_scan_wk()
1735 struct ieee80211_vif *vif = in iwl_mvm_unblock_esr_tpt() local
1739 iwl_mvm_unblock_esr(mvm, vif, IWL_MVM_ESR_BLOCKED_TPT); in iwl_mvm_unblock_esr_tpt()
1763 struct ieee80211_vif *vif) in iwl_mvm_mac_add_interface() argument
1766 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_add_interface()
1781 ret = iwl_mvm_set_link_mapping(mvm, vif, &vif->bss_conf); in iwl_mvm_mac_add_interface()
1798 ret = iwl_mvm_mac_ctxt_init(mvm, vif); in iwl_mvm_mac_add_interface()
1802 rcu_assign_pointer(mvm->vif_id_to_mac[mvmvif->id], vif); in iwl_mvm_mac_add_interface()
1805 if (vif->type == NL80211_IFTYPE_NAN) { in iwl_mvm_mac_add_interface()
1821 if (vif->type == NL80211_IFTYPE_AP || in iwl_mvm_mac_add_interface()
1822 vif->type == NL80211_IFTYPE_ADHOC) { in iwl_mvm_mac_add_interface()
1824 iwl_mvm_vif_dbgfs_add_link(mvm, vif); in iwl_mvm_mac_add_interface()
1831 ret = iwl_mvm_mac_ctxt_add(mvm, vif); in iwl_mvm_mac_add_interface()
1840 ret = iwl_mvm_disable_beacon_filter(mvm, vif); in iwl_mvm_mac_add_interface()
1845 vif->type == NL80211_IFTYPE_STATION && !vif->p2p) { in iwl_mvm_mac_add_interface()
1847 vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER | in iwl_mvm_mac_add_interface()
1851 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) in iwl_mvm_mac_add_interface()
1852 mvm->p2p_device_vif = vif; in iwl_mvm_mac_add_interface()
1854 iwl_mvm_tcm_add_vif(mvm, vif); in iwl_mvm_mac_add_interface()
1856 if (vif->type == NL80211_IFTYPE_MONITOR) { in iwl_mvm_mac_add_interface()
1859 iwl_mvm_chandef_get_primary_80(&vif->bss_conf.chanreq.oper); in iwl_mvm_mac_add_interface()
1863 iwl_mvm_vif_dbgfs_add_link(mvm, vif); in iwl_mvm_mac_add_interface()
1866 vif->type == NL80211_IFTYPE_STATION && !vif->p2p && in iwl_mvm_mac_add_interface()
1868 iwl_mei_set_nic_info(vif->addr, mvm->nvm_data->hw_addr); in iwl_mvm_mac_add_interface()
1869 iwl_mei_set_netdev(ieee80211_vif_to_wdev(vif)->netdev); in iwl_mvm_mac_add_interface()
1870 mvm->csme_vif = vif; in iwl_mvm_mac_add_interface()
1874 if (!ret && (vif->type == NL80211_IFTYPE_AP || in iwl_mvm_mac_add_interface()
1875 vif->type == NL80211_IFTYPE_ADHOC)) in iwl_mvm_mac_add_interface()
1876 ret = iwl_mvm_alloc_bcast_mcast_sta(mvm, vif); in iwl_mvm_mac_add_interface()
1882 iwl_mvm_mac_ctxt_remove(mvm, vif); in iwl_mvm_mac_add_interface()
1890 struct ieee80211_vif *vif) in iwl_mvm_prepare_mac_removal() argument
1892 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_prepare_mac_removal()
1894 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_prepare_mac_removal()
1915 struct ieee80211_vif *vif) in iwl_mvm_mac_remove_interface() argument
1918 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_remove_interface()
1921 iwl_mvm_prepare_mac_removal(mvm, vif); in iwl_mvm_mac_remove_interface()
1923 if (!(vif->type == NL80211_IFTYPE_AP || in iwl_mvm_mac_remove_interface()
1924 vif->type == NL80211_IFTYPE_ADHOC)) in iwl_mvm_mac_remove_interface()
1925 iwl_mvm_tcm_rm_vif(mvm, vif); in iwl_mvm_mac_remove_interface()
1929 if (vif == mvm->csme_vif) { in iwl_mvm_mac_remove_interface()
1942 vif->driver_flags &= ~(IEEE80211_VIF_BEACON_FILTER | in iwl_mvm_mac_remove_interface()
1946 if (vif->bss_conf.ftm_responder) in iwl_mvm_mac_remove_interface()
1949 iwl_mvm_vif_dbgfs_rm_link(mvm, vif); in iwl_mvm_mac_remove_interface()
1955 if (vif->type == NL80211_IFTYPE_AP || in iwl_mvm_mac_remove_interface()
1956 vif->type == NL80211_IFTYPE_ADHOC) { in iwl_mvm_mac_remove_interface()
1958 if (vif == mvm->noa_vif) { in iwl_mvm_mac_remove_interface()
1973 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_mac_remove_interface()
1981 iwl_mvm_mac_ctxt_remove(mvm, vif); in iwl_mvm_mac_remove_interface()
1985 if (vif->type == NL80211_IFTYPE_MONITOR) in iwl_mvm_mac_remove_interface()
1989 iwl_mvm_unset_link_mapping(mvm, vif, &vif->bss_conf); in iwl_mvm_mac_remove_interface()
1990 if (vif->type == NL80211_IFTYPE_AP || in iwl_mvm_mac_remove_interface()
1991 vif->type == NL80211_IFTYPE_ADHOC) { in iwl_mvm_mac_remove_interface()
1993 iwl_mvm_dealloc_bcast_sta(mvm, vif); in iwl_mvm_mac_remove_interface()
2005 struct ieee80211_vif *vif) in iwl_mvm_mc_iface_iterator() argument
2021 if (vif->type != NL80211_IFTYPE_STATION || in iwl_mvm_mc_iface_iterator()
2022 !vif->cfg.assoc) in iwl_mvm_mc_iface_iterator()
2026 memcpy(cmd->bssid, vif->bss_conf.bssid, ETH_ALEN); in iwl_mvm_mc_iface_iterator()
2135 struct ieee80211_vif *vif, in iwl_mvm_config_iface_filter() argument
2146 if (vif->type != NL80211_IFTYPE_STATION || !vif->cfg.assoc || in iwl_mvm_config_iface_filter()
2147 !vif->p2p) in iwl_mvm_config_iface_filter()
2151 iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); in iwl_mvm_config_iface_filter()
2154 int iwl_mvm_update_mu_groups(struct iwl_mvm *mvm, struct ieee80211_vif *vif) in iwl_mvm_update_mu_groups() argument
2158 memcpy(cmd.membership_status, vif->bss_conf.mu_group.membership, in iwl_mvm_update_mu_groups()
2160 memcpy(cmd.user_position, vif->bss_conf.mu_group.position, in iwl_mvm_update_mu_groups()
2170 struct ieee80211_vif *vif) in iwl_mvm_mu_mimo_iface_iterator() argument
2172 if (vif->bss_conf.mu_mimo_owner) { in iwl_mvm_mu_mimo_iface_iterator()
2180 ieee80211_update_mu_groups(vif, 0, in iwl_mvm_mu_mimo_iface_iterator()
2499 bool iwl_mvm_is_nic_ack_enabled(struct iwl_mvm *mvm, struct ieee80211_vif *vif) in iwl_mvm_is_nic_ack_enabled() argument
2508 own_he_cap = ieee80211_get_he_iftype_cap_vif(sband, vif); in iwl_mvm_is_nic_ack_enabled()
2548 struct ieee80211_vif *vif, u8 sta_id) in iwl_mvm_cfg_he_sta() argument
2550 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_cfg_he_sta()
2554 .bss_color = vif->bss_conf.he_bss_color.color, in iwl_mvm_cfg_he_sta()
2555 .htc_trig_based_pkt_ext = vif->bss_conf.htc_trig_based_pkt_ext, in iwl_mvm_cfg_he_sta()
2557 cpu_to_le16(vif->bss_conf.frame_time_rts_th), in iwl_mvm_cfg_he_sta()
2631 if (vif->bss_conf.uora_exists) { in iwl_mvm_cfg_he_sta()
2635 vif->bss_conf.uora_ocw_range & 0x7; in iwl_mvm_cfg_he_sta()
2637 (vif->bss_conf.uora_ocw_range >> 3) & 0x7; in iwl_mvm_cfg_he_sta()
2640 if (!iwl_mvm_is_nic_ack_enabled(mvm, vif)) in iwl_mvm_cfg_he_sta()
2643 if (vif->bss_conf.nontransmitted) { in iwl_mvm_cfg_he_sta()
2646 vif->bss_conf.transmitter_bssid); in iwl_mvm_cfg_he_sta()
2648 vif->bss_conf.bssid_indicator; in iwl_mvm_cfg_he_sta()
2649 sta_ctxt_cmd.bssid_index = vif->bss_conf.bssid_index; in iwl_mvm_cfg_he_sta()
2650 sta_ctxt_cmd.ema_ap = vif->bss_conf.ema_ap; in iwl_mvm_cfg_he_sta()
2652 vif->bss_conf.profile_periodicity; in iwl_mvm_cfg_he_sta()
2700 void iwl_mvm_protect_assoc(struct iwl_mvm *mvm, struct ieee80211_vif *vif, in iwl_mvm_protect_assoc() argument
2720 iwl_mvm_schedule_session_protection(mvm, vif, 900, in iwl_mvm_protect_assoc()
2724 iwl_mvm_protect_session(mvm, vif, duration, in iwl_mvm_protect_assoc()
2730 struct ieee80211_vif *vif, in iwl_mvm_bss_info_changed_station_assoc() argument
2733 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_bss_info_changed_station_assoc()
2741 (changes & BSS_CHANGED_MU_GROUPS) && vif->bss_conf.mu_mimo_owner) { in iwl_mvm_bss_info_changed_station_assoc()
2742 ret = iwl_mvm_update_mu_groups(mvm, vif); in iwl_mvm_bss_info_changed_station_assoc()
2755 iwl_mvm_update_smps_on_active_links(mvm, vif, IWL_MVM_SMPS_REQ_TT, in iwl_mvm_bss_info_changed_station_assoc()
2765 struct ieee80211_vif *vif, in iwl_mvm_bss_info_changed_station_common() argument
2769 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_bss_info_changed_station_common()
2776 iwl_mvm_stop_session_protection(mvm, vif); in iwl_mvm_bss_info_changed_station_common()
2778 iwl_mvm_sf_update(mvm, vif, false); in iwl_mvm_bss_info_changed_station_common()
2779 WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif)); in iwl_mvm_bss_info_changed_station_common()
2804 ret = iwl_mvm_enable_beacon_filter(mvm, vif); in iwl_mvm_bss_info_changed_station_common()
2812 iwl_mvm_update_link_smps(vif, link_conf); in iwl_mvm_bss_info_changed_station_common()
2816 iwl_mvm_send_ap_tx_power_constraint_cmd(mvm, vif, in iwl_mvm_bss_info_changed_station_common()
2823 struct ieee80211_vif *vif, in iwl_mvm_bss_info_changed_station() argument
2827 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_bss_info_changed_station()
2836 if (changes & BSS_CHANGED_ASSOC && vif->cfg.assoc) { in iwl_mvm_bss_info_changed_station()
2837 if ((vif->bss_conf.he_support && in iwl_mvm_bss_info_changed_station()
2839 iwl_mvm_cfg_he_sta(mvm, vif, mvmvif->deflink.ap_sta_id); in iwl_mvm_bss_info_changed_station()
2841 iwl_mvm_mac_ctxt_recalc_tsf_id(mvm, vif); in iwl_mvm_bss_info_changed_station()
2846 vif->cfg.assoc && in iwl_mvm_bss_info_changed_station()
2847 (vif->bss_conf.he_support && !iwlwifi_mod_params.disable_11ax)) in iwl_mvm_bss_info_changed_station()
2848 iwl_mvm_cfg_he_sta(mvm, vif, mvmvif->deflink.ap_sta_id); in iwl_mvm_bss_info_changed_station()
2859 ret = iwl_mvm_mac_ctxt_changed(mvm, vif, false, mvmvif->deflink.bssid); in iwl_mvm_bss_info_changed_station()
2861 IWL_ERR(mvm, "failed to update MAC %pM\n", vif->addr); in iwl_mvm_bss_info_changed_station()
2865 mvmvif->associated = vif->cfg.assoc; in iwl_mvm_bss_info_changed_station()
2868 if (vif->cfg.assoc) { in iwl_mvm_bss_info_changed_station()
2906 u32 dur = (11 * vif->bss_conf.beacon_int) / 10; in iwl_mvm_bss_info_changed_station()
2907 iwl_mvm_protect_session(mvm, vif, dur, dur, in iwl_mvm_bss_info_changed_station()
2911 !vif->bss_conf.dtim_period) { in iwl_mvm_bss_info_changed_station()
2922 iwl_mvm_protect_assoc(mvm, vif, 0, 0); in iwl_mvm_bss_info_changed_station()
2925 iwl_mvm_sf_update(mvm, vif, false); in iwl_mvm_bss_info_changed_station()
2926 iwl_mvm_power_vif_assoc(mvm, vif); in iwl_mvm_bss_info_changed_station()
2927 if (vif->p2p) { in iwl_mvm_bss_info_changed_station()
2928 iwl_mvm_update_smps(mvm, vif, in iwl_mvm_bss_info_changed_station()
2938 ret = iwl_mvm_sf_update(mvm, vif, false); in iwl_mvm_bss_info_changed_station()
2946 * station has been added, but before the vif is set in iwl_mvm_bss_info_changed_station()
2948 * then configure the vif. Since the vif is not in iwl_mvm_bss_info_changed_station()
2955 iwl_mvm_sec_key_remove_ap(mvm, vif, in iwl_mvm_bss_info_changed_station()
2962 ret = iwl_mvm_rm_sta_id(mvm, vif, in iwl_mvm_bss_info_changed_station()
2977 ret = iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); in iwl_mvm_bss_info_changed_station()
2981 vif->addr); in iwl_mvm_bss_info_changed_station()
2984 iwl_mvm_bss_info_changed_station_assoc(mvm, vif, changes); in iwl_mvm_bss_info_changed_station()
2987 iwl_mvm_bss_info_changed_station_common(mvm, vif, &vif->bss_conf, in iwl_mvm_bss_info_changed_station()
2992 struct ieee80211_vif *vif, in iwl_mvm_start_ap_ibss_common() argument
2996 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_start_ap_ibss_common()
3015 *ret = __iwl_mvm_mac_set_key(hw, SET_KEY, vif, NULL, key); in iwl_mvm_start_ap_ibss_common()
3020 if (vif->type == NL80211_IFTYPE_AP && !vif->p2p) { in iwl_mvm_start_ap_ibss_common()
3033 struct ieee80211_vif *vif, in iwl_mvm_start_ap_ibss() argument
3037 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_start_ap_ibss()
3047 if (vif->type == NL80211_IFTYPE_AP) in iwl_mvm_start_ap_ibss()
3048 iwl_mvm_mac_ctxt_recalc_tsf_id(mvm, vif); in iwl_mvm_start_ap_ibss()
3056 ret = iwl_mvm_mac_ctxt_add(mvm, vif); in iwl_mvm_start_ap_ibss()
3061 ret = iwl_mvm_mac_ctxt_beacon_changed(mvm, vif, link_conf); in iwl_mvm_start_ap_ibss()
3066 ret = iwl_mvm_mac_ctxt_beacon_changed(mvm, vif, link_conf); in iwl_mvm_start_ap_ibss()
3071 ret = iwl_mvm_mac_ctxt_add(mvm, vif); in iwl_mvm_start_ap_ibss()
3077 ret = iwl_mvm_binding_add_vif(mvm, vif); in iwl_mvm_start_ap_ibss()
3089 ret = iwl_mvm_add_mcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
3096 ret = iwl_mvm_send_add_bcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
3098 iwl_mvm_rm_mcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
3106 ret = iwl_mvm_send_add_bcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
3109 ret = iwl_mvm_add_mcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
3111 iwl_mvm_send_rm_bcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
3116 if (iwl_mvm_start_ap_ibss_common(hw, vif, &ret)) in iwl_mvm_start_ap_ibss()
3123 /* Need to update the P2P Device MAC (only GO, IBSS is single vif) */ in iwl_mvm_start_ap_ibss()
3124 if (vif->p2p && mvm->p2p_device_vif) in iwl_mvm_start_ap_ibss()
3133 iwl_mvm_ftm_restart_responder(mvm, vif, &vif->bss_conf); in iwl_mvm_start_ap_ibss()
3140 iwl_mvm_send_rm_bcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
3141 iwl_mvm_rm_mcast_sta(mvm, vif); in iwl_mvm_start_ap_ibss()
3143 iwl_mvm_binding_remove_vif(mvm, vif); in iwl_mvm_start_ap_ibss()
3145 iwl_mvm_mac_ctxt_remove(mvm, vif); in iwl_mvm_start_ap_ibss()
3152 struct ieee80211_vif *vif, in iwl_mvm_start_ap() argument
3155 return iwl_mvm_start_ap_ibss(hw, vif, link_conf); in iwl_mvm_start_ap()
3159 struct ieee80211_vif *vif) in iwl_mvm_start_ibss() argument
3161 return iwl_mvm_start_ap_ibss(hw, vif, &vif->bss_conf); in iwl_mvm_start_ibss()
3166 struct ieee80211_vif *vif) in iwl_mvm_stop_ap_ibss_common() argument
3168 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_stop_ap_ibss_common()
3172 iwl_mvm_prepare_mac_removal(mvm, vif); in iwl_mvm_stop_ap_ibss_common()
3175 if (rcu_access_pointer(mvm->csa_vif) == vif) { in iwl_mvm_stop_ap_ibss_common()
3182 if (rcu_access_pointer(mvm->csa_tx_blocked_vif) == vif) { in iwl_mvm_stop_ap_ibss_common()
3190 if (vif->type == NL80211_IFTYPE_AP && !vif->p2p) { in iwl_mvm_stop_ap_ibss_common()
3200 struct ieee80211_vif *vif, in iwl_mvm_stop_ap_ibss() argument
3207 iwl_mvm_stop_ap_ibss_common(mvm, vif); in iwl_mvm_stop_ap_ibss()
3209 /* Need to update the P2P Device MAC (only GO, IBSS is single vif) */ in iwl_mvm_stop_ap_ibss()
3210 if (vif->p2p && mvm->p2p_device_vif) in iwl_mvm_stop_ap_ibss()
3215 iwl_mvm_ftm_responder_clear(mvm, vif); in iwl_mvm_stop_ap_ibss()
3226 iwl_mvm_rm_mcast_sta(mvm, vif); in iwl_mvm_stop_ap_ibss()
3227 iwl_mvm_send_rm_bcast_sta(mvm, vif); in iwl_mvm_stop_ap_ibss()
3229 iwl_mvm_rm_mcast_sta(mvm, vif); in iwl_mvm_stop_ap_ibss()
3230 iwl_mvm_binding_remove_vif(mvm, vif); in iwl_mvm_stop_ap_ibss()
3234 iwl_mvm_mac_ctxt_remove(mvm, vif); in iwl_mvm_stop_ap_ibss()
3238 struct ieee80211_vif *vif, in iwl_mvm_stop_ap() argument
3241 iwl_mvm_stop_ap_ibss(hw, vif, link_conf); in iwl_mvm_stop_ap()
3245 struct ieee80211_vif *vif) in iwl_mvm_stop_ibss() argument
3247 iwl_mvm_stop_ap_ibss(hw, vif, &vif->bss_conf); in iwl_mvm_stop_ibss()
3252 struct ieee80211_vif *vif, in iwl_mvm_bss_info_changed_ap_ibss() argument
3256 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_bss_info_changed_ap_ibss()
3264 iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL)) in iwl_mvm_bss_info_changed_ap_ibss()
3265 IWL_ERR(mvm, "failed to update MAC %pM\n", vif->addr); in iwl_mvm_bss_info_changed_ap_ibss()
3269 iwl_mvm_mac_ctxt_beacon_changed(mvm, vif, &vif->bss_conf)) in iwl_mvm_bss_info_changed_ap_ibss()
3273 int ret = iwl_mvm_ftm_start_responder(mvm, vif, &vif->bss_conf); in iwl_mvm_bss_info_changed_ap_ibss()
3283 struct ieee80211_vif *vif, in iwl_mvm_bss_info_changed() argument
3291 if (changes & BSS_CHANGED_IDLE && !vif->cfg.idle) in iwl_mvm_bss_info_changed()
3294 switch (vif->type) { in iwl_mvm_bss_info_changed()
3296 iwl_mvm_bss_info_changed_station(mvm, vif, bss_conf, changes); in iwl_mvm_bss_info_changed()
3300 iwl_mvm_bss_info_changed_ap_ibss(mvm, vif, bss_conf, changes); in iwl_mvm_bss_info_changed()
3304 iwl_mvm_update_mu_groups(mvm, vif); in iwl_mvm_bss_info_changed()
3314 iwl_mvm_set_tx_power(mvm, vif, bss_conf->txpower); in iwl_mvm_bss_info_changed()
3318 int iwl_mvm_mac_hw_scan(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_mac_hw_scan() argument
3328 return iwl_mvm_reg_scan_start(mvm, vif, &hw_req->req, &hw_req->ies); in iwl_mvm_mac_hw_scan()
3332 struct ieee80211_vif *vif) in iwl_mvm_mac_cancel_hw_scan() argument
3438 void iwl_mvm_mac_sta_notify(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_mac_sta_notify() argument
3464 if (!mvmsta->vif || in iwl_mvm_sta_pm_notif()
3465 mvmsta->vif->type != NL80211_IFTYPE_AP) { in iwl_mvm_sta_pm_notif()
3498 struct ieee80211_vif *vif, in iwl_mvm_sta_pre_rcu_remove() argument
3534 static void iwl_mvm_check_uapsd(struct iwl_mvm *mvm, struct ieee80211_vif *vif, in iwl_mvm_check_uapsd() argument
3542 mdata = &mvm->tcm.data[iwl_mvm_vif_from_mac80211(vif)->id]; in iwl_mvm_check_uapsd()
3550 if (vif->p2p && !iwl_mvm_is_p2p_scm_uapsd_supported(mvm)) { in iwl_mvm_check_uapsd()
3551 vif->driver_flags &= ~IEEE80211_VIF_SUPPORTS_UAPSD; in iwl_mvm_check_uapsd()
3555 if (!vif->p2p && in iwl_mvm_check_uapsd()
3557 vif->driver_flags &= ~IEEE80211_VIF_SUPPORTS_UAPSD; in iwl_mvm_check_uapsd()
3563 vif->driver_flags &= ~IEEE80211_VIF_SUPPORTS_UAPSD; in iwl_mvm_check_uapsd()
3568 vif->driver_flags |= IEEE80211_VIF_SUPPORTS_UAPSD; in iwl_mvm_check_uapsd()
3573 struct ieee80211_vif *vif, u8 *peer_addr, in iwl_mvm_tdls_check_trigger() argument
3579 trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, ieee80211_vif_to_wdev(vif), in iwl_mvm_tdls_check_trigger()
3625 struct ieee80211_vif *vif, in iwl_mvm_check_he_obss_narrow_bw_ru() argument
3629 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_check_he_obss_narrow_bw_ru()
3655 struct ieee80211_vif *vif) in iwl_mvm_reset_cca_40mhz_workaround() argument
3660 if (vif->type != NL80211_IFTYPE_STATION) in iwl_mvm_reset_cca_40mhz_workaround()
3675 he_cap = ieee80211_get_he_iftype_cap_vif(sband, vif); in iwl_mvm_reset_cca_40mhz_workaround()
3687 struct ieee80211_vif *vif, in iwl_mvm_mei_host_associated() argument
3691 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mei_host_associated()
3693 .ssid_len = vif->cfg.ssid_len, in iwl_mvm_mei_host_associated()
3703 if (!vif->bss_conf.chanreq.oper.chan) in iwl_mvm_mei_host_associated()
3706 conn_info.channel = vif->bss_conf.chanreq.oper.chan->hw_value; in iwl_mvm_mei_host_associated()
3749 memcpy(conn_info.ssid, vif->cfg.ssid, vif->cfg.ssid_len); in iwl_mvm_mei_host_associated()
3750 memcpy(conn_info.bssid, vif->bss_conf.bssid, ETH_ALEN); in iwl_mvm_mei_host_associated()
3758 struct ieee80211_vif *vif, in iwl_mvm_mac_ctxt_changed_wrapper() argument
3761 return iwl_mvm_mac_ctxt_changed(mvm, vif, force_assoc_off, NULL); in iwl_mvm_mac_ctxt_changed_wrapper()
3765 struct ieee80211_vif *vif, in iwl_mvm_mac_sta_state() argument
3777 return iwl_mvm_mac_sta_state_common(hw, vif, sta, old_state, new_state, in iwl_mvm_mac_sta_state()
3783 * (2) if a link is valid in sta then it's valid in vif (can
3787 struct ieee80211_vif *vif, in iwl_mvm_rs_rate_init_all_links() argument
3790 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_rs_rate_init_all_links()
3795 link_conf_dereference_check(vif, link_id); in iwl_mvm_rs_rate_init_all_links()
3802 iwl_mvm_rs_rate_init(mvm, vif, sta, conf, link_sta, in iwl_mvm_rs_rate_init_all_links()
3808 struct ieee80211_vif *vif, in iwl_mvm_vif_conf_from_sta() argument
3821 for_each_sta_active_link(vif, sta, link_sta, link_id) { in iwl_mvm_vif_conf_from_sta()
3823 link_conf_dereference_protected(vif, link_id); in iwl_mvm_vif_conf_from_sta()
3842 struct ieee80211_vif *vif, in iwl_mvm_vif_set_he_support() argument
3846 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_vif_set_he_support()
3850 for_each_sta_active_link(vif, sta, link_sta, link_id) { in iwl_mvm_vif_set_he_support()
3852 link_conf_dereference_protected(vif, link_id); in iwl_mvm_vif_set_he_support()
3862 iwl_mvm_check_he_obss_narrow_bw_ru(hw, vif, in iwl_mvm_vif_set_he_support()
3871 struct ieee80211_vif *vif, in iwl_mvm_sta_state_notexist_to_none() argument
3875 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_sta_state_notexist_to_none()
3882 if (vif->type == NL80211_IFTYPE_STATION && in iwl_mvm_sta_state_notexist_to_none()
3883 !iwl_mvm_vif_conf_from_sta(mvm, vif, sta)) in iwl_mvm_sta_state_notexist_to_none()
3887 (vif->p2p || in iwl_mvm_sta_state_notexist_to_none()
3894 ret = callbacks->add_sta(mvm, vif, sta); in iwl_mvm_sta_state_notexist_to_none()
3896 iwl_mvm_recalc_tdls_state(mvm, vif, true); in iwl_mvm_sta_state_notexist_to_none()
3897 iwl_mvm_tdls_check_trigger(mvm, vif, sta->addr, in iwl_mvm_sta_state_notexist_to_none()
3904 for_each_sta_active_link(vif, sta, link_sta, i) in iwl_mvm_sta_state_notexist_to_none()
3909 if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) in iwl_mvm_sta_state_notexist_to_none()
3923 iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); in iwl_mvm_sta_state_notexist_to_none()
3931 struct ieee80211_vif *vif, in iwl_mvm_sta_state_auth_to_assoc() argument
3935 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_sta_state_auth_to_assoc()
3942 if (vif->type == NL80211_IFTYPE_AP) { in iwl_mvm_sta_state_auth_to_assoc()
3943 iwl_mvm_vif_set_he_support(hw, vif, sta, false); in iwl_mvm_sta_state_auth_to_assoc()
3945 callbacks->mac_ctxt_changed(mvm, vif, false); in iwl_mvm_sta_state_auth_to_assoc()
3951 (vif->bss_conf.he_support && in iwl_mvm_sta_state_auth_to_assoc()
3953 iwl_mvm_cfg_he_sta(mvm, vif, mvm_sta->deflink.sta_id); in iwl_mvm_sta_state_auth_to_assoc()
3954 } else if (vif->type == NL80211_IFTYPE_STATION) { in iwl_mvm_sta_state_auth_to_assoc()
3955 iwl_mvm_vif_set_he_support(hw, vif, sta, true); in iwl_mvm_sta_state_auth_to_assoc()
3957 callbacks->mac_ctxt_changed(mvm, vif, false); in iwl_mvm_sta_state_auth_to_assoc()
3962 for_each_sta_active_link(vif, sta, link_sta, link_id) { in iwl_mvm_sta_state_auth_to_assoc()
3964 link_conf_dereference_protected(vif, link_id); in iwl_mvm_sta_state_auth_to_assoc()
3971 iwl_mvm_link_changed(mvm, vif, link_conf, in iwl_mvm_sta_state_auth_to_assoc()
3979 iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); in iwl_mvm_sta_state_auth_to_assoc()
3981 return callbacks->update_sta(mvm, vif, sta); in iwl_mvm_sta_state_auth_to_assoc()
3986 struct ieee80211_vif *vif, in iwl_mvm_sta_state_assoc_to_authorized() argument
3990 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_sta_state_assoc_to_authorized()
4000 iwl_mvm_tdls_check_trigger(mvm, vif, sta->addr, in iwl_mvm_sta_state_assoc_to_authorized()
4004 WARN_ON(iwl_mvm_enable_beacon_filter(mvm, vif)); in iwl_mvm_sta_state_assoc_to_authorized()
4009 mvmvif->link_selection_res = vif->active_links; in iwl_mvm_sta_state_assoc_to_authorized()
4011 vif->active_links ? __ffs(vif->active_links) : 0; in iwl_mvm_sta_state_assoc_to_authorized()
4014 callbacks->mac_ctxt_changed(mvm, vif, false); in iwl_mvm_sta_state_assoc_to_authorized()
4015 iwl_mvm_mei_host_associated(mvm, vif, mvm_sta); in iwl_mvm_sta_state_assoc_to_authorized()
4020 iwl_mvm_block_esr(mvm, vif, IWL_MVM_ESR_BLOCKED_TPT, 0); in iwl_mvm_sta_state_assoc_to_authorized()
4023 iwl_mvm_block_esr(mvm, vif, IWL_MVM_ESR_BLOCKED_FW, 0); in iwl_mvm_sta_state_assoc_to_authorized()
4028 if (vif->type == NL80211_IFTYPE_STATION && in iwl_mvm_sta_state_assoc_to_authorized()
4030 iwl_mvm_select_links(mvm, vif); in iwl_mvm_sta_state_assoc_to_authorized()
4039 int ret = callbacks->update_sta(mvm, vif, sta); in iwl_mvm_sta_state_assoc_to_authorized()
4045 iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); in iwl_mvm_sta_state_assoc_to_authorized()
4052 struct ieee80211_vif *vif, in iwl_mvm_sta_state_authorized_to_assoc() argument
4056 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_sta_state_authorized_to_assoc()
4066 iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); in iwl_mvm_sta_state_authorized_to_assoc()
4077 iwl_mvm_disable_beacon_filter(mvm, vif); in iwl_mvm_sta_state_authorized_to_assoc()
4088 if (ieee80211_vif_is_mld(vif) && mvmvif->esr_active) in iwl_mvm_sta_state_authorized_to_assoc()
4097 struct ieee80211_vif *vif, in iwl_mvm_mac_sta_state_common() argument
4104 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_sta_state_common()
4139 iwl_mvm_reset_cca_40mhz_workaround(mvm, vif); in iwl_mvm_mac_sta_state_common()
4152 for_each_sta_active_link(vif, sta, link_sta, link_id) { in iwl_mvm_mac_sta_state_common()
4166 ret = iwl_mvm_sta_state_notexist_to_none(mvm, vif, sta, in iwl_mvm_mac_sta_state_common()
4177 iwl_mvm_check_uapsd(mvm, vif, sta->addr); in iwl_mvm_mac_sta_state_common()
4181 ret = iwl_mvm_sta_state_auth_to_assoc(hw, mvm, vif, sta, in iwl_mvm_mac_sta_state_common()
4185 ret = iwl_mvm_sta_state_assoc_to_authorized(mvm, vif, sta, in iwl_mvm_mac_sta_state_common()
4189 ret = iwl_mvm_sta_state_authorized_to_assoc(mvm, vif, sta, in iwl_mvm_mac_sta_state_common()
4193 if (vif->type == NL80211_IFTYPE_AP) { in iwl_mvm_mac_sta_state_common()
4195 callbacks->mac_ctxt_changed(mvm, vif, false); in iwl_mvm_mac_sta_state_common()
4196 } else if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) in iwl_mvm_mac_sta_state_common()
4197 iwl_mvm_stop_session_protection(mvm, vif); in iwl_mvm_mac_sta_state_common()
4204 if (vif->type == NL80211_IFTYPE_STATION && !sta->tdls) { in iwl_mvm_mac_sta_state_common()
4205 iwl_mvm_stop_session_protection(mvm, vif); in iwl_mvm_mac_sta_state_common()
4208 ret = callbacks->rm_sta(mvm, vif, sta); in iwl_mvm_mac_sta_state_common()
4210 iwl_mvm_recalc_tdls_state(mvm, vif, false); in iwl_mvm_mac_sta_state_common()
4211 iwl_mvm_tdls_check_trigger(mvm, vif, sta->addr, in iwl_mvm_mac_sta_state_common()
4246 void iwl_mvm_sta_rc_update(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_sta_rc_update() argument
4254 iwl_mvm_rs_rate_init_all_links(mvm, vif, sta); in iwl_mvm_sta_rc_update()
4256 if (vif->type == NL80211_IFTYPE_STATION && in iwl_mvm_sta_rc_update()
4258 iwl_mvm_sf_update(mvm, vif, false); in iwl_mvm_sta_rc_update()
4262 struct ieee80211_vif *vif, in iwl_mvm_mac_conf_tx() argument
4267 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_conf_tx()
4275 if (vif->type == NL80211_IFTYPE_P2P_DEVICE) { in iwl_mvm_mac_conf_tx()
4277 return iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); in iwl_mvm_mac_conf_tx()
4283 struct ieee80211_vif *vif, in iwl_mvm_mac_mgd_prepare_tx() argument
4286 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_mgd_prepare_tx()
4293 iwl_mvm_protect_assoc(mvm, vif, info->duration, info->link_id); in iwl_mvm_mac_mgd_prepare_tx()
4297 struct ieee80211_vif *vif, in iwl_mvm_mac_mgd_complete_tx() argument
4307 iwl_mvm_stop_session_protection(mvm, vif); in iwl_mvm_mac_mgd_complete_tx()
4311 struct ieee80211_vif *vif, in iwl_mvm_mac_sched_scan_start() argument
4319 if (!vif->cfg.idle) in iwl_mvm_mac_sched_scan_start()
4322 return iwl_mvm_sched_scan_start(mvm, vif, req, ies, IWL_MVM_SCAN_SCHED); in iwl_mvm_mac_sched_scan_start()
4326 struct ieee80211_vif *vif) in iwl_mvm_mac_sched_scan_stop() argument
4355 struct ieee80211_vif *vif, in __iwl_mvm_mac_set_key() argument
4359 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in __iwl_mvm_mac_set_key()
4377 } else if (vif->type == NL80211_IFTYPE_STATION) { in __iwl_mvm_mac_set_key()
4397 if (vif->type == NL80211_IFTYPE_STATION) in __iwl_mvm_mac_set_key()
4409 if (vif->type == NL80211_IFTYPE_STATION && in __iwl_mvm_mac_set_key()
4414 if ((vif->type == NL80211_IFTYPE_ADHOC || in __iwl_mvm_mac_set_key()
4415 vif->type == NL80211_IFTYPE_AP) && !sta) { in __iwl_mvm_mac_set_key()
4522 ret = iwl_mvm_sec_key_add(mvm, vif, sta, key); in __iwl_mvm_mac_set_key()
4524 ret = iwl_mvm_set_sta_key(mvm, vif, sta, key, key_offset); in __iwl_mvm_mac_set_key()
4547 if (vif->type == NL80211_IFTYPE_STATION && in __iwl_mvm_mac_set_key()
4584 ret = iwl_mvm_sec_key_del(mvm, vif, sta, key); in __iwl_mvm_mac_set_key()
4586 ret = iwl_mvm_remove_sta_key(mvm, vif, sta, key); in __iwl_mvm_mac_set_key()
4596 struct ieee80211_vif *vif, struct ieee80211_sta *sta, in iwl_mvm_mac_set_key() argument
4602 return __iwl_mvm_mac_set_key(hw, cmd, vif, sta, key); in iwl_mvm_mac_set_key()
4606 struct ieee80211_vif *vif, in iwl_mvm_mac_update_tkip_key() argument
4616 iwl_mvm_update_tkip_key(mvm, vif, keyconf, sta, iv32, phase1key); in iwl_mvm_mac_update_tkip_key()
4656 struct ieee80211_vif *vif, in iwl_mvm_send_aux_roc_cmd() argument
4660 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_send_aux_roc_cmd()
4684 iwl_mvm_roc_duration_and_delay(vif, duration, &req_dur, &delay); in iwl_mvm_send_aux_roc_cmd()
4696 memcpy(tail->node_addr, vif->addr, ETH_ALEN); in iwl_mvm_send_aux_roc_cmd()
4707 te_data->vif = vif; in iwl_mvm_send_aux_roc_cmd()
4771 static int iwl_mvm_roc_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif) in iwl_mvm_roc_link() argument
4777 ret = iwl_mvm_binding_add_vif(mvm, vif); in iwl_mvm_roc_link()
4784 return iwl_mvm_add_p2p_bcast_sta(mvm, vif); in iwl_mvm_roc_link()
4788 struct ieee80211_vif *vif, in iwl_mvm_roc() argument
4798 return iwl_mvm_roc_common(hw, vif, channel, duration, type, &ops); in iwl_mvm_roc()
4803 struct ieee80211_vif *vif, in iwl_mvm_roc_station() argument
4812 ret = iwl_mvm_send_aux_roc_cmd(mvm, channel, vif, duration); in iwl_mvm_roc_station()
4814 ret = iwl_mvm_roc_add_cmd(mvm, channel, vif, duration, in iwl_mvm_roc_station()
4826 struct ieee80211_vif *vif, in iwl_mvm_roc_p2p() argument
4852 return iwl_mvm_roc_add_cmd(mvm, channel, vif, duration, activity); in iwl_mvm_roc_p2p()
4856 struct ieee80211_vif *vif, in iwl_mvm_p2p_find_phy_ctxt() argument
4859 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_p2p_find_phy_ctxt()
4902 int iwl_mvm_roc_common(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_roc_common() argument
4930 switch (vif->type) { in iwl_mvm_roc_common()
4937 ret = iwl_mvm_roc_station(mvm, channel, vif, duration); in iwl_mvm_roc_common()
4943 IWL_ERR(mvm, "ROC: Invalid vif type=%u\n", vif->type); in iwl_mvm_roc_common()
4948 ret = iwl_mvm_roc_p2p(mvm, channel, vif, duration, type); in iwl_mvm_roc_common()
4952 ret = iwl_mvm_p2p_find_phy_ctxt(mvm, vif, channel); in iwl_mvm_roc_common()
4956 ret = ops->link(mvm, vif); in iwl_mvm_roc_common()
4960 return iwl_mvm_start_p2p_roc(mvm, vif, duration, type); in iwl_mvm_roc_common()
4964 struct ieee80211_vif *vif) in iwl_mvm_cancel_roc() argument
4970 iwl_mvm_stop_roc(mvm, vif); in iwl_mvm_cancel_roc()
4982 struct ieee80211_vif *vif) in iwl_mvm_ftm_responder_chanctx_iter() argument
4986 if (rcu_access_pointer(vif->bss_conf.chanctx_conf) == data->ctx && in iwl_mvm_ftm_responder_chanctx_iter()
4987 vif->type == NL80211_IFTYPE_AP && vif->bss_conf.ftmr_params) in iwl_mvm_ftm_responder_chanctx_iter()
5110 struct ieee80211_vif *vif, in __iwl_mvm_assign_vif_chanctx_common() argument
5116 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in __iwl_mvm_assign_vif_chanctx_common()
5122 switch (vif->type) { in __iwl_mvm_assign_vif_chanctx_common()
5151 struct ieee80211_vif *vif, in __iwl_mvm_assign_vif_chanctx() argument
5156 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in __iwl_mvm_assign_vif_chanctx()
5162 if (__iwl_mvm_assign_vif_chanctx_common(mvm, vif, ctx, in __iwl_mvm_assign_vif_chanctx()
5166 ret = iwl_mvm_binding_add_vif(mvm, vif); in __iwl_mvm_assign_vif_chanctx()
5180 if (vif->type == NL80211_IFTYPE_MONITOR) { in __iwl_mvm_assign_vif_chanctx()
5186 ret = iwl_mvm_add_snif_sta(mvm, vif); in __iwl_mvm_assign_vif_chanctx()
5193 if (vif->type == NL80211_IFTYPE_AP) { in __iwl_mvm_assign_vif_chanctx()
5195 iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); in __iwl_mvm_assign_vif_chanctx()
5198 if (vif->type == NL80211_IFTYPE_STATION) { in __iwl_mvm_assign_vif_chanctx()
5208 u32 duration = 5 * vif->bss_conf.beacon_int; in __iwl_mvm_assign_vif_chanctx()
5213 iwl_mvm_protect_session(mvm, vif, duration, duration, in __iwl_mvm_assign_vif_chanctx()
5214 vif->bss_conf.beacon_int / 2, in __iwl_mvm_assign_vif_chanctx()
5220 iwl_mvm_send_ap_tx_power_constraint_cmd(mvm, vif, in __iwl_mvm_assign_vif_chanctx()
5228 iwl_mvm_binding_remove_vif(mvm, vif); in __iwl_mvm_assign_vif_chanctx()
5237 struct ieee80211_vif *vif, in iwl_mvm_assign_vif_chanctx() argument
5244 return __iwl_mvm_assign_vif_chanctx(mvm, vif, link_conf, ctx, false); in iwl_mvm_assign_vif_chanctx()
5254 struct ieee80211_vif *vif, in __iwl_mvm_unassign_vif_chanctx_common() argument
5257 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in __iwl_mvm_unassign_vif_chanctx_common()
5263 switch (vif->type) { in __iwl_mvm_unassign_vif_chanctx_common()
5281 rcu_assign_pointer(mvm->csa_tx_blocked_vif, vif); in __iwl_mvm_unassign_vif_chanctx_common()
5292 struct ieee80211_vif *vif, in __iwl_mvm_unassign_vif_chanctx() argument
5297 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in __iwl_mvm_unassign_vif_chanctx()
5300 if (__iwl_mvm_unassign_vif_chanctx_common(mvm, vif, switching_chanctx)) in __iwl_mvm_unassign_vif_chanctx()
5303 if (vif->type == NL80211_IFTYPE_MONITOR) in __iwl_mvm_unassign_vif_chanctx()
5304 iwl_mvm_rm_snif_sta(mvm, vif); in __iwl_mvm_unassign_vif_chanctx()
5307 if (vif->type == NL80211_IFTYPE_STATION && switching_chanctx) { in __iwl_mvm_unassign_vif_chanctx()
5308 disabled_vif = vif; in __iwl_mvm_unassign_vif_chanctx()
5311 iwl_mvm_mac_ctxt_changed(mvm, vif, true, NULL); in __iwl_mvm_unassign_vif_chanctx()
5315 iwl_mvm_binding_remove_vif(mvm, vif); in __iwl_mvm_unassign_vif_chanctx()
5326 struct ieee80211_vif *vif, in iwl_mvm_unassign_vif_chanctx() argument
5333 __iwl_mvm_unassign_vif_chanctx(mvm, vif, link_conf, ctx, false); in iwl_mvm_unassign_vif_chanctx()
5344 ops->__unassign_vif_chanctx(mvm, vifs[0].vif, vifs[0].link_conf, in iwl_mvm_switch_vif_chanctx_swap()
5354 ret = ops->__assign_vif_chanctx(mvm, vifs[0].vif, vifs[0].link_conf, in iwl_mvm_switch_vif_chanctx_swap()
5377 if (ops->__assign_vif_chanctx(mvm, vifs[0].vif, vifs[0].link_conf, in iwl_mvm_switch_vif_chanctx_swap()
5399 ops->__unassign_vif_chanctx(mvm, vifs[0].vif, vifs[0].link_conf, in iwl_mvm_switch_vif_chanctx_reassign()
5402 ret = ops->__assign_vif_chanctx(mvm, vifs[0].vif, vifs[0].link_conf, in iwl_mvm_switch_vif_chanctx_reassign()
5413 if (ops->__assign_vif_chanctx(mvm, vifs[0].vif, vifs[0].link_conf, in iwl_mvm_switch_vif_chanctx_reassign()
5438 /* we only support a single-vif right now */ in iwl_mvm_switch_vif_chanctx_common()
5483 if (!mvm_sta || !mvm_sta->vif) { in iwl_mvm_set_tim()
5484 IWL_ERR(mvm, "Station is not associated to a vif\n"); in iwl_mvm_set_tim()
5488 return iwl_mvm_mac_ctxt_beacon_changed(mvm, mvm_sta->vif, in iwl_mvm_set_tim()
5489 &mvm_sta->vif->bss_conf); in iwl_mvm_set_tim()
5500 struct ieee80211_vif *vif, in __iwl_mvm_mac_testmode_cmd() argument
5517 if (!vif || vif->type != NL80211_IFTYPE_AP || !vif->p2p || in __iwl_mvm_mac_testmode_cmd()
5518 !vif->bss_conf.enable_beacon || in __iwl_mvm_mac_testmode_cmd()
5523 if (noa_duration >= vif->bss_conf.beacon_int) in __iwl_mvm_mac_testmode_cmd()
5527 mvm->noa_vif = vif; in __iwl_mvm_mac_testmode_cmd()
5531 /* must be associated client vif - ignore authorized */ in __iwl_mvm_mac_testmode_cmd()
5532 if (!vif || vif->type != NL80211_IFTYPE_STATION || in __iwl_mvm_mac_testmode_cmd()
5533 !vif->cfg.assoc || !vif->bss_conf.dtim_period || in __iwl_mvm_mac_testmode_cmd()
5538 return iwl_mvm_enable_beacon_filter(mvm, vif); in __iwl_mvm_mac_testmode_cmd()
5539 return iwl_mvm_disable_beacon_filter(mvm, vif); in __iwl_mvm_mac_testmode_cmd()
5546 struct ieee80211_vif *vif, in iwl_mvm_mac_testmode_cmd() argument
5552 return __iwl_mvm_mac_testmode_cmd(mvm, vif, data, len); in iwl_mvm_mac_testmode_cmd()
5556 void iwl_mvm_channel_switch(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_channel_switch() argument
5570 struct ieee80211_vif *vif, in iwl_mvm_schedule_client_csa() argument
5573 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_schedule_client_csa()
5587 DIV_ROUND_UP(chsw->delay, vif->bss_conf.beacon_int); in iwl_mvm_schedule_client_csa()
5596 struct ieee80211_vif *vif, in iwl_mvm_old_pre_chan_sw_sta() argument
5599 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_old_pre_chan_sw_sta()
5612 ((vif->bss_conf.beacon_int * (chsw->count - 1) - in iwl_mvm_old_pre_chan_sw_sta()
5616 iwl_mvm_csa_client_absent(mvm, vif); in iwl_mvm_old_pre_chan_sw_sta()
5619 int ret = iwl_mvm_disable_beacon_filter(mvm, vif); in iwl_mvm_old_pre_chan_sw_sta()
5625 iwl_mvm_schedule_csa_period(mvm, vif, vif->bss_conf.beacon_int, in iwl_mvm_old_pre_chan_sw_sta()
5645 struct ieee80211_vif *vif, in iwl_mvm_pre_channel_switch() argument
5649 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_pre_channel_switch()
5662 ieee80211_vif_to_wdev(vif), in iwl_mvm_pre_channel_switch()
5665 switch (vif->type) { in iwl_mvm_pre_channel_switch()
5679 rcu_assign_pointer(mvm->csa_vif, vif); in iwl_mvm_pre_channel_switch()
5694 mvmtxq = iwl_mvm_txq_from_mac80211(vif->txq); in iwl_mvm_pre_channel_switch()
5717 if (!vif->cfg.assoc || !vif->bss_conf.dtim_period) in iwl_mvm_pre_channel_switch()
5721 hweight16(vif->valid_links) <= 1) in iwl_mvm_pre_channel_switch()
5730 chsw->count * vif->bss_conf.beacon_int > in iwl_mvm_pre_channel_switch()
5738 ret = iwl_mvm_old_pre_chan_sw_sta(mvm, vif, chsw); in iwl_mvm_pre_channel_switch()
5742 iwl_mvm_schedule_client_csa(mvm, vif, chsw); in iwl_mvm_pre_channel_switch()
5765 struct ieee80211_vif *vif, in iwl_mvm_mac_pre_channel_switch() argument
5771 return iwl_mvm_pre_channel_switch(mvm, vif, chsw); in iwl_mvm_mac_pre_channel_switch()
5775 struct ieee80211_vif *vif, in iwl_mvm_channel_switch_rx_beacon() argument
5779 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_channel_switch_rx_beacon()
5810 vif->link_conf[chsw->link_id]); in iwl_mvm_channel_switch_rx_beacon()
5814 iwl_mvm_abort_channel_switch(hw, vif, link_conf); in iwl_mvm_channel_switch_rx_beacon()
5815 ieee80211_chswitch_done(vif, false, 0); in iwl_mvm_channel_switch_rx_beacon()
5869 void iwl_mvm_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_mac_flush() argument
5872 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_flush()
5880 if (!vif) { in iwl_mvm_mac_flush()
5885 if (!drop && hweight16(vif->active_links) <= 1) { in iwl_mvm_mac_flush()
5886 int link_id = vif->active_links ? __ffs(vif->active_links) : 0; in iwl_mvm_mac_flush()
5890 vif->link_conf[link_id]); in iwl_mvm_mac_flush()
5910 if (mvmsta->vif != vif) in iwl_mvm_mac_flush()
5943 void iwl_mvm_mac_flush_sta(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_mac_flush_sta() argument
5953 for_each_sta_active_link(vif, sta, link_sta, link_id) { in iwl_mvm_mac_flush_sta()
6220 struct ieee80211_vif *vif, in iwl_mvm_mac_sta_statistics() argument
6225 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_sta_statistics()
6242 if (!(vif->driver_flags & IEEE80211_VIF_BEACON_FILTER)) in iwl_mvm_mac_sta_statistics()
6245 if (!vif->cfg.assoc) in iwl_mvm_mac_sta_statistics()
6271 struct ieee80211_vif *vif, in iwl_mvm_event_mlme_callback_ini() argument
6291 struct ieee80211_vif *vif, in iwl_mvm_event_mlme_callback() argument
6305 iwl_mvm_event_mlme_callback_ini(mvm, vif, &event->u.mlme); in iwl_mvm_event_mlme_callback()
6309 trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, ieee80211_vif_to_wdev(vif), in iwl_mvm_event_mlme_callback()
6343 struct ieee80211_vif *vif, in iwl_mvm_event_bar_rx_callback() argument
6349 trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, ieee80211_vif_to_wdev(vif), in iwl_mvm_event_bar_rx_callback()
6366 struct ieee80211_vif *vif, in iwl_mvm_mac_event_callback() argument
6373 iwl_mvm_event_mlme_callback(mvm, vif, event); in iwl_mvm_mac_event_callback()
6376 iwl_mvm_event_bar_rx_callback(mvm, vif, event); in iwl_mvm_mac_event_callback()
6379 iwl_mvm_event_frame_timeout_callback(mvm, vif, event->u.ba.sta, in iwl_mvm_mac_event_callback()
6459 struct ieee80211_vif *vif, in iwl_mvm_mac_get_ftm_responder_stats() argument
6463 struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); in iwl_mvm_mac_get_ftm_responder_stats()
6465 if (vif->p2p || vif->type != NL80211_IFTYPE_AP || in iwl_mvm_mac_get_ftm_responder_stats()
6466 !mvmvif->ap_ibss_active || !vif->bss_conf.ftm_responder) in iwl_mvm_mac_get_ftm_responder_stats()
6486 int iwl_mvm_start_pmsr(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_start_pmsr() argument
6492 return iwl_mvm_ftm_start(mvm, vif, request); in iwl_mvm_start_pmsr()
6495 void iwl_mvm_abort_pmsr(struct ieee80211_hw *hw, struct ieee80211_vif *vif, in iwl_mvm_abort_pmsr() argument
6531 struct ieee80211_vif *vif, in iwl_mvm_set_hw_timestamp() argument