Lines Matching refs:sta_id

30 	int sta_id;  in iwl_mvm_find_free_sta_id()  local
43 for (sta_id = 0; sta_id < mvm->fw->ucode_capa.num_stations; sta_id++) { in iwl_mvm_find_free_sta_id()
44 if (BIT(sta_id) & reserved_ids) in iwl_mvm_find_free_sta_id()
47 if (!rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_find_free_sta_id()
49 return sta_id; in iwl_mvm_find_free_sta_id()
60 .sta_id = mvm_sta->sta_id, in iwl_mvm_sta_send_to_fw()
249 sta = rcu_dereference(ba_data->mvm->fw_id_to_mac_id[ba_data->sta_id]); in iwl_mvm_rx_agg_session_expired()
278 u8 sta_id; in iwl_mvm_invalidate_sta_queue() local
283 sta_id = mvm->queue_info[queue].ra_sta_id; in iwl_mvm_invalidate_sta_queue()
287 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_invalidate_sta_queue()
299 cmd.sta_id = mvmsta->sta_id; in iwl_mvm_invalidate_sta_queue()
354 cmd.sta_id = mvm->queue_info[queue].ra_sta_id; in iwl_mvm_disable_txq()
391 u8 sta_id; in iwl_mvm_get_queue_agg_tids() local
399 sta_id = mvm->queue_info[queue].ra_sta_id; in iwl_mvm_get_queue_agg_tids()
402 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_get_queue_agg_tids()
431 u8 sta_id; in iwl_mvm_remove_sta_queue_marking() local
439 sta_id = mvm->queue_info[queue].ra_sta_id; in iwl_mvm_remove_sta_queue_marking()
444 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_remove_sta_queue_marking()
489 u8 sta_id, tid; in iwl_mvm_free_inactive_queue() local
500 sta_id = mvm->queue_info[queue].ra_sta_id; in iwl_mvm_free_inactive_queue()
503 same_sta = sta_id == new_sta_id; in iwl_mvm_free_inactive_queue()
505 mvmsta = iwl_mvm_sta_from_staid_protected(mvm, sta_id); in iwl_mvm_free_inactive_queue()
634 cmd.sta_id = mvm->queue_info[queue].ra_sta_id; in iwl_mvm_redirect_queue()
670 cmd.sta_id, tid, IWL_FRAME_LIMIT, ssn); in iwl_mvm_redirect_queue()
691 static int iwl_mvm_find_free_queue(struct iwl_mvm *mvm, u8 sta_id, in iwl_mvm_find_free_queue() argument
717 u8 sta_id, u8 tid, unsigned int timeout) in iwl_mvm_tvqm_enable_txq() argument
732 sta_id, tid, SCD_QUEUE_CFG, in iwl_mvm_tvqm_enable_txq()
738 size, sta_id, tid, queue); in iwl_mvm_tvqm_enable_txq()
746 queue, sta_id, tid); in iwl_mvm_tvqm_enable_txq()
766 mvmsta->sta_id, tid); in iwl_mvm_sta_alloc_queue_tvqm()
767 queue = iwl_mvm_tvqm_enable_txq(mvm, mvmsta->sta_id, tid, wdg_timeout); in iwl_mvm_sta_alloc_queue_tvqm()
773 mvm->tvqm_info[queue].sta_id = mvmsta->sta_id; in iwl_mvm_sta_alloc_queue_tvqm()
786 int queue, u8 sta_id, u8 tid) in iwl_mvm_update_txq_mapping() argument
802 mvm->queue_info[queue].ra_sta_id = sta_id; in iwl_mvm_update_txq_mapping()
837 .sta_id = cfg->sta_id, in iwl_mvm_enable_txq()
849 if (!iwl_mvm_update_txq_mapping(mvm, sta, queue, cfg->sta_id, cfg->tid)) in iwl_mvm_enable_txq()
904 u8 sta_id; in iwl_mvm_unshare_queue() local
917 sta_id = mvm->queue_info[queue].ra_sta_id; in iwl_mvm_unshare_queue()
931 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_unshare_queue()
958 cmd.sta_id = mvmsta->sta_id; in iwl_mvm_unshare_queue()
1099 u8 sta_id; in iwl_mvm_inactivity_check() local
1132 sta_id = mvm->queue_info[i].ra_sta_id; in iwl_mvm_inactivity_check()
1133 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_inactivity_check()
1183 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_alloc_queue()
1209 queue = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_sta_alloc_queue()
1228 queue = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_sta_alloc_queue()
1233 queue = iwl_mvm_inactivity_check(mvm, mvmsta->sta_id); in iwl_mvm_sta_alloc_queue()
1257 tid, cfg.sta_id); in iwl_mvm_sta_alloc_queue()
1273 mvmsta->sta_id, tid); in iwl_mvm_sta_alloc_queue()
1409 queue = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_reserve_sta_stream()
1414 queue = iwl_mvm_inactivity_check(mvm, mvmsta->sta_id); in iwl_mvm_reserve_sta_stream()
1425 queue, mvmsta->sta_id); in iwl_mvm_reserve_sta_stream()
1445 .sta_id = mvm_sta->sta_id, in iwl_mvm_realloc_queues_after_restart()
1467 mvm_sta->sta_id, i); in iwl_mvm_realloc_queues_after_restart()
1468 txq_id = iwl_mvm_tvqm_enable_txq(mvm, mvm_sta->sta_id, in iwl_mvm_realloc_queues_after_restart()
1497 mvm_sta->sta_id, i, txq_id); in iwl_mvm_realloc_queues_after_restart()
1517 cmd.sta_id = sta->sta_id; in iwl_mvm_add_int_sta_common()
1563 int i, ret, sta_id; in iwl_mvm_add_sta() local
1570 sta_id = iwl_mvm_find_free_sta_id(mvm, in iwl_mvm_add_sta()
1573 sta_id = mvm_sta->sta_id; in iwl_mvm_add_sta()
1575 if (sta_id == IWL_MVM_INVALID_STA) in iwl_mvm_add_sta()
1583 .sta_id = sta_id, in iwl_mvm_add_sta()
1602 mvm_sta->sta_id = sta_id; in iwl_mvm_add_sta()
1691 mvmvif->ap_sta_id = sta_id; in iwl_mvm_add_sta()
1697 rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta); in iwl_mvm_add_sta()
1715 cmd.sta_id = mvmsta->sta_id; in iwl_mvm_drain_sta()
1730 mvmsta->sta_id); in iwl_mvm_drain_sta()
1735 mvmsta->sta_id); in iwl_mvm_drain_sta()
1747 static int iwl_mvm_rm_sta_common(struct iwl_mvm *mvm, u8 sta_id) in iwl_mvm_rm_sta_common() argument
1751 .sta_id = sta_id, in iwl_mvm_rm_sta_common()
1755 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_rm_sta_common()
1767 IWL_ERR(mvm, "Failed to remove station. Id=%d\n", sta_id); in iwl_mvm_rm_sta_common()
1830 u8 sta_id = mvm_sta->sta_id; in iwl_mvm_rm_sta() local
1875 sta_id, reserved_txq, *status)) in iwl_mvm_rm_sta()
1882 mvmvif->ap_sta_id == sta_id) { in iwl_mvm_rm_sta()
1895 if (WARN_ON_ONCE(mvm->tdls_cs.peer.sta_id == sta_id)) { in iwl_mvm_rm_sta()
1896 mvm->tdls_cs.peer.sta_id = IWL_MVM_INVALID_STA; in iwl_mvm_rm_sta()
1907 ret = iwl_mvm_rm_sta_common(mvm, mvm_sta->sta_id); in iwl_mvm_rm_sta()
1908 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[mvm_sta->sta_id], NULL); in iwl_mvm_rm_sta()
1915 u8 sta_id) in iwl_mvm_rm_sta_id() argument
1917 int ret = iwl_mvm_rm_sta_common(mvm, sta_id); in iwl_mvm_rm_sta_id()
1921 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta_id], NULL); in iwl_mvm_rm_sta_id()
1931 sta->sta_id == IWL_MVM_INVALID_STA) { in iwl_mvm_allocate_int_sta()
1932 sta->sta_id = iwl_mvm_find_free_sta_id(mvm, iftype); in iwl_mvm_allocate_int_sta()
1933 if (WARN_ON_ONCE(sta->sta_id == IWL_MVM_INVALID_STA)) in iwl_mvm_allocate_int_sta()
1941 rcu_assign_pointer(mvm->fw_id_to_mac_id[sta->sta_id], ERR_PTR(-EINVAL)); in iwl_mvm_allocate_int_sta()
1947 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta->sta_id], NULL); in iwl_mvm_dealloc_int_sta()
1949 sta->sta_id = IWL_MVM_INVALID_STA; in iwl_mvm_dealloc_int_sta()
1953 u8 sta_id, u8 fifo) in iwl_mvm_enable_aux_snif_queue() argument
1959 .sta_id = sta_id, in iwl_mvm_enable_aux_snif_queue()
1970 static int iwl_mvm_enable_aux_snif_queue_tvqm(struct iwl_mvm *mvm, u8 sta_id) in iwl_mvm_enable_aux_snif_queue_tvqm() argument
1977 return iwl_mvm_tvqm_enable_txq(mvm, sta_id, IWL_MAX_TID_COUNT, in iwl_mvm_enable_aux_snif_queue_tvqm()
1990 iwl_mvm_enable_aux_snif_queue(mvm, *queue, sta->sta_id, fifo); in iwl_mvm_add_int_sta_with_queue()
2007 txq = iwl_mvm_enable_aux_snif_queue_tvqm(mvm, sta->sta_id); in iwl_mvm_add_int_sta_with_queue()
2009 iwl_mvm_rm_sta_common(mvm, sta->sta_id); in iwl_mvm_add_int_sta_with_queue()
2065 if (WARN_ON_ONCE(mvm->snif_sta.sta_id == IWL_MVM_INVALID_STA)) in iwl_mvm_rm_snif_sta()
2069 ret = iwl_mvm_rm_sta_common(mvm, mvm->snif_sta.sta_id); in iwl_mvm_rm_snif_sta()
2082 if (WARN_ON_ONCE(mvm->aux_sta.sta_id == IWL_MVM_INVALID_STA)) in iwl_mvm_rm_aux_sta()
2086 ret = iwl_mvm_rm_sta_common(mvm, mvm->aux_sta.sta_id); in iwl_mvm_rm_aux_sta()
2119 .sta_id = mvmvif->bcast_sta.sta_id, in iwl_mvm_send_add_bcast_sta()
2146 if (WARN_ON_ONCE(bsta->sta_id == IWL_MVM_INVALID_STA)) in iwl_mvm_send_add_bcast_sta()
2159 queue = iwl_mvm_tvqm_enable_txq(mvm, bsta->sta_id, in iwl_mvm_send_add_bcast_sta()
2163 iwl_mvm_rm_sta_common(mvm, bsta->sta_id); in iwl_mvm_send_add_bcast_sta()
2221 ret = iwl_mvm_rm_sta_common(mvm, mvmvif->bcast_sta.sta_id); in iwl_mvm_send_rm_bcast_sta()
2306 .sta_id = msta->sta_id, in iwl_mvm_add_mcast_sta()
2352 int queue = iwl_mvm_tvqm_enable_txq(mvm, msta->sta_id, in iwl_mvm_add_mcast_sta()
2371 static int __iwl_mvm_remove_sta_key(struct iwl_mvm *mvm, u8 sta_id, in __iwl_mvm_remove_sta_key() argument
2386 if (sta_id == IWL_MVM_INVALID_STA) in __iwl_mvm_remove_sta_key()
2403 u.cmd.common.sta_id = sta_id; in __iwl_mvm_remove_sta_key()
2439 ret = iwl_mvm_rm_sta_common(mvm, mvmvif->mcast_sta.sta_id); in iwl_mvm_rm_mcast_sta()
2587 cmd.sta_id = mvm_sta->sta_id; in iwl_mvm_sta_rx_agg()
2647 baid_data->sta_id = mvm_sta->sta_id; in iwl_mvm_sta_rx_agg()
2662 mvm_sta->sta_id, tid, baid); in iwl_mvm_sta_rx_agg()
2714 cmd.sta_id = mvm_sta->sta_id; in iwl_mvm_sta_tx_agg()
2806 ret = iwl_mvm_find_free_queue(mvm, mvmsta->sta_id, in iwl_mvm_sta_tx_agg_start()
2844 mvmsta->sta_id, tid, txq_id, tid_data->ssn, in iwl_mvm_sta_tx_agg_start()
2883 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_tx_agg_oper()
2955 mvmsta->sta_id, tid, in iwl_mvm_sta_tx_agg_oper()
3042 mvmsta->sta_id, tid, txq_id, tid_data->state); in iwl_mvm_sta_tx_agg_stop()
3081 mvmsta->sta_id, tid, tid_data->state); in iwl_mvm_sta_tx_agg_stop()
3107 mvmsta->sta_id, tid, txq_id, tid_data->state); in iwl_mvm_sta_tx_agg_flush()
3119 if (iwl_mvm_flush_sta_tids(mvm, mvmsta->sta_id, in iwl_mvm_sta_tx_agg_flush()
3180 u8 sta_id = mvmvif->ap_sta_id; in iwl_mvm_get_key_sta() local
3182 sta = rcu_dereference_check(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_get_key_sta()
3214 u32 sta_id, in iwl_mvm_send_sta_key() argument
3235 if (sta_id == IWL_MVM_INVALID_STA) in iwl_mvm_send_sta_key()
3298 u.cmd.common.sta_id = sta_id; in iwl_mvm_send_sta_key()
3369 u8 sta_id, bool remove_key) in iwl_mvm_send_sta_igtk() argument
3387 igtk_cmd.sta_id = cpu_to_le32(sta_id); in iwl_mvm_send_sta_igtk()
3391 if (sta_id == IWL_MVM_INVALID_STA) in iwl_mvm_send_sta_igtk()
3428 keyconf->keyidx, igtk_cmd.sta_id); in iwl_mvm_send_sta_igtk()
3434 .sta_id = igtk_cmd.sta_id, in iwl_mvm_send_sta_igtk()
3459 u8 sta_id = mvmvif->ap_sta_id; in iwl_mvm_get_mac_addr() local
3460 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_get_mac_addr()
3479 u32 sta_id; in __iwl_mvm_set_sta_key() local
3485 sta_id = mvm_sta->sta_id; in __iwl_mvm_set_sta_key()
3491 sta_id = mvmvif->mcast_sta.sta_id; in __iwl_mvm_set_sta_key()
3503 return iwl_mvm_send_sta_key(mvm, sta_id, keyconf, mcast, in __iwl_mvm_set_sta_key()
3508 return iwl_mvm_send_sta_key(mvm, sta_id, keyconf, mcast, in __iwl_mvm_set_sta_key()
3520 u8 sta_id = IWL_MVM_INVALID_STA; in iwl_mvm_set_sta_key() local
3534 sta_id = mvm_sta->sta_id; in iwl_mvm_set_sta_key()
3543 mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_set_sta_key()
3556 sta_id = mvmvif->mcast_sta.sta_id; in iwl_mvm_set_sta_key()
3562 ret = iwl_mvm_send_sta_igtk(mvm, keyconf, sta_id, false); in iwl_mvm_set_sta_key()
3600 __iwl_mvm_remove_sta_key(mvm, sta_id, keyconf, mcast); in iwl_mvm_set_sta_key()
3621 u8 sta_id = IWL_MVM_INVALID_STA; in iwl_mvm_remove_sta_key() local
3629 sta_id = mvm_sta->sta_id; in iwl_mvm_remove_sta_key()
3631 sta_id = iwl_mvm_vif_from_mac80211(vif)->mcast_sta.sta_id; in iwl_mvm_remove_sta_key()
3635 keyconf->keyidx, sta_id); in iwl_mvm_remove_sta_key()
3640 return iwl_mvm_send_sta_igtk(mvm, keyconf, sta_id, true); in iwl_mvm_remove_sta_key()
3660 ret = __iwl_mvm_remove_sta_key(mvm, sta_id, keyconf, mcast); in iwl_mvm_remove_sta_key()
3667 ret = __iwl_mvm_remove_sta_key(mvm, sta_id, keyconf, !mcast); in iwl_mvm_remove_sta_key()
3687 iwl_mvm_send_sta_key(mvm, mvm_sta->sta_id, keyconf, mcast, in iwl_mvm_update_tkip_key()
3701 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_ps_wake()
3722 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_sleep_tx_count()
3802 u32 sta_id = le32_to_cpu(notif->sta_id); in iwl_mvm_rx_eosp_notif() local
3804 if (WARN_ON_ONCE(sta_id >= mvm->fw->ucode_capa.num_stations)) in iwl_mvm_rx_eosp_notif()
3808 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_rx_eosp_notif()
3819 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_disable_tx()
3867 .sta_id = sta->sta_id, in iwl_mvm_int_sta_modify_disable_tx()
3910 if (mvmvif->mcast_sta.sta_id != IWL_MVM_INVALID_STA) in iwl_mvm_modify_all_sta_disable_tx()
3918 if (!disable && mvmvif->bcast_sta.sta_id != IWL_MVM_INVALID_STA) in iwl_mvm_modify_all_sta_disable_tx()
3983 ret = iwl_mvm_send_sta_key(mvm, sta->sta_id, keyconf, false, in iwl_mvm_add_pasn_sta()