Lines Matching defs:sta

7 #include "sta.h"
9 u32 iwl_mvm_sta_fw_id_mask(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
18 if (!sta)
21 mvmsta = iwl_mvm_sta_from_mac80211(sta);
25 if (!sta->valid_links)
29 for_each_sta_active_link(vif, sta, link_sta, link_id) {
63 struct iwl_mvm_int_sta *sta,
71 cmd.sta_id = cpu_to_le32((u8)sta->sta_id);
75 cmd.station_type = cpu_to_le32(sta->type);
79 sta->type == STATION_TYPE_BCAST_MGMT)
119 struct iwl_mvm_int_sta *sta,
125 .sta_id = cpu_to_le32(sta->sta_id),
137 * Adds an internal sta to the FW table with its queues
140 struct iwl_mvm_int_sta *sta,
149 if (WARN_ON_ONCE(sta->sta_id == IWL_MVM_INVALID_STA))
152 if (sta->type == STATION_TYPE_AUX)
153 ret = iwl_mvm_add_aux_sta_to_fw(mvm, sta, link_id);
155 ret = iwl_mvm_mld_add_int_sta_to_fw(mvm, sta, addr, link_id);
163 txq = iwl_mvm_tvqm_enable_txq(mvm, NULL, sta->sta_id, tid,
166 iwl_mvm_mld_rm_sta_from_fw(mvm, sta->sta_id);
175 * Adds a new int sta: allocate it in the driver, add it to the FW table,
339 /* Removes a sta from the FW table, disable its queues, and dealloc it
430 /* send a cfg sta command to add/update a sta in firmware */
431 static int iwl_mvm_mld_cfg_sta(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
437 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
447 /* when adding sta, link should exist in FW */
453 memcpy(&cmd.peer_mld_address, sta->addr, ETH_ALEN);
457 cmd.assoc_id = cpu_to_le32(sta->aid);
461 (sta->mfp || mvm_sta->sta_state < IEEE80211_STA_AUTHORIZED))
473 switch (sta->deflink.smps_mode) {
494 if (sta->wme) {
496 cpu_to_le32(sta->max_sp ? sta->max_sp * 2 : 128);
497 cmd.uapsd_acs = cpu_to_le32(iwl_mvm_get_sta_uapsd_acs(sta));
508 cmd.htc_flags = iwl_mvm_get_sta_htc_flags(sta, link_sta);
552 struct ieee80211_sta *sta,
556 link_sta_dereference_protected(sta, link_id);
557 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
565 if (rcu_access_pointer(sta->link[link_id]) == &sta->deflink) {
575 rcu_assign_pointer(mvm->fw_id_to_mac_id[link->sta_id], sta);
582 /* allocate all the links of a sta, called when the station is first added */
585 struct ieee80211_sta *sta)
587 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
594 for_each_sta_active_link(vif, sta, link_sta, link_id) {
598 ret = iwl_mvm_mld_alloc_sta_link(mvm, vif, sta, link_id);
610 static void iwl_mvm_mld_set_ap_sta_id(struct ieee80211_sta *sta,
614 if (!sta->tdls) {
624 struct ieee80211_sta *sta)
626 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
638 for_each_sta_active_link(vif, sta, link_sta, link_id) {
655 ret = iwl_mvm_mld_cfg_sta(mvm, sta, vif, link_sta,
660 rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta);
665 iwl_mvm_realloc_queues_after_restart(mvm, sta);
671 struct ieee80211_sta *sta)
674 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
683 ret = iwl_mvm_mld_alloc_sta_links(mvm, vif, sta);
689 ret = iwl_mvm_sta_init(mvm, vif, sta, IWL_MVM_INVALID_STA,
692 ret = iwl_mvm_alloc_sta_after_restart(mvm, vif, sta);
698 /* at this stage sta link pointers are already allocated */
699 ret = iwl_mvm_mld_update_sta(mvm, vif, sta);
703 for_each_sta_active_link(vif, sta, link_sta, link_id) {
715 ret = iwl_mvm_mld_cfg_sta(mvm, sta, vif, link_sta, link_conf,
723 iwl_mvm_mld_set_ap_sta_id(sta, mvm_vif->link[link_id],
739 /* free all sta resources in the driver */
745 struct ieee80211_sta *sta)
747 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
754 for_each_sta_active_link(vif, sta, link_sta, link_id) {
764 ret = iwl_mvm_mld_cfg_sta(mvm, sta, vif, link_sta, link_conf,
768 IWL_ERR(mvm, "Failed to update sta link %d\n", link_id);
778 struct ieee80211_sta *sta)
780 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
781 u32 sta_mask = iwl_mvm_sta_fw_id_mask(mvm, sta, -1);
795 for (i = 0; i < ARRAY_SIZE(sta->txq); i++) {
797 iwl_mvm_txq_from_mac80211(sta->txq[i]);
804 struct ieee80211_sta *sta)
806 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
814 for_each_sta_active_link(vif, sta, link_sta, link_id) {
832 iwl_mvm_mld_disable_sta_queues(mvm, vif, sta);
834 for_each_sta_active_link(vif, sta, link_sta, link_id) {
840 stay_in_fw = iwl_mvm_sta_del(mvm, vif, sta, link_sta, &ret);
896 struct ieee80211_sta *sta,
899 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
917 struct ieee80211_sta *sta;
925 sta = rcu_dereference(mvm->fw_id_to_mac_id[i]);
926 if (IS_ERR_OR_NULL(sta))
929 mvm_sta = iwl_mvm_sta_from_mac80211(sta);
941 struct ieee80211_sta *sta,
945 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
1028 struct ieee80211_sta *sta,
1034 ret = iwl_mvm_mld_update_sta_queues(mvm, sta,
1040 ret = iwl_mvm_mld_update_sta_keys(mvm, vif, sta,
1051 struct ieee80211_sta *sta,
1054 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta);
1085 ret = iwl_mvm_mld_update_sta_resources(mvm, vif, sta,
1121 link_sta_dereference_protected(sta, link_id);
1142 rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta);
1150 ret = iwl_mvm_mld_alloc_sta_link(mvm, vif, sta,
1157 ieee80211_sta_recalc_aggregates(sta);
1169 iwl_mvm_mld_set_ap_sta_id(sta, mvm_vif_link,
1176 ret = iwl_mvm_mld_cfg_sta(mvm, sta, vif, link_sta, link_conf,
1187 ret = iwl_mvm_mld_update_sta_resources(mvm, vif, sta,