Lines Matching refs:sta

727 			      struct ieee80211_sta *sta,
767 peer->sta = sta;
930 struct ieee80211_sta *sta,
942 ether_addr_copy(arg.addr, sta->addr);
944 cap.peer_max_sp = sta->max_sp;
945 cap.peer_uapsd_queues = sta->uapsd_queues;
948 !sta->tdls_initiator)
1861 if (arvif->u.sta.uapsd)
1886 if (arvif->u.sta.uapsd)
2157 struct ieee80211_sta *sta,
2168 aid = sta->aid;
2170 ether_addr_copy(arg->addr, sta->addr);
2181 struct ieee80211_sta *sta,
2226 if (sta->mfp &&
2235 struct ieee80211_sta *sta,
2255 ratemask = sta->deflink.supp_rates[band];
2297 struct ieee80211_sta *sta,
2300 const struct ieee80211_sta_ht_cap *ht_cap = &sta->deflink.ht_cap;
2339 if (sta->deflink.bandwidth >= IEEE80211_STA_RX_BW_40) {
2392 arg->peer_num_spatial_streams = min(sta->deflink.rx_nss,
2404 struct ieee80211_sta *sta)
2412 if (sta->wme && sta->uapsd_queues) {
2414 sta->uapsd_queues, sta->max_sp);
2416 if (sta->uapsd_queues & IEEE80211_WMM_IE_STA_QOSINFO_AC_VO)
2419 if (sta->uapsd_queues & IEEE80211_WMM_IE_STA_QOSINFO_AC_VI)
2422 if (sta->uapsd_queues & IEEE80211_WMM_IE_STA_QOSINFO_AC_BK)
2425 if (sta->uapsd_queues & IEEE80211_WMM_IE_STA_QOSINFO_AC_BE)
2429 if (sta->max_sp < MAX_WMI_AP_PS_PEER_PARAM_MAX_SP)
2430 max_sp = sta->max_sp;
2433 sta->addr,
2443 sta->addr,
2454 * sta->listen_interval - mac80211 patch required.
2457 ret = ath10k_wmi_set_ap_ps_param(ar, arvif->vdev_id, sta->addr,
2547 struct ieee80211_sta *sta,
2550 const struct ieee80211_sta_vht_cap *vht_cap = &sta->deflink.vht_cap;
2592 if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_80)
2595 if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160)
2609 arg->peer_num_spatial_streams = min(sta->deflink.rx_nss, max_nss);
2649 sta->addr, arg->peer_max_mpdu,
2655 struct ieee80211_sta *sta,
2662 if (sta->wme)
2665 if (sta->wme && sta->uapsd_queues) {
2671 if (sta->wme)
2675 if (sta->wme)
2683 sta->addr, !!(arg->peer_flags &
2687 static bool ath10k_mac_sta_has_ofdm_only(struct ieee80211_sta *sta)
2689 return sta->deflink.supp_rates[NL80211_BAND_2GHZ] >>
2694 struct ieee80211_sta *sta)
2696 struct ieee80211_sta_vht_cap *vht_cap = &sta->deflink.vht_cap;
2698 if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_160) {
2710 if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_80)
2713 if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
2716 if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_20)
2724 struct ieee80211_sta *sta,
2743 if (sta->deflink.vht_cap.vht_supported &&
2745 if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
2749 } else if (sta->deflink.ht_cap.ht_supported &&
2751 if (sta->deflink.bandwidth == IEEE80211_STA_RX_BW_40)
2755 } else if (ath10k_mac_sta_has_ofdm_only(sta)) {
2766 if (sta->deflink.vht_cap.vht_supported &&
2768 phymode = ath10k_mac_get_phymode_vht(ar, sta);
2769 } else if (sta->deflink.ht_cap.ht_supported &&
2771 if (sta->deflink.bandwidth >= IEEE80211_STA_RX_BW_40)
2785 sta->addr, ath10k_wmi_phymode_str(phymode));
2793 struct ieee80211_sta *sta,
2800 ath10k_peer_assoc_h_basic(ar, vif, sta, arg);
2801 ath10k_peer_assoc_h_crypto(ar, vif, sta, arg);
2802 ath10k_peer_assoc_h_rates(ar, vif, sta, arg);
2803 ath10k_peer_assoc_h_ht(ar, vif, sta, arg);
2804 ath10k_peer_assoc_h_phymode(ar, vif, sta, arg);
2805 ath10k_peer_assoc_h_vht(ar, vif, sta, arg);
2806 ath10k_peer_assoc_h_qos(ar, vif, sta, arg);
3193 struct ieee80211_sta *sta,
3197 struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
3240 ether_addr_copy(arg.peer_macaddr.addr, sta->addr);
3244 ath10k_warn(ar, "failed to set per tid retry/aggr config for sta %pM: %d\n",
3245 sta->addr, ret);
3257 struct ieee80211_sta *sta,
3266 ret = ath10k_peer_assoc_prepare(ar, vif, sta, &peer_arg);
3269 sta->addr, arvif->vdev_id, ret);
3276 sta->addr, arvif->vdev_id, ret);
3284 ret = ath10k_setup_peer_smps(ar, arvif, sta->addr,
3285 &sta->deflink.ht_cap);
3292 ret = ath10k_peer_assoc_qos_ap(ar, arvif, sta);
3295 sta->addr, arvif->vdev_id, ret);
3299 if (!sta->wme) {
3310 if ((arvif->def_wep_key_idx != -1) && (!sta->tdls)) {
3311 ret = ath10k_install_peer_wep_keys(arvif, sta->addr);
3323 return ath10k_new_peer_tid_config(ar, sta, arvif);
3328 struct ieee80211_sta *sta)
3335 if (!sta->wme) {
3345 ret = ath10k_clear_peer_keys(arvif, sta->addr);
3710 struct ieee80211_sta *sta,
3756 if (ieee80211_is_data_present(fc) && sta && sta->tdls)
3866 struct ieee80211_sta *sta,
3900 if (sta) {
3901 arsta = (struct ath10k_sta *)sta->drv_priv;
3928 if (sta) {
3929 arsta = (struct ath10k_sta *)sta->drv_priv;
4105 struct ieee80211_sta *sta;
4157 /* It's safe to access vif and sta - conf_mutex guarantees that
4164 sta = ieee80211_find_sta(vif, peer_addr);
4167 sta = NULL;
4170 txmode = ath10k_mac_tx_h_get_txmode(ar, vif, sta, skb);
4296 if (peer->sta)
4297 return peer->sta->txq[tid];
4339 if (!txq || !txq->sta)
4346 arsta = (struct ath10k_sta *)txq->sta->drv_priv;
4376 struct ieee80211_sta *sta = txq->sta;
4403 ath10k_mac_tx_h_fill_cb(ar, vif, txq, sta, skb, airtime);
4406 txmode = ath10k_mac_tx_h_get_txmode(ar, vif, sta, skb);
4664 struct ieee80211_sta *sta = control->sta;
4674 ath10k_mac_tx_h_fill_cb(ar, vif, txq, sta, skb, airtime);
4676 txmode = ath10k_mac_tx_h_get_txmode(ar, vif, sta, skb);
6341 struct ieee80211_sta *sta)
6344 struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
6347 if (sta->tdls && sta_vif == iter_data->curr_vif)
6524 struct ieee80211_vif *vif, struct ieee80211_sta *sta,
6554 if (sta) {
6555 arsta = (struct ath10k_sta *)sta->drv_priv;
6556 peer_addr = sta->addr;
6632 if (is_wep && !sta && vif->type == NL80211_IFTYPE_STATION) {
6666 if (sta && sta->tdls)
6667 ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr,
6669 else if (sta && cmd == SET_KEY && (key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
6717 struct ieee80211_sta *sta;
6726 sta = container_of((void *)arsta, struct ieee80211_sta, drv_priv);
6758 ath10k_dbg(ar, ATH10K_DBG_STA, "mac update sta %pM peer bw %d phymode %d\n",
6759 sta->addr, bw, mode);
6761 err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr,
6765 sta->addr, mode, err);
6769 err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr,
6773 sta->addr, bw, err);
6777 ath10k_dbg(ar, ATH10K_DBG_STA, "mac update sta %pM nss %d\n",
6778 sta->addr, nss);
6780 err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr,
6784 sta->addr, nss, err);
6788 ath10k_dbg(ar, ATH10K_DBG_STA, "mac update sta %pM smps %d\n",
6789 sta->addr, smps);
6791 err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr,
6795 sta->addr, smps, err);
6799 ath10k_dbg(ar, ATH10K_DBG_STA, "mac update sta %pM supp rates\n",
6800 sta->addr);
6802 err = ath10k_station_assoc(ar, arvif->vif, sta, true);
6805 sta->addr);
6813 struct ieee80211_sta *sta)
6819 if (arvif->vdev_type == WMI_VDEV_TYPE_STA && !sta->tdls)
6831 struct ieee80211_sta *sta)
6837 if (arvif->vdev_type == WMI_VDEV_TYPE_STA && !sta->tdls)
6845 struct ieee80211_sta *sta)
6852 if (sta->deflink.txpwr.type == NL80211_TX_POWER_AUTOMATIC) {
6855 txpwr = sta->deflink.txpwr.power;
6865 ret = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr,
6972 struct ieee80211_sta *sta,
6975 struct ieee80211_sta_ht_cap *ht_cap = &sta->deflink.ht_cap;
6976 struct ieee80211_sta_vht_cap *vht_cap = &sta->deflink.vht_cap;
6978 if (nss > sta->deflink.rx_nss) {
6980 nss, sta->deflink.rx_nss);
6986 ath10k_warn(ar, "Invalid VHT rate for sta %pM\n",
6987 sta->addr);
6992 ath10k_warn(ar, "Invalid HT rate for sta %pM\n",
6993 sta->addr);
7007 struct ieee80211_sta *sta,
7043 if (sta && ath10k_mac_validate_rate_mask(ar, sta, *rate_ctrl_flag, nss))
7058 static int ath10k_mac_set_tid_config(struct ath10k *ar, struct ieee80211_sta *sta,
7066 if (sta) {
7067 if (!sta->wme)
7070 arsta = (struct ath10k_sta *)sta->drv_priv;
7103 ether_addr_copy(arg->peer_macaddr.addr, sta->addr);
7193 struct ieee80211_sta *sta,
7241 ret = ath10k_mac_tid_bitrate_config(ar, vif, sta,
7261 ret = ath10k_mac_set_tid_config(ar, sta, vif, changed, arg);
7271 struct ieee80211_sta *sta,
7275 struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
7294 ether_addr_copy(arg.peer_macaddr.addr, sta->addr);
7325 struct ieee80211_sta *sta;
7335 sta = container_of((void *)arsta, struct ieee80211_sta, drv_priv);
7342 ret = ath10k_mac_reset_tid_config(ar, sta, arvif,
7347 ether_addr_copy(arg.peer_macaddr.addr, sta->addr);
7389 ret = ath10k_mac_validate_rate_mask(ar, sta,
7428 ath10k_warn(ar, "failed to set per tid config for sta %pM: %d\n",
7429 sta->addr, ret);
7444 struct ieee80211_sta *sta)
7446 struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
7450 if (sta_vif != iter_data->curr_vif || !sta->wme)
7458 struct ieee80211_sta *sta,
7464 struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
7477 for (i = 0; i < ARRAY_SIZE(sta->txq); i++)
7478 ath10k_mac_txq_init(sta->txq[i]);
7499 "mac vdev %d peer create %pM (new sta) sta %d / %d peer %d / %d\n",
7500 arvif->vdev_id, sta->addr,
7506 if (sta->tdls) {
7517 ret = ath10k_mac_inc_num_stations(arvif, sta);
7528 ath10k_mac_dec_num_stations(arvif, sta);
7534 ret = ath10k_peer_create(ar, vif, sta, arvif->vdev_id,
7535 sta->addr, peer_type);
7537 ath10k_warn(ar, "failed to add peer %pM for vdev %d when adding a new sta: %i\n",
7538 sta->addr, arvif->vdev_id, ret);
7539 ath10k_mac_dec_num_stations(arvif, sta);
7546 peer = ath10k_peer_find(ar, arvif->vdev_id, sta->addr);
7551 ath10k_peer_delete(ar, arvif->vdev_id, sta->addr);
7552 ath10k_mac_dec_num_stations(arvif, sta);
7563 if (!sta->tdls)
7572 sta->addr);
7573 ath10k_mac_dec_num_stations(arvif, sta);
7578 ret = ath10k_mac_tdls_peer_update(ar, arvif->vdev_id, sta,
7582 "failed to update tdls peer %pM for vdev %d when adding a new sta: %i\n",
7583 sta->addr, arvif->vdev_id, ret);
7584 ath10k_peer_delete(ar, arvif->vdev_id, sta->addr);
7585 ath10k_mac_dec_num_stations(arvif, sta);
7599 "mac vdev %d peer delete %pM sta %pK (sta gone)\n",
7600 arvif->vdev_id, sta->addr, sta);
7602 if (sta->tdls) {
7604 sta,
7608 sta->addr,
7612 ret = ath10k_peer_delete(ar, arvif->vdev_id, sta->addr);
7615 sta->addr, arvif->vdev_id, ret);
7617 ath10k_mac_dec_num_stations(arvif, sta);
7625 if (peer->sta == sta) {
7626 ath10k_warn(ar, "found sta peer %pM (ptr %pK id %d) entry on vdev %i after it was supposedly removed\n",
7627 sta->addr, peer, i, arvif->vdev_id);
7628 peer->sta = NULL;
7643 for (i = 0; i < ARRAY_SIZE(sta->txq); i++)
7644 ath10k_mac_txq_unref(ar, sta->txq[i]);
7646 if (!sta->tdls)
7667 ath10k_dbg(ar, ATH10K_DBG_STA, "mac sta %pM associated\n",
7668 sta->addr);
7670 ret = ath10k_station_assoc(ar, vif, sta, false);
7673 sta->addr, arvif->vdev_id, ret);
7676 sta->tdls) {
7680 ath10k_dbg(ar, ATH10K_DBG_STA, "mac tdls sta %pM authorized\n",
7681 sta->addr);
7683 ret = ath10k_station_assoc(ar, vif, sta, false);
7686 sta->addr, arvif->vdev_id, ret);
7690 ret = ath10k_mac_tdls_peer_update(ar, arvif->vdev_id, sta,
7694 sta->addr, arvif->vdev_id, ret);
7703 ath10k_dbg(ar, ATH10K_DBG_STA, "mac sta %pM disassociated\n",
7704 sta->addr);
7706 ret = ath10k_station_disassoc(ar, vif, sta);
7709 sta->addr, arvif->vdev_id, ret);
7758 arvif->u.sta.uapsd |= value;
7760 arvif->u.sta.uapsd &= ~value;
7764 arvif->u.sta.uapsd);
7770 if (arvif->u.sta.uapsd)
7886 ath10k_warn(ar, "failed to set sta uapsd: %d\n", ret);
8339 struct ieee80211_sta *sta)
8345 if (!sta->deflink.vht_cap.vht_supported || arvif->vht_num_rates != 1)
8348 err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr,
8352 sta->addr, err);
8358 struct ieee80211_sta *sta)
8361 struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
8367 if (ath10k_mac_set_vht_bitrate_mask_fixup(ar, arvif, sta))
8378 struct ieee80211_sta *sta)
8381 struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
8386 if (arsta->arvif != arvif || !sta->deflink.vht_cap.vht_supported)
8389 err = ath10k_wmi_peer_set_param(ar, arvif->vdev_id, sta->addr,
8394 sta->addr, err);
8509 struct ieee80211_sta *sta,
8513 struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
8520 peer = ath10k_peer_find(ar, arvif->vdev_id, sta->addr);
8523 ath10k_warn(ar, "mac sta rc update failed to find peer %pM on vdev %i\n",
8524 sta->addr, arvif->vdev_id);
8529 "mac sta rc update for %pM changed %08x bw %d nss %d smps %d\n",
8530 sta->addr, changed, sta->deflink.bandwidth,
8531 sta->deflink.rx_nss,
8532 sta->deflink.smps_mode);
8537 switch (sta->deflink.bandwidth) {
8552 sta->deflink.bandwidth, sta->addr);
8561 arsta->nss = sta->deflink.rx_nss;
8566 switch (sta->deflink.smps_mode) {
8578 ath10k_warn(ar, "Invalid smps %d in sta rc update for %pM\n",
8579 sta->deflink.smps_mode, sta->addr);
8624 struct ieee80211_sta *sta = params->sta;
8628 ath10k_dbg(ar, ATH10K_DBG_MAC, "mac ampdu vdev_id %i sta %pM tid %u action %d\n",
8629 arvif->vdev_id, sta->addr, tid, action);
9073 struct ieee80211_sta *sta)
9081 if (peer->sta == sta)
9253 struct ieee80211_sta *sta,
9256 struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
9266 peer = ath10k_peer_find(ar, arsta->arvif->vdev_id, sta->addr);
9312 struct ieee80211_sta *sta,
9315 struct ath10k_sta *arsta = (struct ath10k_sta *)sta->drv_priv;
9348 ath10k_mac_sta_get_peer_stats_info(ar, sta, sinfo);
9353 struct ieee80211_sta *sta,
9369 ret = ath10k_mac_parse_tid_config(ar, sta, vif,
9378 if (sta)
9395 struct ieee80211_sta *sta,
9405 if (sta) {
9407 ret = ath10k_mac_reset_tid_config(ar, sta, arvif, tids);