Lines Matching refs:arvif
565 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_get_arvif_iter() local
567 if (arvif->vdev_id == arvif_iter->vdev_id) in ath11k_get_arvif_iter()
568 arvif_iter->arvif = arvif; in ath11k_get_arvif_iter()
584 if (!arvif_iter.arvif) { in ath11k_mac_get_arvif()
589 return arvif_iter.arvif; in ath11k_mac_get_arvif()
597 struct ath11k_vif *arvif; in ath11k_mac_get_arvif_by_vdev_id() local
603 arvif = ath11k_mac_get_arvif(pdev->ar, vdev_id); in ath11k_mac_get_arvif_by_vdev_id()
604 if (arvif) in ath11k_mac_get_arvif_by_vdev_id()
605 return arvif; in ath11k_mac_get_arvif_by_vdev_id()
655 struct ath11k_vif *arvif; in ath11k_mac_get_vif_up() local
661 list_for_each_entry(arvif, &ar->arvifs, list) { in ath11k_mac_get_vif_up()
662 if (arvif->is_up) in ath11k_mac_get_vif_up()
663 return arvif; in ath11k_mac_get_vif_up()
677 u8 ath11k_mac_get_target_pdev_id_from_vif(struct ath11k_vif *arvif) in ath11k_mac_get_target_pdev_id_from_vif() argument
679 struct ath11k *ar = arvif->ar; in ath11k_mac_get_target_pdev_id_from_vif()
681 struct ieee80211_vif *vif = arvif->vif; in ath11k_mac_get_target_pdev_id_from_vif()
702 struct ath11k_vif *arvif; in ath11k_mac_get_target_pdev_id() local
704 arvif = ath11k_mac_get_vif_up(ar->ab); in ath11k_mac_get_target_pdev_id()
706 if (arvif) in ath11k_mac_get_target_pdev_id()
707 return ath11k_mac_get_target_pdev_id_from_vif(arvif); in ath11k_mac_get_target_pdev_id()
733 struct ath11k_vif *arvif; in ath11k_mac_txpower_recalc() local
739 list_for_each_entry(arvif, &ar->arvifs, list) { in ath11k_mac_txpower_recalc()
740 if (arvif->txpower <= 0) in ath11k_mac_txpower_recalc()
744 txpower = arvif->txpower; in ath11k_mac_txpower_recalc()
746 txpower = min(txpower, arvif->txpower); in ath11k_mac_txpower_recalc()
787 static int ath11k_recalc_rtscts_prot(struct ath11k_vif *arvif) in ath11k_recalc_rtscts_prot() argument
789 struct ath11k *ar = arvif->ar; in ath11k_recalc_rtscts_prot()
803 if (arvif->num_legacy_stations > 0) in ath11k_recalc_rtscts_prot()
809 if (arvif->rtscts_prot_mode == rts_cts) in ath11k_recalc_rtscts_prot()
812 arvif->rtscts_prot_mode = rts_cts; in ath11k_recalc_rtscts_prot()
815 arvif->vdev_id, rts_cts); in ath11k_recalc_rtscts_prot()
817 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_recalc_rtscts_prot()
821 arvif->vdev_id, ret); in ath11k_recalc_rtscts_prot()
826 static int ath11k_mac_set_kickout(struct ath11k_vif *arvif) in ath11k_mac_set_kickout() argument
828 struct ath11k *ar = arvif->ar; in ath11k_mac_set_kickout()
837 arvif->vdev_id, ret); in ath11k_mac_set_kickout()
842 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, param, in ath11k_mac_set_kickout()
846 arvif->vdev_id, ret); in ath11k_mac_set_kickout()
851 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, param, in ath11k_mac_set_kickout()
855 arvif->vdev_id, ret); in ath11k_mac_set_kickout()
860 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, param, in ath11k_mac_set_kickout()
864 arvif->vdev_id, ret); in ath11k_mac_set_kickout()
1211 static int ath11k_mac_vif_setup_ps(struct ath11k_vif *arvif) in ath11k_mac_vif_setup_ps() argument
1213 struct ath11k *ar = arvif->ar; in ath11k_mac_vif_setup_ps()
1214 struct ieee80211_vif *vif = arvif->vif; in ath11k_mac_vif_setup_ps()
1222 lockdep_assert_held(&arvif->ar->conf_mutex); in ath11k_mac_vif_setup_ps()
1224 if (arvif->vif->type != NL80211_IFTYPE_STATION) in ath11k_mac_vif_setup_ps()
1227 enable_ps = arvif->ps; in ath11k_mac_vif_setup_ps()
1229 if (!arvif->is_started) { in ath11k_mac_vif_setup_ps()
1246 ret = ath11k_wmi_set_sta_ps_param(ar, arvif->vdev_id, param, in ath11k_mac_vif_setup_ps()
1250 arvif->vdev_id, ret); in ath11k_mac_vif_setup_ps()
1258 arvif->vdev_id, psmode ? "enable" : "disable"); in ath11k_mac_vif_setup_ps()
1260 ret = ath11k_wmi_pdev_set_ps_mode(ar, arvif->vdev_id, psmode); in ath11k_mac_vif_setup_ps()
1263 psmode, arvif->vdev_id, ret); in ath11k_mac_vif_setup_ps()
1272 struct ath11k_vif *arvif; in ath11k_mac_config_ps() local
1277 list_for_each_entry(arvif, &ar->arvifs, list) { in ath11k_mac_config_ps()
1278 ret = ath11k_mac_vif_setup_ps(arvif); in ath11k_mac_config_ps()
1350 static int ath11k_mac_setup_bcn_tmpl(struct ath11k_vif *arvif) in ath11k_mac_setup_bcn_tmpl() argument
1352 struct ath11k *ar = arvif->ar; in ath11k_mac_setup_bcn_tmpl()
1355 struct ieee80211_vif *vif = arvif->vif; in ath11k_mac_setup_bcn_tmpl()
1362 if (arvif->vdev_type != WMI_VDEV_TYPE_AP) in ath11k_mac_setup_bcn_tmpl()
1375 arvif->rsnie_present = true; in ath11k_mac_setup_bcn_tmpl()
1377 arvif->rsnie_present = false; in ath11k_mac_setup_bcn_tmpl()
1382 arvif->wpaie_present = true; in ath11k_mac_setup_bcn_tmpl()
1384 arvif->wpaie_present = false; in ath11k_mac_setup_bcn_tmpl()
1386 ret = ath11k_wmi_bcn_tmpl(ar, arvif->vdev_id, &offs, bcn); in ath11k_mac_setup_bcn_tmpl()
1397 void ath11k_mac_bcn_tx_event(struct ath11k_vif *arvif) in ath11k_mac_bcn_tx_event() argument
1399 struct ieee80211_vif *vif = arvif->vif; in ath11k_mac_bcn_tx_event()
1401 if (!vif->bss_conf.color_change_active && !arvif->bcca_zero_sent) in ath11k_mac_bcn_tx_event()
1406 arvif->bcca_zero_sent = true; in ath11k_mac_bcn_tx_event()
1411 arvif->bcca_zero_sent = false; in ath11k_mac_bcn_tx_event()
1415 ath11k_mac_setup_bcn_tmpl(arvif); in ath11k_mac_bcn_tx_event()
1418 static void ath11k_control_beaconing(struct ath11k_vif *arvif, in ath11k_control_beaconing() argument
1421 struct ath11k *ar = arvif->ar; in ath11k_control_beaconing()
1424 lockdep_assert_held(&arvif->ar->conf_mutex); in ath11k_control_beaconing()
1427 ret = ath11k_wmi_vdev_down(ar, arvif->vdev_id); in ath11k_control_beaconing()
1430 arvif->vdev_id, ret); in ath11k_control_beaconing()
1432 arvif->is_up = false; in ath11k_control_beaconing()
1437 ret = ath11k_mac_setup_bcn_tmpl(arvif); in ath11k_control_beaconing()
1444 arvif->tx_seq_no = 0x1000; in ath11k_control_beaconing()
1446 arvif->aid = 0; in ath11k_control_beaconing()
1448 ether_addr_copy(arvif->bssid, info->bssid); in ath11k_control_beaconing()
1450 ret = ath11k_wmi_vdev_up(arvif->ar, arvif->vdev_id, arvif->aid, in ath11k_control_beaconing()
1451 arvif->bssid); in ath11k_control_beaconing()
1454 arvif->vdev_id, ret); in ath11k_control_beaconing()
1458 arvif->is_up = true; in ath11k_control_beaconing()
1460 ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "mac vdev %d up\n", arvif->vdev_id); in ath11k_control_beaconing()
1468 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_mac_handle_beacon_iter() local
1476 cancel_delayed_work(&arvif->connection_loss_work); in ath11k_mac_handle_beacon_iter()
1491 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_mac_handle_beacon_miss_iter() local
1492 struct ath11k *ar = arvif->ar; in ath11k_mac_handle_beacon_miss_iter()
1495 if (arvif->vdev_id != *vdev_id) in ath11k_mac_handle_beacon_miss_iter()
1498 if (!arvif->is_up) in ath11k_mac_handle_beacon_miss_iter()
1508 ieee80211_queue_delayed_work(hw, &arvif->connection_loss_work, in ath11k_mac_handle_beacon_miss_iter()
1522 struct ath11k_vif *arvif = container_of(work, struct ath11k_vif, in ath11k_mac_vif_sta_connection_loss_work() local
1524 struct ieee80211_vif *vif = arvif->vif; in ath11k_mac_vif_sta_connection_loss_work()
1526 if (!arvif->is_up) in ath11k_mac_vif_sta_connection_loss_work()
1537 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_peer_assoc_h_basic() local
1548 arg->vdev_id = arvif->vdev_id; in ath11k_peer_assoc_h_basic()
1565 struct ath11k_vif *arvif = (struct ath11k_vif *)vif->drv_priv; in ath11k_peer_assoc_h_crypto() local
1577 if (arvif->rsnie_present || arvif->wpaie_present) { in ath11k_peer_assoc_h_crypto()
1579 if (arvif->wpaie_present) in ath11k_peer_assoc_h_crypto()
1623 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_peer_assoc_h_rates() local
1641 ratemask &= arvif->bitrate_mask.control[band].legacy; in ath11k_peer_assoc_h_rates()
1686 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_peer_assoc_h_ht() local
1703 ht_mcs_mask = arvif->bitrate_mask.control[band].ht_mcs; in ath11k_peer_assoc_h_ht()
1731 if (arvif->bitrate_mask.control[band].gi == NL80211_TXRATE_DEFAULT_GI) in ath11k_peer_assoc_h_ht()
1735 if (arvif->bitrate_mask.control[band].gi != NL80211_TXRATE_FORCE_LGI) { in ath11k_peer_assoc_h_ht()
1883 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_peer_assoc_h_vht() local
1900 vht_mcs_mask = arvif->bitrate_mask.control[band].vht_mcs; in ath11k_peer_assoc_h_vht()
2080 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_peer_assoc_h_he() local
2101 memcpy(he_mcs_mask, arvif->bitrate_mask.control[band].he_mcs, in ath11k_peer_assoc_h_he()
2403 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_peer_assoc_h_qos() local
2405 switch (arvif->vdev_type) { in ath11k_peer_assoc_h_qos()
2435 struct ath11k_vif *arvif, in ath11k_peer_assoc_qos_ap() argument
2445 params.vdev_id = arvif->vdev_id; in ath11k_peer_assoc_qos_ap()
2497 params.param, arvif->vdev_id, ret); in ath11k_peer_assoc_qos_ap()
2566 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_peer_assoc_h_phymode() local
2578 ht_mcs_mask = arvif->bitrate_mask.control[band].ht_mcs; in ath11k_peer_assoc_h_phymode()
2579 vht_mcs_mask = arvif->bitrate_mask.control[band].vht_mcs; in ath11k_peer_assoc_h_phymode()
2580 he_mcs_mask = arvif->bitrate_mask.control[band].he_mcs; in ath11k_peer_assoc_h_phymode()
2673 static int ath11k_setup_peer_smps(struct ath11k *ar, struct ath11k_vif *arvif, in ath11k_setup_peer_smps() argument
2693 return ath11k_wmi_set_peer_param(ar, addr, arvif->vdev_id, in ath11k_setup_peer_smps()
2703 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_bss_assoc() local
2713 arvif->vdev_id, arvif->bssid, arvif->aid); in ath11k_bss_assoc()
2720 bss_conf->bssid, arvif->vdev_id); in ath11k_bss_assoc()
2733 bss_conf->bssid, arvif->vdev_id, ret); in ath11k_bss_assoc()
2739 bss_conf->bssid, arvif->vdev_id); in ath11k_bss_assoc()
2743 ret = ath11k_setup_peer_smps(ar, arvif, bss_conf->bssid, in ath11k_bss_assoc()
2748 arvif->vdev_id, ret); in ath11k_bss_assoc()
2752 WARN_ON(arvif->is_up); in ath11k_bss_assoc()
2754 arvif->aid = vif->cfg.aid; in ath11k_bss_assoc()
2755 ether_addr_copy(arvif->bssid, bss_conf->bssid); in ath11k_bss_assoc()
2757 ret = ath11k_wmi_vdev_up(ar, arvif->vdev_id, arvif->aid, arvif->bssid); in ath11k_bss_assoc()
2760 arvif->vdev_id, ret); in ath11k_bss_assoc()
2764 arvif->is_up = true; in ath11k_bss_assoc()
2765 arvif->rekey_data.enable_offload = false; in ath11k_bss_assoc()
2769 arvif->vdev_id, bss_conf->bssid, vif->cfg.aid); in ath11k_bss_assoc()
2773 peer = ath11k_peer_find(ar->ab, arvif->vdev_id, arvif->bssid); in ath11k_bss_assoc()
2780 ret = ath11k_wmi_set_peer_param(ar, arvif->bssid, in ath11k_bss_assoc()
2781 arvif->vdev_id, in ath11k_bss_assoc()
2788 ret = ath11k_wmi_send_obss_spr_cmd(ar, arvif->vdev_id, in ath11k_bss_assoc()
2792 arvif->vdev_id, ret); in ath11k_bss_assoc()
2794 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_bss_assoc()
2799 arvif->vdev_id, ret); in ath11k_bss_assoc()
2808 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_bss_disassoc() local
2814 arvif->vdev_id, arvif->bssid); in ath11k_bss_disassoc()
2816 ret = ath11k_wmi_vdev_down(ar, arvif->vdev_id); in ath11k_bss_disassoc()
2819 arvif->vdev_id, ret); in ath11k_bss_disassoc()
2821 arvif->is_up = false; in ath11k_bss_disassoc()
2823 memset(&arvif->rekey_data, 0, sizeof(arvif->rekey_data)); in ath11k_bss_disassoc()
2825 cancel_delayed_work_sync(&arvif->connection_loss_work); in ath11k_bss_disassoc()
2857 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_recalculate_mgmt_rate() local
2878 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, vdev_param, in ath11k_recalculate_mgmt_rate()
2889 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, vdev_param, in ath11k_recalculate_mgmt_rate()
2895 static int ath11k_mac_fils_discovery(struct ath11k_vif *arvif, in ath11k_mac_fils_discovery() argument
2898 struct ath11k *ar = arvif->ar; in ath11k_mac_fils_discovery()
2907 tmpl = ieee80211_get_fils_discovery_tmpl(ar->hw, arvif->vif); in ath11k_mac_fils_discovery()
2909 ret = ath11k_wmi_fils_discovery_tmpl(ar, arvif->vdev_id, in ath11k_mac_fils_discovery()
2916 arvif->vif); in ath11k_mac_fils_discovery()
2918 ret = ath11k_wmi_probe_resp_tmpl(ar, arvif->vdev_id, in ath11k_mac_fils_discovery()
2921 return ath11k_wmi_fils_discovery(ar, arvif->vdev_id, 0, false); in ath11k_mac_fils_discovery()
2927 arvif->vdev_id, (unsol_bcast_probe_resp_enabled ? in ath11k_mac_fils_discovery()
2935 ret = ath11k_wmi_fils_discovery(ar, arvif->vdev_id, interval, in ath11k_mac_fils_discovery()
3099 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); in ath11k_mac_op_bss_info_changed() local
3116 arvif->beacon_interval = info->beacon_int; in ath11k_mac_op_bss_info_changed()
3119 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_op_bss_info_changed()
3121 arvif->beacon_interval); in ath11k_mac_op_bss_info_changed()
3124 arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3128 arvif->beacon_interval, arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3138 arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3142 arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3144 if (!arvif->do_not_send_tmpl || !arvif->bcca_zero_sent) { in ath11k_mac_op_bss_info_changed()
3145 ret = ath11k_mac_setup_bcn_tmpl(arvif); in ath11k_mac_op_bss_info_changed()
3151 if (arvif->bcca_zero_sent) in ath11k_mac_op_bss_info_changed()
3152 arvif->do_not_send_tmpl = true; in ath11k_mac_op_bss_info_changed()
3154 arvif->do_not_send_tmpl = false; in ath11k_mac_op_bss_info_changed()
3157 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_op_bss_info_changed()
3163 arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3167 arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3172 arvif->dtim_period = info->dtim_period; in ath11k_mac_op_bss_info_changed()
3175 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_op_bss_info_changed()
3177 arvif->dtim_period); in ath11k_mac_op_bss_info_changed()
3181 arvif->vdev_id, ret); in ath11k_mac_op_bss_info_changed()
3185 arvif->dtim_period, arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3190 arvif->u.ap.ssid_len = vif->cfg.ssid_len; in ath11k_mac_op_bss_info_changed()
3192 memcpy(arvif->u.ap.ssid, vif->cfg.ssid, in ath11k_mac_op_bss_info_changed()
3194 arvif->u.ap.hidden_ssid = info->hidden_ssid; in ath11k_mac_op_bss_info_changed()
3198 ether_addr_copy(arvif->bssid, info->bssid); in ath11k_mac_op_bss_info_changed()
3201 ath11k_control_beaconing(arvif, info); in ath11k_mac_op_bss_info_changed()
3203 if (arvif->is_up && vif->bss_conf.he_support && in ath11k_mac_op_bss_info_changed()
3207 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_op_bss_info_changed()
3211 param_value, arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3215 param_value, arvif->vdev_id, ret); in ath11k_mac_op_bss_info_changed()
3225 if (arvif->is_started) { in ath11k_mac_op_bss_info_changed()
3226 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_op_bss_info_changed()
3230 arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3233 cts_prot, arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3249 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_op_bss_info_changed()
3253 arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3257 slottime, arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3269 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_op_bss_info_changed()
3273 arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3277 preamble, arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3289 arvif->vdev_id, info->txpower); in ath11k_mac_op_bss_info_changed()
3291 arvif->txpower = info->txpower; in ath11k_mac_op_bss_info_changed()
3297 arvif->ps = vif->cfg.ps; in ath11k_mac_op_bss_info_changed()
3302 arvif->vdev_id, ret); in ath11k_mac_op_bss_info_changed()
3306 !ath11k_mac_vif_chan(arvif->vif, &def)) { in ath11k_mac_op_bss_info_changed()
3330 arvif->vdev_id, rate); in ath11k_mac_op_bss_info_changed()
3333 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_op_bss_info_changed()
3338 arvif->vdev_id, ret); in ath11k_mac_op_bss_info_changed()
3341 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_op_bss_info_changed()
3346 arvif->vdev_id, ret); in ath11k_mac_op_bss_info_changed()
3350 !ath11k_mac_vif_chan(arvif->vif, &def)) in ath11k_mac_op_bss_info_changed()
3371 ar, arvif->vdev_id, info->he_bss_color.color, in ath11k_mac_op_bss_info_changed()
3376 arvif->vdev_id, ret); in ath11k_mac_op_bss_info_changed()
3385 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_op_bss_info_changed()
3391 arvif->vdev_id, ret); in ath11k_mac_op_bss_info_changed()
3395 param_value, arvif->vdev_id); in ath11k_mac_op_bss_info_changed()
3398 arvif->vdev_id, in ath11k_mac_op_bss_info_changed()
3402 arvif->vdev_id, ret); in ath11k_mac_op_bss_info_changed()
3404 ar, arvif->vdev_id, 0, in ath11k_mac_op_bss_info_changed()
3408 arvif->vdev_id, ret); in ath11k_mac_op_bss_info_changed()
3414 ath11k_mac_fils_discovery(arvif, info); in ath11k_mac_op_bss_info_changed()
3418 memcpy(arvif->arp_ns_offload.ipv4_addr, in ath11k_mac_op_bss_info_changed()
3421 memcpy(arvif->arp_ns_offload.mac_addr, vif->addr, ETH_ALEN); in ath11k_mac_op_bss_info_changed()
3422 arvif->arp_ns_offload.ipv4_count = ipv4_cnt; in ath11k_mac_op_bss_info_changed()
3426 vif->addr, arvif->arp_ns_offload.ipv4_addr); in ath11k_mac_op_bss_info_changed()
3610 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); in ath11k_mac_op_hw_scan() local
3625 ar->scan.vdev_id = arvif->vdev_id; in ath11k_mac_op_hw_scan()
3641 arg.vdev_id = arvif->vdev_id; in ath11k_mac_op_hw_scan()
3706 ath11k_mac_11d_scan_start(ar, arvif->vdev_id); in ath11k_mac_op_hw_scan()
3723 static int ath11k_install_key(struct ath11k_vif *arvif, in ath11k_install_key() argument
3729 struct ath11k *ar = arvif->ar; in ath11k_install_key()
3731 .vdev_id = arvif->vdev_id, in ath11k_install_key()
3739 lockdep_assert_held(&arvif->ar->conf_mutex); in ath11k_install_key()
3780 ret = ath11k_wmi_vdev_install_key(arvif->ar, &arg); in ath11k_install_key()
3791 static int ath11k_clear_peer_keys(struct ath11k_vif *arvif, in ath11k_clear_peer_keys() argument
3794 struct ath11k *ar = arvif->ar; in ath11k_clear_peer_keys()
3805 peer = ath11k_peer_find(ab, arvif->vdev_id, addr); in ath11k_clear_peer_keys()
3816 ret = ath11k_install_key(arvif, peer->keys[i], in ath11k_clear_peer_keys()
3839 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); in ath11k_mac_op_set_key() local
3863 else if (arvif->vdev_type == WMI_VDEV_TYPE_STA) in ath11k_mac_op_set_key()
3874 peer = ath11k_peer_find(ab, arvif->vdev_id, peer_addr); in ath11k_mac_op_set_key()
3902 ret = ath11k_install_key(arvif, key, cmd, peer_addr, flags); in ath11k_mac_op_set_key()
3908 ret = ath11k_dp_peer_rx_pn_replay_config(arvif, peer_addr, cmd, key); in ath11k_mac_op_set_key()
3915 peer = ath11k_peer_find(ab, arvif->vdev_id, peer_addr); in ath11k_mac_op_set_key()
3991 ath11k_mac_set_peer_vht_fixed_rate(struct ath11k_vif *arvif, in ath11k_mac_set_peer_vht_fixed_rate() argument
3996 struct ath11k *ar = arvif->ar; in ath11k_mac_set_peer_vht_fixed_rate()
4029 arvif->vdev_id, in ath11k_mac_set_peer_vht_fixed_rate()
4041 ath11k_mac_set_peer_he_fixed_rate(struct ath11k_vif *arvif, in ath11k_mac_set_peer_he_fixed_rate() argument
4046 struct ath11k *ar = arvif->ar; in ath11k_mac_set_peer_he_fixed_rate()
4080 arvif->vdev_id, in ath11k_mac_set_peer_he_fixed_rate()
4096 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); in ath11k_station_assoc() local
4110 mask = &arvif->bitrate_mask; in ath11k_station_assoc()
4118 sta->addr, arvif->vdev_id, ret); in ath11k_station_assoc()
4124 sta->addr, arvif->vdev_id); in ath11k_station_assoc()
4137 ret = ath11k_mac_set_peer_vht_fixed_rate(arvif, sta, mask, in ath11k_station_assoc()
4142 ret = ath11k_mac_set_peer_he_fixed_rate(arvif, sta, mask, in ath11k_station_assoc()
4154 ret = ath11k_setup_peer_smps(ar, arvif, sta->addr, in ath11k_station_assoc()
4159 arvif->vdev_id, ret); in ath11k_station_assoc()
4164 arvif->num_legacy_stations++; in ath11k_station_assoc()
4165 ret = ath11k_recalc_rtscts_prot(arvif); in ath11k_station_assoc()
4171 ret = ath11k_peer_assoc_qos_ap(ar, arvif, sta); in ath11k_station_assoc()
4174 sta->addr, arvif->vdev_id, ret); in ath11k_station_assoc()
4186 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_station_disassoc() local
4192 arvif->num_legacy_stations--; in ath11k_station_disassoc()
4193 ret = ath11k_recalc_rtscts_prot(arvif); in ath11k_station_disassoc()
4198 ret = ath11k_clear_peer_keys(arvif, sta->addr); in ath11k_station_disassoc()
4201 arvif->vdev_id, ret); in ath11k_station_disassoc()
4210 struct ath11k_vif *arvif; in ath11k_sta_rc_update_wk() local
4226 arvif = arsta->arvif; in ath11k_sta_rc_update_wk()
4227 ar = arvif->ar; in ath11k_sta_rc_update_wk()
4229 if (WARN_ON(ath11k_mac_vif_chan(arvif->vif, &def))) in ath11k_sta_rc_update_wk()
4233 ht_mcs_mask = arvif->bitrate_mask.control[band].ht_mcs; in ath11k_sta_rc_update_wk()
4234 vht_mcs_mask = arvif->bitrate_mask.control[band].vht_mcs; in ath11k_sta_rc_update_wk()
4235 he_mcs_mask = arvif->bitrate_mask.control[band].he_mcs; in ath11k_sta_rc_update_wk()
4258 ath11k_peer_assoc_h_phymode(ar, arvif->vif, sta, &peer_arg); in ath11k_sta_rc_update_wk()
4271 err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id, in ath11k_sta_rc_update_wk()
4280 err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id, in ath11k_sta_rc_update_wk()
4293 err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id, in ath11k_sta_rc_update_wk()
4302 err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id, in ath11k_sta_rc_update_wk()
4315 err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id, in ath11k_sta_rc_update_wk()
4326 err = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id, in ath11k_sta_rc_update_wk()
4334 mask = &arvif->bitrate_mask; in ath11k_sta_rc_update_wk()
4352 ath11k_mac_set_peer_vht_fixed_rate(arvif, sta, mask, in ath11k_sta_rc_update_wk()
4355 ath11k_mac_set_peer_he_fixed_rate(arvif, sta, mask, in ath11k_sta_rc_update_wk()
4365 arvif->vdev_id, in ath11k_sta_rc_update_wk()
4373 ath11k_peer_assoc_prepare(ar, arvif->vif, sta, in ath11k_sta_rc_update_wk()
4380 sta->addr, arvif->vdev_id, err); in ath11k_sta_rc_update_wk()
4384 sta->addr, arvif->vdev_id); in ath11k_sta_rc_update_wk()
4395 struct ath11k_vif *arvif; in ath11k_sta_set_4addr_wk() local
4402 arvif = arsta->arvif; in ath11k_sta_set_4addr_wk()
4403 ar = arvif->ar; in ath11k_sta_set_4addr_wk()
4409 arvif->vdev_id, in ath11k_sta_set_4addr_wk()
4417 static int ath11k_mac_inc_num_stations(struct ath11k_vif *arvif, in ath11k_mac_inc_num_stations() argument
4420 struct ath11k *ar = arvif->ar; in ath11k_mac_inc_num_stations()
4424 if (arvif->vdev_type == WMI_VDEV_TYPE_STA && !sta->tdls) in ath11k_mac_inc_num_stations()
4435 static void ath11k_mac_dec_num_stations(struct ath11k_vif *arvif, in ath11k_mac_dec_num_stations() argument
4438 struct ath11k *ar = arvif->ar; in ath11k_mac_dec_num_stations()
4442 if (arvif->vdev_type == WMI_VDEV_TYPE_STA && !sta->tdls) in ath11k_mac_dec_num_stations()
4453 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); in ath11k_mac_station_add() local
4460 ret = ath11k_mac_inc_num_stations(arvif, sta); in ath11k_mac_station_add()
4473 peer_param.vdev_id = arvif->vdev_id; in ath11k_mac_station_add()
4477 ret = ath11k_peer_create(ar, arvif, sta, &peer_param); in ath11k_mac_station_add()
4480 sta->addr, arvif->vdev_id); in ath11k_mac_station_add()
4485 sta->addr, arvif->vdev_id); in ath11k_mac_station_add()
4499 arvif->vdev_id, in ath11k_mac_station_add()
4508 ret = ath11k_dp_peer_setup(ar, arvif->vdev_id, sta->addr); in ath11k_mac_station_add()
4511 sta->addr, arvif->vdev_id, ret); in ath11k_mac_station_add()
4516 !arvif->is_started && in ath11k_mac_station_add()
4517 arvif->vdev_type != WMI_VDEV_TYPE_AP) { in ath11k_mac_station_add()
4532 ath11k_peer_delete(ar, arvif->vdev_id, sta->addr); in ath11k_mac_station_add()
4537 ath11k_mac_dec_num_stations(arvif, sta); in ath11k_mac_station_add()
4577 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); in ath11k_mac_op_sta_state() local
4594 arsta->arvif = arvif; in ath11k_mac_op_sta_state()
4602 sta->addr, arvif->vdev_id); in ath11k_mac_op_sta_state()
4608 ath11k_dp_peer_cleanup(ar, arvif->vdev_id, sta->addr); in ath11k_mac_op_sta_state()
4611 ret = ath11k_peer_delete(ar, arvif->vdev_id, sta->addr); in ath11k_mac_op_sta_state()
4615 sta->addr, arvif->vdev_id); in ath11k_mac_op_sta_state()
4620 sta->addr, arvif->vdev_id); in ath11k_mac_op_sta_state()
4623 ath11k_mac_dec_num_stations(arvif, sta); in ath11k_mac_op_sta_state()
4626 peer = ath11k_peer_find(ar->ab, arvif->vdev_id, sta->addr); in ath11k_mac_op_sta_state()
4631 vif->addr, arvif->vdev_id); in ath11k_mac_op_sta_state()
4665 peer = ath11k_peer_find(ar->ab, arvif->vdev_id, sta->addr); in ath11k_mac_op_sta_state()
4671 if (vif->type == NL80211_IFTYPE_STATION && arvif->is_up) { in ath11k_mac_op_sta_state()
4673 arvif->vdev_id, in ath11k_mac_op_sta_state()
4678 sta->addr, arvif->vdev_id, ret); in ath11k_mac_op_sta_state()
4684 peer = ath11k_peer_find(ar->ab, arvif->vdev_id, sta->addr); in ath11k_mac_op_sta_state()
4709 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_mac_op_sta_set_txpwr() local
4726 ret = ath11k_wmi_set_peer_param(ar, sta->addr, arvif->vdev_id, in ath11k_mac_op_sta_set_txpwr()
4759 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_mac_op_sta_rc_update() local
4765 peer = ath11k_peer_find(ar->ab, arvif->vdev_id, sta->addr); in ath11k_mac_op_sta_rc_update()
4769 sta->addr, arvif->vdev_id); in ath11k_mac_op_sta_rc_update()
4826 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); in ath11k_conf_tx_uapsd() local
4830 if (arvif->vdev_type != WMI_VDEV_TYPE_STA) in ath11k_conf_tx_uapsd()
4853 arvif->u.sta.uapsd |= value; in ath11k_conf_tx_uapsd()
4855 arvif->u.sta.uapsd &= ~value; in ath11k_conf_tx_uapsd()
4857 ret = ath11k_wmi_set_sta_ps_param(ar, arvif->vdev_id, in ath11k_conf_tx_uapsd()
4859 arvif->u.sta.uapsd); in ath11k_conf_tx_uapsd()
4865 if (arvif->u.sta.uapsd) in ath11k_conf_tx_uapsd()
4870 ret = ath11k_wmi_set_sta_ps_param(ar, arvif->vdev_id, in ath11k_conf_tx_uapsd()
4886 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_mac_op_conf_tx() local
4894 p = &arvif->wmm_params.ac_vo; in ath11k_mac_op_conf_tx()
4897 p = &arvif->wmm_params.ac_vi; in ath11k_mac_op_conf_tx()
4900 p = &arvif->wmm_params.ac_be; in ath11k_mac_op_conf_tx()
4903 p = &arvif->wmm_params.ac_bk; in ath11k_mac_op_conf_tx()
4917 ret = ath11k_wmi_send_wmm_update_cmd_tlv(ar, arvif->vdev_id, in ath11k_mac_op_conf_tx()
4918 &arvif->wmm_params); in ath11k_mac_op_conf_tx()
5000 static int ath11k_mac_set_txbf_conf(struct ath11k_vif *arvif) in ath11k_mac_set_txbf_conf() argument
5003 struct ath11k *ar = arvif->ar; in ath11k_mac_set_txbf_conf()
5033 arvif->vdev_type == WMI_VDEV_TYPE_AP) in ath11k_mac_set_txbf_conf()
5043 arvif->vdev_type == WMI_VDEV_TYPE_STA) in ath11k_mac_set_txbf_conf()
5047 return ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_set_txbf_conf()
5543 static int ath11k_mac_mgmt_tx_wmi(struct ath11k *ar, struct ath11k_vif *arvif, in ath11k_mac_mgmt_tx_wmi() argument
5585 ret = ath11k_wmi_mgmt_send(ar, arvif->vdev_id, buf_id, skb); in ath11k_mac_mgmt_tx_wmi()
5616 struct ath11k_vif *arvif; in ath11k_mgmt_over_wmi_tx_work() local
5628 arvif = ath11k_vif_to_arvif(skb_cb->vif); in ath11k_mgmt_over_wmi_tx_work()
5630 if (ar->allocated_vdev_map & (1LL << arvif->vdev_id)) { in ath11k_mgmt_over_wmi_tx_work()
5631 ret = ath11k_mac_mgmt_tx_wmi(ar, arvif, skb); in ath11k_mgmt_over_wmi_tx_work()
5634 arvif->vdev_id, ret); in ath11k_mgmt_over_wmi_tx_work()
5639 arvif->vdev_id); in ath11k_mgmt_over_wmi_tx_work()
5644 arvif->vdev_id, in ath11k_mgmt_over_wmi_tx_work()
5645 arvif->is_started); in ath11k_mgmt_over_wmi_tx_work()
5692 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); in ath11k_mac_op_tx() local
5724 ret = ath11k_dp_tx(ar, arvif, arsta, skb); in ath11k_mac_op_tx()
5959 ath11k_mac_setup_vdev_create_params(struct ath11k_vif *arvif, in ath11k_mac_setup_vdev_create_params() argument
5962 struct ath11k *ar = arvif->ar; in ath11k_mac_setup_vdev_create_params()
5965 params->if_id = arvif->vdev_id; in ath11k_mac_setup_vdev_create_params()
5966 params->type = arvif->vdev_type; in ath11k_mac_setup_vdev_create_params()
5967 params->subtype = arvif->vdev_subtype; in ath11k_mac_setup_vdev_create_params()
6018 struct ath11k_vif *arvif) in ath11k_set_he_mu_sounding_mode() argument
6025 param_value = ath11k_mac_prepare_he_mode(ar->pdev, arvif->vif->type); in ath11k_set_he_mu_sounding_mode()
6026 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_set_he_mu_sounding_mode()
6030 arvif->vdev_id, ret, param_value); in ath11k_set_he_mu_sounding_mode()
6038 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_set_he_mu_sounding_mode()
6042 arvif->vdev_id, ret); in ath11k_set_he_mu_sounding_mode()
6053 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); in ath11k_mac_op_update_vif_offload() local
6071 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_op_update_vif_offload()
6075 arvif->vdev_id, ret); in ath11k_mac_op_update_vif_offload()
6087 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_op_update_vif_offload()
6091 arvif->vdev_id, ret); in ath11k_mac_op_update_vif_offload()
6100 struct ath11k_vif *arvif; in ath11k_mac_vif_ap_active_any() local
6106 list_for_each_entry(arvif, &ar->arvifs, list) { in ath11k_mac_vif_ap_active_any()
6107 if (arvif->is_up && arvif->vdev_type == WMI_VDEV_TYPE_AP) in ath11k_mac_vif_ap_active_any()
6219 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); in ath11k_mac_op_add_interface() local
6251 ath11k_debugfs_remove_interface(arvif); in ath11k_mac_op_add_interface()
6253 memset(arvif, 0, sizeof(*arvif)); in ath11k_mac_op_add_interface()
6255 arvif->ar = ar; in ath11k_mac_op_add_interface()
6256 arvif->vif = vif; in ath11k_mac_op_add_interface()
6258 INIT_LIST_HEAD(&arvif->list); in ath11k_mac_op_add_interface()
6259 INIT_DELAYED_WORK(&arvif->connection_loss_work, in ath11k_mac_op_add_interface()
6262 for (i = 0; i < ARRAY_SIZE(arvif->bitrate_mask.control); i++) { in ath11k_mac_op_add_interface()
6263 arvif->bitrate_mask.control[i].legacy = 0xffffffff; in ath11k_mac_op_add_interface()
6264 arvif->bitrate_mask.control[i].gi = NL80211_TXRATE_FORCE_SGI; in ath11k_mac_op_add_interface()
6265 memset(arvif->bitrate_mask.control[i].ht_mcs, 0xff, in ath11k_mac_op_add_interface()
6266 sizeof(arvif->bitrate_mask.control[i].ht_mcs)); in ath11k_mac_op_add_interface()
6267 memset(arvif->bitrate_mask.control[i].vht_mcs, 0xff, in ath11k_mac_op_add_interface()
6268 sizeof(arvif->bitrate_mask.control[i].vht_mcs)); in ath11k_mac_op_add_interface()
6269 memset(arvif->bitrate_mask.control[i].he_mcs, 0xff, in ath11k_mac_op_add_interface()
6270 sizeof(arvif->bitrate_mask.control[i].he_mcs)); in ath11k_mac_op_add_interface()
6275 arvif->vdev_id = bit; in ath11k_mac_op_add_interface()
6276 arvif->vdev_subtype = WMI_VDEV_SUBTYPE_NONE; in ath11k_mac_op_add_interface()
6281 arvif->vdev_type = WMI_VDEV_TYPE_STA; in ath11k_mac_op_add_interface()
6284 arvif->vdev_subtype = WMI_VDEV_SUBTYPE_MESH_11S; in ath11k_mac_op_add_interface()
6287 arvif->vdev_type = WMI_VDEV_TYPE_AP; in ath11k_mac_op_add_interface()
6290 arvif->vdev_type = WMI_VDEV_TYPE_MONITOR; in ath11k_mac_op_add_interface()
6299 arvif->vdev_id, arvif->vdev_type, arvif->vdev_subtype, in ath11k_mac_op_add_interface()
6302 vif->cab_queue = arvif->vdev_id % (ATH11K_HW_MAX_QUEUES - 1); in ath11k_mac_op_add_interface()
6306 ath11k_mac_setup_vdev_create_params(arvif, &vdev_param); in ath11k_mac_op_add_interface()
6311 arvif->vdev_id, ret); in ath11k_mac_op_add_interface()
6317 vif->addr, arvif->vdev_id); in ath11k_mac_op_add_interface()
6318 ar->allocated_vdev_map |= 1LL << arvif->vdev_id; in ath11k_mac_op_add_interface()
6319 ab->free_vdev_map &= ~(1LL << arvif->vdev_id); in ath11k_mac_op_add_interface()
6322 list_add(&arvif->list, &ar->arvifs); in ath11k_mac_op_add_interface()
6328 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_op_add_interface()
6332 arvif->vdev_id, ar->cfg_tx_chainmask, nss, ret); in ath11k_mac_op_add_interface()
6336 switch (arvif->vdev_type) { in ath11k_mac_op_add_interface()
6338 peer_param.vdev_id = arvif->vdev_id; in ath11k_mac_op_add_interface()
6341 ret = ath11k_peer_create(ar, arvif, NULL, &peer_param); in ath11k_mac_op_add_interface()
6344 arvif->vdev_id, ret); in ath11k_mac_op_add_interface()
6348 ret = ath11k_mac_set_kickout(arvif); in ath11k_mac_op_add_interface()
6351 arvif->vdev_id, ret); in ath11k_mac_op_add_interface()
6360 ret = ath11k_wmi_set_sta_ps_param(ar, arvif->vdev_id, in ath11k_mac_op_add_interface()
6364 arvif->vdev_id, ret); in ath11k_mac_op_add_interface()
6370 ret = ath11k_wmi_set_sta_ps_param(ar, arvif->vdev_id, in ath11k_mac_op_add_interface()
6374 arvif->vdev_id, ret); in ath11k_mac_op_add_interface()
6380 ret = ath11k_wmi_set_sta_ps_param(ar, arvif->vdev_id, in ath11k_mac_op_add_interface()
6384 arvif->vdev_id, ret); in ath11k_mac_op_add_interface()
6388 ret = ath11k_wmi_pdev_set_ps_mode(ar, arvif->vdev_id, in ath11k_mac_op_add_interface()
6392 arvif->vdev_id, ret); in ath11k_mac_op_add_interface()
6408 arvif->txpower = vif->bss_conf.txpower; in ath11k_mac_op_add_interface()
6415 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_op_add_interface()
6419 arvif->vdev_id, ret); in ath11k_mac_op_add_interface()
6422 ath11k_dp_vdev_tx_attach(ar, arvif); in ath11k_mac_op_add_interface()
6434 ath11k_debugfs_add_interface(arvif); in ath11k_mac_op_add_interface()
6441 if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { in ath11k_mac_op_add_interface()
6442 fbret = ath11k_peer_delete(ar, arvif->vdev_id, vif->addr); in ath11k_mac_op_add_interface()
6445 vif->addr, arvif->vdev_id, fbret); in ath11k_mac_op_add_interface()
6451 ath11k_wmi_vdev_delete(ar, arvif->vdev_id); in ath11k_mac_op_add_interface()
6453 ar->allocated_vdev_map &= ~(1LL << arvif->vdev_id); in ath11k_mac_op_add_interface()
6454 ab->free_vdev_map |= 1LL << arvif->vdev_id; in ath11k_mac_op_add_interface()
6456 list_del(&arvif->list); in ath11k_mac_op_add_interface()
6460 ath11k_debugfs_remove_interface(arvif); in ath11k_mac_op_add_interface()
6481 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); in ath11k_mac_op_remove_interface() local
6487 cancel_delayed_work_sync(&arvif->connection_loss_work); in ath11k_mac_op_remove_interface()
6492 arvif->vdev_id); in ath11k_mac_op_remove_interface()
6494 if (arvif->vdev_type == WMI_VDEV_TYPE_STA) in ath11k_mac_op_remove_interface()
6497 if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { in ath11k_mac_op_remove_interface()
6498 ret = ath11k_peer_delete(ar, arvif->vdev_id, vif->addr); in ath11k_mac_op_remove_interface()
6501 arvif->vdev_id, ret); in ath11k_mac_op_remove_interface()
6506 ret = ath11k_wmi_vdev_delete(ar, arvif->vdev_id); in ath11k_mac_op_remove_interface()
6509 arvif->vdev_id, ret); in ath11k_mac_op_remove_interface()
6520 ab->free_vdev_map |= 1LL << (arvif->vdev_id); in ath11k_mac_op_remove_interface()
6521 ar->allocated_vdev_map &= ~(1LL << arvif->vdev_id); in ath11k_mac_op_remove_interface()
6525 vif->addr, arvif->vdev_id); in ath11k_mac_op_remove_interface()
6527 if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) { in ath11k_mac_op_remove_interface()
6541 list_del(&arvif->list); in ath11k_mac_op_remove_interface()
6544 ath11k_peer_cleanup(ar, arvif->vdev_id); in ath11k_mac_op_remove_interface()
6559 ath11k_debugfs_remove_interface(arvif); in ath11k_mac_op_remove_interface()
6697 ath11k_mac_vdev_start_restart(struct ath11k_vif *arvif, in ath11k_mac_vdev_start_restart() argument
6701 struct ath11k *ar = arvif->ar; in ath11k_mac_vdev_start_restart()
6705 int he_support = arvif->vif->bss_conf.he_support; in ath11k_mac_vdev_start_restart()
6712 arg.vdev_id = arvif->vdev_id; in ath11k_mac_vdev_start_restart()
6713 arg.dtim_period = arvif->dtim_period; in ath11k_mac_vdev_start_restart()
6714 arg.bcn_intval = arvif->beacon_interval; in ath11k_mac_vdev_start_restart()
6730 if (arvif->vdev_type == WMI_VDEV_TYPE_AP) { in ath11k_mac_vdev_start_restart()
6731 arg.ssid = arvif->u.ap.ssid; in ath11k_mac_vdev_start_restart()
6732 arg.ssid_len = arvif->u.ap.ssid_len; in ath11k_mac_vdev_start_restart()
6733 arg.hidden_ssid = arvif->u.ap.hidden_ssid; in ath11k_mac_vdev_start_restart()
6748 ret = ath11k_set_he_mu_sounding_mode(ar, arvif); in ath11k_mac_vdev_start_restart()
6782 arvif->vif->addr, arvif->vdev_id); in ath11k_mac_vdev_start_restart()
6791 if (arvif->vdev_type == WMI_VDEV_TYPE_AP && in ath11k_mac_vdev_start_restart()
6800 ret = ath11k_mac_set_txbf_conf(arvif); in ath11k_mac_vdev_start_restart()
6803 arvif->vdev_id, ret); in ath11k_mac_vdev_start_restart()
6808 static int ath11k_mac_vdev_stop(struct ath11k_vif *arvif) in ath11k_mac_vdev_stop() argument
6810 struct ath11k *ar = arvif->ar; in ath11k_mac_vdev_stop()
6817 ret = ath11k_wmi_vdev_stop(ar, arvif->vdev_id); in ath11k_mac_vdev_stop()
6820 arvif->vdev_id, ret); in ath11k_mac_vdev_stop()
6827 arvif->vdev_id, ret); in ath11k_mac_vdev_stop()
6835 arvif->vif->addr, arvif->vdev_id); in ath11k_mac_vdev_stop()
6840 arvif->vdev_id); in ath11k_mac_vdev_stop()
6848 static int ath11k_mac_vdev_start(struct ath11k_vif *arvif, in ath11k_mac_vdev_start() argument
6851 return ath11k_mac_vdev_start_restart(arvif, ctx, false); in ath11k_mac_vdev_start()
6854 static int ath11k_mac_vdev_restart(struct ath11k_vif *arvif, in ath11k_mac_vdev_restart() argument
6857 return ath11k_mac_vdev_start_restart(arvif, ctx, true); in ath11k_mac_vdev_restart()
6905 struct ath11k_vif *arvif; in ath11k_mac_update_vif_chan() local
6919 arvif = (void *)vifs[i].vif->drv_priv; in ath11k_mac_update_vif_chan()
6921 if (WARN_ON(!arvif->is_started)) in ath11k_mac_update_vif_chan()
6931 if (arvif->is_up) { in ath11k_mac_update_vif_chan()
6932 ret = ath11k_mac_vdev_restart(arvif, vifs[i].new_ctx); in ath11k_mac_update_vif_chan()
6935 arvif->vdev_id, ret); in ath11k_mac_update_vif_chan()
6939 ret = ath11k_mac_vdev_stop(arvif); in ath11k_mac_update_vif_chan()
6942 arvif->vdev_id, ret); in ath11k_mac_update_vif_chan()
6946 ret = ath11k_mac_vdev_start(arvif, vifs[i].new_ctx); in ath11k_mac_update_vif_chan()
6949 arvif->vdev_id, ret); in ath11k_mac_update_vif_chan()
6954 ret = ath11k_mac_setup_bcn_tmpl(arvif); in ath11k_mac_update_vif_chan()
6959 ret = ath11k_wmi_vdev_up(arvif->ar, arvif->vdev_id, arvif->aid, in ath11k_mac_update_vif_chan()
6960 arvif->bssid); in ath11k_mac_update_vif_chan()
6963 arvif->vdev_id, ret); in ath11k_mac_update_vif_chan()
7050 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_start_vdev_delay() local
7053 if (WARN_ON(arvif->is_started)) in ath11k_start_vdev_delay()
7056 ret = ath11k_mac_vdev_start(arvif, &arvif->chanctx); in ath11k_start_vdev_delay()
7059 arvif->vdev_id, vif->addr, in ath11k_start_vdev_delay()
7060 arvif->chanctx.def.chan->center_freq, ret); in ath11k_start_vdev_delay()
7069 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, vdev_param, in ath11k_start_vdev_delay()
7077 if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) { in ath11k_start_vdev_delay()
7078 ret = ath11k_wmi_vdev_up(ar, arvif->vdev_id, 0, ar->mac_addr); in ath11k_start_vdev_delay()
7085 arvif->is_started = true; in ath11k_start_vdev_delay()
7099 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_mac_op_assign_vif_chanctx() local
7107 ctx, arvif->vdev_id); in ath11k_mac_op_assign_vif_chanctx()
7111 arvif->vdev_type != WMI_VDEV_TYPE_AP && in ath11k_mac_op_assign_vif_chanctx()
7112 arvif->vdev_type != WMI_VDEV_TYPE_MONITOR && in ath11k_mac_op_assign_vif_chanctx()
7113 !ath11k_peer_find_by_vdev_id(ab, arvif->vdev_id)) { in ath11k_mac_op_assign_vif_chanctx()
7114 memcpy(&arvif->chanctx, ctx, sizeof(*ctx)); in ath11k_mac_op_assign_vif_chanctx()
7119 if (WARN_ON(arvif->is_started)) { in ath11k_mac_op_assign_vif_chanctx()
7125 arvif->vdev_type != WMI_VDEV_TYPE_AP && in ath11k_mac_op_assign_vif_chanctx()
7126 arvif->vdev_type != WMI_VDEV_TYPE_MONITOR) { in ath11k_mac_op_assign_vif_chanctx()
7127 param.vdev_id = arvif->vdev_id; in ath11k_mac_op_assign_vif_chanctx()
7131 ret = ath11k_peer_create(ar, arvif, NULL, ¶m); in ath11k_mac_op_assign_vif_chanctx()
7139 if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) { in ath11k_mac_op_assign_vif_chanctx()
7147 arvif->is_started = true; in ath11k_mac_op_assign_vif_chanctx()
7151 ret = ath11k_mac_vdev_start(arvif, ctx); in ath11k_mac_op_assign_vif_chanctx()
7154 arvif->vdev_id, vif->addr, in ath11k_mac_op_assign_vif_chanctx()
7159 arvif->is_started = true; in ath11k_mac_op_assign_vif_chanctx()
7161 if (arvif->vdev_type != WMI_VDEV_TYPE_MONITOR && in ath11k_mac_op_assign_vif_chanctx()
7189 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_mac_op_unassign_vif_chanctx() local
7197 ctx, arvif->vdev_id); in ath11k_mac_op_unassign_vif_chanctx()
7199 WARN_ON(!arvif->is_started); in ath11k_mac_op_unassign_vif_chanctx()
7202 arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) { in ath11k_mac_op_unassign_vif_chanctx()
7207 ath11k_peer_delete(ar, arvif->vdev_id, ar->mac_addr); in ath11k_mac_op_unassign_vif_chanctx()
7210 if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) { in ath11k_mac_op_unassign_vif_chanctx()
7219 arvif->is_started = false; in ath11k_mac_op_unassign_vif_chanctx()
7224 ret = ath11k_mac_vdev_stop(arvif); in ath11k_mac_op_unassign_vif_chanctx()
7227 arvif->vdev_id, ret); in ath11k_mac_op_unassign_vif_chanctx()
7229 arvif->is_started = false; in ath11k_mac_op_unassign_vif_chanctx()
7232 arvif->vdev_type == WMI_VDEV_TYPE_STA) { in ath11k_mac_op_unassign_vif_chanctx()
7233 ret = ath11k_peer_delete(ar, arvif->vdev_id, arvif->bssid); in ath11k_mac_op_unassign_vif_chanctx()
7237 arvif->bssid, arvif->vdev_id, ret); in ath11k_mac_op_unassign_vif_chanctx()
7241 arvif->bssid, arvif->vdev_id); in ath11k_mac_op_unassign_vif_chanctx()
7245 arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) in ath11k_mac_op_unassign_vif_chanctx()
7246 ath11k_wmi_vdev_down(ar, arvif->vdev_id); in ath11k_mac_op_unassign_vif_chanctx()
7248 if (arvif->vdev_type != WMI_VDEV_TYPE_MONITOR && in ath11k_mac_op_unassign_vif_chanctx()
7258 if (arvif->vdev_type == WMI_VDEV_TYPE_STA) in ath11k_mac_op_unassign_vif_chanctx()
7259 ath11k_mac_11d_scan_start(ar, arvif->vdev_id); in ath11k_mac_op_unassign_vif_chanctx()
7287 struct ath11k_vif *arvif; in ath11k_set_vdev_param_to_all_vifs() local
7291 list_for_each_entry(arvif, &ar->arvifs, list) { in ath11k_set_vdev_param_to_all_vifs()
7293 param, arvif->vdev_id, value); in ath11k_set_vdev_param_to_all_vifs()
7295 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_set_vdev_param_to_all_vifs()
7299 param, arvif->vdev_id, ret); in ath11k_set_vdev_param_to_all_vifs()
7524 ath11k_mac_set_fixed_rate_gi_ltf(struct ath11k_vif *arvif, u8 he_gi, u8 he_ltf) in ath11k_mac_set_fixed_rate_gi_ltf() argument
7526 struct ath11k *ar = arvif->ar; in ath11k_mac_set_fixed_rate_gi_ltf()
7533 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_set_fixed_rate_gi_ltf()
7544 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_set_fixed_rate_gi_ltf()
7556 ath11k_mac_set_auto_rate_gi_ltf(struct ath11k_vif *arvif, u16 he_gi, u8 he_ltf) in ath11k_mac_set_auto_rate_gi_ltf() argument
7558 struct ath11k *ar = arvif->ar; in ath11k_mac_set_auto_rate_gi_ltf()
7597 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_set_auto_rate_gi_ltf()
7610 static int ath11k_mac_set_rate_params(struct ath11k_vif *arvif, in ath11k_mac_set_rate_params() argument
7614 struct ath11k *ar = arvif->ar; in ath11k_mac_set_rate_params()
7622 arvif->vdev_id, rate, nss, sgi, ldpc, he_gi, in ath11k_mac_set_rate_params()
7625 if (!arvif->vif->bss_conf.he_support) { in ath11k_mac_set_rate_params()
7627 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_set_rate_params()
7637 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_set_rate_params()
7646 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_set_rate_params()
7654 if (arvif->vif->bss_conf.he_support) { in ath11k_mac_set_rate_params()
7656 ret = ath11k_mac_set_fixed_rate_gi_ltf(arvif, he_gi, in ath11k_mac_set_rate_params()
7664 ret = ath11k_mac_set_auto_rate_gi_ltf(arvif, he_gi, in ath11k_mac_set_rate_params()
7674 ret = ath11k_wmi_vdev_set_param_cmd(ar, arvif->vdev_id, in ath11k_mac_set_rate_params()
7739 struct ath11k_vif *arvif = data; in ath11k_mac_set_bitrate_mask_iter() local
7741 struct ath11k *ar = arvif->ar; in ath11k_mac_set_bitrate_mask_iter()
7753 struct ath11k_vif *arvif = data; in ath11k_mac_disable_peer_fixed_rate() local
7754 struct ath11k *ar = arvif->ar; in ath11k_mac_disable_peer_fixed_rate()
7758 arvif->vdev_id, in ath11k_mac_disable_peer_fixed_rate()
7824 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_mac_op_set_bitrate_mask() local
7827 struct ath11k *ar = arvif->ar; in ath11k_mac_op_set_bitrate_mask()
7873 arvif->vdev_id, ret); in ath11k_mac_op_set_bitrate_mask()
7878 arvif); in ath11k_mac_op_set_bitrate_mask()
7884 arvif->bitrate_mask = *mask; in ath11k_mac_op_set_bitrate_mask()
7887 arvif); in ath11k_mac_op_set_bitrate_mask()
7949 arvif); in ath11k_mac_op_set_bitrate_mask()
7951 arvif->bitrate_mask = *mask; in ath11k_mac_op_set_bitrate_mask()
7954 arvif); in ath11k_mac_op_set_bitrate_mask()
7961 ret = ath11k_mac_set_rate_params(arvif, rate, nss, sgi, ldpc, he_gi, in ath11k_mac_op_set_bitrate_mask()
7965 arvif->vdev_id, ret); in ath11k_mac_op_set_bitrate_mask()
8108 struct ath11k *ar = arsta->arvif->ar; in ath11k_mac_put_chain_rssi()
8138 struct ath11k *ar = arsta->arvif->ar; in ath11k_mac_op_sta_statistics()
8167 arsta->arvif->vdev_type == WMI_VDEV_TYPE_STA && in ath11k_mac_op_sta_statistics()
8176 arsta->arvif->vdev_type == WMI_VDEV_TYPE_STA && in ath11k_mac_op_sta_statistics()
8224 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); in ath11k_mac_op_ipv6_changed() local
8232 offload = &arvif->arp_ns_offload; in ath11k_mac_op_ipv6_changed()
8298 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif); in ath11k_mac_op_set_rekey_data() local
8299 struct ath11k_rekey_data *rekey_data = &arvif->rekey_data; in ath11k_mac_op_set_rekey_data()
8302 arvif->vdev_id); in ath11k_mac_op_set_rekey_data()
8314 arvif->rekey_data.enable_offload = true; in ath11k_mac_op_set_rekey_data()
8414 struct ath11k_vif *arvif = (void *)vif->drv_priv; in ath11k_mac_op_remain_on_channel() local
8429 ar->scan.vdev_id = arvif->vdev_id; in ath11k_mac_op_remain_on_channel()
8457 arg.vdev_id = arvif->vdev_id; in ath11k_mac_op_remain_on_channel()
9287 int ath11k_mac_vif_set_keepalive(struct ath11k_vif *arvif, in ath11k_mac_vif_set_keepalive() argument
9291 struct ath11k *ar = arvif->ar; in ath11k_mac_vif_set_keepalive()
9297 if (arvif->vdev_type != WMI_VDEV_TYPE_STA) in ath11k_mac_vif_set_keepalive()
9303 arg.vdev_id = arvif->vdev_id; in ath11k_mac_vif_set_keepalive()
9311 arvif->vdev_id, ret); in ath11k_mac_vif_set_keepalive()