Lines Matching refs:vif

504 static int ath11k_mac_vif_chan(struct ieee80211_vif *vif,
510 conf = rcu_dereference(vif->bss_conf.chanctx_conf);
564 struct ieee80211_vif *vif)
567 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
686 struct ieee80211_vif *vif = arvif->vif;
692 if (WARN_ON(ath11k_mac_vif_chan(vif, &def)))
1219 struct ieee80211_vif *vif = arvif->vif;
1229 if (arvif->vif->type != NL80211_IFTYPE_STATION)
1241 timeout = ieee80211_tu_to_usec(vif->bss_conf.beacon_int) / 1000;
1408 if (profile[2] == arvif->vif->bss_conf.bssid_index) {
1541 tx_arvif = ath11k_vif_to_arvif(arvif->vif->mbssid_tx_vif);
1544 tx_arvif->vif, 0);
1594 struct ieee80211_vif *vif = arvif->vif;
1599 if (vif->mbssid_tx_vif) {
1600 tx_arvif = ath11k_vif_to_arvif(vif->mbssid_tx_vif);
1605 vif = tx_arvif->vif;
1609 bcn = ieee80211_beacon_get_template(hw, vif, &offs, 0);
1634 struct ieee80211_vif *vif = arvif->vif;
1642 if (vif->mbssid_tx_vif &&
1643 arvif != ath11k_vif_to_arvif(vif->mbssid_tx_vif) && arvif->is_up)
1646 if (vif->bss_conf.ema_ap && vif->mbssid_tx_vif)
1654 struct ieee80211_vif *vif = arvif->vif;
1656 if (!vif->bss_conf.color_change_active && !arvif->bcca_zero_sent)
1659 if (vif->bss_conf.color_change_active &&
1660 ieee80211_beacon_cntdwn_is_complete(vif, 0)) {
1662 ieee80211_color_change_finish(vif, 0);
1668 if (vif->bss_conf.color_change_active)
1669 ieee80211_beacon_update_cntdwn(vif, 0);
1706 if (arvif->vif->mbssid_tx_vif)
1707 tx_arvif = ath11k_vif_to_arvif(arvif->vif->mbssid_tx_vif);
1726 struct ieee80211_vif *vif)
1730 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
1732 if (vif->type != NL80211_IFTYPE_STATION)
1735 if (!ether_addr_equal(mgmt->bssid, vif->bss_conf.bssid))
1750 struct ieee80211_vif *vif)
1753 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
1763 ieee80211_beacon_loss(vif);
1786 struct ieee80211_vif *vif = arvif->vif;
1791 ieee80211_connection_loss(vif);
1795 struct ieee80211_vif *vif,
1799 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
1804 if (vif->type == NL80211_IFTYPE_STATION)
1805 aid = vif->cfg.aid;
1816 arg->peer_caps = vif->bss_conf.assoc_capability;
1820 struct ieee80211_vif *vif,
1824 struct ieee80211_bss_conf *info = &vif->bss_conf;
1827 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
1833 if (WARN_ON(ath11k_mac_vif_chan(vif, &def)))
1881 struct ieee80211_vif *vif,
1885 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
1897 if (WARN_ON(ath11k_mac_vif_chan(vif, &def)))
1943 struct ieee80211_vif *vif,
1948 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
1958 if (WARN_ON(ath11k_mac_vif_chan(vif, &def)))
2140 struct ieee80211_vif *vif,
2145 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
2155 if (WARN_ON(ath11k_mac_vif_chan(vif, &def)))
2338 struct ieee80211_vif *vif,
2342 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
2356 if (WARN_ON(ath11k_mac_vif_chan(vif, &def)))
2418 arg->peer_he_ops = vif->bss_conf.he_oper.params;
2583 struct ieee80211_vif *vif,
2592 if (WARN_ON(ath11k_mac_vif_chan(vif, &def)))
2665 struct ieee80211_vif *vif,
2669 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
2828 struct ieee80211_vif *vif,
2832 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
2840 if (WARN_ON(ath11k_mac_vif_chan(vif, &def)))
2907 struct ieee80211_vif *vif,
2923 ath11k_peer_assoc_h_basic(ar, vif, sta, arg);
2924 ath11k_peer_assoc_h_crypto(ar, vif, sta, arg);
2925 ath11k_peer_assoc_h_rates(ar, vif, sta, arg);
2926 ath11k_peer_assoc_h_phymode(ar, vif, sta, arg);
2927 ath11k_peer_assoc_h_ht(ar, vif, sta, arg);
2928 ath11k_peer_assoc_h_vht(ar, vif, sta, arg);
2929 ath11k_peer_assoc_h_he(ar, vif, sta, arg);
2930 ath11k_peer_assoc_h_he_6ghz(ar, vif, sta, arg);
2931 ath11k_peer_assoc_h_qos(ar, vif, sta, arg);
2970 if (!arvif->vif->bss_conf.he_support)
2975 if (arvif->vif->bss_conf.he_su_beamformer) {
2977 if (arvif->vif->bss_conf.he_mu_beamformer &&
2982 if (arvif->vif->type != NL80211_IFTYPE_MESH_POINT) {
2986 if (arvif->vif->bss_conf.he_full_ul_mumimo)
2989 if (arvif->vif->bss_conf.he_su_beamformee)
3015 struct ieee80211_vif *vif,
3018 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
3026 if (!vif->bss_conf.he_support)
3029 if (vif->type != NL80211_IFTYPE_STATION)
3032 if (WARN_ON(ath11k_mac_vif_chan(vif, &def)))
3036 cap_band = &ar->mac.iftype[NL80211_BAND_2GHZ][vif->type].he_cap;
3038 cap_band = &ar->mac.iftype[NL80211_BAND_5GHZ][vif->type].he_cap;
3049 if (vif->type != NL80211_IFTYPE_MESH_POINT) {
3076 struct ieee80211_vif *vif,
3080 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
3095 ap_sta = ieee80211_find_sta(vif, bss_conf->bssid);
3106 ath11k_peer_assoc_prepare(ar, vif, ap_sta, &peer_arg, false);
3110 if (!ath11k_mac_vif_recalc_sta_he_txbf(ar, vif, &he_cap)) {
3142 arvif->aid = vif->cfg.aid;
3158 arvif->vdev_id, bss_conf->bssid, vif->cfg.aid);
3194 struct ieee80211_vif *vif)
3197 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
3243 struct ieee80211_vif *vif,
3246 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
3257 basic_rate_idx = ffs(vif->bss_conf.basic_rates) - 1;
3296 tmpl = ieee80211_get_fils_discovery_tmpl(ar->hw, arvif->vif);
3305 arvif->vif);
3495 struct ieee80211_vif *vif,
3500 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
3557 if (vif->bss_conf.he_support) {
3590 vif->type == NL80211_IFTYPE_AP) {
3591 arvif->u.ap.ssid_len = vif->cfg.ssid_len;
3592 if (vif->cfg.ssid_len)
3593 memcpy(arvif->u.ap.ssid, vif->cfg.ssid,
3594 vif->cfg.ssid_len);
3606 if (arvif->is_up && vif->bss_conf.he_support &&
3607 vif->bss_conf.he_oper.params) {
3609 param_value = vif->bss_conf.he_oper.params;
3684 if (vif->cfg.assoc)
3685 ath11k_bss_assoc(hw, vif, info);
3687 ath11k_bss_disassoc(hw, vif);
3699 arvif->ps = vif->cfg.ps;
3708 !ath11k_mac_vif_chan(arvif->vif, &def)) {
3710 mcast_rate = vif->bss_conf.mcast_rate[band];
3715 rateidx = ffs(vif->bss_conf.basic_rates) - 1;
3752 !ath11k_mac_vif_chan(arvif->vif, &def))
3753 ath11k_recalculate_mgmt_rate(ar, vif, &def);
3771 if (vif->type == NL80211_IFTYPE_AP) {
3798 } else if (vif->type == NL80211_IFTYPE_STATION) {
3817 (vif->type == NL80211_IFTYPE_AP ||
3818 vif->type == NL80211_IFTYPE_MESH_POINT)) {
3833 ipv4_cnt = min(vif->cfg.arp_addr_cnt, ATH11K_IPV4_MAX_COUNT);
3835 vif->cfg.arp_addr_list,
3837 memcpy(arvif->arp_ns_offload.mac_addr, vif->addr, ETH_ALEN);
3840 ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "arp_addr_cnt %d vif->addr %pM, offload_addr %pI4\n",
3841 vif->cfg.arp_addr_cnt,
3842 vif->addr, arvif->arp_ns_offload.ipv4_addr);
4022 struct ieee80211_vif *vif,
4026 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
4190 struct ieee80211_vif *vif)
4312 struct ieee80211_vif *vif, struct ieee80211_sta *sta,
4317 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
4342 peer_addr = vif->bss_conf.bssid;
4344 peer_addr = vif->addr;
4632 struct ieee80211_vif *vif,
4636 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
4646 if (WARN_ON(ath11k_mac_vif_chan(vif, &def)))
4652 ath11k_peer_assoc_prepare(ar, vif, sta, &peer_arg, reassoc);
4729 struct ieee80211_vif *vif,
4732 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
4783 if (WARN_ON(ath11k_mac_vif_chan(arvif->vif, &def)))
4810 ath11k_peer_assoc_h_phymode(ar, arvif->vif, sta, &peer_arg);
4930 ath11k_peer_assoc_prepare(ar, arvif->vif, sta,
5034 struct ieee80211_vif *vif,
5038 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
5069 struct ieee80211_vif *vif,
5082 struct ieee80211_vif *vif,
5088 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
5152 static int ath11k_conf_tx_uapsd(struct ath11k *ar, struct ieee80211_vif *vif,
5155 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
5210 struct ieee80211_vif *vif,
5215 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
5253 ret = ath11k_conf_tx_uapsd(ar, vif, ac, params->uapsd);
5891 struct ieee80211_vif *vif = ctx;
5895 if (skb_cb->vif == vif)
5980 if (!skb_cb->vif) {
5981 ath11k_warn(ar->ab, "no vif found for mgmt frame\n");
5986 arvif = ath11k_vif_to_arvif(skb_cb->vif);
6049 struct ieee80211_vif *vif = info->control.vif;
6050 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
6059 skb_cb->vif = vif;
6330 tx_vif = arvif->vif->mbssid_tx_vif;
6338 if (arvif->vif->bss_conf.nontransmitted) {
6350 if (arvif->vif->bss_conf.ema_ap)
6396 struct ieee80211_vif *vif)
6400 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
6406 (vif->type != NL80211_IFTYPE_STATION &&
6407 vif->type != NL80211_IFTYPE_AP))
6408 vif->offload_flags &= ~(IEEE80211_OFFLOAD_ENCAP_ENABLED |
6411 if (vif->offload_flags & IEEE80211_OFFLOAD_ENCAP_ENABLED)
6423 vif->offload_flags &= ~IEEE80211_OFFLOAD_ENCAP_ENABLED;
6427 if (vif->offload_flags & IEEE80211_OFFLOAD_DECAP_ENABLED)
6439 vif->offload_flags &= ~IEEE80211_OFFLOAD_DECAP_ENABLED;
6564 struct ieee80211_vif *vif = arvif->vif;
6590 vif->addr, arvif->vdev_id);
6596 struct ieee80211_vif *vif)
6600 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
6609 vif->driver_flags |= IEEE80211_VIF_SUPPORTS_UAPSD;
6613 if (vif->type == NL80211_IFTYPE_AP &&
6630 arvif->vif = vif;
6652 switch (vif->type) {
6656 if (vif->p2p)
6664 if (vif->p2p)
6685 vif->cab_queue = arvif->vdev_id % (ATH11K_HW_MAX_QUEUES - 1);
6686 for (i = 0; i < ARRAY_SIZE(vif->hw_queue); i++)
6687 vif->hw_queue[i] = i % (ATH11K_HW_MAX_QUEUES - 1);
6696 ret = ath11k_wmi_vdev_create(ar, vif->addr, &vdev_param);
6705 vif->addr, arvif->vdev_id);
6713 ath11k_mac_op_update_vif_offload(hw, vif);
6727 peer_param.peer_addr = vif->addr;
6796 arvif->txpower = vif->bss_conf.txpower;
6812 if (vif->type != NL80211_IFTYPE_MONITOR &&
6834 fbret = ath11k_peer_delete(ar, arvif->vdev_id, vif->addr);
6837 vif->addr, arvif->vdev_id, fbret);
6856 struct ieee80211_vif *vif = ctx;
6859 if (skb_cb->vif == vif)
6860 skb_cb->vif = NULL;
6866 struct ieee80211_vif *vif)
6869 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
6890 ret = ath11k_peer_delete(ar, arvif->vdev_id, vif->addr);
6923 ath11k_mac_vif_txmgmt_idr_remove, vif);
6928 ath11k_mac_vif_unref, vif);
6992 struct ieee80211_vif *vif,
7158 ath11k_mac_fill_reg_tpc_info(ar, arvif->vif, &arvif->chanctx);
7167 arvif->vif->addr, arvif->vdev_id);
7221 arvif->vif->addr, arvif->vdev_id);
7255 struct ieee80211_vif *vif)
7259 if (rcu_access_pointer(vif->bss_conf.chanctx_conf) != arg->ctx)
7267 struct ieee80211_vif *vif)
7272 ctx = rcu_access_pointer(vif->bss_conf.chanctx_conf);
7279 arg->vifs[arg->next_vif].vif = vif;
7306 arvif = ath11k_vif_to_arvif(vifs[i].vif);
7346 mbssid_tx_vif = arvif->vif->mbssid_tx_vif;
7353 arvif->vif->bss_conf.bssid_index,
7354 1 << arvif->vif->bss_conf.bssid_indicator);
7367 ath11k_warn(ar->ab, "failed to stop monitor during vif channel update: %d",
7374 ath11k_warn(ar->ab, "failed to start monitor during vif channel update: %d",
7440 struct ieee80211_vif *vif)
7444 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
7453 arvif->vdev_id, vif->addr,
7487 struct ieee80211_vif *vif)
7491 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
7681 struct ieee80211_vif *vif,
7685 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
7686 struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
7851 ath11k_reg_ap_pwr_convert(vif->bss_conf.power_type);
7855 struct ieee80211_vif *vif,
7859 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
7860 struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
7983 struct ieee80211_vif *vif,
7989 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
8004 power_type = vif->bss_conf.power_type;
8015 ath11k_mac_parse_tx_pwr_env(ar, vif, ctx);
8036 ath11k_warn(ar->ab, "failed to start monitor during vif channel context assignment: %d",
8049 arvif->vdev_id, vif->addr,
8061 ath11k_warn(ar->ab, "failed to start monitor during vif channel context assignment: %d",
8079 struct ieee80211_vif *vif,
8085 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
8107 ath11k_warn(ar->ab, "failed to stop monitor during vif channel context unassignment: %d",
8137 ath11k_warn(ar->ab, "failed to stop monitor during vif channel context unassignment: %d",
8248 static void ath11k_mac_op_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
8334 he_cap = ieee80211_get_he_iftype_cap_vif(sband, arvif->vif);
8500 if (!arvif->vif->bss_conf.he_support) {
8529 if (arvif->vif->bss_conf.he_support) {
8696 struct ieee80211_vif *vif,
8699 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
8718 if (ath11k_mac_vif_chan(vif, &def))
8892 ieee80211_hw_restart_disconnect(arvif->vif);
9013 struct ieee80211_vif *vif,
9099 struct ieee80211_vif *vif,
9104 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
9120 memcpy(offload->mac_addr, vif->addr, ETH_ALEN);
9176 struct ieee80211_vif *vif,
9180 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
9270 struct ieee80211_vif *vif)
9290 struct ieee80211_vif *vif,
9296 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
9422 struct ieee80211_vif *vif,
9479 /* We didn't get txpower from FW. Hence, relying on vif->bss_conf.txpower */
9480 *dbm = vif->bss_conf.txpower;
9487 struct ieee80211_vif *vif,
9491 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
9533 if (ieee80211_vif_is_mesh(vif)) {
9556 ret = ath11k_mac_start_vdev_delay(ar->hw, vif);
9581 struct ieee80211_vif *vif,
9585 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
9592 ret = ath11k_mac_stop_vdev_early(ar->hw, vif);
9621 struct ieee80211_vif *vif,
9627 struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
9649 ret = ath11k_mac_station_add(ar, vif, sta);
9655 ret = ath11k_mac_station_remove(ar, vif, sta);
9665 vif->addr, arvif->vdev_id);
9676 (vif->type == NL80211_IFTYPE_AP ||
9677 vif->type == NL80211_IFTYPE_MESH_POINT ||
9678 vif->type == NL80211_IFTYPE_ADHOC)) {
9679 ret = ath11k_station_assoc(ar, vif, sta, false);
9699 if (vif->type == NL80211_IFTYPE_STATION && arvif->is_up) {
9719 (vif->type == NL80211_IFTYPE_AP ||
9720 vif->type == NL80211_IFTYPE_MESH_POINT ||
9721 vif->type == NL80211_IFTYPE_ADHOC)) {
9722 ret = ath11k_station_disassoc(ar, vif, sta);