Lines Matching refs:mvmsta

276 	struct iwl_mvm_sta *mvmsta;  in iwl_mvm_invalidate_sta_queue()  local
294 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_invalidate_sta_queue()
296 mvmsta->tid_disable_agg |= disable_agg_tids; in iwl_mvm_invalidate_sta_queue()
298 cmd.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color); in iwl_mvm_invalidate_sta_queue()
299 cmd.sta_id = mvmsta->sta_id; in iwl_mvm_invalidate_sta_queue()
306 cmd.tfd_queue_msk = cpu_to_le32(mvmsta->tfd_queue_msk); in iwl_mvm_invalidate_sta_queue()
307 cmd.tid_disable_tx = cpu_to_le16(mvmsta->tid_disable_agg); in iwl_mvm_invalidate_sta_queue()
406 struct iwl_mvm_sta *mvmsta; in iwl_mvm_get_queue_agg_tids() local
426 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_get_queue_agg_tids()
428 spin_lock_bh(&mvmsta->lock); in iwl_mvm_get_queue_agg_tids()
430 if (mvmsta->tid_data[tid].state == IWL_AGG_ON) in iwl_mvm_get_queue_agg_tids()
433 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_get_queue_agg_tids()
446 struct iwl_mvm_sta *mvmsta; in iwl_mvm_remove_sta_queue_marking() local
469 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_remove_sta_queue_marking()
471 spin_lock_bh(&mvmsta->lock); in iwl_mvm_remove_sta_queue_marking()
477 if (mvmsta->tid_data[tid].state == IWL_AGG_ON) in iwl_mvm_remove_sta_queue_marking()
479 mvmsta->tid_data[tid].txq_id = IWL_MVM_INVALID_QUEUE; in iwl_mvm_remove_sta_queue_marking()
485 mvmsta->tfd_queue_msk &= ~BIT(queue); /* Don't use this queue anymore */ in iwl_mvm_remove_sta_queue_marking()
486 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_remove_sta_queue_marking()
507 struct iwl_mvm_sta *mvmsta; in iwl_mvm_free_inactive_queue() local
524 mvmsta = iwl_mvm_sta_from_staid_protected(mvm, sta_id); in iwl_mvm_free_inactive_queue()
525 if (WARN_ON(!mvmsta)) in iwl_mvm_free_inactive_queue()
826 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_alloc_queue_tvqm() local
830 iwl_mvm_get_wd_timeout(mvm, mvmsta->vif, false, false); in iwl_mvm_sta_alloc_queue_tvqm()
837 mvmsta->sta_id, tid); in iwl_mvm_sta_alloc_queue_tvqm()
838 queue = iwl_mvm_tvqm_enable_txq(mvm, mvmsta->sta_id, tid, wdg_timeout); in iwl_mvm_sta_alloc_queue_tvqm()
844 mvm->tvqm_info[queue].sta_id = mvmsta->sta_id; in iwl_mvm_sta_alloc_queue_tvqm()
848 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue_tvqm()
849 mvmsta->tid_data[tid].txq_id = queue; in iwl_mvm_sta_alloc_queue_tvqm()
850 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue_tvqm()
974 struct iwl_mvm_sta *mvmsta; in iwl_mvm_unshare_queue() local
1008 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_unshare_queue()
1009 wdg_timeout = iwl_mvm_get_wd_timeout(mvm, mvmsta->vif, false, false); in iwl_mvm_unshare_queue()
1011 ssn = IEEE80211_SEQ_TO_SN(mvmsta->tid_data[tid].seq_number); in iwl_mvm_unshare_queue()
1023 if (mvmsta->tid_data[tid].state == IWL_AGG_ON) { in iwl_mvm_unshare_queue()
1026 mvmsta->tid_disable_agg &= ~BIT(tid); in iwl_mvm_unshare_queue()
1028 cmd.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color); in iwl_mvm_unshare_queue()
1029 cmd.sta_id = mvmsta->sta_id; in iwl_mvm_unshare_queue()
1032 cmd.tfd_queue_msk = cpu_to_le32(mvmsta->tfd_queue_msk); in iwl_mvm_unshare_queue()
1033 cmd.tid_disable_tx = cpu_to_le16(mvmsta->tid_disable_agg); in iwl_mvm_unshare_queue()
1058 struct iwl_mvm_sta *mvmsta, int queue, in iwl_mvm_remove_inactive_tids() argument
1065 lockdep_assert_held(&mvmsta->lock); in iwl_mvm_remove_inactive_tids()
1074 if (iwl_mvm_tid_queued(mvm, &mvmsta->tid_data[tid])) in iwl_mvm_remove_inactive_tids()
1078 if (mvmsta->tid_data[tid].state != IWL_AGG_OFF) in iwl_mvm_remove_inactive_tids()
1095 mvmsta->tid_data[tid].txq_id = IWL_MVM_INVALID_QUEUE; in iwl_mvm_remove_inactive_tids()
1169 struct iwl_mvm_sta *mvmsta; in iwl_mvm_inactivity_check() local
1214 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_inactivity_check()
1216 spin_lock_bh(&mvmsta->lock); in iwl_mvm_inactivity_check()
1217 ret = iwl_mvm_remove_inactive_tids(mvm, mvmsta, i, in iwl_mvm_inactivity_check()
1226 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_inactivity_check()
1251 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_alloc_queue() local
1254 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_alloc_queue()
1259 iwl_mvm_get_wd_timeout(mvm, mvmsta->vif, false, false); in iwl_mvm_sta_alloc_queue()
1274 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1275 tfd_queue_mask = mvmsta->tfd_queue_msk; in iwl_mvm_sta_alloc_queue()
1276 ssn = IEEE80211_SEQ_TO_SN(mvmsta->tid_data[tid].seq_number); in iwl_mvm_sta_alloc_queue()
1277 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1280 queue = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_sta_alloc_queue()
1290 if ((queue < 0 && mvmsta->reserved_queue != IEEE80211_INVAL_HW_QUEUE) && in iwl_mvm_sta_alloc_queue()
1291 (mvm->queue_info[mvmsta->reserved_queue].status == in iwl_mvm_sta_alloc_queue()
1293 queue = mvmsta->reserved_queue; in iwl_mvm_sta_alloc_queue()
1299 queue = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_sta_alloc_queue()
1304 queue = iwl_mvm_inactivity_check(mvm, mvmsta->sta_id); in iwl_mvm_sta_alloc_queue()
1344 mvmsta->sta_id, tid); in iwl_mvm_sta_alloc_queue()
1369 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1376 mvmsta->tid_data[tid].seq_number += 0x10; in iwl_mvm_sta_alloc_queue()
1379 mvmsta->tid_data[tid].txq_id = queue; in iwl_mvm_sta_alloc_queue()
1380 mvmsta->tfd_queue_msk |= BIT(queue); in iwl_mvm_sta_alloc_queue()
1381 queue_state = mvmsta->tid_data[tid].state; in iwl_mvm_sta_alloc_queue()
1383 if (mvmsta->reserved_queue == queue) in iwl_mvm_sta_alloc_queue()
1384 mvmsta->reserved_queue = IEEE80211_INVAL_HW_QUEUE; in iwl_mvm_sta_alloc_queue()
1385 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1463 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_reserve_sta_stream() local
1480 queue = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_reserve_sta_stream()
1485 queue = iwl_mvm_inactivity_check(mvm, mvmsta->sta_id); in iwl_mvm_reserve_sta_stream()
1493 mvmsta->reserved_queue = queue; in iwl_mvm_reserve_sta_stream()
1496 queue, mvmsta->sta_id); in iwl_mvm_reserve_sta_stream()
1775 int iwl_mvm_drain_sta(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta, in iwl_mvm_drain_sta() argument
1784 cmd.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color); in iwl_mvm_drain_sta()
1785 cmd.sta_id = mvmsta->sta_id; in iwl_mvm_drain_sta()
1800 mvmsta->sta_id); in iwl_mvm_drain_sta()
1805 mvmsta->sta_id); in iwl_mvm_drain_sta()
2924 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_start() local
2933 if (mvmsta->tid_data[tid].state != IWL_AGG_QUEUED && in iwl_mvm_sta_tx_agg_start()
2934 mvmsta->tid_data[tid].state != IWL_AGG_OFF) { in iwl_mvm_sta_tx_agg_start()
2937 mvmsta->tid_data[tid].state); in iwl_mvm_sta_tx_agg_start()
2943 if (mvmsta->tid_data[tid].txq_id == IWL_MVM_INVALID_QUEUE && in iwl_mvm_sta_tx_agg_start()
2952 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_start()
2960 txq_id = mvmsta->tid_data[tid].txq_id; in iwl_mvm_sta_tx_agg_start()
2962 ret = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_sta_tx_agg_start()
2993 tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_start()
3000 mvmsta->sta_id, tid, txq_id, tid_data->ssn, in iwl_mvm_sta_tx_agg_start()
3020 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_start()
3029 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_oper() local
3030 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_oper()
3039 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_tx_agg_oper()
3052 BUILD_BUG_ON((sizeof(mvmsta->agg_tids) * BITS_PER_BYTE) in iwl_mvm_sta_tx_agg_oper()
3055 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_oper()
3059 mvmsta->agg_tids |= BIT(tid); in iwl_mvm_sta_tx_agg_oper()
3062 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_oper()
3111 mvmsta->sta_id, tid, in iwl_mvm_sta_tx_agg_oper()
3142 mvmsta->max_agg_bufsize = in iwl_mvm_sta_tx_agg_oper()
3143 min(mvmsta->max_agg_bufsize, buf_size); in iwl_mvm_sta_tx_agg_oper()
3144 mvmsta->lq_sta.rs_drv.lq.agg_frame_cnt_limit = mvmsta->max_agg_bufsize; in iwl_mvm_sta_tx_agg_oper()
3149 return iwl_mvm_send_lq_cmd(mvm, &mvmsta->lq_sta.rs_drv.lq); in iwl_mvm_sta_tx_agg_oper()
3153 struct iwl_mvm_sta *mvmsta, in iwl_mvm_unreserve_agg_queue() argument
3179 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_stop() local
3180 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_stop()
3193 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
3198 mvmsta->sta_id, tid, txq_id, tid_data->state); in iwl_mvm_sta_tx_agg_stop()
3200 mvmsta->agg_tids &= ~BIT(tid); in iwl_mvm_sta_tx_agg_stop()
3202 iwl_mvm_unreserve_agg_queue(mvm, mvmsta, tid_data); in iwl_mvm_sta_tx_agg_stop()
3214 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
3237 mvmsta->sta_id, tid, tid_data->state); in iwl_mvm_sta_tx_agg_stop()
3243 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
3251 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_flush() local
3252 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_flush()
3260 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_flush()
3263 mvmsta->sta_id, tid, txq_id, tid_data->state); in iwl_mvm_sta_tx_agg_flush()
3266 mvmsta->agg_tids &= ~BIT(tid); in iwl_mvm_sta_tx_agg_flush()
3267 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_flush()
3269 iwl_mvm_unreserve_agg_queue(mvm, mvmsta, tid_data); in iwl_mvm_sta_tx_agg_flush()
3272 iwl_mvm_drain_sta(mvm, mvmsta, true); in iwl_mvm_sta_tx_agg_flush()
3275 if (iwl_mvm_flush_sta_tids(mvm, mvmsta->sta_id, in iwl_mvm_sta_tx_agg_flush()
3285 iwl_mvm_drain_sta(mvm, mvmsta, false); in iwl_mvm_sta_tx_agg_flush()
3853 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_ps_wake() local
3856 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_ps_wake()
3858 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_ps_wake()
3874 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_sleep_tx_count() local
3877 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_sleep_tx_count()
3880 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_sleep_tx_count()
3903 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_modify_sleep_tx_count()
3908 tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_modify_sleep_tx_count()
3920 mvmsta->sleep_tx_count = sleep_tx_count; in iwl_mvm_sta_modify_sleep_tx_count()
3921 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_modify_sleep_tx_count()
3935 mvmsta->next_status_eosp = true; in iwl_mvm_sta_modify_sleep_tx_count()
3970 struct iwl_mvm_sta *mvmsta, bool disable) in iwl_mvm_sta_modify_disable_tx() argument
3974 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_disable_tx()
3977 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_disable_tx()
4081 struct iwl_mvm_sta *mvmsta; in iwl_mvm_csa_client_absent() local
4085 mvmsta = iwl_mvm_sta_from_staid_rcu(mvm, mvmvif->ap_sta_id); in iwl_mvm_csa_client_absent()
4087 if (mvmsta) in iwl_mvm_csa_client_absent()
4088 iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, true); in iwl_mvm_csa_client_absent()