Lines Matching refs:mvmsta

311 	struct iwl_mvm_sta *mvmsta;  in iwl_mvm_invalidate_sta_queue()  local
332 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_invalidate_sta_queue()
334 mvmsta->tid_disable_agg |= disable_agg_tids; in iwl_mvm_invalidate_sta_queue()
336 cmd.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color); in iwl_mvm_invalidate_sta_queue()
337 cmd.sta_id = mvmsta->sta_id; in iwl_mvm_invalidate_sta_queue()
344 cmd.tfd_queue_msk = cpu_to_le32(mvmsta->tfd_queue_msk); in iwl_mvm_invalidate_sta_queue()
345 cmd.tid_disable_tx = cpu_to_le16(mvmsta->tid_disable_agg); in iwl_mvm_invalidate_sta_queue()
361 struct iwl_mvm_sta *mvmsta; in iwl_mvm_get_queue_agg_tids() local
383 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_get_queue_agg_tids()
385 spin_lock_bh(&mvmsta->lock); in iwl_mvm_get_queue_agg_tids()
387 if (mvmsta->tid_data[tid].state == IWL_AGG_ON) in iwl_mvm_get_queue_agg_tids()
390 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_get_queue_agg_tids()
403 struct iwl_mvm_sta *mvmsta; in iwl_mvm_remove_sta_queue_marking() local
428 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_remove_sta_queue_marking()
430 spin_lock_bh(&mvmsta->lock); in iwl_mvm_remove_sta_queue_marking()
433 if (mvmsta->tid_data[tid].state == IWL_AGG_ON) in iwl_mvm_remove_sta_queue_marking()
435 mvmsta->tid_data[tid].txq_id = IWL_MVM_INVALID_QUEUE; in iwl_mvm_remove_sta_queue_marking()
438 mvmsta->tfd_queue_msk &= ~BIT(queue); /* Don't use this queue anymore */ in iwl_mvm_remove_sta_queue_marking()
439 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_remove_sta_queue_marking()
449 struct iwl_mvm_sta *mvmsta; in iwl_mvm_free_inactive_queue() local
465 mvmsta = iwl_mvm_sta_from_staid_protected(mvm, sta_id); in iwl_mvm_free_inactive_queue()
466 if (WARN_ON(!mvmsta)) in iwl_mvm_free_inactive_queue()
476 mvmsta->vif->hw_queue[txq_curr_ac], in iwl_mvm_free_inactive_queue()
678 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_alloc_queue_tvqm() local
680 iwl_mvm_get_wd_timeout(mvm, mvmsta->vif, false, false); in iwl_mvm_sta_alloc_queue_tvqm()
681 u8 mac_queue = mvmsta->vif->hw_queue[ac]; in iwl_mvm_sta_alloc_queue_tvqm()
688 mvmsta->sta_id, tid); in iwl_mvm_sta_alloc_queue_tvqm()
689 queue = iwl_mvm_tvqm_enable_txq(mvm, mac_queue, mvmsta->sta_id, tid, in iwl_mvm_sta_alloc_queue_tvqm()
696 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue_tvqm()
697 mvmsta->tid_data[tid].txq_id = queue; in iwl_mvm_sta_alloc_queue_tvqm()
698 mvmsta->tid_data[tid].is_tid_active = true; in iwl_mvm_sta_alloc_queue_tvqm()
699 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue_tvqm()
708 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_alloc_queue() local
711 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_alloc_queue()
716 iwl_mvm_get_wd_timeout(mvm, mvmsta->vif, false, false); in iwl_mvm_sta_alloc_queue()
717 u8 mac_queue = mvmsta->vif->hw_queue[ac]; in iwl_mvm_sta_alloc_queue()
732 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
733 tfd_queue_mask = mvmsta->tfd_queue_msk; in iwl_mvm_sta_alloc_queue()
734 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
744 queue = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_sta_alloc_queue()
754 if ((queue < 0 && mvmsta->reserved_queue != IEEE80211_INVAL_HW_QUEUE) && in iwl_mvm_sta_alloc_queue()
755 (mvm->queue_info[mvmsta->reserved_queue].status == in iwl_mvm_sta_alloc_queue()
757 mvm->queue_info[mvmsta->reserved_queue].status == in iwl_mvm_sta_alloc_queue()
759 queue = mvmsta->reserved_queue; in iwl_mvm_sta_alloc_queue()
765 queue = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_sta_alloc_queue()
779 same_sta = mvm->queue_info[queue].ra_sta_id == mvmsta->sta_id; in iwl_mvm_sta_alloc_queue()
782 queue, mvmsta->sta_id, tid); in iwl_mvm_sta_alloc_queue()
834 mvmsta->sta_id, tid); in iwl_mvm_sta_alloc_queue()
865 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
872 mvmsta->tid_data[tid].seq_number += 0x10; in iwl_mvm_sta_alloc_queue()
873 mvmsta->tid_data[tid].txq_id = queue; in iwl_mvm_sta_alloc_queue()
874 mvmsta->tid_data[tid].is_tid_active = true; in iwl_mvm_sta_alloc_queue()
875 mvmsta->tfd_queue_msk |= BIT(queue); in iwl_mvm_sta_alloc_queue()
876 queue_state = mvmsta->tid_data[tid].state; in iwl_mvm_sta_alloc_queue()
878 if (mvmsta->reserved_queue == queue) in iwl_mvm_sta_alloc_queue()
879 mvmsta->reserved_queue = IEEE80211_INVAL_HW_QUEUE; in iwl_mvm_sta_alloc_queue()
880 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
953 struct iwl_mvm_sta *mvmsta; in iwl_mvm_unshare_queue() local
989 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_unshare_queue()
990 wdg_timeout = iwl_mvm_get_wd_timeout(mvm, mvmsta->vif, false, false); in iwl_mvm_unshare_queue()
992 ssn = IEEE80211_SEQ_TO_SN(mvmsta->tid_data[tid].seq_number); in iwl_mvm_unshare_queue()
1003 if (mvmsta->tid_data[tid].state == IWL_AGG_ON) { in iwl_mvm_unshare_queue()
1006 mvmsta->tid_disable_agg &= ~BIT(tid); in iwl_mvm_unshare_queue()
1008 cmd.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color); in iwl_mvm_unshare_queue()
1009 cmd.sta_id = mvmsta->sta_id; in iwl_mvm_unshare_queue()
1012 cmd.tfd_queue_msk = cpu_to_le32(mvmsta->tfd_queue_msk); in iwl_mvm_unshare_queue()
1013 cmd.tid_disable_tx = cpu_to_le16(mvmsta->tid_disable_agg); in iwl_mvm_unshare_queue()
1043 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_tx_deferred_stream() local
1044 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_tx_deferred_stream()
1066 mvmsta->sta_id, tid); in iwl_mvm_tx_deferred_stream()
1079 spin_lock(&mvmsta->lock); in iwl_mvm_tx_deferred_stream()
1081 mvmsta->deferred_traffic_tid_map &= ~BIT(tid); in iwl_mvm_tx_deferred_stream()
1082 spin_unlock(&mvmsta->lock); in iwl_mvm_tx_deferred_stream()
1098 struct iwl_mvm_sta *mvmsta; in iwl_mvm_add_new_dqa_stream_wk() local
1150 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_add_new_dqa_stream_wk()
1151 deferred_tid_traffic = mvmsta->deferred_traffic_tid_map; in iwl_mvm_add_new_dqa_stream_wk()
1165 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_reserve_sta_stream() local
1188 queue = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_reserve_sta_stream()
1202 same_sta = mvm->queue_info[queue].ra_sta_id == mvmsta->sta_id; in iwl_mvm_reserve_sta_stream()
1208 mvmsta->reserved_queue = queue; in iwl_mvm_reserve_sta_stream()
1214 queue, mvmsta->sta_id); in iwl_mvm_reserve_sta_stream()
1473 int iwl_mvm_drain_sta(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta, in iwl_mvm_drain_sta() argument
1482 cmd.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color); in iwl_mvm_drain_sta()
1483 cmd.sta_id = mvmsta->sta_id; in iwl_mvm_drain_sta()
1498 mvmsta->sta_id); in iwl_mvm_drain_sta()
1503 mvmsta->sta_id); in iwl_mvm_drain_sta()
2452 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_start() local
2461 if (mvmsta->tid_data[tid].state != IWL_AGG_QUEUED && in iwl_mvm_sta_tx_agg_start()
2462 mvmsta->tid_data[tid].state != IWL_AGG_OFF) { in iwl_mvm_sta_tx_agg_start()
2465 mvmsta->tid_data[tid].state); in iwl_mvm_sta_tx_agg_start()
2471 if (mvmsta->tid_data[tid].txq_id == IWL_MVM_INVALID_QUEUE && in iwl_mvm_sta_tx_agg_start()
2480 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_start()
2484 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_start()
2497 txq_id = mvmsta->tid_data[tid].txq_id; in iwl_mvm_sta_tx_agg_start()
2499 txq_id = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_sta_tx_agg_start()
2525 tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_start()
2532 mvmsta->sta_id, tid, txq_id, tid_data->ssn, in iwl_mvm_sta_tx_agg_start()
2556 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_start()
2565 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_oper() local
2566 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_oper()
2575 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_tx_agg_oper()
2588 BUILD_BUG_ON((sizeof(mvmsta->agg_tids) * BITS_PER_BYTE) in iwl_mvm_sta_tx_agg_oper()
2591 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_oper()
2595 mvmsta->agg_tids |= BIT(tid); in iwl_mvm_sta_tx_agg_oper()
2598 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_oper()
2649 mvmsta->sta_id, tid, in iwl_mvm_sta_tx_agg_oper()
2683 mvmsta->max_agg_bufsize = in iwl_mvm_sta_tx_agg_oper()
2684 min(mvmsta->max_agg_bufsize, buf_size); in iwl_mvm_sta_tx_agg_oper()
2685 mvmsta->lq_sta.rs_drv.lq.agg_frame_cnt_limit = mvmsta->max_agg_bufsize; in iwl_mvm_sta_tx_agg_oper()
2690 return iwl_mvm_send_lq_cmd(mvm, &mvmsta->lq_sta.rs_drv.lq, false); in iwl_mvm_sta_tx_agg_oper()
2694 struct iwl_mvm_sta *mvmsta, in iwl_mvm_unreserve_agg_queue() argument
2721 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_stop() local
2722 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_stop()
2735 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
2740 mvmsta->sta_id, tid, txq_id, tid_data->state); in iwl_mvm_sta_tx_agg_stop()
2742 mvmsta->agg_tids &= ~BIT(tid); in iwl_mvm_sta_tx_agg_stop()
2744 iwl_mvm_unreserve_agg_queue(mvm, mvmsta, tid_data); in iwl_mvm_sta_tx_agg_stop()
2756 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
2779 mvmsta->sta_id, tid, tid_data->state); in iwl_mvm_sta_tx_agg_stop()
2785 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
2793 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_flush() local
2794 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_flush()
2802 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_flush()
2805 mvmsta->sta_id, tid, txq_id, tid_data->state); in iwl_mvm_sta_tx_agg_flush()
2808 mvmsta->agg_tids &= ~BIT(tid); in iwl_mvm_sta_tx_agg_flush()
2809 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_flush()
2811 iwl_mvm_unreserve_agg_queue(mvm, mvmsta, tid_data); in iwl_mvm_sta_tx_agg_flush()
2814 iwl_mvm_drain_sta(mvm, mvmsta, true); in iwl_mvm_sta_tx_agg_flush()
2817 if (iwl_mvm_flush_sta_tids(mvm, mvmsta->sta_id, in iwl_mvm_sta_tx_agg_flush()
2827 iwl_mvm_drain_sta(mvm, mvmsta, false); in iwl_mvm_sta_tx_agg_flush()
3403 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_ps_wake() local
3406 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_ps_wake()
3408 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_ps_wake()
3424 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_sleep_tx_count() local
3427 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_sleep_tx_count()
3430 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_sleep_tx_count()
3453 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_modify_sleep_tx_count()
3458 tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_modify_sleep_tx_count()
3470 mvmsta->sleep_tx_count = sleep_tx_count; in iwl_mvm_sta_modify_sleep_tx_count()
3471 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_modify_sleep_tx_count()
3485 mvmsta->next_status_eosp = true; in iwl_mvm_sta_modify_sleep_tx_count()
3520 struct iwl_mvm_sta *mvmsta, bool disable) in iwl_mvm_sta_modify_disable_tx() argument
3524 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_disable_tx()
3527 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_disable_tx()
3626 struct iwl_mvm_sta *mvmsta; in iwl_mvm_csa_client_absent() local
3630 mvmsta = iwl_mvm_sta_from_staid_rcu(mvm, mvmvif->ap_sta_id); in iwl_mvm_csa_client_absent()
3632 if (!WARN_ON(!mvmsta)) in iwl_mvm_csa_client_absent()
3633 iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, true); in iwl_mvm_csa_client_absent()