• Home
  • Raw
  • Download

Lines Matching refs:local

77 static int sta_info_hash_del(struct ieee80211_local *local,  in sta_info_hash_del()  argument
80 return rhltable_remove(&local->sta_hash, &sta->hash_node, in sta_info_hash_del()
89 struct ieee80211_local *local = sdata->local; in __cleanup_single_sta() local
119 ieee80211_txq_purge(local, txqi); in __cleanup_single_sta()
124 local->total_ps_buffered -= skb_queue_len(&sta->ps_tx_buf[ac]); in __cleanup_single_sta()
125 ieee80211_purge_tx_queue(&local->hw, &sta->ps_tx_buf[ac]); in __cleanup_single_sta()
126 ieee80211_purge_tx_queue(&local->hw, &sta->tx_filtered[ac]); in __cleanup_single_sta()
145 ieee80211_purge_tx_queue(&local->hw, &tid_tx->pending); in __cleanup_single_sta()
153 struct ieee80211_local *local = sdata->local; in cleanup_single_sta() local
156 sta_info_free(local, sta); in cleanup_single_sta()
159 struct rhlist_head *sta_info_hash_lookup(struct ieee80211_local *local, in sta_info_hash_lookup() argument
162 return rhltable_lookup(&local->sta_hash, addr, sta_rht_params); in sta_info_hash_lookup()
169 struct ieee80211_local *local = sdata->local; in sta_info_get() local
174 for_each_sta_info(local, addr, sta, tmp) { in sta_info_get()
194 struct ieee80211_local *local = sdata->local; in sta_info_get_bss() local
199 for_each_sta_info(local, addr, sta, tmp) { in sta_info_get_bss()
216 struct ieee80211_local *local = sdata->local; in sta_info_get_by_idx() local
220 list_for_each_entry_rcu(sta, &local->sta_list, list) { in sta_info_get_by_idx()
244 void sta_info_free(struct ieee80211_local *local, struct sta_info *sta) in sta_info_free() argument
262 static int sta_info_hash_add(struct ieee80211_local *local, in sta_info_hash_add() argument
265 return rhltable_insert(&local->sta_hash, &sta->hash_node, in sta_info_hash_add()
288 static int sta_prepare_rate_control(struct ieee80211_local *local, in sta_prepare_rate_control() argument
291 if (ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) in sta_prepare_rate_control()
294 sta->rate_ctrl = local->rate_ctrl; in sta_prepare_rate_control()
306 struct ieee80211_local *local = sdata->local; in sta_info_alloc() local
307 struct ieee80211_hw *hw = &local->hw; in sta_info_alloc()
345 local->hw.max_rx_aggregation_subframes; in sta_info_alloc()
356 sta->local = local; in sta_info_alloc()
373 if (local->ops->wake_tx_queue) { in sta_info_alloc()
390 if (sta_prepare_rate_control(local, sta, gfp)) in sta_info_alloc()
520 lockdep_assert_held(&sdata->local->sta_mtx); in sta_info_insert_check()
521 if (ieee80211_hw_check(&sdata->local->hw, NEEDS_UNIQUE_STA_ADDR) && in sta_info_insert_check()
522 ieee80211_find_sta_by_ifaddr(&sdata->local->hw, sta->addr, NULL)) { in sta_info_insert_check()
531 static int sta_info_insert_drv_state(struct ieee80211_local *local, in sta_info_insert_drv_state() argument
539 err = drv_sta_state(local, sdata, sta, state, state + 1); in sta_info_insert_drv_state()
549 if (!local->ops->sta_add) in sta_info_insert_drv_state()
563 WARN_ON(drv_sta_state(local, sdata, sta, state, state - 1)); in sta_info_insert_drv_state()
571 struct ieee80211_local *local = sdata->local; in ieee80211_recalc_p2p_go_ps_allowed() local
576 list_for_each_entry_rcu(sta, &local->sta_list, list) { in ieee80211_recalc_p2p_go_ps_allowed()
600 struct ieee80211_local *local = sta->local; in sta_info_insert_finish() local
605 lockdep_assert_held(&local->sta_mtx); in sta_info_insert_finish()
619 local->num_sta++; in sta_info_insert_finish()
620 local->sta_generation++; in sta_info_insert_finish()
627 err = sta_info_hash_add(local, sta); in sta_info_insert_finish()
631 list_add_tail_rcu(&sta->list, &local->sta_list); in sta_info_insert_finish()
634 err = sta_info_insert_drv_state(local, sdata, sta); in sta_info_insert_finish()
652 sinfo->generation = local->sta_generation; in sta_info_insert_finish()
660 mutex_unlock(&local->sta_mtx); in sta_info_insert_finish()
667 sta_info_hash_del(local, sta); in sta_info_insert_finish()
670 local->num_sta--; in sta_info_insert_finish()
674 mutex_unlock(&local->sta_mtx); in sta_info_insert_finish()
682 struct ieee80211_local *local = sta->local; in sta_info_insert_rcu() local
687 mutex_lock(&local->sta_mtx); in sta_info_insert_rcu()
691 mutex_unlock(&local->sta_mtx); in sta_info_insert_rcu()
702 sta_info_free(local, sta); in sta_info_insert_rcu()
762 struct ieee80211_local *local = sta->local; in __sta_info_recalc_tim() local
784 if (ieee80211_hw_check(&local->hw, AP_LINK_PS) && !local->ops->set_tim) in __sta_info_recalc_tim()
822 spin_lock_bh(&local->tim_lock); in __sta_info_recalc_tim()
832 if (local->ops->set_tim && !WARN_ON(sta->dead)) { in __sta_info_recalc_tim()
833 local->tim_in_locked_section = true; in __sta_info_recalc_tim()
834 drv_set_tim(local, &sta->sta, indicate_tim); in __sta_info_recalc_tim()
835 local->tim_in_locked_section = false; in __sta_info_recalc_tim()
839 spin_unlock_bh(&local->tim_lock); in __sta_info_recalc_tim()
867 static bool sta_info_cleanup_expire_buffered_ac(struct ieee80211_local *local, in sta_info_cleanup_expire_buffered_ac() argument
897 ieee80211_free_txskb(&local->hw, skb); in sta_info_cleanup_expire_buffered_ac()
923 local->total_ps_buffered--; in sta_info_cleanup_expire_buffered_ac()
926 ieee80211_free_txskb(&local->hw, skb); in sta_info_cleanup_expire_buffered_ac()
945 static bool sta_info_cleanup_expire_buffered(struct ieee80211_local *local, in sta_info_cleanup_expire_buffered() argument
958 sta_info_cleanup_expire_buffered_ac(local, sta, ac); in sta_info_cleanup_expire_buffered()
965 struct ieee80211_local *local; in __sta_info_destroy_part1() local
974 local = sta->local; in __sta_info_destroy_part1()
977 lockdep_assert_held(&local->sta_mtx); in __sta_info_destroy_part1()
993 drv_sync_rx_queues(local, sta); in __sta_info_destroy_part1()
995 ret = sta_info_hash_del(local, sta); in __sta_info_destroy_part1()
1004 drv_tdls_cancel_channel_switch(local, sdata, &sta->sta); in __sta_info_destroy_part1()
1011 drv_sta_pre_rcu_remove(local, sta->sdata, sta); in __sta_info_destroy_part1()
1022 struct ieee80211_local *local = sta->local; in __sta_info_destroy_part2() local
1033 lockdep_assert_held(&local->sta_mtx); in __sta_info_destroy_part2()
1036 ieee80211_free_sta_keys(local, sta); in __sta_info_destroy_part2()
1043 local->num_sta--; in __sta_info_destroy_part2()
1044 local->sta_generation++; in __sta_info_destroy_part2()
1055 ret = drv_sta_state(local, sdata, sta, IEEE80211_STA_NONE, in __sta_info_destroy_part2()
1092 mutex_lock(&sdata->local->sta_mtx); in sta_info_destroy_addr()
1095 mutex_unlock(&sdata->local->sta_mtx); in sta_info_destroy_addr()
1106 mutex_lock(&sdata->local->sta_mtx); in sta_info_destroy_addr_bss()
1109 mutex_unlock(&sdata->local->sta_mtx); in sta_info_destroy_addr_bss()
1116 struct ieee80211_local *local = from_timer(local, t, sta_cleanup); in sta_info_cleanup() local
1121 list_for_each_entry_rcu(sta, &local->sta_list, list) in sta_info_cleanup()
1122 if (sta_info_cleanup_expire_buffered(local, sta)) in sta_info_cleanup()
1126 if (local->quiescing) in sta_info_cleanup()
1132 mod_timer(&local->sta_cleanup, in sta_info_cleanup()
1136 int sta_info_init(struct ieee80211_local *local) in sta_info_init() argument
1140 err = rhltable_init(&local->sta_hash, &sta_rht_params); in sta_info_init()
1144 spin_lock_init(&local->tim_lock); in sta_info_init()
1145 mutex_init(&local->sta_mtx); in sta_info_init()
1146 INIT_LIST_HEAD(&local->sta_list); in sta_info_init()
1148 timer_setup(&local->sta_cleanup, sta_info_cleanup, 0); in sta_info_init()
1152 void sta_info_stop(struct ieee80211_local *local) in sta_info_stop() argument
1154 del_timer_sync(&local->sta_cleanup); in sta_info_stop()
1155 rhltable_destroy(&local->sta_hash); in sta_info_stop()
1161 struct ieee80211_local *local = sdata->local; in __sta_info_flush() local
1171 mutex_lock(&local->sta_mtx); in __sta_info_flush()
1172 list_for_each_entry_safe(sta, tmp, &local->sta_list, list) { in __sta_info_flush()
1186 mutex_unlock(&local->sta_mtx); in __sta_info_flush()
1194 struct ieee80211_local *local = sdata->local; in ieee80211_sta_expire() local
1197 mutex_lock(&local->sta_mtx); in ieee80211_sta_expire()
1199 list_for_each_entry_safe(sta, tmp, &local->sta_list, list) { in ieee80211_sta_expire()
1217 mutex_unlock(&local->sta_mtx); in ieee80211_sta_expire()
1224 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_find_sta_by_ifaddr() local
1232 for_each_sta_info(local, addr, sta, tmp) { in ieee80211_find_sta_by_ifaddr()
1268 struct ieee80211_local *local = sdata->local; in ieee80211_sta_ps_deliver_wakeup() local
1291 if (!ieee80211_hw_check(&local->hw, AP_LINK_PS)) in ieee80211_sta_ps_deliver_wakeup()
1292 drv_sta_notify(local, sdata, STA_NOTIFY_AWAKE, &sta->sta); in ieee80211_sta_ps_deliver_wakeup()
1298 schedule_and_wake_txq(local, to_txq_info(sta->sta.txq[i])); in ieee80211_sta_ps_deliver_wakeup()
1323 ieee80211_add_pending_skbs(local, &pending); in ieee80211_sta_ps_deliver_wakeup()
1351 local->total_ps_buffered -= buffered; in ieee80211_sta_ps_deliver_wakeup()
1367 struct ieee80211_local *local = sdata->local; in ieee80211_send_null_response() local
1392 skb = dev_alloc_skb(local->hw.extra_tx_headroom + size); in ieee80211_send_null_response()
1396 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_send_null_response()
1435 drv_allow_buffered_frames(local, sta, BIT(tid), 1, in ieee80211_send_null_response()
1504 struct ieee80211_local *local = sdata->local; in ieee80211_sta_ps_get_frames() local
1534 local->total_ps_buffered--; in ieee80211_sta_ps_get_frames()
1559 struct ieee80211_local *local = sdata->local; in ieee80211_sta_ps_deliver_response() local
1695 drv_allow_buffered_frames(local, sta, tids, num, in ieee80211_sta_ps_deliver_response()
1698 ieee80211_add_pending_skbs(local, &pending); in ieee80211_sta_ps_deliver_response()
1719 drv_release_buffered_frames(local, sta, driver_release_tids, in ieee80211_sta_ps_deliver_response()
1802 trace_api_sta_block_awake(sta->local, pubsta, block); in ieee80211_sta_block_awake()
1832 struct ieee80211_local *local = sta->local; in ieee80211_sta_eosp() local
1834 trace_api_eosp(local, pubsta); in ieee80211_sta_eosp()
1846 trace_api_send_eosp_nullfunc(sta->local, pubsta, tid); in ieee80211_send_eosp_nullfunc()
1864 trace_api_sta_set_buffered(sta->local, pubsta, tid, buffered); in ieee80211_sta_set_buffered()
1879 struct ieee80211_local *local = sta->sdata->local; in ieee80211_sta_register_airtime() local
1883 if (sta->local->airtime_flags & AIRTIME_USE_TX) in ieee80211_sta_register_airtime()
1885 if (sta->local->airtime_flags & AIRTIME_USE_RX) in ieee80211_sta_register_airtime()
1888 spin_lock_bh(&local->active_txq_lock[ac]); in ieee80211_sta_register_airtime()
1892 spin_unlock_bh(&local->active_txq_lock[ac]); in ieee80211_sta_register_airtime()
1938 int err = drv_sta_state(sta->local, sta->sdata, sta, in sta_info_move_state()
2035 struct ieee80211_local *local = sta->local; in sta_get_last_rx_stats() local
2038 if (!ieee80211_hw_check(&local->hw, USES_RSS)) in sta_get_last_rx_stats()
2053 static void sta_stats_decode_rate(struct ieee80211_local *local, u32 rate, in sta_stats_decode_rate() argument
2079 sband = local->hw.wiphy->bands[band]; in sta_stats_decode_rate()
2108 sta_stats_decode_rate(sta->local, rate, rinfo); in sta_set_rate_info_rx()
2116 struct ieee80211_local *local = sta->local; in sta_set_tidstats() local
2135 ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) { in sta_set_tidstats()
2141 ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS)) { in sta_set_tidstats()
2146 if (local->ops->wake_tx_queue && tid < IEEE80211_NUM_TIDS) { in sta_set_tidstats()
2147 spin_lock_bh(&local->fq.lock); in sta_set_tidstats()
2155 spin_unlock_bh(&local->fq.lock); in sta_set_tidstats()
2176 struct ieee80211_local *local = sdata->local; in sta_set_sinfo() local
2183 sinfo->generation = sdata->local->sta_generation; in sta_set_sinfo()
2192 drv_sta_statistics(local, sdata, &sta->sta, sinfo); in sta_set_sinfo()
2299 if (ieee80211_hw_check(&sta->local->hw, SIGNAL_DBM) || in sta_set_sinfo()
2300 ieee80211_hw_check(&sta->local->hw, SIGNAL_UNSPEC)) { in sta_set_sinfo()
2433 airtime_link_metric_get(local, sta); in sta_set_sinfo()
2440 struct ieee80211_local *local = sdata->local; in sta_get_expected_throughput() local
2445 ref = local->rate_ctrl; in sta_get_expected_throughput()
2451 thr = drv_get_expected_throughput(local, sta); in sta_get_expected_throughput()
2468 if (!sta->sdata->local->ops->wake_tx_queue) in sta_update_codel_params()
2471 if (thr && thr < STA_SLOW_THRESHOLD * sta->local->num_sta) { in sta_update_codel_params()