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()
245 struct ieee80211_sta *sta) in iwl_mvm_tdls_sta_deinit() argument
247 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_tdls_sta_deinit()
261 struct ieee80211_sta *sta) in iwl_mvm_add_sta() argument
264 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_add_sta()
294 if (sta->tdls) { in iwl_mvm_add_sta()
295 ret = iwl_mvm_tdls_sta_init(mvm, sta); in iwl_mvm_add_sta()
312 ret = iwl_mvm_sta_send_to_fw(mvm, sta, false); in iwl_mvm_add_sta()
317 if (!sta->tdls) { in iwl_mvm_add_sta()
325 rcu_assign_pointer(mvm->fw_id_to_mac_id[sta_id], sta); in iwl_mvm_add_sta()
330 iwl_mvm_tdls_sta_deinit(mvm, sta); in iwl_mvm_add_sta()
336 struct ieee80211_sta *sta) in iwl_mvm_update_sta() argument
338 return iwl_mvm_sta_send_to_fw(mvm, sta, true); in iwl_mvm_update_sta()
384 struct ieee80211_sta *sta; in iwl_mvm_rm_sta_common() local
390 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_rm_sta_common()
394 if (!sta) { in iwl_mvm_rm_sta_common()
425 struct ieee80211_sta *sta = in iwl_mvm_sta_drained_wk() local
437 if (!IS_ERR(sta) || PTR_ERR(sta) == -ENOENT) in iwl_mvm_sta_drained_wk()
440 if (PTR_ERR(sta) == -EINVAL) { in iwl_mvm_sta_drained_wk()
446 if (!sta) { in iwl_mvm_sta_drained_wk()
452 WARN_ON(PTR_ERR(sta) != -EBUSY); in iwl_mvm_sta_drained_wk()
483 struct ieee80211_sta *sta) in iwl_mvm_rm_sta() argument
486 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_rm_sta()
542 if (sta->tdls) { in iwl_mvm_rm_sta()
553 if (sta->tdls) in iwl_mvm_rm_sta()
554 iwl_mvm_tdls_sta_deinit(mvm, sta); in iwl_mvm_rm_sta()
576 struct iwl_mvm_int_sta *sta, in iwl_mvm_allocate_int_sta() argument
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()
585 sta->tfd_queue_msk = qmask; 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()
593 struct iwl_mvm_int_sta *sta) in iwl_mvm_dealloc_int_sta() argument
595 RCU_INIT_POINTER(mvm->fw_id_to_mac_id[sta->sta_id], NULL); in iwl_mvm_dealloc_int_sta()
596 memset(sta, 0, sizeof(struct iwl_mvm_int_sta)); in iwl_mvm_dealloc_int_sta()
597 sta->sta_id = IWL_MVM_STATION_COUNT; in iwl_mvm_dealloc_int_sta()
601 struct iwl_mvm_int_sta *sta, in iwl_mvm_add_int_sta_common() argument
612 cmd.sta_id = sta->sta_id; in iwl_mvm_add_int_sta_common()
616 cmd.tfd_queue_msk = cpu_to_le32(sta->tfd_queue_msk); in iwl_mvm_add_int_sta_common()
789 int iwl_mvm_sta_rx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta, in iwl_mvm_sta_rx_agg() argument
792 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_rx_agg()
849 static int iwl_mvm_sta_tx_agg(struct iwl_mvm *mvm, struct ieee80211_sta *sta, in iwl_mvm_sta_tx_agg() argument
852 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg()
916 struct ieee80211_sta *sta, u16 tid, u16 *ssn) in iwl_mvm_sta_tx_agg_start() argument
918 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_start()
968 ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); in iwl_mvm_sta_tx_agg_start()
979 struct ieee80211_sta *sta, u16 tid, u8 buf_size) in iwl_mvm_sta_tx_agg_oper() argument
981 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_oper()
984 iwl_mvm_get_wd_timeout(mvm, vif, sta->tdls, false); in iwl_mvm_sta_tx_agg_oper()
1003 ret = iwl_mvm_sta_tx_agg(mvm, sta, tid, queue, true); in iwl_mvm_sta_tx_agg_oper()
1022 sta->addr, tid); in iwl_mvm_sta_tx_agg_oper()
1028 struct ieee80211_sta *sta, u16 tid) in iwl_mvm_sta_tx_agg_stop() argument
1030 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_stop()
1041 ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); in iwl_mvm_sta_tx_agg_stop()
1074 ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); in iwl_mvm_sta_tx_agg_stop()
1076 iwl_mvm_sta_tx_agg(mvm, sta, tid, txq_id, false); in iwl_mvm_sta_tx_agg_stop()
1091 ieee80211_stop_tx_ba_cb_irqsafe(vif, sta->addr, tid); in iwl_mvm_sta_tx_agg_stop()
1110 struct ieee80211_sta *sta, u16 tid) in iwl_mvm_sta_tx_agg_flush() argument
1112 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_tx_agg_flush()
1138 iwl_mvm_sta_tx_agg(mvm, sta, tid, txq_id, false); in iwl_mvm_sta_tx_agg_flush()
1166 struct ieee80211_sta *sta) in iwl_mvm_get_key_sta_id() argument
1170 if (sta) { in iwl_mvm_get_key_sta_id()
1171 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_get_key_sta_id()
1303 struct ieee80211_sta *sta) in iwl_mvm_get_mac_addr() argument
1307 if (sta) in iwl_mvm_get_mac_addr()
1308 return sta->addr; in iwl_mvm_get_mac_addr()
1313 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_get_mac_addr()
1315 return sta->addr; in iwl_mvm_get_mac_addr()
1324 struct ieee80211_sta *sta, in __iwl_mvm_set_sta_key() argument
1328 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in __iwl_mvm_set_sta_key()
1336 addr = iwl_mvm_get_mac_addr(mvm, vif, sta); in __iwl_mvm_set_sta_key()
1397 struct ieee80211_sta *sta, in iwl_mvm_set_sta_key() argument
1408 sta_id = iwl_mvm_get_key_sta_id(vif, sta); in iwl_mvm_set_sta_key()
1423 if (!sta) { 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()
1426 if (IS_ERR_OR_NULL(sta)) { in iwl_mvm_set_sta_key()
1432 if (WARN_ON_ONCE(iwl_mvm_sta_from_mac80211(sta)->vif != vif)) in iwl_mvm_set_sta_key()
1446 ret = __iwl_mvm_set_sta_key(mvm, vif, sta, keyconf, mcast); in iwl_mvm_set_sta_key()
1460 ret = __iwl_mvm_set_sta_key(mvm, vif, sta, keyconf, !mcast); in iwl_mvm_set_sta_key()
1470 sta->addr, ret); in iwl_mvm_set_sta_key()
1476 struct ieee80211_sta *sta, in iwl_mvm_remove_sta_key() argument
1486 sta_id = iwl_mvm_get_key_sta_id(vif, sta); in iwl_mvm_remove_sta_key()
1511 if (!sta) { 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()
1514 if (!sta) { in iwl_mvm_remove_sta_key()
1520 if (WARN_ON_ONCE(iwl_mvm_sta_from_mac80211(sta)->vif != vif)) in iwl_mvm_remove_sta_key()
1538 struct ieee80211_sta *sta, u32 iv32, in iwl_mvm_update_tkip_key() argument
1542 u8 sta_id = iwl_mvm_get_key_sta_id(vif, sta); in iwl_mvm_update_tkip_key()
1550 if (!sta) { in iwl_mvm_update_tkip_key()
1551 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_update_tkip_key()
1552 if (WARN_ON(IS_ERR_OR_NULL(sta))) { in iwl_mvm_update_tkip_key()
1558 mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_update_tkip_key()
1565 struct ieee80211_sta *sta) in iwl_mvm_sta_modify_ps_wake() argument
1567 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_ps_wake()
1582 struct ieee80211_sta *sta, in iwl_mvm_sta_modify_sleep_tx_count() argument
1587 struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_sleep_tx_count()
1626 ieee80211_sta_eosp(sta); in iwl_mvm_sta_modify_sleep_tx_count()
1642 ieee80211_sta_eosp(sta); in iwl_mvm_sta_modify_sleep_tx_count()
1669 struct ieee80211_sta *sta; in iwl_mvm_rx_eosp_notif() local
1676 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_rx_eosp_notif()
1677 if (!IS_ERR_OR_NULL(sta)) in iwl_mvm_rx_eosp_notif()
1678 ieee80211_sta_eosp(sta); in iwl_mvm_rx_eosp_notif()
1702 struct ieee80211_sta *sta, in iwl_mvm_sta_modify_disable_tx_ap() argument
1705 struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_sta_modify_disable_tx_ap()
1722 ieee80211_sta_block_awake(mvm->hw, sta, disable); in iwl_mvm_sta_modify_disable_tx_ap()
1733 struct ieee80211_sta *sta; in iwl_mvm_modify_all_sta_disable_tx() local
1741 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[i], in iwl_mvm_modify_all_sta_disable_tx()
1743 if (IS_ERR_OR_NULL(sta)) in iwl_mvm_modify_all_sta_disable_tx()
1746 mvm_sta = iwl_mvm_sta_from_mac80211(sta); in iwl_mvm_modify_all_sta_disable_tx()
1751 iwl_mvm_sta_modify_disable_tx_ap(mvm, sta, disable); in iwl_mvm_modify_all_sta_disable_tx()