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()
267 int i, ret, sta_id; in iwl_mvm_add_sta() local
272 sta_id = iwl_mvm_find_free_sta_id(mvm, in iwl_mvm_add_sta()
275 sta_id = mvm_sta->sta_id; in iwl_mvm_add_sta()
277 if (sta_id == IWL_MVM_STATION_COUNT) in iwl_mvm_add_sta()
287 mvm_sta->sta_id = sta_id; in iwl_mvm_add_sta()
296 atomic_set(&mvm->pending_frames[sta_id], 0); in iwl_mvm_add_sta()
326 mvmvif->ap_sta_id = sta_id; in iwl_mvm_add_sta()
332 rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta); in iwl_mvm_add_sta()
358 cmd.sta_id = mvmsta->sta_id; in iwl_mvm_drain_sta()
372 mvmsta->sta_id); in iwl_mvm_drain_sta()
377 mvmsta->sta_id); in iwl_mvm_drain_sta()
389 static int iwl_mvm_rm_sta_common(struct iwl_mvm *mvm, u8 sta_id) in iwl_mvm_rm_sta_common() argument
393 .sta_id = sta_id, in iwl_mvm_rm_sta_common()
397 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_rm_sta_common()
409 IWL_ERR(mvm, "Failed to remove station. Id=%d\n", sta_id); in iwl_mvm_rm_sta_common()
419 u8 sta_id; in iwl_mvm_sta_drained_wk() local
430 for_each_set_bit(sta_id, mvm->sta_drained, IWL_MVM_STATION_COUNT) { in iwl_mvm_sta_drained_wk()
433 rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_sta_drained_wk()
449 sta_id); in iwl_mvm_sta_drained_wk()
455 sta_id); in iwl_mvm_sta_drained_wk()
463 ret = iwl_mvm_rm_sta_common(mvm, sta_id); in iwl_mvm_sta_drained_wk()
467 sta_id); in iwl_mvm_sta_drained_wk()
470 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta_id], NULL); in iwl_mvm_sta_drained_wk()
471 clear_bit(sta_id, mvm->sta_drained); in iwl_mvm_sta_drained_wk()
473 if (mvm->tfd_drained[sta_id]) { in iwl_mvm_sta_drained_wk()
474 unsigned long i, msk = mvm->tfd_drained[sta_id]; in iwl_mvm_sta_drained_wk()
480 mvm->tfd_drained[sta_id] = 0; in iwl_mvm_sta_drained_wk()
482 sta_id, msk); in iwl_mvm_sta_drained_wk()
500 mvmvif->ap_sta_id == mvm_sta->sta_id) { in iwl_mvm_rm_sta()
522 if (mvm->d0i3_ap_sta_id == mvm_sta->sta_id) in iwl_mvm_rm_sta()
530 if (WARN_ON_ONCE(mvm->tdls_cs.peer.sta_id == mvm_sta->sta_id)) { in iwl_mvm_rm_sta()
531 mvm->tdls_cs.peer.sta_id = IWL_MVM_STATION_COUNT; in iwl_mvm_rm_sta()
544 if (atomic_read(&mvm->pending_frames[mvm_sta->sta_id])) { in iwl_mvm_rm_sta()
545 rcu_assign_pointer(mvm->fw_id_to_mac_id[mvm_sta->sta_id], in iwl_mvm_rm_sta()
551 mvm->tfd_drained[mvm_sta->sta_id] = in iwl_mvm_rm_sta()
554 mvm_sta->sta_id); in iwl_mvm_rm_sta()
564 ret = iwl_mvm_rm_sta_common(mvm, mvm_sta->sta_id); in iwl_mvm_rm_sta()
565 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[mvm_sta->sta_id], NULL); in iwl_mvm_rm_sta()
573 u8 sta_id) in iwl_mvm_rm_sta_id() argument
575 int ret = iwl_mvm_rm_sta_common(mvm, sta_id); in iwl_mvm_rm_sta_id()
579 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta_id], NULL); in iwl_mvm_rm_sta_id()
588 sta->sta_id = iwl_mvm_find_free_sta_id(mvm, iftype); in iwl_mvm_allocate_int_sta()
589 if (WARN_ON_ONCE(sta->sta_id == IWL_MVM_STATION_COUNT)) in iwl_mvm_allocate_int_sta()
596 rcu_assign_pointer(mvm->fw_id_to_mac_id[sta->sta_id], ERR_PTR(-EINVAL)); in iwl_mvm_allocate_int_sta()
603 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta->sta_id], NULL); in iwl_mvm_dealloc_int_sta()
605 sta->sta_id = IWL_MVM_STATION_COUNT; in iwl_mvm_dealloc_int_sta()
620 cmd.sta_id = sta->sta_id; in iwl_mvm_add_int_sta_common()
701 if (WARN_ON_ONCE(bsta->sta_id == IWL_MVM_STATION_COUNT)) in iwl_mvm_send_add_bcast_sta()
717 ret = iwl_mvm_rm_sta_common(mvm, mvmvif->bcast_sta.sta_id); in iwl_mvm_send_rm_bcast_sta()
813 cmd.sta_id = mvm_sta->sta_id; in iwl_mvm_sta_rx_agg()
876 cmd.sta_id = mvm_sta->sta_id; in iwl_mvm_sta_tx_agg()
971 mvmsta->sta_id, tid, txq_id, tid_data->ssn, in iwl_mvm_sta_tx_agg_start()
1016 mvmsta->sta_id, tid, buf_size, ssn, wdg_timeout); in iwl_mvm_sta_tx_agg_oper()
1067 mvmsta->sta_id, tid, txq_id, tid_data->state); in iwl_mvm_sta_tx_agg_stop()
1120 mvmsta->sta_id, tid, tid_data->state); in iwl_mvm_sta_tx_agg_stop()
1146 mvmsta->sta_id, tid, txq_id, tid_data->state); in iwl_mvm_sta_tx_agg_flush()
1213 return mvm_sta->sta_id; in iwl_mvm_get_key_sta_id()
1223 u8 sta_id = mvmvif->ap_sta_id; in iwl_mvm_get_key_sta_id() local
1225 sta = rcu_dereference_check(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_get_key_sta_id()
1235 return sta_id; in iwl_mvm_get_key_sta_id()
1253 u8 sta_id = mvm_sta->sta_id; in iwl_mvm_send_sta_key() local
1289 cmd.sta_id = sta_id; in iwl_mvm_send_sta_key()
1314 u8 sta_id, bool remove_key) in iwl_mvm_send_sta_igtk() argument
1325 igtk_cmd.sta_id = cpu_to_le32(sta_id); in iwl_mvm_send_sta_igtk()
1346 igtk_cmd.sta_id); in iwl_mvm_send_sta_igtk()
1364 u8 sta_id = mvmvif->ap_sta_id; in iwl_mvm_get_mac_addr() local
1365 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_get_mac_addr()
1410 static int __iwl_mvm_remove_sta_key(struct iwl_mvm *mvm, u8 sta_id, in __iwl_mvm_remove_sta_key() argument
1429 cmd.sta_id = sta_id; in __iwl_mvm_remove_sta_key()
1455 u8 sta_id; in iwl_mvm_set_sta_key() local
1462 sta_id = iwl_mvm_get_key_sta_id(mvm, vif, sta); in iwl_mvm_set_sta_key()
1463 if (sta_id == IWL_MVM_STATION_COUNT) { in iwl_mvm_set_sta_key()
1469 ret = iwl_mvm_send_sta_igtk(mvm, keyconf, sta_id, false); in iwl_mvm_set_sta_key()
1478 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_set_sta_key()
1525 __iwl_mvm_remove_sta_key(mvm, sta_id, keyconf, mcast); in iwl_mvm_set_sta_key()
1542 u8 sta_id; in iwl_mvm_remove_sta_key() local
1548 sta_id = iwl_mvm_get_key_sta_id(mvm, vif, sta); in iwl_mvm_remove_sta_key()
1551 keyconf->keyidx, sta_id); in iwl_mvm_remove_sta_key()
1554 return iwl_mvm_send_sta_igtk(mvm, keyconf, sta_id, true); in iwl_mvm_remove_sta_key()
1569 if (sta_id == IWL_MVM_STATION_COUNT) { in iwl_mvm_remove_sta_key()
1574 ret = __iwl_mvm_remove_sta_key(mvm, sta_id, keyconf, mcast); in iwl_mvm_remove_sta_key()
1581 ret = __iwl_mvm_remove_sta_key(mvm, sta_id, keyconf, !mcast); in iwl_mvm_remove_sta_key()
1593 u8 sta_id; in iwl_mvm_update_tkip_key() local
1598 sta_id = iwl_mvm_get_key_sta_id(mvm, vif, sta); in iwl_mvm_update_tkip_key()
1599 if (WARN_ON_ONCE(sta_id == IWL_MVM_STATION_COUNT)) in iwl_mvm_update_tkip_key()
1603 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_update_tkip_key()
1624 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_ps_wake()
1644 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_sleep_tx_count()
1723 u32 sta_id = le32_to_cpu(notif->sta_id); in iwl_mvm_rx_eosp_notif() local
1725 if (WARN_ON_ONCE(sta_id >= IWL_MVM_STATION_COUNT)) in iwl_mvm_rx_eosp_notif()
1729 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_rx_eosp_notif()
1740 .sta_id = mvmsta->sta_id, in iwl_mvm_sta_modify_disable_tx()
1772 if (disable || !atomic_read(&mvm->pending_frames[mvm_sta->sta_id])) in iwl_mvm_sta_modify_disable_tx_ap()