Lines Matching refs:sta

99 int iwl_mvm_sta_send_to_fw(struct iwl_mvm *mvm, struct ieee80211_sta *sta,  in iwl_mvm_sta_send_to_fw()  argument
102 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_send_to_fw()
116 memcpy(&add_sta_cmd.addr, sta->addr, ETH_ALEN); in iwl_mvm_sta_send_to_fw()
119 switch (sta->bandwidth) { in iwl_mvm_sta_send_to_fw()
130 if (sta->ht_cap.ht_supported) in iwl_mvm_sta_send_to_fw()
136 switch (sta->rx_nss) { in iwl_mvm_sta_send_to_fw()
148 switch (sta->smps_mode) { in iwl_mvm_sta_send_to_fw()
166 if (sta->ht_cap.ht_supported) { in iwl_mvm_sta_send_to_fw()
171 mpdu_dens = sta->ht_cap.ampdu_density; in iwl_mvm_sta_send_to_fw()
174 if (sta->vht_cap.vht_supported) { in iwl_mvm_sta_send_to_fw()
175 agg_size = sta->vht_cap.cap & in iwl_mvm_sta_send_to_fw()
179 } else if (sta->ht_cap.ht_supported) { in iwl_mvm_sta_send_to_fw()
180 agg_size = sta->ht_cap.ampdu_factor; in iwl_mvm_sta_send_to_fw()
208 struct ieee80211_sta *sta) in iwl_mvm_tdls_sta_init() argument
211 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_tdls_sta_init()
247 struct ieee80211_sta *sta) in iwl_mvm_tdls_sta_deinit() argument
249 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_tdls_sta_deinit()
263 struct ieee80211_sta *sta) in iwl_mvm_add_sta() argument
266 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_add_sta()
301 if (sta->tdls) { in iwl_mvm_add_sta()
302 ret = iwl_mvm_tdls_sta_init(mvm, sta); in iwl_mvm_add_sta()
319 ret = iwl_mvm_sta_send_to_fw(mvm, sta, false); in iwl_mvm_add_sta()
324 if (!sta->tdls) { in iwl_mvm_add_sta()
332 rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta); in iwl_mvm_add_sta()
337 iwl_mvm_tdls_sta_deinit(mvm, sta); in iwl_mvm_add_sta()
343 struct ieee80211_sta *sta) in iwl_mvm_update_sta() argument
345 return iwl_mvm_sta_send_to_fw(mvm, sta, true); in iwl_mvm_update_sta()
391 struct ieee80211_sta *sta; in iwl_mvm_rm_sta_common() local
397 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_rm_sta_common()
401 if (!sta) { in iwl_mvm_rm_sta_common()
432 struct ieee80211_sta *sta = in iwl_mvm_sta_drained_wk() local
444 if (!IS_ERR(sta) || PTR_ERR(sta) == -ENOENT) in iwl_mvm_sta_drained_wk()
447 if (PTR_ERR(sta) == -EINVAL) { in iwl_mvm_sta_drained_wk()
453 if (!sta) { in iwl_mvm_sta_drained_wk()
459 WARN_ON(PTR_ERR(sta) != -EBUSY); in iwl_mvm_sta_drained_wk()
491 struct ieee80211_sta *sta) in iwl_mvm_rm_sta() argument
494 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_rm_sta()
550 if (sta->tdls) { in iwl_mvm_rm_sta()
561 if (sta->tdls) in iwl_mvm_rm_sta()
562 iwl_mvm_tdls_sta_deinit(mvm, sta); in iwl_mvm_rm_sta()
584 struct iwl_mvm_int_sta *sta, in iwl_mvm_allocate_int_sta() argument
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()
593 sta->tfd_queue_msk = qmask; 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()
601 struct iwl_mvm_int_sta *sta) in iwl_mvm_dealloc_int_sta() argument
603 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta->sta_id], NULL); in iwl_mvm_dealloc_int_sta()
604 memset(sta, 0, sizeof(struct iwl_mvm_int_sta)); in iwl_mvm_dealloc_int_sta()
605 sta->sta_id = IWL_MVM_STATION_COUNT; in iwl_mvm_dealloc_int_sta()
609 struct iwl_mvm_int_sta *sta, in iwl_mvm_add_int_sta_common() argument
620 cmd.sta_id = sta->sta_id; in iwl_mvm_add_int_sta_common()
624 cmd.tfd_queue_msk = cpu_to_le32(sta->tfd_queue_msk); in iwl_mvm_add_int_sta_common()
797 int iwl_mvm_sta_rx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta, in iwl_mvm_sta_rx_agg() argument
800 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_rx_agg()
857 static int iwl_mvm_sta_tx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta, in iwl_mvm_sta_tx_agg() argument
860 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg()
924 struct ieee80211_sta *sta, u16 tid, u16 *ssn) in iwl_mvm_sta_tx_agg_start() argument
926 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_start()
976 ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); in iwl_mvm_sta_tx_agg_start()
990 struct ieee80211_sta *sta, u16 tid, u8 buf_size) in iwl_mvm_sta_tx_agg_oper() argument
992 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_oper()
995 iwl_mvm_get_wd_timeout(mvm, vif, sta->tdls, false); in iwl_mvm_sta_tx_agg_oper()
1018 ret = iwl_mvm_sta_tx_agg(mvm, sta, tid, queue, true); in iwl_mvm_sta_tx_agg_oper()
1039 sta->addr, tid); in iwl_mvm_sta_tx_agg_oper()
1045 struct ieee80211_sta *sta, u16 tid) in iwl_mvm_sta_tx_agg_stop() argument
1047 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_stop()
1058 ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); in iwl_mvm_sta_tx_agg_stop()
1095 ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); in iwl_mvm_sta_tx_agg_stop()
1097 iwl_mvm_sta_tx_agg(mvm, sta, tid, txq_id, false); in iwl_mvm_sta_tx_agg_stop()
1113 ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); in iwl_mvm_sta_tx_agg_stop()
1132 struct ieee80211_sta *sta, u16 tid) in iwl_mvm_sta_tx_agg_flush() argument
1134 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_flush()
1165 iwl_mvm_sta_tx_agg(mvm, sta, tid, txq_id, false); in iwl_mvm_sta_tx_agg_flush()
1206 struct ieee80211_sta *sta) in iwl_mvm_get_key_sta_id() argument
1210 if (sta) { in iwl_mvm_get_key_sta_id()
1211 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_get_key_sta_id()
1225 sta = rcu_dereference_check(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_get_key_sta_id()
1232 if (IS_ERR_OR_NULL(sta)) in iwl_mvm_get_key_sta_id()
1355 struct ieee80211_sta *sta) in iwl_mvm_get_mac_addr() argument
1359 if (sta) in iwl_mvm_get_mac_addr()
1360 return sta->addr; in iwl_mvm_get_mac_addr()
1365 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_get_mac_addr()
1367 return sta->addr; in iwl_mvm_get_mac_addr()
1376 struct ieee80211_sta *sta, in __iwl_mvm_set_sta_key() argument
1381 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in __iwl_mvm_set_sta_key()
1389 addr = iwl_mvm_get_mac_addr(mvm, vif, sta); in __iwl_mvm_set_sta_key()
1450 struct ieee80211_sta *sta, in iwl_mvm_set_sta_key() argument
1462 sta_id = iwl_mvm_get_key_sta_id(mvm, vif, sta); in iwl_mvm_set_sta_key()
1477 if (!sta) { 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()
1480 if (IS_ERR_OR_NULL(sta)) { in iwl_mvm_set_sta_key()
1486 if (WARN_ON_ONCE(iwl_mvm_sta_from_mac80211(sta)->vif != vif)) in iwl_mvm_set_sta_key()
1507 ret = __iwl_mvm_set_sta_key(mvm, vif, sta, keyconf, key_offset, mcast); in iwl_mvm_set_sta_key()
1521 ret = __iwl_mvm_set_sta_key(mvm, vif, sta, keyconf, in iwl_mvm_set_sta_key()
1532 sta ? sta->addr : zero_addr, ret); in iwl_mvm_set_sta_key()
1538 struct ieee80211_sta *sta, in iwl_mvm_remove_sta_key() argument
1548 sta_id = iwl_mvm_get_key_sta_id(mvm, vif, sta); in iwl_mvm_remove_sta_key()
1589 struct ieee80211_sta *sta, u32 iv32, in iwl_mvm_update_tkip_key() argument
1598 sta_id = iwl_mvm_get_key_sta_id(mvm, vif, sta); in iwl_mvm_update_tkip_key()
1602 if (!sta) { in iwl_mvm_update_tkip_key()
1603 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_update_tkip_key()
1604 if (WARN_ON(IS_ERR_OR_NULL(sta))) { in iwl_mvm_update_tkip_key()
1610 mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_update_tkip_key()
1619 struct ieee80211_sta *sta) in iwl_mvm_sta_modify_ps_wake() argument
1621 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_ps_wake()
1636 struct ieee80211_sta *sta, in iwl_mvm_sta_modify_sleep_tx_count() argument
1641 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_sleep_tx_count()
1680 ieee80211_sta_eosp(sta); in iwl_mvm_sta_modify_sleep_tx_count()
1696 ieee80211_sta_eosp(sta); in iwl_mvm_sta_modify_sleep_tx_count()
1722 struct ieee80211_sta *sta; in iwl_mvm_rx_eosp_notif() local
1729 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_rx_eosp_notif()
1730 if (!IS_ERR_OR_NULL(sta)) in iwl_mvm_rx_eosp_notif()
1731 ieee80211_sta_eosp(sta); in iwl_mvm_rx_eosp_notif()
1753 struct ieee80211_sta *sta, in iwl_mvm_sta_modify_disable_tx_ap() argument
1756 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_disable_tx_ap()
1773 ieee80211_sta_block_awake(mvm->hw, sta, disable); in iwl_mvm_sta_modify_disable_tx_ap()
1784 struct ieee80211_sta *sta; in iwl_mvm_modify_all_sta_disable_tx() local
1792 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[i], in iwl_mvm_modify_all_sta_disable_tx()
1794 if (IS_ERR_OR_NULL(sta)) in iwl_mvm_modify_all_sta_disable_tx()
1797 mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_modify_all_sta_disable_tx()
1802 iwl_mvm_sta_modify_disable_tx_ap(mvm, sta, disable); in iwl_mvm_modify_all_sta_disable_tx()