Lines Matching refs:sta
113 int iwl_mvm_sta_send_to_fw(struct iwl_mvm *mvm, struct ieee80211_sta *sta, in iwl_mvm_sta_send_to_fw() argument
116 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_send_to_fw()
131 memcpy(&add_sta_cmd.addr, sta->addr, ETH_ALEN); in iwl_mvm_sta_send_to_fw()
137 switch (sta->bandwidth) { in iwl_mvm_sta_send_to_fw()
148 if (sta->ht_cap.ht_supported) in iwl_mvm_sta_send_to_fw()
154 switch (sta->rx_nss) { in iwl_mvm_sta_send_to_fw()
166 switch (sta->smps_mode) { in iwl_mvm_sta_send_to_fw()
184 if (sta->ht_cap.ht_supported) { in iwl_mvm_sta_send_to_fw()
189 mpdu_dens = sta->ht_cap.ampdu_density; in iwl_mvm_sta_send_to_fw()
192 if (sta->vht_cap.vht_supported) { in iwl_mvm_sta_send_to_fw()
193 agg_size = sta->vht_cap.cap & in iwl_mvm_sta_send_to_fw()
197 } else if (sta->ht_cap.ht_supported) { in iwl_mvm_sta_send_to_fw()
198 agg_size = sta->ht_cap.ampdu_factor; in iwl_mvm_sta_send_to_fw()
230 struct ieee80211_sta *sta; in iwl_mvm_rx_agg_session_expired() local
251 sta = rcu_dereference(ba_data->mvm->fw_id_to_mac_id[ba_data->sta_id]); in iwl_mvm_rx_agg_session_expired()
252 mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_rx_agg_session_expired()
254 sta->addr, ba_data->tid); in iwl_mvm_rx_agg_session_expired()
260 struct ieee80211_sta *sta) in iwl_mvm_tdls_sta_init() argument
263 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_tdls_sta_init()
299 struct ieee80211_sta *sta) in iwl_mvm_tdls_sta_deinit() argument
301 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_tdls_sta_deinit()
319 struct ieee80211_sta *sta; in iwl_mvm_invalidate_sta_queue() local
331 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_invalidate_sta_queue()
333 if (WARN_ON_ONCE(IS_ERR_OR_NULL(sta))) { in iwl_mvm_invalidate_sta_queue()
338 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_invalidate_sta_queue()
366 struct ieee80211_sta *sta; in iwl_mvm_get_queue_agg_tids() local
380 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_get_queue_agg_tids()
383 if (WARN_ON_ONCE(IS_ERR_OR_NULL(sta))) in iwl_mvm_get_queue_agg_tids()
386 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_get_queue_agg_tids()
405 struct ieee80211_sta *sta; in iwl_mvm_remove_sta_queue_marking() local
421 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_remove_sta_queue_marking()
423 if (WARN_ON_ONCE(IS_ERR_OR_NULL(sta))) { in iwl_mvm_remove_sta_queue_marking()
428 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_remove_sta_queue_marking()
627 struct ieee80211_sta *sta, u8 ac, int tid, in iwl_mvm_sta_alloc_queue() argument
630 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_alloc_queue()
825 ret = iwl_mvm_sta_send_to_fw(mvm, sta, true, STA_MODIFY_QUEUES); in iwl_mvm_sta_alloc_queue()
831 ret = iwl_mvm_sta_tx_agg(mvm, sta, tid, queue, true); in iwl_mvm_sta_alloc_queue()
888 struct ieee80211_sta *sta; in iwl_mvm_unshare_queue() local
915 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_unshare_queue()
918 if (WARN_ON_ONCE(IS_ERR_OR_NULL(sta))) in iwl_mvm_unshare_queue()
921 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_unshare_queue()
973 struct ieee80211_sta *sta, int tid) in iwl_mvm_tx_deferred_stream() argument
975 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_tx_deferred_stream()
995 iwl_mvm_sta_alloc_queue(mvm, sta, ac, tid, hdr)) { in iwl_mvm_tx_deferred_stream()
1016 if (no_queue || iwl_mvm_tx_skb(mvm, skb, sta)) in iwl_mvm_tx_deferred_stream()
1028 struct ieee80211_sta *sta; in iwl_mvm_add_new_dqa_stream_wk() local
1071 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_add_new_dqa_stream_wk()
1073 if (IS_ERR_OR_NULL(sta)) in iwl_mvm_add_new_dqa_stream_wk()
1076 mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_add_new_dqa_stream_wk()
1081 iwl_mvm_tx_deferred_stream(mvm, sta, tid); in iwl_mvm_add_new_dqa_stream_wk()
1088 struct ieee80211_sta *sta, in iwl_mvm_reserve_sta_stream() argument
1091 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_reserve_sta_stream()
1103 if (vif_type == NL80211_IFTYPE_STATION && !sta->tdls && in iwl_mvm_reserve_sta_stream()
1187 struct ieee80211_sta *sta) in iwl_mvm_add_sta() argument
1190 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_add_sta()
1231 if (!iwl_mvm_is_dqa_supported(mvm) && sta->tdls) { in iwl_mvm_add_sta()
1232 ret = iwl_mvm_tdls_sta_init(mvm, sta); in iwl_mvm_add_sta()
1271 ret = iwl_mvm_reserve_sta_stream(mvm, sta, in iwl_mvm_add_sta()
1278 ret = iwl_mvm_sta_send_to_fw(mvm, sta, false, 0); in iwl_mvm_add_sta()
1283 if (!sta->tdls) { in iwl_mvm_add_sta()
1291 rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta); in iwl_mvm_add_sta()
1296 if (!iwl_mvm_is_dqa_supported(mvm) && sta->tdls) in iwl_mvm_add_sta()
1297 iwl_mvm_tdls_sta_deinit(mvm, sta); in iwl_mvm_add_sta()
1345 struct ieee80211_sta *sta; in iwl_mvm_rm_sta_common() local
1351 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_rm_sta_common()
1355 if (!sta) { in iwl_mvm_rm_sta_common()
1386 struct ieee80211_sta *sta = in iwl_mvm_sta_drained_wk() local
1398 if (!IS_ERR(sta) || PTR_ERR(sta) == -ENOENT) in iwl_mvm_sta_drained_wk()
1401 if (PTR_ERR(sta) == -EINVAL) { in iwl_mvm_sta_drained_wk()
1407 if (!sta) { in iwl_mvm_sta_drained_wk()
1413 WARN_ON(PTR_ERR(sta) != -EBUSY); in iwl_mvm_sta_drained_wk()
1465 struct ieee80211_sta *sta) in iwl_mvm_rm_sta() argument
1468 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_rm_sta()
1568 if (sta->tdls) { in iwl_mvm_rm_sta()
1577 if (!iwl_mvm_is_dqa_supported(mvm) && sta->tdls) in iwl_mvm_rm_sta()
1578 iwl_mvm_tdls_sta_deinit(mvm, sta); in iwl_mvm_rm_sta()
1600 struct iwl_mvm_int_sta *sta, in iwl_mvm_allocate_int_sta() argument
1604 sta->sta_id = iwl_mvm_find_free_sta_id(mvm, iftype); in iwl_mvm_allocate_int_sta()
1605 if (WARN_ON_ONCE(sta->sta_id == IWL_MVM_STATION_COUNT)) in iwl_mvm_allocate_int_sta()
1609 sta->tfd_queue_msk = qmask; in iwl_mvm_allocate_int_sta()
1612 rcu_assign_pointer(mvm->fw_id_to_mac_id[sta->sta_id], ERR_PTR(-EINVAL)); in iwl_mvm_allocate_int_sta()
1617 struct iwl_mvm_int_sta *sta) in iwl_mvm_dealloc_int_sta() argument
1619 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta->sta_id], NULL); in iwl_mvm_dealloc_int_sta()
1620 memset(sta, 0, sizeof(struct iwl_mvm_int_sta)); in iwl_mvm_dealloc_int_sta()
1621 sta->sta_id = IWL_MVM_STATION_COUNT; in iwl_mvm_dealloc_int_sta()
1625 struct iwl_mvm_int_sta *sta, in iwl_mvm_add_int_sta_common() argument
1636 cmd.sta_id = sta->sta_id; in iwl_mvm_add_int_sta_common()
1640 cmd.tfd_queue_msk = cpu_to_le32(sta->tfd_queue_msk); in iwl_mvm_add_int_sta_common()
1971 int iwl_mvm_sta_rx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta, in iwl_mvm_sta_rx_agg() argument
1974 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_rx_agg()
2110 int iwl_mvm_sta_tx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta, in iwl_mvm_sta_tx_agg() argument
2113 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg()
2181 struct ieee80211_sta *sta, u16 tid, u16 *ssn) in iwl_mvm_sta_tx_agg_start() argument
2183 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_start()
2259 ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); in iwl_mvm_sta_tx_agg_start()
2276 struct ieee80211_sta *sta, u16 tid, u8 buf_size, in iwl_mvm_sta_tx_agg_oper() argument
2279 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_oper()
2282 iwl_mvm_get_wd_timeout(mvm, vif, sta->tdls, false); in iwl_mvm_sta_tx_agg_oper()
2356 ret = iwl_mvm_sta_tx_agg(mvm, sta, tid, queue, true); in iwl_mvm_sta_tx_agg_oper()
2378 sta->addr, tid); in iwl_mvm_sta_tx_agg_oper()
2384 struct ieee80211_sta *sta, u16 tid) in iwl_mvm_sta_tx_agg_stop() argument
2386 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_stop()
2396 ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); in iwl_mvm_sta_tx_agg_stop()
2441 ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); in iwl_mvm_sta_tx_agg_stop()
2443 iwl_mvm_sta_tx_agg(mvm, sta, tid, txq_id, false); in iwl_mvm_sta_tx_agg_stop()
2461 ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); in iwl_mvm_sta_tx_agg_stop()
2480 struct ieee80211_sta *sta, u16 tid) in iwl_mvm_sta_tx_agg_flush() argument
2482 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_flush()
2520 iwl_mvm_sta_tx_agg(mvm, sta, tid, txq_id, false); in iwl_mvm_sta_tx_agg_flush()
2562 struct ieee80211_sta *sta) in iwl_mvm_get_key_sta() argument
2566 if (sta) in iwl_mvm_get_key_sta()
2567 return iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_get_key_sta()
2578 sta = rcu_dereference_check(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_get_key_sta()
2586 if (IS_ERR_OR_NULL(sta)) in iwl_mvm_get_key_sta()
2589 return iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_get_key_sta()
2750 struct ieee80211_sta *sta) in iwl_mvm_get_mac_addr() argument
2754 if (sta) in iwl_mvm_get_mac_addr()
2755 return sta->addr; in iwl_mvm_get_mac_addr()
2760 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_get_mac_addr()
2762 return sta->addr; in iwl_mvm_get_mac_addr()
2771 struct ieee80211_sta *sta, in __iwl_mvm_set_sta_key() argument
2776 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in __iwl_mvm_set_sta_key()
2784 addr = iwl_mvm_get_mac_addr(mvm, vif, sta); in __iwl_mvm_set_sta_key()
2847 struct ieee80211_sta *sta, in iwl_mvm_set_sta_key() argument
2860 mvm_sta = iwl_mvm_get_key_sta(mvm, vif, sta); in iwl_mvm_set_sta_key()
2878 if (!sta) { in iwl_mvm_set_sta_key()
2879 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_set_sta_key()
2881 if (IS_ERR_OR_NULL(sta)) { in iwl_mvm_set_sta_key()
2887 if (WARN_ON_ONCE(iwl_mvm_sta_from_mac80211(sta)->vif != vif)) in iwl_mvm_set_sta_key()
2908 ret = __iwl_mvm_set_sta_key(mvm, vif, sta, keyconf, key_offset, mcast); in iwl_mvm_set_sta_key()
2920 ret = __iwl_mvm_set_sta_key(mvm, vif, sta, keyconf, in iwl_mvm_set_sta_key()
2933 sta ? sta->addr : zero_addr, ret); in iwl_mvm_set_sta_key()
2939 struct ieee80211_sta *sta, in iwl_mvm_remove_sta_key() argument
2950 mvm_sta = iwl_mvm_get_key_sta(mvm, vif, sta); in iwl_mvm_remove_sta_key()
2995 struct ieee80211_sta *sta, u32 iv32, in iwl_mvm_update_tkip_key() argument
3003 mvm_sta = iwl_mvm_get_key_sta(mvm, vif, sta); in iwl_mvm_update_tkip_key()
3014 struct ieee80211_sta *sta) in iwl_mvm_sta_modify_ps_wake() argument
3016 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_ps_wake()
3032 struct ieee80211_sta *sta, in iwl_mvm_sta_modify_sleep_tx_count() argument
3037 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_sleep_tx_count()
3078 ieee80211_sta_eosp(sta); in iwl_mvm_sta_modify_sleep_tx_count()
3097 ieee80211_sta_eosp(sta); in iwl_mvm_sta_modify_sleep_tx_count()
3128 struct ieee80211_sta *sta; in iwl_mvm_rx_eosp_notif() local
3135 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_rx_eosp_notif()
3136 if (!IS_ERR_OR_NULL(sta)) in iwl_mvm_rx_eosp_notif()
3137 ieee80211_sta_eosp(sta); in iwl_mvm_rx_eosp_notif()
3160 struct ieee80211_sta *sta, in iwl_mvm_sta_modify_disable_tx_ap() argument
3163 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_disable_tx_ap()
3180 ieee80211_sta_block_awake(mvm->hw, sta, disable); in iwl_mvm_sta_modify_disable_tx_ap()
3191 struct ieee80211_sta *sta; in iwl_mvm_modify_all_sta_disable_tx() local
3199 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[i], in iwl_mvm_modify_all_sta_disable_tx()
3201 if (IS_ERR_OR_NULL(sta)) in iwl_mvm_modify_all_sta_disable_tx()
3204 mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_modify_all_sta_disable_tx()
3209 iwl_mvm_sta_modify_disable_tx_ap(mvm, sta, disable); in iwl_mvm_modify_all_sta_disable_tx()