Lines Matching refs:mvmsta
309 struct iwl_mvm_sta *mvmsta; in iwl_mvm_invalidate_sta_queue() local
327 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_invalidate_sta_queue()
329 mvmsta->tid_disable_agg |= disable_agg_tids; in iwl_mvm_invalidate_sta_queue()
331 cmd.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color); in iwl_mvm_invalidate_sta_queue()
332 cmd.sta_id = mvmsta->deflink.sta_id; in iwl_mvm_invalidate_sta_queue()
339 cmd.tfd_queue_msk = cpu_to_le32(mvmsta->tfd_queue_msk); in iwl_mvm_invalidate_sta_queue()
340 cmd.tid_disable_tx = cpu_to_le16(mvmsta->tid_disable_agg); in iwl_mvm_invalidate_sta_queue()
447 struct iwl_mvm_sta *mvmsta; in iwl_mvm_get_queue_agg_tids() local
467 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_get_queue_agg_tids()
469 spin_lock_bh(&mvmsta->lock); in iwl_mvm_get_queue_agg_tids()
471 if (mvmsta->tid_data[tid].state == IWL_AGG_ON) in iwl_mvm_get_queue_agg_tids()
474 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_get_queue_agg_tids()
487 struct iwl_mvm_sta *mvmsta; in iwl_mvm_remove_sta_queue_marking() local
510 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_remove_sta_queue_marking()
512 spin_lock_bh(&mvmsta->lock); in iwl_mvm_remove_sta_queue_marking()
518 if (mvmsta->tid_data[tid].state == IWL_AGG_ON) in iwl_mvm_remove_sta_queue_marking()
520 mvmsta->tid_data[tid].txq_id = IWL_MVM_INVALID_QUEUE; in iwl_mvm_remove_sta_queue_marking()
529 mvmsta->tfd_queue_msk &= ~BIT(queue); /* Don't use this queue anymore */ in iwl_mvm_remove_sta_queue_marking()
530 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_remove_sta_queue_marking()
551 struct iwl_mvm_sta *mvmsta; in iwl_mvm_free_inactive_queue() local
568 mvmsta = iwl_mvm_sta_from_staid_protected(mvm, sta_id); in iwl_mvm_free_inactive_queue()
569 if (WARN_ON(!mvmsta)) in iwl_mvm_free_inactive_queue()
867 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_tvqm_enable_txq() local
871 link_id < ARRAY_SIZE(mvmsta->link); in iwl_mvm_tvqm_enable_txq()
874 rcu_dereference_protected(mvmsta->link[link_id], in iwl_mvm_tvqm_enable_txq()
913 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_alloc_queue_tvqm() local
917 iwl_mvm_get_wd_timeout(mvm, mvmsta->vif, false, false); in iwl_mvm_sta_alloc_queue_tvqm()
924 mvmsta->deflink.sta_id, tid); in iwl_mvm_sta_alloc_queue_tvqm()
925 queue = iwl_mvm_tvqm_enable_txq(mvm, sta, mvmsta->deflink.sta_id, in iwl_mvm_sta_alloc_queue_tvqm()
932 mvm->tvqm_info[queue].sta_id = mvmsta->deflink.sta_id; in iwl_mvm_sta_alloc_queue_tvqm()
936 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue_tvqm()
937 mvmsta->tid_data[tid].txq_id = queue; in iwl_mvm_sta_alloc_queue_tvqm()
938 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue_tvqm()
1062 struct iwl_mvm_sta *mvmsta; in iwl_mvm_unshare_queue() local
1096 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_unshare_queue()
1097 wdg_timeout = iwl_mvm_get_wd_timeout(mvm, mvmsta->vif, false, false); in iwl_mvm_unshare_queue()
1099 ssn = IEEE80211_SEQ_TO_SN(mvmsta->tid_data[tid].seq_number); in iwl_mvm_unshare_queue()
1111 if (mvmsta->tid_data[tid].state == IWL_AGG_ON) { in iwl_mvm_unshare_queue()
1114 mvmsta->tid_disable_agg &= ~BIT(tid); in iwl_mvm_unshare_queue()
1116 cmd.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color); in iwl_mvm_unshare_queue()
1117 cmd.sta_id = mvmsta->deflink.sta_id; in iwl_mvm_unshare_queue()
1120 cmd.tfd_queue_msk = cpu_to_le32(mvmsta->tfd_queue_msk); in iwl_mvm_unshare_queue()
1121 cmd.tid_disable_tx = cpu_to_le16(mvmsta->tid_disable_agg); in iwl_mvm_unshare_queue()
1146 struct iwl_mvm_sta *mvmsta, int queue, in iwl_mvm_remove_inactive_tids() argument
1153 lockdep_assert_held(&mvmsta->lock); in iwl_mvm_remove_inactive_tids()
1162 if (iwl_mvm_tid_queued(mvm, &mvmsta->tid_data[tid])) in iwl_mvm_remove_inactive_tids()
1166 if (mvmsta->tid_data[tid].state != IWL_AGG_OFF) in iwl_mvm_remove_inactive_tids()
1183 mvmsta->tid_data[tid].txq_id = IWL_MVM_INVALID_QUEUE; in iwl_mvm_remove_inactive_tids()
1257 struct iwl_mvm_sta *mvmsta; in iwl_mvm_inactivity_check() local
1302 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_inactivity_check()
1304 spin_lock_bh(&mvmsta->lock); in iwl_mvm_inactivity_check()
1305 ret = iwl_mvm_remove_inactive_tids(mvm, mvmsta, i, in iwl_mvm_inactivity_check()
1314 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_inactivity_check()
1339 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_alloc_queue() local
1342 .sta_id = mvmsta->deflink.sta_id, in iwl_mvm_sta_alloc_queue()
1347 iwl_mvm_get_wd_timeout(mvm, mvmsta->vif, false, false); in iwl_mvm_sta_alloc_queue()
1362 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1363 tfd_queue_mask = mvmsta->tfd_queue_msk; in iwl_mvm_sta_alloc_queue()
1364 ssn = IEEE80211_SEQ_TO_SN(mvmsta->tid_data[tid].seq_number); in iwl_mvm_sta_alloc_queue()
1365 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1368 queue = iwl_mvm_find_free_queue(mvm, mvmsta->deflink.sta_id, in iwl_mvm_sta_alloc_queue()
1378 if ((queue < 0 && mvmsta->reserved_queue != IEEE80211_INVAL_HW_QUEUE) && in iwl_mvm_sta_alloc_queue()
1379 (mvm->queue_info[mvmsta->reserved_queue].status == in iwl_mvm_sta_alloc_queue()
1381 queue = mvmsta->reserved_queue; in iwl_mvm_sta_alloc_queue()
1387 queue = iwl_mvm_find_free_queue(mvm, mvmsta->deflink.sta_id, in iwl_mvm_sta_alloc_queue()
1392 queue = iwl_mvm_inactivity_check(mvm, mvmsta->deflink.sta_id); in iwl_mvm_sta_alloc_queue()
1432 mvmsta->deflink.sta_id, tid); in iwl_mvm_sta_alloc_queue()
1457 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1464 mvmsta->tid_data[tid].seq_number += 0x10; in iwl_mvm_sta_alloc_queue()
1467 mvmsta->tid_data[tid].txq_id = queue; in iwl_mvm_sta_alloc_queue()
1468 mvmsta->tfd_queue_msk |= BIT(queue); in iwl_mvm_sta_alloc_queue()
1469 queue_state = mvmsta->tid_data[tid].state; in iwl_mvm_sta_alloc_queue()
1471 if (mvmsta->reserved_queue == queue) in iwl_mvm_sta_alloc_queue()
1472 mvmsta->reserved_queue = IEEE80211_INVAL_HW_QUEUE; in iwl_mvm_sta_alloc_queue()
1473 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1499 iwl_mvm_disable_txq(mvm, sta, mvmsta->deflink.sta_id, &queue_tmp, tid); in iwl_mvm_sta_alloc_queue()
1561 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_reserve_sta_stream() local
1578 queue = iwl_mvm_find_free_queue(mvm, mvmsta->deflink.sta_id, in iwl_mvm_reserve_sta_stream()
1583 queue = iwl_mvm_inactivity_check(mvm, mvmsta->deflink.sta_id); in iwl_mvm_reserve_sta_stream()
1591 mvmsta->reserved_queue = queue; in iwl_mvm_reserve_sta_stream()
1594 queue, mvmsta->deflink.sta_id); in iwl_mvm_reserve_sta_stream()
1895 int iwl_mvm_drain_sta(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta, in iwl_mvm_drain_sta() argument
1904 cmd.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color); in iwl_mvm_drain_sta()
1905 cmd.sta_id = mvmsta->deflink.sta_id; in iwl_mvm_drain_sta()
1920 mvmsta->deflink.sta_id); in iwl_mvm_drain_sta()
1925 mvmsta->deflink.sta_id); in iwl_mvm_drain_sta()
3098 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_start() local
3107 if (mvmsta->tid_data[tid].state != IWL_AGG_QUEUED && in iwl_mvm_sta_tx_agg_start()
3108 mvmsta->tid_data[tid].state != IWL_AGG_OFF) { in iwl_mvm_sta_tx_agg_start()
3111 mvmsta->tid_data[tid].state); in iwl_mvm_sta_tx_agg_start()
3117 if (mvmsta->tid_data[tid].txq_id == IWL_MVM_INVALID_QUEUE && in iwl_mvm_sta_tx_agg_start()
3126 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_start()
3134 txq_id = mvmsta->tid_data[tid].txq_id; in iwl_mvm_sta_tx_agg_start()
3136 ret = iwl_mvm_find_free_queue(mvm, mvmsta->deflink.sta_id, in iwl_mvm_sta_tx_agg_start()
3167 tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_start()
3174 mvmsta->deflink.sta_id, tid, txq_id, in iwl_mvm_sta_tx_agg_start()
3195 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_start()
3204 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_oper() local
3205 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_oper()
3214 .sta_id = mvmsta->deflink.sta_id, in iwl_mvm_sta_tx_agg_oper()
3227 BUILD_BUG_ON((sizeof(mvmsta->agg_tids) * BITS_PER_BYTE) in iwl_mvm_sta_tx_agg_oper()
3230 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_oper()
3234 mvmsta->agg_tids |= BIT(tid); in iwl_mvm_sta_tx_agg_oper()
3237 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_oper()
3286 mvmsta->deflink.sta_id, tid, in iwl_mvm_sta_tx_agg_oper()
3317 mvmsta->deflink.lq_sta.rs_drv.pers.max_agg_bufsize = in iwl_mvm_sta_tx_agg_oper()
3318 min(mvmsta->deflink.lq_sta.rs_drv.pers.max_agg_bufsize, in iwl_mvm_sta_tx_agg_oper()
3320 mvmsta->deflink.lq_sta.rs_drv.lq.agg_frame_cnt_limit = in iwl_mvm_sta_tx_agg_oper()
3321 mvmsta->deflink.lq_sta.rs_drv.pers.max_agg_bufsize; in iwl_mvm_sta_tx_agg_oper()
3326 return iwl_mvm_send_lq_cmd(mvm, &mvmsta->deflink.lq_sta.rs_drv.lq); in iwl_mvm_sta_tx_agg_oper()
3330 struct iwl_mvm_sta *mvmsta, in iwl_mvm_unreserve_agg_queue() argument
3356 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_stop() local
3357 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_stop()
3370 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
3375 mvmsta->deflink.sta_id, tid, txq_id, in iwl_mvm_sta_tx_agg_stop()
3378 mvmsta->agg_tids &= ~BIT(tid); in iwl_mvm_sta_tx_agg_stop()
3380 iwl_mvm_unreserve_agg_queue(mvm, mvmsta, tid_data); in iwl_mvm_sta_tx_agg_stop()
3392 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
3415 mvmsta->deflink.sta_id, tid, tid_data->state); in iwl_mvm_sta_tx_agg_stop()
3421 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
3429 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_flush() local
3430 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_flush()
3438 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_flush()
3441 mvmsta->deflink.sta_id, tid, txq_id, in iwl_mvm_sta_tx_agg_flush()
3445 mvmsta->agg_tids &= ~BIT(tid); in iwl_mvm_sta_tx_agg_flush()
3446 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_flush()
3448 iwl_mvm_unreserve_agg_queue(mvm, mvmsta, tid_data); in iwl_mvm_sta_tx_agg_flush()
3451 iwl_mvm_drain_sta(mvm, mvmsta, true); in iwl_mvm_sta_tx_agg_flush()
3454 if (iwl_mvm_flush_sta_tids(mvm, mvmsta->deflink.sta_id, in iwl_mvm_sta_tx_agg_flush()
3464 iwl_mvm_drain_sta(mvm, mvmsta, false); in iwl_mvm_sta_tx_agg_flush()
4040 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_ps_wake() local
4043 .sta_id = mvmsta->deflink.sta_id, in iwl_mvm_sta_modify_ps_wake()
4045 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_ps_wake()
4061 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_sleep_tx_count() local
4064 .sta_id = mvmsta->deflink.sta_id, in iwl_mvm_sta_modify_sleep_tx_count()
4067 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_sleep_tx_count()
4090 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_modify_sleep_tx_count()
4095 tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_modify_sleep_tx_count()
4107 mvmsta->sleep_tx_count = sleep_tx_count; in iwl_mvm_sta_modify_sleep_tx_count()
4108 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_modify_sleep_tx_count()
4122 mvmsta->next_status_eosp = true; in iwl_mvm_sta_modify_sleep_tx_count()
4157 struct iwl_mvm_sta *mvmsta, in iwl_mvm_sta_modify_disable_tx() argument
4162 .sta_id = mvmsta->deflink.sta_id, in iwl_mvm_sta_modify_disable_tx()
4165 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_disable_tx()
4170 iwl_mvm_mld_sta_modify_disable_tx(mvm, mvmsta, disable); in iwl_mvm_sta_modify_disable_tx()
4286 struct iwl_mvm_sta *mvmsta; in iwl_mvm_csa_client_absent() local
4290 mvmsta = iwl_mvm_sta_from_staid_rcu(mvm, mvmvif->deflink.ap_sta_id); in iwl_mvm_csa_client_absent()
4292 if (mvmsta) in iwl_mvm_csa_client_absent()
4293 iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, true); in iwl_mvm_csa_client_absent()