Lines Matching refs:mvmsta

306 	struct iwl_mvm_sta *mvmsta;  in iwl_mvm_invalidate_sta_queue()  local
324 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_invalidate_sta_queue()
326 mvmsta->tid_disable_agg |= disable_agg_tids; in iwl_mvm_invalidate_sta_queue()
328 cmd.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color); in iwl_mvm_invalidate_sta_queue()
329 cmd.sta_id = mvmsta->sta_id; in iwl_mvm_invalidate_sta_queue()
336 cmd.tfd_queue_msk = cpu_to_le32(mvmsta->tfd_queue_msk); in iwl_mvm_invalidate_sta_queue()
337 cmd.tid_disable_tx = cpu_to_le16(mvmsta->tid_disable_agg); in iwl_mvm_invalidate_sta_queue()
416 struct iwl_mvm_sta *mvmsta; in iwl_mvm_get_queue_agg_tids() local
436 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_get_queue_agg_tids()
438 spin_lock_bh(&mvmsta->lock); in iwl_mvm_get_queue_agg_tids()
440 if (mvmsta->tid_data[tid].state == IWL_AGG_ON) in iwl_mvm_get_queue_agg_tids()
443 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_get_queue_agg_tids()
456 struct iwl_mvm_sta *mvmsta; in iwl_mvm_remove_sta_queue_marking() local
479 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_remove_sta_queue_marking()
481 spin_lock_bh(&mvmsta->lock); in iwl_mvm_remove_sta_queue_marking()
487 if (mvmsta->tid_data[tid].state == IWL_AGG_ON) in iwl_mvm_remove_sta_queue_marking()
489 mvmsta->tid_data[tid].txq_id = IWL_MVM_INVALID_QUEUE; in iwl_mvm_remove_sta_queue_marking()
494 mvmsta->tfd_queue_msk &= ~BIT(queue); /* Don't use this queue anymore */ in iwl_mvm_remove_sta_queue_marking()
495 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_remove_sta_queue_marking()
516 struct iwl_mvm_sta *mvmsta; in iwl_mvm_free_inactive_queue() local
532 mvmsta = iwl_mvm_sta_from_staid_protected(mvm, sta_id); in iwl_mvm_free_inactive_queue()
533 if (WARN_ON(!mvmsta)) in iwl_mvm_free_inactive_queue()
772 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_alloc_queue_tvqm() local
776 iwl_mvm_get_wd_timeout(mvm, mvmsta->vif, false, false); in iwl_mvm_sta_alloc_queue_tvqm()
783 mvmsta->sta_id, tid); in iwl_mvm_sta_alloc_queue_tvqm()
784 queue = iwl_mvm_tvqm_enable_txq(mvm, mvmsta->sta_id, tid, wdg_timeout); in iwl_mvm_sta_alloc_queue_tvqm()
790 mvm->tvqm_info[queue].sta_id = mvmsta->sta_id; in iwl_mvm_sta_alloc_queue_tvqm()
794 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue_tvqm()
795 mvmsta->tid_data[tid].txq_id = queue; in iwl_mvm_sta_alloc_queue_tvqm()
796 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue_tvqm()
920 struct iwl_mvm_sta *mvmsta; in iwl_mvm_unshare_queue() local
954 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_unshare_queue()
955 wdg_timeout = iwl_mvm_get_wd_timeout(mvm, mvmsta->vif, false, false); in iwl_mvm_unshare_queue()
957 ssn = IEEE80211_SEQ_TO_SN(mvmsta->tid_data[tid].seq_number); in iwl_mvm_unshare_queue()
969 if (mvmsta->tid_data[tid].state == IWL_AGG_ON) { in iwl_mvm_unshare_queue()
972 mvmsta->tid_disable_agg &= ~BIT(tid); in iwl_mvm_unshare_queue()
974 cmd.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color); in iwl_mvm_unshare_queue()
975 cmd.sta_id = mvmsta->sta_id; in iwl_mvm_unshare_queue()
978 cmd.tfd_queue_msk = cpu_to_le32(mvmsta->tfd_queue_msk); in iwl_mvm_unshare_queue()
979 cmd.tid_disable_tx = cpu_to_le16(mvmsta->tid_disable_agg); in iwl_mvm_unshare_queue()
1004 struct iwl_mvm_sta *mvmsta, int queue, in iwl_mvm_remove_inactive_tids() argument
1011 lockdep_assert_held(&mvmsta->lock); in iwl_mvm_remove_inactive_tids()
1020 if (iwl_mvm_tid_queued(mvm, &mvmsta->tid_data[tid])) in iwl_mvm_remove_inactive_tids()
1024 if (mvmsta->tid_data[tid].state != IWL_AGG_OFF) in iwl_mvm_remove_inactive_tids()
1041 mvmsta->tid_data[tid].txq_id = IWL_MVM_INVALID_QUEUE; in iwl_mvm_remove_inactive_tids()
1115 struct iwl_mvm_sta *mvmsta; in iwl_mvm_inactivity_check() local
1160 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_inactivity_check()
1162 spin_lock_bh(&mvmsta->lock); in iwl_mvm_inactivity_check()
1163 ret = iwl_mvm_remove_inactive_tids(mvm, mvmsta, i, in iwl_mvm_inactivity_check()
1172 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_inactivity_check()
1199 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_alloc_queue() local
1202 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_alloc_queue()
1207 iwl_mvm_get_wd_timeout(mvm, mvmsta->vif, false, false); in iwl_mvm_sta_alloc_queue()
1221 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1222 tfd_queue_mask = mvmsta->tfd_queue_msk; in iwl_mvm_sta_alloc_queue()
1223 ssn = IEEE80211_SEQ_TO_SN(mvmsta->tid_data[tid].seq_number); in iwl_mvm_sta_alloc_queue()
1224 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1227 queue = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_sta_alloc_queue()
1237 if ((queue < 0 && mvmsta->reserved_queue != IEEE80211_INVAL_HW_QUEUE) && in iwl_mvm_sta_alloc_queue()
1238 (mvm->queue_info[mvmsta->reserved_queue].status == in iwl_mvm_sta_alloc_queue()
1240 queue = mvmsta->reserved_queue; in iwl_mvm_sta_alloc_queue()
1246 queue = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_sta_alloc_queue()
1251 queue = iwl_mvm_inactivity_check(mvm, mvmsta->sta_id); in iwl_mvm_sta_alloc_queue()
1291 mvmsta->sta_id, tid); in iwl_mvm_sta_alloc_queue()
1316 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1323 mvmsta->tid_data[tid].seq_number += 0x10; in iwl_mvm_sta_alloc_queue()
1326 mvmsta->tid_data[tid].txq_id = queue; in iwl_mvm_sta_alloc_queue()
1327 mvmsta->tfd_queue_msk |= BIT(queue); in iwl_mvm_sta_alloc_queue()
1328 queue_state = mvmsta->tid_data[tid].state; in iwl_mvm_sta_alloc_queue()
1330 if (mvmsta->reserved_queue == queue) in iwl_mvm_sta_alloc_queue()
1331 mvmsta->reserved_queue = IEEE80211_INVAL_HW_QUEUE; in iwl_mvm_sta_alloc_queue()
1332 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1407 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_reserve_sta_stream() local
1424 queue = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_reserve_sta_stream()
1429 queue = iwl_mvm_inactivity_check(mvm, mvmsta->sta_id); in iwl_mvm_reserve_sta_stream()
1437 mvmsta->reserved_queue = queue; in iwl_mvm_reserve_sta_stream()
1440 queue, mvmsta->sta_id); in iwl_mvm_reserve_sta_stream()
1713 int iwl_mvm_drain_sta(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta, in iwl_mvm_drain_sta() argument
1722 cmd.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color); in iwl_mvm_drain_sta()
1723 cmd.sta_id = mvmsta->sta_id; in iwl_mvm_drain_sta()
1738 mvmsta->sta_id); in iwl_mvm_drain_sta()
1743 mvmsta->sta_id); in iwl_mvm_drain_sta()
2758 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_start() local
2767 if (mvmsta->tid_data[tid].state != IWL_AGG_QUEUED && in iwl_mvm_sta_tx_agg_start()
2768 mvmsta->tid_data[tid].state != IWL_AGG_OFF) { in iwl_mvm_sta_tx_agg_start()
2771 mvmsta->tid_data[tid].state); in iwl_mvm_sta_tx_agg_start()
2777 if (mvmsta->tid_data[tid].txq_id == IWL_MVM_INVALID_QUEUE && in iwl_mvm_sta_tx_agg_start()
2786 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_start()
2794 txq_id = mvmsta->tid_data[tid].txq_id; in iwl_mvm_sta_tx_agg_start()
2796 ret = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_sta_tx_agg_start()
2827 tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_start()
2834 mvmsta->sta_id, tid, txq_id, tid_data->ssn, in iwl_mvm_sta_tx_agg_start()
2855 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_start()
2864 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_oper() local
2865 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_oper()
2874 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_tx_agg_oper()
2887 BUILD_BUG_ON((sizeof(mvmsta->agg_tids) * BITS_PER_BYTE) in iwl_mvm_sta_tx_agg_oper()
2890 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_oper()
2894 mvmsta->agg_tids |= BIT(tid); in iwl_mvm_sta_tx_agg_oper()
2897 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_oper()
2946 mvmsta->sta_id, tid, in iwl_mvm_sta_tx_agg_oper()
2977 mvmsta->max_agg_bufsize = in iwl_mvm_sta_tx_agg_oper()
2978 min(mvmsta->max_agg_bufsize, buf_size); in iwl_mvm_sta_tx_agg_oper()
2979 mvmsta->lq_sta.rs_drv.lq.agg_frame_cnt_limit = mvmsta->max_agg_bufsize; in iwl_mvm_sta_tx_agg_oper()
2984 return iwl_mvm_send_lq_cmd(mvm, &mvmsta->lq_sta.rs_drv.lq); in iwl_mvm_sta_tx_agg_oper()
2988 struct iwl_mvm_sta *mvmsta, in iwl_mvm_unreserve_agg_queue() argument
3014 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_stop() local
3015 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_stop()
3028 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
3033 mvmsta->sta_id, tid, txq_id, tid_data->state); in iwl_mvm_sta_tx_agg_stop()
3035 mvmsta->agg_tids &= ~BIT(tid); in iwl_mvm_sta_tx_agg_stop()
3037 iwl_mvm_unreserve_agg_queue(mvm, mvmsta, tid_data); in iwl_mvm_sta_tx_agg_stop()
3049 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
3072 mvmsta->sta_id, tid, tid_data->state); in iwl_mvm_sta_tx_agg_stop()
3078 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
3086 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_flush() local
3087 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_flush()
3095 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_flush()
3098 mvmsta->sta_id, tid, txq_id, tid_data->state); in iwl_mvm_sta_tx_agg_flush()
3101 mvmsta->agg_tids &= ~BIT(tid); in iwl_mvm_sta_tx_agg_flush()
3102 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_flush()
3104 iwl_mvm_unreserve_agg_queue(mvm, mvmsta, tid_data); in iwl_mvm_sta_tx_agg_flush()
3107 iwl_mvm_drain_sta(mvm, mvmsta, true); in iwl_mvm_sta_tx_agg_flush()
3110 if (iwl_mvm_flush_sta_tids(mvm, mvmsta->sta_id, in iwl_mvm_sta_tx_agg_flush()
3120 iwl_mvm_drain_sta(mvm, mvmsta, false); in iwl_mvm_sta_tx_agg_flush()
3639 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_ps_wake() local
3642 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_ps_wake()
3644 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_ps_wake()
3660 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_sleep_tx_count() local
3663 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_sleep_tx_count()
3666 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_sleep_tx_count()
3689 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_modify_sleep_tx_count()
3694 tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_modify_sleep_tx_count()
3706 mvmsta->sleep_tx_count = sleep_tx_count; in iwl_mvm_sta_modify_sleep_tx_count()
3707 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_modify_sleep_tx_count()
3721 mvmsta->next_status_eosp = true; in iwl_mvm_sta_modify_sleep_tx_count()
3756 struct iwl_mvm_sta *mvmsta, bool disable) in iwl_mvm_sta_modify_disable_tx() argument
3760 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_disable_tx()
3763 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_disable_tx()
3862 struct iwl_mvm_sta *mvmsta; in iwl_mvm_csa_client_absent() local
3866 mvmsta = iwl_mvm_sta_from_staid_rcu(mvm, mvmvif->ap_sta_id); in iwl_mvm_csa_client_absent()
3868 if (!WARN_ON(!mvmsta)) in iwl_mvm_csa_client_absent()
3869 iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, true); in iwl_mvm_csa_client_absent()