Lines Matching refs:local

56 	struct ieee80211_local *local = tx->local;  in ieee80211_duration()  local
79 sband = local->hw.wiphy->bands[info->band]; in ieee80211_duration()
210 struct ieee80211_local *local = tx->local; in ieee80211_tx_h_dynamic_ps() local
214 if (!ieee80211_hw_check(&local->hw, SUPPORTS_PS)) in ieee80211_tx_h_dynamic_ps()
218 if (ieee80211_hw_check(&local->hw, SUPPORTS_DYNAMIC_PS)) in ieee80211_tx_h_dynamic_ps()
222 if (local->hw.conf.dynamic_ps_timeout <= 0) in ieee80211_tx_h_dynamic_ps()
226 if (local->scanning) in ieee80211_tx_h_dynamic_ps()
229 if (!local->ps_sdata) in ieee80211_tx_h_dynamic_ps()
233 if (local->quiescing) in ieee80211_tx_h_dynamic_ps()
260 if (local->hw.conf.flags & IEEE80211_CONF_PS) { in ieee80211_tx_h_dynamic_ps()
261 ieee80211_stop_queues_by_reason(&local->hw, in ieee80211_tx_h_dynamic_ps()
266 ieee80211_queue_work(&local->hw, in ieee80211_tx_h_dynamic_ps()
267 &local->dynamic_ps_disable_work); in ieee80211_tx_h_dynamic_ps()
274 mod_timer(&local->dynamic_ps_timer, jiffies + in ieee80211_tx_h_dynamic_ps()
275 msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout)); in ieee80211_tx_h_dynamic_ps()
291 if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) && in ieee80211_tx_h_check_assoc()
328 I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc); in ieee80211_tx_h_check_assoc()
348 static void purge_old_ps_buffers(struct ieee80211_local *local) in purge_old_ps_buffers() argument
355 list_for_each_entry_rcu(sdata, &local->interfaces, list) { in purge_old_ps_buffers()
377 list_for_each_entry_rcu(sta, &local->sta_list, list) { in purge_old_ps_buffers()
385 ieee80211_free_txskb(&local->hw, skb); in purge_old_ps_buffers()
391 local->total_ps_buffered = total; in purge_old_ps_buffers()
392 ps_dbg_hw(&local->hw, "PS buffers full - purged %d frames\n", purged); in purge_old_ps_buffers()
431 if (ieee80211_hw_check(&tx->local->hw, QUEUE_CONTROL)) in ieee80211_tx_h_multicast_ps_buf()
441 if (!ieee80211_hw_check(&tx->local->hw, HOST_BROADCAST_PS_BUFFERING)) in ieee80211_tx_h_multicast_ps_buf()
445 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) in ieee80211_tx_h_multicast_ps_buf()
446 purge_old_ps_buffers(tx->local); in ieee80211_tx_h_multicast_ps_buf()
453 tx->local->total_ps_buffered++; in ieee80211_tx_h_multicast_ps_buf()
481 struct ieee80211_local *local = tx->local; in ieee80211_tx_h_unicast_ps_buf() local
500 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) in ieee80211_tx_h_unicast_ps_buf()
501 purge_old_ps_buffers(tx->local); in ieee80211_tx_h_unicast_ps_buf()
522 ieee80211_free_txskb(&local->hw, old); in ieee80211_tx_h_unicast_ps_buf()
524 tx->local->total_ps_buffered++; in ieee80211_tx_h_unicast_ps_buf()
533 if (!timer_pending(&local->sta_cleanup)) in ieee80211_tx_h_unicast_ps_buf()
534 mod_timer(&local->sta_cleanup, in ieee80211_tx_h_unicast_ps_buf()
666 sband = tx->local->hw.wiphy->bands[info->band]; in ieee80211_tx_h_rate_ctrl()
669 tx->local->hw.wiphy->frag_threshold); in ieee80211_tx_h_rate_ctrl()
672 txrc.hw = &tx->local->hw; in ieee80211_tx_h_rate_ctrl()
693 if (len > tx->local->hw.wiphy->rts_threshold) { in ieee80211_tx_h_rate_ctrl()
720 if (WARN(test_bit(SCAN_SW_SCANNING, &tx->local->scanning) && assoc && in ieee80211_tx_h_rate_ctrl()
855 struct ieee80211_local *local = tx->local; in ieee80211_fragment() local
873 tmp = dev_alloc_skb(local->tx_headroom + in ieee80211_fragment()
883 local->tx_headroom + tx->sdata->encrypt_headroom); in ieee80211_fragment()
917 int frag_threshold = tx->local->hw.wiphy->frag_threshold; in ieee80211_tx_h_fragment()
928 if (tx->local->ops->set_frag_threshold) in ieee80211_tx_h_fragment()
1127 ieee80211_free_txskb(&tx->local->hw, purge_skb); in ieee80211_tx_prep_agg()
1147 struct ieee80211_local *local = sdata->local; in ieee80211_tx_prepare() local
1155 tx->local = local; in ieee80211_tx_prepare()
1187 ieee80211_hw_check(&local->hw, AMPDU_AGGREGATION) && in ieee80211_tx_prepare()
1188 !ieee80211_hw_check(&local->hw, TX_AMPDU_SETUP_IN_HW)) { in ieee80211_tx_prepare()
1214 skb->len + FCS_LEN <= local->hw.wiphy->frag_threshold || in ieee80211_tx_prepare()
1231 static void ieee80211_drv_tx(struct ieee80211_local *local, in ieee80211_drv_tx() argument
1266 if (atomic_read(&sdata->txqs_len[ac]) >= local->hw.txq_ac_max_pending) in ieee80211_drv_tx()
1270 drv_wake_tx_queue(local, txqi); in ieee80211_drv_tx()
1275 drv_tx(local, &control, skb); in ieee80211_drv_tx()
1281 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_tx_dequeue() local
1299 ieee80211_propagate_queue_wake(local, sdata->vif.hw_queue[ac]); in ieee80211_tx_dequeue()
1321 static bool ieee80211_tx_frags(struct ieee80211_local *local, in ieee80211_tx_frags() argument
1335 if (WARN_ON_ONCE(q >= local->hw.queues)) { in ieee80211_tx_frags()
1337 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx_frags()
1342 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_tx_frags()
1343 if (local->queue_stop_reasons[q] || in ieee80211_tx_frags()
1344 (!txpending && !skb_queue_empty(&local->pending[q]))) { in ieee80211_tx_frags()
1347 if (local->queue_stop_reasons[q] & in ieee80211_tx_frags()
1356 &local->queue_stop_reason_lock, in ieee80211_tx_frags()
1358 ieee80211_purge_tx_queue(&local->hw, in ieee80211_tx_frags()
1371 &local->pending[q]); in ieee80211_tx_frags()
1374 &local->pending[q]); in ieee80211_tx_frags()
1376 spin_unlock_irqrestore(&local->queue_stop_reason_lock, in ieee80211_tx_frags()
1381 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_tx_frags()
1386 ieee80211_drv_tx(local, vif, sta, skb); in ieee80211_tx_frags()
1395 static bool __ieee80211_tx(struct ieee80211_local *local, in __ieee80211_tx() argument
1428 sdata = rcu_dereference(local->monitor_sdata); in __ieee80211_tx()
1433 } else if (ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) { in __ieee80211_tx()
1448 result = ieee80211_tx_frags(local, vif, pubsta, skbs, in __ieee80211_tx()
1451 ieee80211_tpt_led_trig_tx(local, fc, led_len); in __ieee80211_tx()
1479 if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL)) in invoke_tx_handlers()
1494 if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL)) in invoke_tx_handlers()
1500 I802_DEBUG_INC(tx->local->tx_handlers_drop); in invoke_tx_handlers()
1502 ieee80211_free_txskb(&tx->local->hw, tx->skb); in invoke_tx_handlers()
1504 ieee80211_purge_tx_queue(&tx->local->hw, &tx->skbs); in invoke_tx_handlers()
1507 I802_DEBUG_INC(tx->local->tx_handlers_queued); in invoke_tx_handlers()
1559 struct ieee80211_local *local = sdata->local; in ieee80211_tx() local
1576 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx()
1584 !ieee80211_hw_check(&local->hw, QUEUE_CONTROL)) in ieee80211_tx()
1589 result = __ieee80211_tx(local, &tx.skbs, led_len, in ieee80211_tx()
1601 struct ieee80211_local *local = sdata->local; in ieee80211_skb_resize() local
1611 (!ieee80211_hw_check(&local->hw, SUPPORTS_CLONED_SKBS) || in ieee80211_skb_resize()
1614 I802_DEBUG_INC(local->tx_expand_skb_head_cloned); in ieee80211_skb_resize()
1616 I802_DEBUG_INC(local->tx_expand_skb_head); in ieee80211_skb_resize()
1621 wiphy_debug(local->hw.wiphy, in ieee80211_skb_resize()
1632 struct ieee80211_local *local = sdata->local; in ieee80211_xmit() local
1640 headroom = local->tx_headroom; in ieee80211_xmit()
1647 ieee80211_free_txskb(&local->hw, skb); in ieee80211_xmit()
1754 struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); in ieee80211_monitor_start_xmit() local
1837 list_for_each_entry_rcu(tmp_sdata, &local->interfaces, list) { in ieee80211_monitor_start_xmit()
1852 tmp_sdata = rcu_dereference(local->monitor_sdata); in ieee80211_monitor_start_xmit()
1860 else if (!local->use_chanctx) in ieee80211_monitor_start_xmit()
1861 chandef = &local->_oper_chandef; in ieee80211_monitor_start_xmit()
1881 if (!cfg80211_reg_can_beacon(local->hw.wiphy, chandef, in ieee80211_monitor_start_xmit()
2005 struct ieee80211_local *local = sdata->local; in ieee80211_build_hdr() local
2084 band = local->hw.conf.chandef.chan->band; in ieee80211_build_hdr()
2254 I802_DEBUG_INC(local->tx_handlers_drop_unauth_port); in ieee80211_build_hdr()
2268 spin_lock_irqsave(&local->ack_status_lock, flags); in ieee80211_build_hdr()
2269 id = idr_alloc(&local->ack_status_frames, ack_skb, in ieee80211_build_hdr()
2271 spin_unlock_irqrestore(&local->ack_status_lock, flags); in ieee80211_build_hdr()
2341 head_need += local->tx_headroom; in ieee80211_build_hdr()
2344 ieee80211_free_txskb(&local->hw, skb); in ieee80211_build_hdr()
2424 struct ieee80211_local *local = sta->local; in ieee80211_check_fast_xmit() local
2430 if (!ieee80211_hw_check(&local->hw, SUPPORT_FAST_XMIT)) in ieee80211_check_fast_xmit()
2446 if (ieee80211_hw_check(&local->hw, SUPPORTS_PS) && in ieee80211_check_fast_xmit()
2447 !ieee80211_hw_check(&local->hw, SUPPORTS_DYNAMIC_PS) && in ieee80211_check_fast_xmit()
2464 if (local->hw.wiphy->frag_threshold != (u32)-1 && in ieee80211_check_fast_xmit()
2465 !local->ops->set_frag_threshold) in ieee80211_check_fast_xmit()
2651 void ieee80211_check_fast_xmit_all(struct ieee80211_local *local) in ieee80211_check_fast_xmit_all() argument
2656 list_for_each_entry_rcu(sta, &local->sta_list, list) in ieee80211_check_fast_xmit_all()
2663 struct ieee80211_local *local = sdata->local; in ieee80211_check_fast_xmit_iface() local
2668 list_for_each_entry_rcu(sta, &local->sta_list, list) { in ieee80211_check_fast_xmit_iface()
2697 struct ieee80211_local *local = sdata->local; in ieee80211_xmit_fast() local
2700 int hw_headroom = sdata->local->hw.extra_tx_headroom; in ieee80211_xmit_fast()
2792 tx.local = local; in ieee80211_xmit_fast()
2800 if (!ieee80211_hw_check(&local->hw, HAS_RATE_CONTROL)) { in ieee80211_xmit_fast()
2844 ieee80211_tx_frags(local, &sdata->vif, &sta->sta, &tx.skbs, false); in ieee80211_xmit_fast()
2948 .local = sdata->local, in ieee80211_build_data_template()
2984 void ieee80211_clear_tx_pending(struct ieee80211_local *local) in ieee80211_clear_tx_pending() argument
2989 for (i = 0; i < local->hw.queues; i++) { in ieee80211_clear_tx_pending()
2990 while ((skb = skb_dequeue(&local->pending[i])) != NULL) in ieee80211_clear_tx_pending()
2991 ieee80211_free_txskb(&local->hw, skb); in ieee80211_clear_tx_pending()
3000 static bool ieee80211_tx_pending_skb(struct ieee80211_local *local, in ieee80211_tx_pending_skb() argument
3029 result = __ieee80211_tx(local, &skbs, skb->len, sta, true); in ieee80211_tx_pending_skb()
3040 struct ieee80211_local *local = (struct ieee80211_local *)data; in ieee80211_tx_pending() local
3047 spin_lock_irqsave(&local->queue_stop_reason_lock, flags); in ieee80211_tx_pending()
3048 for (i = 0; i < local->hw.queues; i++) { in ieee80211_tx_pending()
3053 if (local->queue_stop_reasons[i] || in ieee80211_tx_pending()
3054 skb_queue_empty(&local->pending[i])) in ieee80211_tx_pending()
3057 while (!skb_queue_empty(&local->pending[i])) { in ieee80211_tx_pending()
3058 struct sk_buff *skb = __skb_dequeue(&local->pending[i]); in ieee80211_tx_pending()
3062 ieee80211_free_txskb(&local->hw, skb); in ieee80211_tx_pending()
3066 spin_unlock_irqrestore(&local->queue_stop_reason_lock, in ieee80211_tx_pending()
3069 txok = ieee80211_tx_pending_skb(local, skb); in ieee80211_tx_pending()
3070 spin_lock_irqsave(&local->queue_stop_reason_lock, in ieee80211_tx_pending()
3076 if (skb_queue_empty(&local->pending[i])) in ieee80211_tx_pending()
3077 ieee80211_propagate_queue_wake(local, i); in ieee80211_tx_pending()
3079 spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags); in ieee80211_tx_pending()
3155 struct ieee80211_local *local = sdata->local; in ieee80211_beacon_add_tim() local
3164 if (local->tim_in_locked_section) { in ieee80211_beacon_add_tim()
3167 spin_lock_bh(&local->tim_lock); in ieee80211_beacon_add_tim()
3169 spin_unlock_bh(&local->tim_lock); in ieee80211_beacon_add_tim()
3321 struct ieee80211_local *local = hw_to_local(hw); in __ieee80211_beacon_get() local
3358 skb = dev_alloc_skb(local->tx_headroom + in __ieee80211_beacon_get()
3361 local->hw.extra_beacon_tailroom); in __ieee80211_beacon_get()
3365 skb_reserve(skb, local->tx_headroom); in __ieee80211_beacon_get()
3400 skb = dev_alloc_skb(local->tx_headroom + beacon->head_len + in __ieee80211_beacon_get()
3401 local->hw.extra_beacon_tailroom); in __ieee80211_beacon_get()
3404 skb_reserve(skb, local->tx_headroom); in __ieee80211_beacon_get()
3433 skb = dev_alloc_skb(local->tx_headroom + in __ieee80211_beacon_get()
3437 local->hw.extra_beacon_tailroom); in __ieee80211_beacon_get()
3440 skb_reserve(skb, local->tx_headroom); in __ieee80211_beacon_get()
3481 txrc.sband = local->hw.wiphy->bands[band]; in __ieee80211_beacon_get()
3589 struct ieee80211_local *local; in ieee80211_pspoll_get() local
3597 local = sdata->local; in ieee80211_pspoll_get()
3599 skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*pspoll)); in ieee80211_pspoll_get()
3603 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_pspoll_get()
3627 struct ieee80211_local *local; in ieee80211_nullfunc_get() local
3635 local = sdata->local; in ieee80211_nullfunc_get()
3637 skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*nullfunc)); in ieee80211_nullfunc_get()
3641 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_nullfunc_get()
3662 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_probereq_get() local
3670 skb = dev_alloc_skb(local->hw.extra_tx_headroom + sizeof(*hdr) + in ieee80211_probereq_get()
3675 skb_reserve(skb, local->hw.extra_tx_headroom); in ieee80211_probereq_get()
3731 struct ieee80211_local *local = hw_to_local(hw); in ieee80211_get_buffered_bc() local
3768 local->total_ps_buffered--; in ieee80211_get_buffered_bc()
3805 struct ieee80211_local *local = sdata->local; in ieee80211_reserve_tid() local
3809 lockdep_assert_held(&local->sta_mtx); in ieee80211_reserve_tid()
3836 ieee80211_stop_vif_queues(sdata->local, sdata, in ieee80211_reserve_tid()
3842 if (ieee80211_hw_check(&local->hw, AMPDU_AGGREGATION)) { in ieee80211_reserve_tid()
3849 __ieee80211_flush_queues(local, sdata, queues, false); in ieee80211_reserve_tid()
3853 ieee80211_wake_vif_queues(local, sdata, in ieee80211_reserve_tid()
3856 if (ieee80211_hw_check(&local->hw, AMPDU_AGGREGATION)) in ieee80211_reserve_tid()
3870 lockdep_assert_held(&sdata->local->sta_mtx); in ieee80211_unreserve_tid()