Lines Matching refs:local
78 static int sta_info_hash_del(struct ieee80211_local *local, in sta_info_hash_del() argument
81 return rhashtable_remove_fast(&local->sta_hash, &sta->hash_node, in sta_info_hash_del()
90 struct ieee80211_local *local = sdata->local; in __cleanup_single_sta() local
116 ieee80211_purge_tx_queue(&local->hw, &txqi->queue); in __cleanup_single_sta()
122 local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]); in __cleanup_single_sta()
123 ieee80211_purge_tx_queue(&local->hw, &sta->ps_tx_buf[ac]); in __cleanup_single_sta()
124 ieee80211_purge_tx_queue(&local->hw, &sta->tx_filtered[ac]); in __cleanup_single_sta()
143 ieee80211_purge_tx_queue(&local->hw, &tid_tx->pending); in __cleanup_single_sta()
151 struct ieee80211_local *local = sdata->local; in cleanup_single_sta() local
154 sta_info_free(local, sta); in cleanup_single_sta()
161 struct ieee80211_local *local = sdata->local; in sta_info_get() local
167 tbl = rht_dereference_rcu(local->sta_hash.tbl, &local->sta_hash); in sta_info_get()
169 for_each_sta_info(local, tbl, addr, sta, tmp) { in sta_info_get()
189 struct ieee80211_local *local = sdata->local; in sta_info_get_bss() local
195 tbl = rht_dereference_rcu(local->sta_hash.tbl, &local->sta_hash); in sta_info_get_bss()
197 for_each_sta_info(local, tbl, addr, sta, tmp) { in sta_info_get_bss()
214 struct ieee80211_local *local = sdata->local; in sta_info_get_by_idx() local
218 list_for_each_entry_rcu(sta, &local->sta_list, list) { in sta_info_get_by_idx()
242 void sta_info_free(struct ieee80211_local *local, struct sta_info *sta) in sta_info_free() argument
259 static int sta_info_hash_add(struct ieee80211_local *local, in sta_info_hash_add() argument
262 return rhashtable_insert_fast(&local->sta_hash, &sta->hash_node, in sta_info_hash_add()
285 static int sta_prepare_rate_control(struct ieee80211_local *local, in sta_prepare_rate_control() argument
288 if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) in sta_prepare_rate_control()
291 sta->rate_ctrl = local->rate_ctrl; in sta_prepare_rate_control()
303 struct ieee80211_local *local = sdata->local; in sta_info_alloc() local
304 struct ieee80211_hw *hw = &local->hw; in sta_info_alloc()
332 sta->local = local; in sta_info_alloc()
346 if (local->ops->wake_tx_queue) { in sta_info_alloc()
362 if (sta_prepare_rate_control(local, sta, gfp)) in sta_info_alloc()
441 static int sta_info_insert_drv_state(struct ieee80211_local *local, in sta_info_insert_drv_state() argument
449 err = drv_sta_state(local, sdata, sta, state, state + 1); in sta_info_insert_drv_state()
459 if (!local->ops->sta_add) in sta_info_insert_drv_state()
473 WARN_ON(drv_sta_state(local, sdata, sta, state, state - 1)); in sta_info_insert_drv_state()
485 struct ieee80211_local *local = sta->local; in sta_info_insert_finish() local
490 lockdep_assert_held(&local->sta_mtx); in sta_info_insert_finish()
504 local->num_sta++; in sta_info_insert_finish()
505 local->sta_generation++; in sta_info_insert_finish()
512 err = sta_info_hash_add(local, sta); in sta_info_insert_finish()
516 list_add_tail_rcu(&sta->list, &local->sta_list); in sta_info_insert_finish()
519 err = sta_info_insert_drv_state(local, sdata, sta); in sta_info_insert_finish()
531 sinfo->generation = local->sta_generation; in sta_info_insert_finish()
539 mutex_unlock(&local->sta_mtx); in sta_info_insert_finish()
546 sta_info_hash_del(local, sta); in sta_info_insert_finish()
549 local->num_sta--; in sta_info_insert_finish()
553 mutex_unlock(&local->sta_mtx); in sta_info_insert_finish()
560 struct ieee80211_local *local = sta->local; in sta_info_insert_rcu() local
571 mutex_lock(&local->sta_mtx); in sta_info_insert_rcu()
579 sta_info_free(local, sta); in sta_info_insert_rcu()
639 struct ieee80211_local *local = sta->local; in __sta_info_recalc_tim() local
661 if (ieee80211_hw_check(&local->hw, AP_LINK_PS)) in __sta_info_recalc_tim()
699 spin_lock_bh(&local->tim_lock); in __sta_info_recalc_tim()
709 if (local->ops->set_tim && !WARN_ON(sta->dead)) { in __sta_info_recalc_tim()
710 local->tim_in_locked_section = true; in __sta_info_recalc_tim()
711 drv_set_tim(local, &sta->sta, indicate_tim); in __sta_info_recalc_tim()
712 local->tim_in_locked_section = false; in __sta_info_recalc_tim()
716 spin_unlock_bh(&local->tim_lock); in __sta_info_recalc_tim()
744 static bool sta_info_cleanup_expire_buffered_ac(struct ieee80211_local *local, in sta_info_cleanup_expire_buffered_ac() argument
774 ieee80211_free_txskb(&local->hw, skb); in sta_info_cleanup_expire_buffered_ac()
800 local->total_ps_buffered--; in sta_info_cleanup_expire_buffered_ac()
803 ieee80211_free_txskb(&local->hw, skb); in sta_info_cleanup_expire_buffered_ac()
822 static bool sta_info_cleanup_expire_buffered(struct ieee80211_local *local, in sta_info_cleanup_expire_buffered() argument
835 sta_info_cleanup_expire_buffered_ac(local, sta, ac); in sta_info_cleanup_expire_buffered()
842 struct ieee80211_local *local; in __sta_info_destroy_part1() local
851 local = sta->local; in __sta_info_destroy_part1()
854 lockdep_assert_held(&local->sta_mtx); in __sta_info_destroy_part1()
865 ret = sta_info_hash_del(local, sta); in __sta_info_destroy_part1()
874 drv_tdls_cancel_channel_switch(local, sdata, &sta->sta); in __sta_info_destroy_part1()
880 drv_sta_pre_rcu_remove(local, sta->sdata, sta); in __sta_info_destroy_part1()
891 struct ieee80211_local *local = sta->local; in __sta_info_destroy_part2() local
902 lockdep_assert_held(&local->sta_mtx); in __sta_info_destroy_part2()
905 ieee80211_free_sta_keys(local, sta); in __sta_info_destroy_part2()
912 local->num_sta--; in __sta_info_destroy_part2()
913 local->sta_generation++; in __sta_info_destroy_part2()
924 ret = drv_sta_state(local, sdata, sta, IEEE80211_STA_NONE, in __sta_info_destroy_part2()
963 mutex_lock(&sdata->local->sta_mtx); in sta_info_destroy_addr()
966 mutex_unlock(&sdata->local->sta_mtx); in sta_info_destroy_addr()
977 mutex_lock(&sdata->local->sta_mtx); in sta_info_destroy_addr_bss()
980 mutex_unlock(&sdata->local->sta_mtx); in sta_info_destroy_addr_bss()
987 struct ieee80211_local *local = (struct ieee80211_local *) data; in sta_info_cleanup() local
992 list_for_each_entry_rcu(sta, &local->sta_list, list) in sta_info_cleanup()
993 if (sta_info_cleanup_expire_buffered(local, sta)) in sta_info_cleanup()
997 if (local->quiescing) in sta_info_cleanup()
1003 mod_timer(&local->sta_cleanup, in sta_info_cleanup()
1012 int sta_info_init(struct ieee80211_local *local) in sta_info_init() argument
1016 err = rhashtable_init(&local->sta_hash, &sta_rht_params); in sta_info_init()
1020 spin_lock_init(&local->tim_lock); in sta_info_init()
1021 mutex_init(&local->sta_mtx); in sta_info_init()
1022 INIT_LIST_HEAD(&local->sta_list); in sta_info_init()
1024 setup_timer(&local->sta_cleanup, sta_info_cleanup, in sta_info_init()
1025 (unsigned long)local); in sta_info_init()
1029 void sta_info_stop(struct ieee80211_local *local) in sta_info_stop() argument
1031 del_timer_sync(&local->sta_cleanup); in sta_info_stop()
1032 rhashtable_destroy(&local->sta_hash); in sta_info_stop()
1038 struct ieee80211_local *local = sdata->local; in __sta_info_flush() local
1048 mutex_lock(&local->sta_mtx); in __sta_info_flush()
1049 list_for_each_entry_safe(sta, tmp, &local->sta_list, list) { in __sta_info_flush()
1063 mutex_unlock(&local->sta_mtx); in __sta_info_flush()
1071 struct ieee80211_local *local = sdata->local; in ieee80211_sta_expire() local
1074 mutex_lock(&local->sta_mtx); in ieee80211_sta_expire()
1076 list_for_each_entry_safe(sta, tmp, &local->sta_list, list) { in ieee80211_sta_expire()
1092 mutex_unlock(&local->sta_mtx); in ieee80211_sta_expire()
1099 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_find_sta_by_ifaddr() local
1104 tbl = rht_dereference_rcu(local->sta_hash.tbl, &local->sta_hash); in ieee80211_find_sta_by_ifaddr()
1110 for_each_sta_info(local, tbl, addr, sta, tmp) { in ieee80211_find_sta_by_ifaddr()
1146 struct ieee80211_local *local = sdata->local; in ieee80211_sta_ps_deliver_wakeup() local
1169 if (!ieee80211_hw_check(&local->hw, AP_LINK_PS)) in ieee80211_sta_ps_deliver_wakeup()
1170 drv_sta_notify(local, sdata, STA_NOTIFY_AWAKE, &sta->sta); in ieee80211_sta_ps_deliver_wakeup()
1179 drv_wake_tx_queue(local, txqi); in ieee80211_sta_ps_deliver_wakeup()
1205 ieee80211_add_pending_skbs(local, &pending); in ieee80211_sta_ps_deliver_wakeup()
1233 local->total_ps_buffered -= buffered; in ieee80211_sta_ps_deliver_wakeup()
1249 struct ieee80211_local *local = sdata->local; in ieee80211_send_null_response() local
1269 skb = dev_alloc_skb(local->hw.extra_tx_headroom + size); in ieee80211_send_null_response()
1273 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_send_null_response()
1308 drv_allow_buffered_frames(local, sta, BIT(tid), 1, in ieee80211_send_null_response()
1343 struct ieee80211_local *local = sdata->local; in ieee80211_sta_ps_deliver_response() local
1394 local->total_ps_buffered--; in ieee80211_sta_ps_deliver_response()
1528 drv_allow_buffered_frames(local, sta, tids, num, in ieee80211_sta_ps_deliver_response()
1531 ieee80211_add_pending_skbs(local, &pending); in ieee80211_sta_ps_deliver_response()
1553 drv_release_buffered_frames(local, sta, driver_release_tids, in ieee80211_sta_ps_deliver_response()
1636 trace_api_sta_block_awake(sta->local, pubsta, block); in ieee80211_sta_block_awake()
1666 struct ieee80211_local *local = sta->local; in ieee80211_sta_eosp() local
1668 trace_api_eosp(local, pubsta); in ieee80211_sta_eosp()
1682 trace_api_sta_set_buffered(sta->local, pubsta, tid, buffered); in ieee80211_sta_set_buffered()
1735 int err = drv_sta_state(sta->local, sta->sdata, sta, in sta_info_move_state()
1836 sband = sta->local->hw.wiphy->bands[ in sta_set_rate_info_rx()
1862 struct ieee80211_local *local = sdata->local; in sta_set_sinfo() local
1868 ref = local->rate_ctrl; in sta_set_sinfo()
1870 sinfo->generation = sdata->local->sta_generation; in sta_set_sinfo()
1879 drv_sta_statistics(local, sdata, &sta->sta, sinfo); in sta_set_sinfo()
1941 if (ieee80211_hw_check(&sta->local->hw, SIGNAL_DBM) || in sta_set_sinfo()
1942 ieee80211_hw_check(&sta->local->hw, SIGNAL_UNSPEC)) { in sta_set_sinfo()
1997 ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) { in sta_set_sinfo()
2006 ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) { in sta_set_sinfo()
2073 thr = drv_get_expected_throughput(local, &sta->sta); in sta_set_sinfo()