Lines Matching refs:sta_id
74 int sta_id; in iwl_mvm_find_free_sta_id() local
87 for (sta_id = 0; sta_id < IWL_MVM_STATION_COUNT; sta_id++) { in iwl_mvm_find_free_sta_id()
88 if (BIT(sta_id) & reserved_ids) in iwl_mvm_find_free_sta_id()
91 if (!rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_find_free_sta_id()
93 return sta_id; in iwl_mvm_find_free_sta_id()
104 .sta_id = mvm_sta->sta_id, in iwl_mvm_sta_send_to_fw()
265 int i, ret, sta_id; in iwl_mvm_add_sta() local
270 sta_id = iwl_mvm_find_free_sta_id(mvm, in iwl_mvm_add_sta()
273 sta_id = mvm_sta->sta_id; in iwl_mvm_add_sta()
275 if (sta_id == IWL_MVM_STATION_COUNT) in iwl_mvm_add_sta()
280 mvm_sta->sta_id = sta_id; in iwl_mvm_add_sta()
289 atomic_set(&mvm->pending_frames[sta_id], 0); in iwl_mvm_add_sta()
319 mvmvif->ap_sta_id = sta_id; in iwl_mvm_add_sta()
325 rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta); in iwl_mvm_add_sta()
351 cmd.sta_id = mvmsta->sta_id; in iwl_mvm_drain_sta()
365 mvmsta->sta_id); in iwl_mvm_drain_sta()
370 mvmsta->sta_id); in iwl_mvm_drain_sta()
382 static int iwl_mvm_rm_sta_common(struct iwl_mvm *mvm, u8 sta_id) in iwl_mvm_rm_sta_common() argument
386 .sta_id = sta_id, in iwl_mvm_rm_sta_common()
390 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_rm_sta_common()
402 IWL_ERR(mvm, "Failed to remove station. Id=%d\n", sta_id); in iwl_mvm_rm_sta_common()
412 u8 sta_id; in iwl_mvm_sta_drained_wk() local
423 for_each_set_bit(sta_id, mvm->sta_drained, IWL_MVM_STATION_COUNT) { in iwl_mvm_sta_drained_wk()
426 rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_sta_drained_wk()
442 sta_id); in iwl_mvm_sta_drained_wk()
448 sta_id); in iwl_mvm_sta_drained_wk()
456 ret = iwl_mvm_rm_sta_common(mvm, sta_id); in iwl_mvm_sta_drained_wk()
460 sta_id); in iwl_mvm_sta_drained_wk()
463 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta_id], NULL); in iwl_mvm_sta_drained_wk()
464 clear_bit(sta_id, mvm->sta_drained); in iwl_mvm_sta_drained_wk()
466 if (mvm->tfd_drained[sta_id]) { in iwl_mvm_sta_drained_wk()
467 unsigned long i, msk = mvm->tfd_drained[sta_id]; in iwl_mvm_sta_drained_wk()
472 mvm->tfd_drained[sta_id] = 0; in iwl_mvm_sta_drained_wk()
474 sta_id, msk); in iwl_mvm_sta_drained_wk()
492 mvmvif->ap_sta_id == mvm_sta->sta_id) { in iwl_mvm_rm_sta()
514 if (mvm->d0i3_ap_sta_id == mvm_sta->sta_id) in iwl_mvm_rm_sta()
522 if (WARN_ON_ONCE(mvm->tdls_cs.peer.sta_id == mvm_sta->sta_id)) { in iwl_mvm_rm_sta()
523 mvm->tdls_cs.peer.sta_id = IWL_MVM_STATION_COUNT; in iwl_mvm_rm_sta()
536 if (atomic_read(&mvm->pending_frames[mvm_sta->sta_id])) { in iwl_mvm_rm_sta()
537 rcu_assign_pointer(mvm->fw_id_to_mac_id[mvm_sta->sta_id], in iwl_mvm_rm_sta()
543 mvm->tfd_drained[mvm_sta->sta_id] = in iwl_mvm_rm_sta()
546 mvm_sta->sta_id); in iwl_mvm_rm_sta()
556 ret = iwl_mvm_rm_sta_common(mvm, mvm_sta->sta_id); in iwl_mvm_rm_sta()
557 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[mvm_sta->sta_id], NULL); in iwl_mvm_rm_sta()
565 u8 sta_id) in iwl_mvm_rm_sta_id() argument
567 int ret = iwl_mvm_rm_sta_common(mvm, sta_id); in iwl_mvm_rm_sta_id()
571 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta_id], NULL); in iwl_mvm_rm_sta_id()
580 sta->sta_id = iwl_mvm_find_free_sta_id(mvm, iftype); in iwl_mvm_allocate_int_sta()
581 if (WARN_ON_ONCE(sta->sta_id == IWL_MVM_STATION_COUNT)) in iwl_mvm_allocate_int_sta()
588 rcu_assign_pointer(mvm->fw_id_to_mac_id[sta->sta_id], ERR_PTR(-EINVAL)); in iwl_mvm_allocate_int_sta()
595 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta->sta_id], NULL); in iwl_mvm_dealloc_int_sta()
597 sta->sta_id = IWL_MVM_STATION_COUNT; in iwl_mvm_dealloc_int_sta()
612 cmd.sta_id = sta->sta_id; in iwl_mvm_add_int_sta_common()
693 if (WARN_ON_ONCE(bsta->sta_id == IWL_MVM_STATION_COUNT)) in iwl_mvm_send_add_bcast_sta()
709 ret = iwl_mvm_rm_sta_common(mvm, mvmvif->bcast_sta.sta_id); in iwl_mvm_send_rm_bcast_sta()
805 cmd.sta_id = mvm_sta->sta_id; in iwl_mvm_sta_rx_agg()
868 cmd.sta_id = mvm_sta->sta_id; in iwl_mvm_sta_tx_agg()
963 mvmsta->sta_id, tid, txq_id, tid_data->ssn, in iwl_mvm_sta_tx_agg_start()
1007 iwl_mvm_enable_agg_txq(mvm, queue, fifo, mvmsta->sta_id, tid, in iwl_mvm_sta_tx_agg_oper()
1050 mvmsta->sta_id, tid, txq_id, tid_data->state); in iwl_mvm_sta_tx_agg_stop()
1098 mvmsta->sta_id, tid, tid_data->state); in iwl_mvm_sta_tx_agg_stop()
1124 mvmsta->sta_id, tid, txq_id, tid_data->state); in iwl_mvm_sta_tx_agg_flush()
1173 return mvm_sta->sta_id; in iwl_mvm_get_key_sta_id()
1199 u8 sta_id = mvm_sta->sta_id; in iwl_mvm_send_sta_key() local
1235 cmd.sta_id = sta_id; in iwl_mvm_send_sta_key()
1260 u8 sta_id, bool remove_key) in iwl_mvm_send_sta_igtk() argument
1271 igtk_cmd.sta_id = cpu_to_le32(sta_id); in iwl_mvm_send_sta_igtk()
1294 igtk_cmd.sta_id); in iwl_mvm_send_sta_igtk()
1312 u8 sta_id = mvmvif->ap_sta_id; in iwl_mvm_get_mac_addr() local
1313 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_get_mac_addr()
1357 static int __iwl_mvm_remove_sta_key(struct iwl_mvm *mvm, u8 sta_id, in __iwl_mvm_remove_sta_key() argument
1376 cmd.sta_id = sta_id; in __iwl_mvm_remove_sta_key()
1402 u8 sta_id; in iwl_mvm_set_sta_key() local
1408 sta_id = iwl_mvm_get_key_sta_id(vif, sta); in iwl_mvm_set_sta_key()
1409 if (sta_id == IWL_MVM_STATION_COUNT) { in iwl_mvm_set_sta_key()
1415 ret = iwl_mvm_send_sta_igtk(mvm, keyconf, sta_id, false); in iwl_mvm_set_sta_key()
1424 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_set_sta_key()
1463 __iwl_mvm_remove_sta_key(mvm, sta_id, keyconf, mcast); in iwl_mvm_set_sta_key()
1480 u8 sta_id; in iwl_mvm_remove_sta_key() local
1486 sta_id = iwl_mvm_get_key_sta_id(vif, sta); in iwl_mvm_remove_sta_key()
1489 keyconf->keyidx, sta_id); in iwl_mvm_remove_sta_key()
1492 return iwl_mvm_send_sta_igtk(mvm, keyconf, sta_id, true); in iwl_mvm_remove_sta_key()
1500 if (sta_id == IWL_MVM_STATION_COUNT) { in iwl_mvm_remove_sta_key()
1512 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_remove_sta_key()
1523 ret = __iwl_mvm_remove_sta_key(mvm, sta_id, keyconf, mcast); in iwl_mvm_remove_sta_key()
1530 ret = __iwl_mvm_remove_sta_key(mvm, sta_id, keyconf, !mcast); in iwl_mvm_remove_sta_key()
1542 u8 sta_id = iwl_mvm_get_key_sta_id(vif, sta); in iwl_mvm_update_tkip_key() local
1545 if (WARN_ON_ONCE(sta_id == IWL_MVM_STATION_COUNT)) in iwl_mvm_update_tkip_key()
1551 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_update_tkip_key()
1570 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_ps_wake()
1590 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_sleep_tx_count()
1670 u32 sta_id = le32_to_cpu(notif->sta_id); in iwl_mvm_rx_eosp_notif() local
1672 if (WARN_ON_ONCE(sta_id >= IWL_MVM_STATION_COUNT)) in iwl_mvm_rx_eosp_notif()
1676 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_rx_eosp_notif()
1689 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_disable_tx()
1721 if (disable || !atomic_read(&mvm->pending_frames[mvm_sta->sta_id])) in iwl_mvm_sta_modify_disable_tx_ap()