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()
861 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_tvqm_enable_txq() local
866 for_each_sta_active_link(mvmsta->vif, sta, link_sta, link_id) { in iwl_mvm_tvqm_enable_txq()
868 rcu_dereference_protected(mvmsta->link[link_id], in iwl_mvm_tvqm_enable_txq()
899 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_alloc_queue_tvqm() local
903 iwl_mvm_get_wd_timeout(mvm, mvmsta->vif); in iwl_mvm_sta_alloc_queue_tvqm()
910 mvmsta->deflink.sta_id, tid); in iwl_mvm_sta_alloc_queue_tvqm()
911 queue = iwl_mvm_tvqm_enable_txq(mvm, sta, mvmsta->deflink.sta_id, in iwl_mvm_sta_alloc_queue_tvqm()
918 mvm->tvqm_info[queue].sta_id = mvmsta->deflink.sta_id; in iwl_mvm_sta_alloc_queue_tvqm()
922 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue_tvqm()
923 mvmsta->tid_data[tid].txq_id = queue; in iwl_mvm_sta_alloc_queue_tvqm()
924 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue_tvqm()
1048 struct iwl_mvm_sta *mvmsta; in iwl_mvm_unshare_queue() local
1082 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_unshare_queue()
1083 wdg_timeout = iwl_mvm_get_wd_timeout(mvm, mvmsta->vif); in iwl_mvm_unshare_queue()
1085 ssn = IEEE80211_SEQ_TO_SN(mvmsta->tid_data[tid].seq_number); in iwl_mvm_unshare_queue()
1097 if (mvmsta->tid_data[tid].state == IWL_AGG_ON) { in iwl_mvm_unshare_queue()
1100 mvmsta->tid_disable_agg &= ~BIT(tid); in iwl_mvm_unshare_queue()
1102 cmd.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color); in iwl_mvm_unshare_queue()
1103 cmd.sta_id = mvmsta->deflink.sta_id; in iwl_mvm_unshare_queue()
1106 cmd.tfd_queue_msk = cpu_to_le32(mvmsta->tfd_queue_msk); in iwl_mvm_unshare_queue()
1107 cmd.tid_disable_tx = cpu_to_le16(mvmsta->tid_disable_agg); in iwl_mvm_unshare_queue()
1132 struct iwl_mvm_sta *mvmsta, int queue, in iwl_mvm_remove_inactive_tids() argument
1139 lockdep_assert_held(&mvmsta->lock); in iwl_mvm_remove_inactive_tids()
1148 if (iwl_mvm_tid_queued(mvm, &mvmsta->tid_data[tid])) in iwl_mvm_remove_inactive_tids()
1152 if (mvmsta->tid_data[tid].state != IWL_AGG_OFF) in iwl_mvm_remove_inactive_tids()
1169 mvmsta->tid_data[tid].txq_id = IWL_MVM_INVALID_QUEUE; in iwl_mvm_remove_inactive_tids()
1243 struct iwl_mvm_sta *mvmsta; in iwl_mvm_inactivity_check() local
1288 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_inactivity_check()
1290 spin_lock_bh(&mvmsta->lock); in iwl_mvm_inactivity_check()
1291 ret = iwl_mvm_remove_inactive_tids(mvm, mvmsta, i, in iwl_mvm_inactivity_check()
1300 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_inactivity_check()
1325 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_alloc_queue() local
1328 .sta_id = mvmsta->deflink.sta_id, in iwl_mvm_sta_alloc_queue()
1333 iwl_mvm_get_wd_timeout(mvm, mvmsta->vif); in iwl_mvm_sta_alloc_queue()
1348 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1349 tfd_queue_mask = mvmsta->tfd_queue_msk; in iwl_mvm_sta_alloc_queue()
1350 ssn = IEEE80211_SEQ_TO_SN(mvmsta->tid_data[tid].seq_number); in iwl_mvm_sta_alloc_queue()
1351 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1354 queue = iwl_mvm_find_free_queue(mvm, mvmsta->deflink.sta_id, in iwl_mvm_sta_alloc_queue()
1364 if ((queue < 0 && mvmsta->reserved_queue != IEEE80211_INVAL_HW_QUEUE) && in iwl_mvm_sta_alloc_queue()
1365 (mvm->queue_info[mvmsta->reserved_queue].status == in iwl_mvm_sta_alloc_queue()
1367 queue = mvmsta->reserved_queue; in iwl_mvm_sta_alloc_queue()
1373 queue = iwl_mvm_find_free_queue(mvm, mvmsta->deflink.sta_id, in iwl_mvm_sta_alloc_queue()
1378 queue = iwl_mvm_inactivity_check(mvm, mvmsta->deflink.sta_id); in iwl_mvm_sta_alloc_queue()
1418 mvmsta->deflink.sta_id, tid); in iwl_mvm_sta_alloc_queue()
1443 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1450 mvmsta->tid_data[tid].seq_number += 0x10; in iwl_mvm_sta_alloc_queue()
1453 mvmsta->tid_data[tid].txq_id = queue; in iwl_mvm_sta_alloc_queue()
1454 mvmsta->tfd_queue_msk |= BIT(queue); in iwl_mvm_sta_alloc_queue()
1455 queue_state = mvmsta->tid_data[tid].state; in iwl_mvm_sta_alloc_queue()
1457 if (mvmsta->reserved_queue == queue) in iwl_mvm_sta_alloc_queue()
1458 mvmsta->reserved_queue = IEEE80211_INVAL_HW_QUEUE; in iwl_mvm_sta_alloc_queue()
1459 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_alloc_queue()
1485 iwl_mvm_disable_txq(mvm, sta, mvmsta->deflink.sta_id, &queue_tmp, tid); in iwl_mvm_sta_alloc_queue()
1575 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_reserve_sta_stream() local
1592 queue = iwl_mvm_find_free_queue(mvm, mvmsta->deflink.sta_id, in iwl_mvm_reserve_sta_stream()
1597 queue = iwl_mvm_inactivity_check(mvm, mvmsta->deflink.sta_id); in iwl_mvm_reserve_sta_stream()
1605 mvmsta->reserved_queue = queue; in iwl_mvm_reserve_sta_stream()
1608 queue, mvmsta->deflink.sta_id); in iwl_mvm_reserve_sta_stream()
1921 int iwl_mvm_drain_sta(struct iwl_mvm *mvm, struct iwl_mvm_sta *mvmsta, in iwl_mvm_drain_sta() argument
1930 cmd.mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color); in iwl_mvm_drain_sta()
1931 cmd.sta_id = mvmsta->deflink.sta_id; in iwl_mvm_drain_sta()
1946 mvmsta->deflink.sta_id); in iwl_mvm_drain_sta()
1951 mvmsta->deflink.sta_id); in iwl_mvm_drain_sta()
3101 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_start() local
3110 if (mvmsta->tid_data[tid].state != IWL_AGG_QUEUED && in iwl_mvm_sta_tx_agg_start()
3111 mvmsta->tid_data[tid].state != IWL_AGG_OFF) { in iwl_mvm_sta_tx_agg_start()
3114 mvmsta->tid_data[tid].state); in iwl_mvm_sta_tx_agg_start()
3120 if (mvmsta->tid_data[tid].txq_id == IWL_MVM_INVALID_QUEUE && in iwl_mvm_sta_tx_agg_start()
3129 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_start()
3137 txq_id = mvmsta->tid_data[tid].txq_id; in iwl_mvm_sta_tx_agg_start()
3139 ret = iwl_mvm_find_free_queue(mvm, mvmsta->deflink.sta_id, in iwl_mvm_sta_tx_agg_start()
3170 tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_start()
3177 mvmsta->deflink.sta_id, tid, txq_id, in iwl_mvm_sta_tx_agg_start()
3198 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_start()
3207 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_oper() local
3208 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_oper()
3217 .sta_id = mvmsta->deflink.sta_id, in iwl_mvm_sta_tx_agg_oper()
3230 BUILD_BUG_ON((sizeof(mvmsta->agg_tids) * BITS_PER_BYTE) in iwl_mvm_sta_tx_agg_oper()
3233 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_oper()
3237 mvmsta->agg_tids |= BIT(tid); in iwl_mvm_sta_tx_agg_oper()
3240 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_oper()
3289 mvmsta->deflink.sta_id, tid, in iwl_mvm_sta_tx_agg_oper()
3320 mvmsta->deflink.lq_sta.rs_drv.pers.max_agg_bufsize = in iwl_mvm_sta_tx_agg_oper()
3321 min(mvmsta->deflink.lq_sta.rs_drv.pers.max_agg_bufsize, in iwl_mvm_sta_tx_agg_oper()
3323 mvmsta->deflink.lq_sta.rs_drv.lq.agg_frame_cnt_limit = in iwl_mvm_sta_tx_agg_oper()
3324 mvmsta->deflink.lq_sta.rs_drv.pers.max_agg_bufsize; in iwl_mvm_sta_tx_agg_oper()
3329 return iwl_mvm_send_lq_cmd(mvm, &mvmsta->deflink.lq_sta.rs_drv.lq); in iwl_mvm_sta_tx_agg_oper()
3333 struct iwl_mvm_sta *mvmsta, in iwl_mvm_unreserve_agg_queue() argument
3359 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_stop() local
3360 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_stop()
3373 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
3378 mvmsta->deflink.sta_id, tid, txq_id, in iwl_mvm_sta_tx_agg_stop()
3381 mvmsta->agg_tids &= ~BIT(tid); in iwl_mvm_sta_tx_agg_stop()
3383 iwl_mvm_unreserve_agg_queue(mvm, mvmsta, tid_data); in iwl_mvm_sta_tx_agg_stop()
3395 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
3418 mvmsta->deflink.sta_id, tid, tid_data->state); in iwl_mvm_sta_tx_agg_stop()
3424 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_stop()
3432 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_flush() local
3433 struct iwl_mvm_tid_data *tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_tx_agg_flush()
3441 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_flush()
3444 mvmsta->deflink.sta_id, tid, txq_id, in iwl_mvm_sta_tx_agg_flush()
3448 mvmsta->agg_tids &= ~BIT(tid); in iwl_mvm_sta_tx_agg_flush()
3449 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_tx_agg_flush()
3451 iwl_mvm_unreserve_agg_queue(mvm, mvmsta, tid_data); in iwl_mvm_sta_tx_agg_flush()
3454 iwl_mvm_drain_sta(mvm, mvmsta, true); in iwl_mvm_sta_tx_agg_flush()
3457 if (iwl_mvm_flush_sta_tids(mvm, mvmsta->deflink.sta_id, in iwl_mvm_sta_tx_agg_flush()
3467 iwl_mvm_drain_sta(mvm, mvmsta, false); in iwl_mvm_sta_tx_agg_flush()
4046 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_ps_wake() local
4049 .sta_id = mvmsta->deflink.sta_id, in iwl_mvm_sta_modify_ps_wake()
4051 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_ps_wake()
4067 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_sleep_tx_count() local
4070 .sta_id = mvmsta->deflink.sta_id, in iwl_mvm_sta_modify_sleep_tx_count()
4073 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_sleep_tx_count()
4096 spin_lock_bh(&mvmsta->lock); in iwl_mvm_sta_modify_sleep_tx_count()
4101 tid_data = &mvmsta->tid_data[tid]; in iwl_mvm_sta_modify_sleep_tx_count()
4113 mvmsta->sleep_tx_count = sleep_tx_count; in iwl_mvm_sta_modify_sleep_tx_count()
4114 spin_unlock_bh(&mvmsta->lock); in iwl_mvm_sta_modify_sleep_tx_count()
4128 mvmsta->next_status_eosp = true; in iwl_mvm_sta_modify_sleep_tx_count()
4161 struct iwl_mvm_sta *mvmsta, in iwl_mvm_sta_modify_disable_tx() argument
4166 .sta_id = mvmsta->deflink.sta_id, in iwl_mvm_sta_modify_disable_tx()
4169 .mac_id_n_color = cpu_to_le32(mvmsta->mac_id_n_color), in iwl_mvm_sta_modify_disable_tx()
4175 iwl_mvm_mld_sta_modify_disable_tx(mvm, mvmsta, disable); in iwl_mvm_sta_modify_disable_tx()
4294 struct iwl_mvm_sta *mvmsta; in iwl_mvm_csa_client_absent() local
4298 mvmsta = iwl_mvm_sta_from_staid_rcu(mvm, mvmvif->deflink.ap_sta_id); in iwl_mvm_csa_client_absent()
4300 if (mvmsta) in iwl_mvm_csa_client_absent()
4301 iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, true); in iwl_mvm_csa_client_absent()