Lines Matching refs:local

49 	struct ieee80211_local *local = tx->local;  in ieee80211_duration()  local
65 sband = local->hw.wiphy->bands[info->band]; in ieee80211_duration()
195 struct ieee80211_local *local = tx->local; in ieee80211_tx_h_dynamic_ps() local
200 if (!ieee80211_hw_check(&local->hw, SUPPORTS_PS)) in ieee80211_tx_h_dynamic_ps()
204 if (ieee80211_hw_check(&local->hw, SUPPORTS_DYNAMIC_PS)) in ieee80211_tx_h_dynamic_ps()
208 if (local->hw.conf.dynamic_ps_timeout <= 0) in ieee80211_tx_h_dynamic_ps()
212 if (local->scanning) in ieee80211_tx_h_dynamic_ps()
215 if (!local->ps_sdata) in ieee80211_tx_h_dynamic_ps()
219 if (local->quiescing) in ieee80211_tx_h_dynamic_ps()
249 if (local->hw.conf.flags & IEEE80211_CONF_PS) { in ieee80211_tx_h_dynamic_ps()
250 ieee80211_stop_queues_by_reason(&local->hw, in ieee80211_tx_h_dynamic_ps()
255 wiphy_work_queue(local->hw.wiphy, in ieee80211_tx_h_dynamic_ps()
256 &local->dynamic_ps_disable_work); in ieee80211_tx_h_dynamic_ps()
263 mod_timer(&local->dynamic_ps_timer, jiffies + in ieee80211_tx_h_dynamic_ps()
264 msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); in ieee80211_tx_h_dynamic_ps()
280 if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) && in ieee80211_tx_h_check_assoc()
314 I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc); in ieee80211_tx_h_check_assoc()
333 static void purge_old_ps_buffers(struct ieee80211_local *local) in purge_old_ps_buffers() argument
340 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in purge_old_ps_buffers()
353 ieee80211_free_txskb(&local->hw, skb); in purge_old_ps_buffers()
362 list_for_each_entry_rcu(sta, &local->sta_list, list) { in purge_old_ps_buffers()
370 ieee80211_free_txskb(&local->hw, skb); in purge_old_ps_buffers()
376 local->total_ps_buffered = total; in purge_old_ps_buffers()
377 ps_dbg_hw(&local->hw, "PS buffers full - purged %d frames\n", purged); in purge_old_ps_buffers()
416 if (ieee80211_hw_check(&tx->local->hw, QUEUE_CONTROL)) in ieee80211_tx_h_multicast_ps_buf()
426 if (!ieee80211_hw_check(&tx->local->hw, HOST_BROADCAST_PS_BUFFERING)) in ieee80211_tx_h_multicast_ps_buf()
430 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) in ieee80211_tx_h_multicast_ps_buf()
431 purge_old_ps_buffers(tx->local); in ieee80211_tx_h_multicast_ps_buf()
436 ieee80211_free_txskb(&tx->local->hw, skb_dequeue(&ps->bc_buf)); in ieee80211_tx_h_multicast_ps_buf()
438 tx->local->total_ps_buffered++; in ieee80211_tx_h_multicast_ps_buf()
466 struct ieee80211_local *local = tx->local; in ieee80211_tx_h_unicast_ps_buf() local
485 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) in ieee80211_tx_h_unicast_ps_buf()
486 purge_old_ps_buffers(tx->local); in ieee80211_tx_h_unicast_ps_buf()
507 ieee80211_free_txskb(&local->hw, old); in ieee80211_tx_h_unicast_ps_buf()
509 tx->local->total_ps_buffered++; in ieee80211_tx_h_unicast_ps_buf()
518 if (!timer_pending(&local->sta_cleanup)) in ieee80211_tx_h_unicast_ps_buf()
519 mod_timer(&local->sta_cleanup, in ieee80211_tx_h_unicast_ps_buf()
690 sband = tx->local->hw.wiphy->bands[info->band]; in ieee80211_tx_h_rate_ctrl()
695 tx->local->hw.wiphy->frag_threshold); in ieee80211_tx_h_rate_ctrl()
698 txrc.hw = &tx->local->hw; in ieee80211_tx_h_rate_ctrl()
720 if (len > tx->local->hw.wiphy->rts_threshold) { in ieee80211_tx_h_rate_ctrl()
751 if (WARN(test_bit(SCAN_SW_SCANNING, &tx->local->scanning) && assoc && in ieee80211_tx_h_rate_ctrl()
896 struct ieee80211_local *local = tx->local; in ieee80211_fragment() local
914 tmp = dev_alloc_skb(local->tx_headroom + in ieee80211_fragment()
924 local->tx_headroom + IEEE80211_ENCRYPT_HEADROOM); in ieee80211_fragment()
958 int frag_threshold = tx->local->hw.wiphy->frag_threshold; in ieee80211_tx_h_fragment()
969 if (ieee80211_hw_check(&tx->local->hw, SUPPORTS_TX_FRAG)) in ieee80211_tx_h_fragment()
1170 ieee80211_free_txskb(&tx->local->hw, purge_skb); in ieee80211_tx_prep_agg()
1183 struct rate_control_ref *ref = sdata->local->rate_ctrl; in ieee80211_aggr_check()
1213 struct ieee80211_local *local = sdata->local; in ieee80211_tx_prepare() local
1221 tx->local = local; in ieee80211_tx_prepare()
1253 ieee80211_hw_check(&local->hw, AMPDU_AGGREGATION) && in ieee80211_tx_prepare()
1254 !ieee80211_hw_check(&local->hw, TX_AMPDU_SETUP_IN_HW)) { in ieee80211_tx_prepare()
1283 skb->len + FCS_LEN <= local->hw.wiphy->frag_threshold || in ieee80211_tx_prepare()
1300 static struct txq_info *ieee80211_get_txq(struct ieee80211_local *local, in ieee80211_get_txq() argument
1367 struct ieee80211_local *local; in codel_dequeue_func() local
1373 local = vif_to_sdata(txqi->txq.vif)->local; in codel_dequeue_func()
1374 fq = &local->fq; in codel_dequeue_func()
1379 flow = &fq->flows[cvars - local->cvars]; in codel_dequeue_func()
1387 struct ieee80211_local *local; in codel_drop_func() local
1392 local = vif_to_sdata(txqi->txq.vif)->local; in codel_drop_func()
1393 hw = &local->hw; in codel_drop_func()
1402 struct ieee80211_local *local; in fq_tin_dequeue_func() local
1408 local = container_of(fq, struct ieee80211_local, fq); in fq_tin_dequeue_func()
1410 cparams = &local->cparams; in fq_tin_dequeue_func()
1416 cvars = &local->cvars[flow - fq->flows]; in fq_tin_dequeue_func()
1434 struct ieee80211_local *local; in fq_skb_free_func() local
1436 local = container_of(fq, struct ieee80211_local, fq); in fq_skb_free_func()
1437 ieee80211_free_txskb(&local->hw, skb); in fq_skb_free_func()
1440 static void ieee80211_txq_enqueue(struct ieee80211_local *local, in ieee80211_txq_enqueue() argument
1444 struct fq *fq = &local->fq; in ieee80211_txq_enqueue()
1478 void ieee80211_txq_remove_vlan(struct ieee80211_local *local, in ieee80211_txq_remove_vlan() argument
1481 struct fq *fq = &local->fq; in ieee80211_txq_remove_vlan()
1526 if (!ieee80211_hw_check(&sdata->local->hw, in ieee80211_txq_init()
1529 } else if (!ieee80211_hw_check(&sdata->local->hw, in ieee80211_txq_init()
1544 void ieee80211_txq_purge(struct ieee80211_local *local, in ieee80211_txq_purge() argument
1547 struct fq *fq = &local->fq; in ieee80211_txq_purge()
1552 ieee80211_purge_tx_queue(&local->hw, &txqi->frags); in ieee80211_txq_purge()
1555 spin_lock_bh(&local->active_txq_lock[txqi->txq.ac]); in ieee80211_txq_purge()
1557 spin_unlock_bh(&local->active_txq_lock[txqi->txq.ac]); in ieee80211_txq_purge()
1560 void ieee80211_txq_set_params(struct ieee80211_local *local, int radio_idx) in ieee80211_txq_set_params() argument
1562 if (local->hw.wiphy->txq_limit) in ieee80211_txq_set_params()
1563 local->fq.limit = local->hw.wiphy->txq_limit; in ieee80211_txq_set_params()
1565 local->hw.wiphy->txq_limit = local->fq.limit; in ieee80211_txq_set_params()
1567 if (local->hw.wiphy->txq_memory_limit) in ieee80211_txq_set_params()
1568 local->fq.memory_limit = local->hw.wiphy->txq_memory_limit; in ieee80211_txq_set_params()
1570 local->hw.wiphy->txq_memory_limit = local->fq.memory_limit; in ieee80211_txq_set_params()
1572 if (local->hw.wiphy->txq_quantum) in ieee80211_txq_set_params()
1573 local->fq.quantum = local->hw.wiphy->txq_quantum; in ieee80211_txq_set_params()
1575 local->hw.wiphy->txq_quantum = local->fq.quantum; in ieee80211_txq_set_params()
1578 int ieee80211_txq_setup_flows(struct ieee80211_local *local) in ieee80211_txq_setup_flows() argument
1580 struct fq *fq = &local->fq; in ieee80211_txq_setup_flows()
1597 sband = local->hw.wiphy->bands[band]; in ieee80211_txq_setup_flows()
1607 codel_params_init(&local->cparams); in ieee80211_txq_setup_flows()
1608 local->cparams.interval = MS2TIME(100); in ieee80211_txq_setup_flows()
1609 local->cparams.target = MS2TIME(20); in ieee80211_txq_setup_flows()
1610 local->cparams.ecn = true; in ieee80211_txq_setup_flows()
1612 local->cvars = kvcalloc(fq->flows_cnt, sizeof(local->cvars[0]), in ieee80211_txq_setup_flows()
1614 if (!local->cvars) { in ieee80211_txq_setup_flows()
1622 codel_vars_init(&local->cvars[i]); in ieee80211_txq_setup_flows()
1624 ieee80211_txq_set_params(local, -1); in ieee80211_txq_setup_flows()
1629 void ieee80211_txq_teardown_flows(struct ieee80211_local *local) in ieee80211_txq_teardown_flows() argument
1631 struct fq *fq = &local->fq; in ieee80211_txq_teardown_flows()
1633 kvfree(local->cvars); in ieee80211_txq_teardown_flows()
1634 local->cvars = NULL; in ieee80211_txq_teardown_flows()
1641 static bool ieee80211_queue_skb(struct ieee80211_local *local, in ieee80211_queue_skb() argument
1657 txqi = ieee80211_get_txq(local, vif, sta, skb); in ieee80211_queue_skb()
1662 ieee80211_txq_enqueue(local, txqi, skb); in ieee80211_queue_skb()
1664 schedule_and_wake_txq(local, txqi); in ieee80211_queue_skb()
1669 static bool ieee80211_tx_frags(struct ieee80211_local *local, in ieee80211_tx_frags() argument
1684 if (WARN_ON_ONCE(q >= local->hw.queues)) { in ieee80211_tx_frags()
1686 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx_frags()
1691 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_tx_frags()
1692 if (local->queue_stop_reasons[q] || in ieee80211_tx_frags()
1693 (!txpending && !skb_queue_empty(&local->pending[q]))) { in ieee80211_tx_frags()
1696 if (local->queue_stop_reasons[q] & in ieee80211_tx_frags()
1705 &local->queue_stop_reason_lock, in ieee80211_tx_frags()
1707 ieee80211_purge_tx_queue(&local->hw, in ieee80211_tx_frags()
1720 &local->pending[q]); in ieee80211_tx_frags()
1723 &local->pending[q]); in ieee80211_tx_frags()
1725 spin_unlock_irqrestore(&local->queue_stop_reason_lock, in ieee80211_tx_frags()
1730 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_tx_frags()
1736 drv_tx(local, &control, skb); in ieee80211_tx_frags()
1745 static bool __ieee80211_tx(struct ieee80211_local *local, in __ieee80211_tx() argument
1767 ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR)) { in __ieee80211_tx()
1771 sdata = rcu_dereference(local->monitor_sdata); in __ieee80211_tx()
1772 if (sdata && ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF)) { in __ieee80211_tx()
1776 } else if (ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) { in __ieee80211_tx()
1777 ieee80211_purge_tx_queue(&local->hw, skbs); in __ieee80211_tx()
1791 result = ieee80211_tx_frags(local, vif, sta, skbs, txpending); in __ieee80211_tx()
1827 ieee80211_free_txskb(&tx->local->hw, tx->skb); in invoke_tx_handlers_early()
1829 ieee80211_purge_tx_queue(&tx->local->hw, &tx->skbs); in invoke_tx_handlers_early()
1832 I802_DEBUG_INC(tx->local->tx_handlers_queued); in invoke_tx_handlers_early()
1848 if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL)) in invoke_tx_handlers_late()
1863 if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL)) in invoke_tx_handlers_late()
1871 ieee80211_free_txskb(&tx->local->hw, tx->skb); in invoke_tx_handlers_late()
1873 ieee80211_purge_tx_queue(&tx->local->hw, &tx->skbs); in invoke_tx_handlers_late()
1876 I802_DEBUG_INC(tx->local->tx_handlers_queued); in invoke_tx_handlers_late()
1937 struct ieee80211_local *local = sdata->local; in ieee80211_tx() local
1952 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx()
1961 !ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) in ieee80211_tx()
1968 if (ieee80211_queue_skb(local, sdata, tx.sta, tx.skb)) in ieee80211_tx()
1972 result = __ieee80211_tx(local, &tx.skbs, tx.sta, txpending); in ieee80211_tx()
1990 struct ieee80211_local *local = sdata->local; in ieee80211_skb_resize() local
2005 (!ieee80211_hw_check(&local->hw, SUPPORTS_CLONED_SKBS) || in ieee80211_skb_resize()
2007 I802_DEBUG_INC(local->tx_expand_skb_head_cloned); in ieee80211_skb_resize()
2009 I802_DEBUG_INC(local->tx_expand_skb_head); in ieee80211_skb_resize()
2014 wiphy_debug(local->hw.wiphy, in ieee80211_skb_resize()
2025 struct ieee80211_local *local = sdata->local; in ieee80211_xmit() local
2038 headroom = local->tx_headroom; in ieee80211_xmit()
2045 ieee80211_free_txskb(&local->hw, skb); in ieee80211_xmit()
2090 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); in ieee80211_parse_tx_radiotap() local
2258 local->hw.wiphy->bands[info->band]; in ieee80211_parse_tx_radiotap()
2297 local->hw.max_rate_tries); in ieee80211_parse_tx_radiotap()
2306 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); in ieee80211_monitor_start_xmit() local
2378 list_for_each_entry_rcu(tmp_sdata, &local->interfaces, list) { in ieee80211_monitor_start_xmit()
2392 tmp_sdata = rcu_dereference(local->monitor_sdata); in ieee80211_monitor_start_xmit()
2400 else if (local->emulate_chanctx) in ieee80211_monitor_start_xmit()
2401 chandef = &local->hw.conf.chandef; in ieee80211_monitor_start_xmit()
2409 if (!cfg80211_chandef_usable(local->hw.wiphy, chandef, in ieee80211_monitor_start_xmit()
2429 if (!cfg80211_reg_can_beacon(local->hw.wiphy, chandef, in ieee80211_monitor_start_xmit()
2542 static u16 ieee80211_store_ack_skb(struct ieee80211_local *local, in ieee80211_store_ack_skb() argument
2559 spin_lock_irqsave(&local->ack_status_lock, flags); in ieee80211_store_ack_skb()
2560 id = idr_alloc(&local->ack_status_frames, ack_skb, in ieee80211_store_ack_skb()
2562 spin_unlock_irqrestore(&local->ack_status_lock, flags); in ieee80211_store_ack_skb()
2568 *cookie = ieee80211_mgmt_tx_cookie(local); in ieee80211_store_ack_skb()
2605 struct ieee80211_local *local = sdata->local; in ieee80211_build_hdr() local
2628 if (local->force_tx_status) in ieee80211_build_hdr()
2874 I802_DEBUG_INC(local->tx_handlers_drop_unauth_port); in ieee80211_build_hdr()
2883 info_id = ieee80211_store_ack_skb(local, skb, &info_flags, in ieee80211_build_hdr()
2930 head_need += local->tx_headroom; in ieee80211_build_hdr()
2933 ieee80211_free_txskb(&local->hw, skb); in ieee80211_build_hdr()
3031 struct ieee80211_local *local = sta->local; in ieee80211_check_fast_xmit() local
3037 if (!ieee80211_hw_check(&local->hw, SUPPORT_FAST_XMIT)) in ieee80211_check_fast_xmit()
3056 if (ieee80211_hw_check(&local->hw, SUPPORTS_PS) && in ieee80211_check_fast_xmit()
3057 !ieee80211_hw_check(&local->hw, SUPPORTS_DYNAMIC_PS) && in ieee80211_check_fast_xmit()
3074 if (local->hw.wiphy->frag_threshold != (u32)-1 && in ieee80211_check_fast_xmit()
3075 !ieee80211_hw_check(&local->hw, SUPPORTS_TX_FRAG)) in ieee80211_check_fast_xmit()
3276 void ieee80211_check_fast_xmit_all(struct ieee80211_local *local) in ieee80211_check_fast_xmit_all() argument
3281 list_for_each_entry_rcu(sta, &local->sta_list, list) in ieee80211_check_fast_xmit_all()
3288 struct ieee80211_local *local = sdata->local; in ieee80211_check_fast_xmit_iface() local
3293 list_for_each_entry_rcu(sta, &local->sta_list, list) { in ieee80211_check_fast_xmit_iface()
3317 static bool ieee80211_amsdu_realloc_pad(struct ieee80211_local *local, in ieee80211_amsdu_realloc_pad() argument
3321 I802_DEBUG_INC(local->tx_expand_skb_head); in ieee80211_amsdu_realloc_pad()
3324 wiphy_debug(local->hw.wiphy, in ieee80211_amsdu_realloc_pad()
3337 struct ieee80211_local *local = sdata->local; in ieee80211_amsdu_prepare_head() local
3353 if (!ieee80211_amsdu_realloc_pad(local, skb, in ieee80211_amsdu_prepare_head()
3355 local->hw.extra_tx_headroom)) in ieee80211_amsdu_prepare_head()
3406 struct ieee80211_local *local = sdata->local; in ieee80211_amsdu_aggregate() local
3407 struct fq *fq = &local->fq; in ieee80211_amsdu_aggregate()
3416 int max_frags = local->hw.max_tx_fragments; in ieee80211_amsdu_aggregate()
3427 if (!ieee80211_hw_check(&local->hw, TX_AMSDU)) in ieee80211_amsdu_aggregate()
3489 if (!drv_can_aggregate_in_amsdu(local, head, skb)) in ieee80211_amsdu_aggregate()
3514 if (!ieee80211_amsdu_realloc_pad(local, skb, sizeof(rfc1042_header) + in ieee80211_amsdu_aggregate()
3561 if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL) && in ieee80211_xmit_fast_finish()
3675 struct ieee80211_local *local = sdata->local; in __ieee80211_xmit_fast() local
3680 int hw_headroom = sdata->local->hw.extra_tx_headroom; in __ieee80211_xmit_fast()
3717 if (local->force_tx_status) in __ieee80211_xmit_fast()
3730 tx.local = local; in __ieee80211_xmit_fast()
3735 if (ieee80211_queue_skb(local, sdata, sta, skb)) in __ieee80211_xmit_fast()
3752 ieee80211_tx_frags(local, &sdata->vif, sta, &tx.skbs, false); in __ieee80211_xmit_fast()
3813 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_tx_dequeue() local
3817 struct fq *fq = &local->fq; in ieee80211_tx_dequeue()
3833 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_tx_dequeue()
3834 q_stopped = local->queue_stop_reasons[q]; in ieee80211_tx_dequeue()
3835 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_tx_dequeue()
3870 tx.local = local; in ieee80211_tx_dequeue()
3890 I802_DEBUG_INC(local->tx_handlers_drop_unauth_port); in ieee80211_tx_dequeue()
3891 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx_dequeue()
3903 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx_dequeue()
3912 if (!ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) { in ieee80211_tx_dequeue()
3915 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx_dequeue()
3934 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx_dequeue()
3952 !ieee80211_hw_check(&local->hw, TX_FRAG_LIST)) { in ieee80211_tx_dequeue()
3954 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx_dequeue()
3962 ieee80211_hw_check(&local->hw, NO_VIRTUAL_MONITOR)) { in ieee80211_tx_dequeue()
3966 tx.sdata = rcu_dereference(local->monitor_sdata); in ieee80211_tx_dequeue()
3968 ieee80211_hw_check(&local->hw, WANT_MONITOR_VIF)) { in ieee80211_tx_dequeue()
3972 } else if (ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) { in ieee80211_tx_dequeue()
3973 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx_dequeue()
3993 wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) { in ieee80211_tx_dequeue()
4001 ieee80211_sta_update_pending_airtime(local, tx.sta, in ieee80211_tx_dequeue()
4053 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_next_txq() local
4058 spin_lock_bh(&local->active_txq_lock[ac]); in ieee80211_next_txq()
4060 if (!local->schedule_round[ac]) in ieee80211_next_txq()
4064 txqi = list_first_entry_or_null(&local->active_txqs[ac], in ieee80211_next_txq()
4095 &local->active_txqs[txqi->txq.ac]); in ieee80211_next_txq()
4100 if (txqi->schedule_round == local->schedule_round[ac]) in ieee80211_next_txq()
4104 txqi->schedule_round = local->schedule_round[ac]; in ieee80211_next_txq()
4108 spin_unlock_bh(&local->active_txq_lock[ac]); in ieee80211_next_txq()
4117 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_schedule_txq() local
4121 spin_lock_bh(&local->active_txq_lock[txq->ac]); in __ieee80211_schedule_txq()
4135 if (txqi->txq.sta && local->airtime_flags && has_queue && in __ieee80211_schedule_txq()
4136 wiphy_ext_feature_isset(local->hw.wiphy, in __ieee80211_schedule_txq()
4139 &local->active_txqs[txq->ac]); in __ieee80211_schedule_txq()
4142 &local->active_txqs[txq->ac]); in __ieee80211_schedule_txq()
4147 spin_unlock_bh(&local->active_txq_lock[txq->ac]); in __ieee80211_schedule_txq()
4157 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_txq_airtime_check() local
4159 if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) in ieee80211_txq_airtime_check()
4176 if (atomic_read(&local->aql_total_pending_airtime) < in ieee80211_txq_airtime_check()
4177 local->aql_threshold && in ieee80211_txq_airtime_check()
4187 ieee80211_txq_schedule_airtime_check(struct ieee80211_local *local, u8 ac) in ieee80211_txq_schedule_airtime_check() argument
4193 if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL)) in ieee80211_txq_schedule_airtime_check()
4196 list_for_each_entry(txq, &local->active_txqs[ac], schedule_order) in ieee80211_txq_schedule_airtime_check()
4199 aql_limit = (num_txq - 1) * local->aql_txq_limit_low[ac] / 2 + in ieee80211_txq_schedule_airtime_check()
4200 local->aql_txq_limit_high[ac]; in ieee80211_txq_schedule_airtime_check()
4202 return atomic_read(&local->aql_ac_pending_airtime[ac]) < aql_limit; in ieee80211_txq_schedule_airtime_check()
4208 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_txq_may_transmit() local
4213 spin_lock_bh(&local->active_txq_lock[ac]); in ieee80211_txq_may_transmit()
4221 if (!ieee80211_txq_schedule_airtime_check(local, ac)) in ieee80211_txq_may_transmit()
4224 list_for_each_entry_safe(iter, tmp, &local->active_txqs[ac], in ieee80211_txq_may_transmit()
4231 &local->active_txqs[ac]); in ieee80211_txq_may_transmit()
4237 list_move_tail(&iter->schedule_order, &local->active_txqs[ac]); in ieee80211_txq_may_transmit()
4245 list_move_tail(&txqi->schedule_order, &local->active_txqs[ac]); in ieee80211_txq_may_transmit()
4246 spin_unlock_bh(&local->active_txq_lock[ac]); in ieee80211_txq_may_transmit()
4252 spin_unlock_bh(&local->active_txq_lock[ac]); in ieee80211_txq_may_transmit()
4260 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_txq_schedule_start() local
4262 spin_lock_bh(&local->active_txq_lock[ac]); in ieee80211_txq_schedule_start()
4264 if (ieee80211_txq_schedule_airtime_check(local, ac)) { in ieee80211_txq_schedule_start()
4265 local->schedule_round[ac]++; in ieee80211_txq_schedule_start()
4266 if (!local->schedule_round[ac]) in ieee80211_txq_schedule_start()
4267 local->schedule_round[ac]++; in ieee80211_txq_schedule_start()
4269 local->schedule_round[ac] = 0; in ieee80211_txq_schedule_start()
4272 spin_unlock_bh(&local->active_txq_lock[ac]); in ieee80211_txq_schedule_start()
4283 struct ieee80211_local *local = sdata->local; in __ieee80211_subif_start_xmit() local
4293 sk_pacing_shift_update(skb->sk, sdata->local->hw.tx_sk_pacing_shift); in __ieee80211_subif_start_xmit()
4298 ieee80211_hw_check(&local->hw, SUPPORT_FAST_XMIT) && in __ieee80211_subif_start_xmit()
4354 ieee80211_tpt_led_trig_tx(local, len); in __ieee80211_subif_start_xmit()
4418 struct ieee80211_local *local = sdata->local; in ieee80211_convert_to_unicast() local
4425 list_for_each_entry_rcu(sta, &local->sta_list, list) { in ieee80211_convert_to_unicast()
4536 !ieee80211_hw_check(&sdata->local->hw, MLO_MCAST_MULTI_LINK_TX)) || in ieee80211_subif_start_xmit()
4556 struct ieee80211_local *local = sdata->local; in __ieee80211_tx_8023() local
4563 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in __ieee80211_tx_8023()
4565 if (local->queue_stop_reasons[q] || in __ieee80211_tx_8023()
4566 (!txpending && !skb_queue_empty(&local->pending[q]))) { in __ieee80211_tx_8023()
4568 skb_queue_head(&local->pending[q], skb); in __ieee80211_tx_8023()
4570 skb_queue_tail(&local->pending[q], skb); in __ieee80211_tx_8023()
4572 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in __ieee80211_tx_8023()
4577 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in __ieee80211_tx_8023()
4584 drv_tx(local, &control, skb); in __ieee80211_tx_8023()
4593 struct ieee80211_local *local = sdata->local; in ieee80211_tx_8023() local
4597 if (ieee80211_queue_skb(local, sdata, sta, skb)) in ieee80211_tx_8023()
4614 struct ieee80211_local *local = sdata->local; in ieee80211_8023_xmit() local
4624 if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning)) && in ieee80211_8023_xmit()
4676 info->status_data = ieee80211_store_ack_skb(local, skb, in ieee80211_8023_xmit()
4686 ieee80211_tpt_led_trig_tx(local, len); in ieee80211_8023_xmit()
4729 sk_pacing_shift_update(skb->sk, sdata->local->hw.tx_sk_pacing_shift); in ieee80211_subif_start_xmit_8023()
4747 .local = sdata->local, in ieee80211_build_data_template()
4784 void ieee80211_clear_tx_pending(struct ieee80211_local *local) in ieee80211_clear_tx_pending() argument
4789 for (i = 0; i < local->hw.queues; i++) { in ieee80211_clear_tx_pending()
4790 while ((skb = skb_dequeue(&local->pending[i])) != NULL) in ieee80211_clear_tx_pending()
4791 ieee80211_free_txskb(&local->hw, skb); in ieee80211_clear_tx_pending()
4800 static bool ieee80211_tx_pending_skb(struct ieee80211_local *local, in ieee80211_tx_pending_skb() argument
4843 result = __ieee80211_tx(local, &skbs, sta, true); in ieee80211_tx_pending_skb()
4854 struct ieee80211_local *local = from_tasklet(local, t, in ieee80211_tx_pending() local
4862 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_tx_pending()
4863 for (i = 0; i < local->hw.queues; i++) { in ieee80211_tx_pending()
4868 if (local->queue_stop_reasons[i] || in ieee80211_tx_pending()
4869 skb_queue_empty(&local->pending[i])) in ieee80211_tx_pending()
4872 while (!skb_queue_empty(&local->pending[i])) { in ieee80211_tx_pending()
4873 struct sk_buff *skb = __skb_dequeue(&local->pending[i]); in ieee80211_tx_pending()
4877 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx_pending()
4881 spin_unlock_irqrestore(&local->queue_stop_reason_lock, in ieee80211_tx_pending()
4884 txok = ieee80211_tx_pending_skb(local, skb); in ieee80211_tx_pending()
4885 spin_lock_irqsave(&local->queue_stop_reason_lock, in ieee80211_tx_pending()
4891 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_tx_pending()
5062 struct ieee80211_local *local = sdata->local; in ieee80211_beacon_add_tim() local
5071 if (local->tim_in_locked_section) { in ieee80211_beacon_add_tim()
5074 spin_lock_bh(&local->tim_lock); in ieee80211_beacon_add_tim()
5076 spin_unlock_bh(&local->tim_lock); in ieee80211_beacon_add_tim()
5281 struct ieee80211_local *local, in ieee80211_beacon_protect() argument
5303 tx.local = local; in ieee80211_beacon_protect()
5327 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_beacon_get_finish() local
5355 txrc.sband = local->hw.wiphy->bands[band]; in ieee80211_beacon_get_finish()
5413 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_beacon_get_ap() local
5434 skb = dev_alloc_skb(local->tx_headroom + beacon->head_len + in __ieee80211_beacon_get_ap()
5436 local->hw.extra_beacon_tailroom + mbssid_len); in __ieee80211_beacon_get_ap()
5440 skb_reserve(skb, local->tx_headroom); in __ieee80211_beacon_get_ap()
5462 if (ieee80211_beacon_protect(skb, local, sdata, link) < 0) { in __ieee80211_beacon_get_ap()
5493 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_s1g_short_beacon_get() local
5498 skb = dev_alloc_skb(local->tx_headroom + sb->short_head_len + in ieee80211_s1g_short_beacon_get()
5500 local->hw.extra_beacon_tailroom); in ieee80211_s1g_short_beacon_get()
5504 skb_reserve(skb, local->tx_headroom); in ieee80211_s1g_short_beacon_get()
5583 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_beacon_get() local
5656 skb = dev_alloc_skb(local->tx_headroom + beacon->head_len + in __ieee80211_beacon_get()
5657 local->hw.extra_beacon_tailroom); in __ieee80211_beacon_get()
5660 skb_reserve(skb, local->tx_headroom); in __ieee80211_beacon_get()
5691 skb = dev_alloc_skb(local->tx_headroom + in __ieee80211_beacon_get()
5695 local->hw.extra_beacon_tailroom); in __ieee80211_beacon_get()
5698 skb_reserve(skb, local->tx_headroom); in __ieee80211_beacon_get()
5856 skb = dev_alloc_skb(sdata->local->hw.extra_tx_headroom + tmpl->len); in ieee80211_get_fils_discovery_tmpl()
5858 skb_reserve(skb, sdata->local->hw.extra_tx_headroom); in ieee80211_get_fils_discovery_tmpl()
5885 skb = dev_alloc_skb(sdata->local->hw.extra_tx_headroom + tmpl->len); in ieee80211_get_unsol_bcast_probe_resp_tmpl()
5887 skb_reserve(skb, sdata->local->hw.extra_tx_headroom); in ieee80211_get_unsol_bcast_probe_resp_tmpl()
5901 struct ieee80211_local *local; in ieee80211_pspoll_get() local
5908 local = sdata->local; in ieee80211_pspoll_get()
5910 skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*pspoll)); in ieee80211_pspoll_get()
5914 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_pspoll_get()
5936 struct ieee80211_local *local = sdata->local; in ieee80211_nullfunc_get() local
5945 skb = dev_alloc_skb(local->hw.extra_tx_headroom + in ieee80211_nullfunc_get()
5967 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_nullfunc_get()
6006 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_probereq_get() local
6014 skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*hdr) + in ieee80211_probereq_get()
6019 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_probereq_get()
6074 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_get_buffered_bc() local
6111 local->total_ps_buffered--; in ieee80211_get_buffered_bc()
6148 struct ieee80211_local *local = sdata->local; in ieee80211_reserve_tid() local
6152 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_reserve_tid()
6179 ieee80211_stop_vif_queues(sdata->local, sdata, in ieee80211_reserve_tid()
6185 if (ieee80211_hw_check(&local->hw, AMPDU_AGGREGATION)) { in ieee80211_reserve_tid()
6192 __ieee80211_flush_queues(local, sdata, queues, false); in ieee80211_reserve_tid()
6196 ieee80211_wake_vif_queues(local, sdata, in ieee80211_reserve_tid()
6199 if (ieee80211_hw_check(&local->hw, AMPDU_AGGREGATION)) in ieee80211_reserve_tid()
6213 lockdep_assert_wiphy(sdata->local->hw.wiphy); in ieee80211_unreserve_tid()
6328 struct ieee80211_local *local = sdata->local; in ieee80211_tx_control_port() local
6337 lockdep_assert_wiphy(local->hw.wiphy); in ieee80211_tx_control_port()
6358 skb = dev_alloc_skb(local->hw.extra_tx_headroom + in ieee80211_tx_control_port()
6363 skb_reserve(skb, local->hw.extra_tx_headroom + sizeof(struct ethhdr)); in ieee80211_tx_control_port()
6399 if (local->hw.queues < IEEE80211_NUM_ACS) in ieee80211_tx_control_port()
6440 struct ieee80211_local *local = sdata->local; in ieee80211_probe_mesh_link() local
6443 skb = dev_alloc_skb(local->hw.extra_tx_headroom + len + in ieee80211_probe_mesh_link()
6449 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_probe_mesh_link()