Lines Matching refs:local
46 struct ieee80211_local *local = tx->local; in ieee80211_duration() local
69 sband = local->hw.wiphy->bands[info->band]; in ieee80211_duration()
200 struct ieee80211_local *local = tx->local; in ieee80211_tx_h_dynamic_ps() local
204 if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS)) in ieee80211_tx_h_dynamic_ps()
208 if (local->hw.flags & IEEE80211_HW_SUPPORTS_DYNAMIC_PS) in ieee80211_tx_h_dynamic_ps()
212 if (local->hw.conf.dynamic_ps_timeout <= 0) in ieee80211_tx_h_dynamic_ps()
216 if (local->scanning) in ieee80211_tx_h_dynamic_ps()
219 if (!local->ps_sdata) in ieee80211_tx_h_dynamic_ps()
223 if (local->quiescing) in ieee80211_tx_h_dynamic_ps()
250 if (local->hw.conf.flags & IEEE80211_CONF_PS) { in ieee80211_tx_h_dynamic_ps()
251 ieee80211_stop_queues_by_reason(&local->hw, in ieee80211_tx_h_dynamic_ps()
256 ieee80211_queue_work(&local->hw, in ieee80211_tx_h_dynamic_ps()
257 &local->dynamic_ps_disable_work); in ieee80211_tx_h_dynamic_ps()
264 mod_timer(&local->dynamic_ps_timer, jiffies + in ieee80211_tx_h_dynamic_ps()
265 msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); in ieee80211_tx_h_dynamic_ps()
281 if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) && in ieee80211_tx_h_check_assoc()
318 I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc); in ieee80211_tx_h_check_assoc()
338 static void purge_old_ps_buffers(struct ieee80211_local *local) in purge_old_ps_buffers() argument
345 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in purge_old_ps_buffers()
367 list_for_each_entry_rcu(sta, &local->sta_list, list) { in purge_old_ps_buffers()
375 ieee80211_free_txskb(&local->hw, skb); in purge_old_ps_buffers()
381 local->total_ps_buffered = total; in purge_old_ps_buffers()
382 ps_dbg_hw(&local->hw, "PS buffers full - purged %d frames\n", purged); in purge_old_ps_buffers()
421 if (tx->local->hw.flags & IEEE80211_HW_QUEUE_CONTROL) in ieee80211_tx_h_multicast_ps_buf()
431 if (!(tx->local->hw.flags & IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING)) in ieee80211_tx_h_multicast_ps_buf()
435 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) in ieee80211_tx_h_multicast_ps_buf()
436 purge_old_ps_buffers(tx->local); in ieee80211_tx_h_multicast_ps_buf()
443 tx->local->total_ps_buffered++; in ieee80211_tx_h_multicast_ps_buf()
471 struct ieee80211_local *local = tx->local; in ieee80211_tx_h_unicast_ps_buf() local
490 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) in ieee80211_tx_h_unicast_ps_buf()
491 purge_old_ps_buffers(tx->local); in ieee80211_tx_h_unicast_ps_buf()
512 ieee80211_free_txskb(&local->hw, old); in ieee80211_tx_h_unicast_ps_buf()
514 tx->local->total_ps_buffered++; in ieee80211_tx_h_unicast_ps_buf()
523 if (!timer_pending(&local->sta_cleanup)) in ieee80211_tx_h_unicast_ps_buf()
524 mod_timer(&local->sta_cleanup, in ieee80211_tx_h_unicast_ps_buf()
657 sband = tx->local->hw.wiphy->bands[info->band]; in ieee80211_tx_h_rate_ctrl()
660 tx->local->hw.wiphy->frag_threshold); in ieee80211_tx_h_rate_ctrl()
663 txrc.hw = &tx->local->hw; in ieee80211_tx_h_rate_ctrl()
683 if (len > tx->local->hw.wiphy->rts_threshold) { in ieee80211_tx_h_rate_ctrl()
710 if (WARN(test_bit(SCAN_SW_SCANNING, &tx->local->scanning) && assoc && in ieee80211_tx_h_rate_ctrl()
845 struct ieee80211_local *local = tx->local; in ieee80211_fragment() local
863 tmp = dev_alloc_skb(local->tx_headroom + in ieee80211_fragment()
873 local->tx_headroom + tx->sdata->encrypt_headroom); in ieee80211_fragment()
907 int frag_threshold = tx->local->hw.wiphy->frag_threshold; in ieee80211_tx_h_fragment()
918 if (tx->local->ops->set_frag_threshold) in ieee80211_tx_h_fragment()
1116 ieee80211_free_txskb(&tx->local->hw, purge_skb); in ieee80211_tx_prep_agg()
1136 struct ieee80211_local *local = sdata->local; in ieee80211_tx_prepare() local
1144 tx->local = local; in ieee80211_tx_prepare()
1176 (local->hw.flags & IEEE80211_HW_AMPDU_AGGREGATION) && in ieee80211_tx_prepare()
1177 !(local->hw.flags & IEEE80211_HW_TX_AMPDU_SETUP_IN_HW)) { in ieee80211_tx_prepare()
1203 skb->len + FCS_LEN <= local->hw.wiphy->frag_threshold || in ieee80211_tx_prepare()
1218 static void ieee80211_drv_tx(struct ieee80211_local *local, in ieee80211_drv_tx() argument
1253 if (atomic_read(&sdata->txqs_len[ac]) >= local->hw.txq_ac_max_pending) in ieee80211_drv_tx()
1257 drv_wake_tx_queue(local, txqi); in ieee80211_drv_tx()
1262 drv_tx(local, &control, skb); in ieee80211_drv_tx()
1268 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_tx_dequeue() local
1286 ieee80211_propagate_queue_wake(local, sdata->vif.hw_queue[ac]); in ieee80211_tx_dequeue()
1308 static bool ieee80211_tx_frags(struct ieee80211_local *local, in ieee80211_tx_frags() argument
1322 if (WARN_ON_ONCE(q >= local->hw.queues)) { in ieee80211_tx_frags()
1324 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx_frags()
1329 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_tx_frags()
1330 if (local->queue_stop_reasons[q] || in ieee80211_tx_frags()
1331 (!txpending && !skb_queue_empty(&local->pending[q]))) { in ieee80211_tx_frags()
1334 if (local->queue_stop_reasons[q] & in ieee80211_tx_frags()
1343 &local->queue_stop_reason_lock, in ieee80211_tx_frags()
1345 ieee80211_purge_tx_queue(&local->hw, in ieee80211_tx_frags()
1358 &local->pending[q]); in ieee80211_tx_frags()
1361 &local->pending[q]); in ieee80211_tx_frags()
1363 spin_unlock_irqrestore(&local->queue_stop_reason_lock, in ieee80211_tx_frags()
1368 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_tx_frags()
1373 ieee80211_drv_tx(local, vif, sta, skb); in ieee80211_tx_frags()
1382 static bool __ieee80211_tx(struct ieee80211_local *local, in __ieee80211_tx() argument
1415 sdata = rcu_dereference(local->monitor_sdata); in __ieee80211_tx()
1420 } else if (local->hw.flags & IEEE80211_HW_QUEUE_CONTROL) { in __ieee80211_tx()
1435 result = ieee80211_tx_frags(local, vif, pubsta, skbs, in __ieee80211_tx()
1438 ieee80211_tpt_led_trig_tx(local, fc, led_len); in __ieee80211_tx()
1466 if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)) in invoke_tx_handlers()
1481 if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL)) in invoke_tx_handlers()
1487 I802_DEBUG_INC(tx->local->tx_handlers_drop); in invoke_tx_handlers()
1489 ieee80211_free_txskb(&tx->local->hw, tx->skb); in invoke_tx_handlers()
1491 ieee80211_purge_tx_queue(&tx->local->hw, &tx->skbs); in invoke_tx_handlers()
1494 I802_DEBUG_INC(tx->local->tx_handlers_queued); in invoke_tx_handlers()
1546 struct ieee80211_local *local = sdata->local; in ieee80211_tx() local
1563 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx()
1571 !(local->hw.flags & IEEE80211_HW_QUEUE_CONTROL)) in ieee80211_tx()
1576 result = __ieee80211_tx(local, &tx.skbs, led_len, in ieee80211_tx()
1588 struct ieee80211_local *local = sdata->local; in ieee80211_skb_resize() local
1598 (!(local->hw.flags & IEEE80211_HW_SUPPORTS_CLONED_SKBS) || in ieee80211_skb_resize()
1601 I802_DEBUG_INC(local->tx_expand_skb_head_cloned); in ieee80211_skb_resize()
1603 I802_DEBUG_INC(local->tx_expand_skb_head); in ieee80211_skb_resize()
1608 wiphy_debug(local->hw.wiphy, in ieee80211_skb_resize()
1619 struct ieee80211_local *local = sdata->local; in ieee80211_xmit() local
1627 headroom = local->tx_headroom; in ieee80211_xmit()
1634 ieee80211_free_txskb(&local->hw, skb); in ieee80211_xmit()
1741 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); in ieee80211_monitor_start_xmit() local
1824 list_for_each_entry_rcu(tmp_sdata, &local->interfaces, list) { in ieee80211_monitor_start_xmit()
1839 tmp_sdata = rcu_dereference(local->monitor_sdata); in ieee80211_monitor_start_xmit()
1847 else if (!local->use_chanctx) in ieee80211_monitor_start_xmit()
1848 chandef = &local->_oper_chandef; in ieee80211_monitor_start_xmit()
1868 if (!cfg80211_reg_can_beacon(local->hw.wiphy, chandef, in ieee80211_monitor_start_xmit()
1992 struct ieee80211_local *local = sdata->local; in ieee80211_build_hdr() local
2071 band = local->hw.conf.chandef.chan->band; in ieee80211_build_hdr()
2241 I802_DEBUG_INC(local->tx_handlers_drop_unauth_port); in ieee80211_build_hdr()
2255 spin_lock_irqsave(&local->ack_status_lock, flags); in ieee80211_build_hdr()
2256 id = idr_alloc(&local->ack_status_frames, ack_skb, in ieee80211_build_hdr()
2258 spin_unlock_irqrestore(&local->ack_status_lock, flags); in ieee80211_build_hdr()
2328 head_need += local->tx_headroom; in ieee80211_build_hdr()
2331 ieee80211_free_txskb(&local->hw, skb); in ieee80211_build_hdr()
2439 .local = sdata->local, in ieee80211_build_data_template()
2475 void ieee80211_clear_tx_pending(struct ieee80211_local *local) in ieee80211_clear_tx_pending() argument
2480 for (i = 0; i < local->hw.queues; i++) { in ieee80211_clear_tx_pending()
2481 while ((skb = skb_dequeue(&local->pending[i])) != NULL) in ieee80211_clear_tx_pending()
2482 ieee80211_free_txskb(&local->hw, skb); in ieee80211_clear_tx_pending()
2491 static bool ieee80211_tx_pending_skb(struct ieee80211_local *local, in ieee80211_tx_pending_skb() argument
2520 result = __ieee80211_tx(local, &skbs, skb->len, sta, true); in ieee80211_tx_pending_skb()
2531 struct ieee80211_local *local = (struct ieee80211_local *)data; in ieee80211_tx_pending() local
2538 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_tx_pending()
2539 for (i = 0; i < local->hw.queues; i++) { in ieee80211_tx_pending()
2544 if (local->queue_stop_reasons[i] || in ieee80211_tx_pending()
2545 skb_queue_empty(&local->pending[i])) in ieee80211_tx_pending()
2548 while (!skb_queue_empty(&local->pending[i])) { in ieee80211_tx_pending()
2549 struct sk_buff *skb = __skb_dequeue(&local->pending[i]); in ieee80211_tx_pending()
2553 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx_pending()
2557 spin_unlock_irqrestore(&local->queue_stop_reason_lock, in ieee80211_tx_pending()
2560 txok = ieee80211_tx_pending_skb(local, skb); in ieee80211_tx_pending()
2561 spin_lock_irqsave(&local->queue_stop_reason_lock, in ieee80211_tx_pending()
2567 if (skb_queue_empty(&local->pending[i])) in ieee80211_tx_pending()
2568 ieee80211_propagate_queue_wake(local, i); in ieee80211_tx_pending()
2570 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_tx_pending()
2646 struct ieee80211_local *local = sdata->local; in ieee80211_beacon_add_tim() local
2655 if (local->tim_in_locked_section) { in ieee80211_beacon_add_tim()
2658 spin_lock_bh(&local->tim_lock); in ieee80211_beacon_add_tim()
2660 spin_unlock_bh(&local->tim_lock); in ieee80211_beacon_add_tim()
2806 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_beacon_get() local
2843 skb = dev_alloc_skb(local->tx_headroom + in __ieee80211_beacon_get()
2846 local->hw.extra_beacon_tailroom); in __ieee80211_beacon_get()
2850 skb_reserve(skb, local->tx_headroom); in __ieee80211_beacon_get()
2885 skb = dev_alloc_skb(local->tx_headroom + beacon->head_len + in __ieee80211_beacon_get()
2886 local->hw.extra_beacon_tailroom); in __ieee80211_beacon_get()
2889 skb_reserve(skb, local->tx_headroom); in __ieee80211_beacon_get()
2918 skb = dev_alloc_skb(local->tx_headroom + in __ieee80211_beacon_get()
2922 local->hw.extra_beacon_tailroom); in __ieee80211_beacon_get()
2925 skb_reserve(skb, local->tx_headroom); in __ieee80211_beacon_get()
2966 txrc.sband = local->hw.wiphy->bands[band]; in __ieee80211_beacon_get()
3055 struct ieee80211_local *local; in ieee80211_pspoll_get() local
3063 local = sdata->local; in ieee80211_pspoll_get()
3065 skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*pspoll)); in ieee80211_pspoll_get()
3069 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_pspoll_get()
3093 struct ieee80211_local *local; in ieee80211_nullfunc_get() local
3101 local = sdata->local; in ieee80211_nullfunc_get()
3103 skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*nullfunc)); in ieee80211_nullfunc_get()
3107 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_nullfunc_get()
3128 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_probereq_get() local
3136 skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*hdr) + in ieee80211_probereq_get()
3141 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_probereq_get()
3197 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_get_buffered_bc() local
3234 local->total_ps_buffered--; in ieee80211_get_buffered_bc()
3271 struct ieee80211_local *local = sdata->local; in ieee80211_reserve_tid() local
3275 lockdep_assert_held(&local->sta_mtx); in ieee80211_reserve_tid()
3302 ieee80211_stop_vif_queues(sdata->local, sdata, in ieee80211_reserve_tid()
3308 if (local->hw.flags & IEEE80211_HW_AMPDU_AGGREGATION) { in ieee80211_reserve_tid()
3315 __ieee80211_flush_queues(local, sdata, queues, false); in ieee80211_reserve_tid()
3319 ieee80211_wake_vif_queues(local, sdata, in ieee80211_reserve_tid()
3322 if (local->hw.flags & IEEE80211_HW_AMPDU_AGGREGATION) in ieee80211_reserve_tid()
3336 lockdep_assert_held(&sdata->local->sta_mtx); in ieee80211_unreserve_tid()