Lines Matching refs:tx
55 static __le16 ieee80211_duration(struct ieee80211_tx_data *tx, in ieee80211_duration() argument
61 struct ieee80211_local *local = tx->local; in ieee80211_duration()
69 if (tx->rate.flags & (IEEE80211_TX_RC_MCS | IEEE80211_TX_RC_VHT_MCS)) in ieee80211_duration()
73 chanctx_conf = rcu_dereference(tx->sdata->vif.chanctx_conf); in ieee80211_duration()
81 if (WARN_ON_ONCE(tx->rate.idx < 0)) in ieee80211_duration()
85 txrate = &sband->bitrates[tx->rate.idx]; in ieee80211_duration()
154 if (tx->sdata->vif.bss_conf.basic_rates & BIT(i)) in ieee80211_duration()
160 if (tx->sdata->flags & IEEE80211_SDATA_OPERATING_GMODE) in ieee80211_duration()
194 tx->sdata->vif.bss_conf.use_short_preamble, in ieee80211_duration()
204 tx->sdata->vif.bss_conf.use_short_preamble, in ieee80211_duration()
213 ieee80211_tx_h_dynamic_ps(struct ieee80211_tx_data *tx) in ieee80211_tx_h_dynamic_ps() argument
215 struct ieee80211_local *local = tx->local; in ieee80211_tx_h_dynamic_ps()
217 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); in ieee80211_tx_h_dynamic_ps()
243 if (tx->sdata->vif.type != NL80211_IFTYPE_STATION) in ieee80211_tx_h_dynamic_ps()
249 ifmgd = &tx->sdata->u.mgd; in ieee80211_tx_h_dynamic_ps()
266 skb_get_queue_mapping(tx->skb) == IEEE80211_AC_VO) in ieee80211_tx_h_dynamic_ps()
290 ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx) in ieee80211_tx_h_check_assoc() argument
293 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; in ieee80211_tx_h_check_assoc()
294 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); in ieee80211_tx_h_check_assoc()
300 if (unlikely(test_bit(SCAN_SW_SCANNING, &tx->local->scanning)) && in ieee80211_tx_h_check_assoc()
301 test_bit(SDATA_STATE_OFFCHANNEL, &tx->sdata->state) && in ieee80211_tx_h_check_assoc()
317 if (tx->sdata->vif.type == NL80211_IFTYPE_OCB) in ieee80211_tx_h_check_assoc()
320 if (tx->sdata->vif.type == NL80211_IFTYPE_WDS) in ieee80211_tx_h_check_assoc()
323 if (tx->flags & IEEE80211_TX_PS_BUFFERED) in ieee80211_tx_h_check_assoc()
326 if (tx->sta) in ieee80211_tx_h_check_assoc()
327 assoc = test_sta_flag(tx->sta, WLAN_STA_ASSOC); in ieee80211_tx_h_check_assoc()
329 if (likely(tx->flags & IEEE80211_TX_UNICAST)) { in ieee80211_tx_h_check_assoc()
333 sdata_info(tx->sdata, in ieee80211_tx_h_check_assoc()
337 I802_DEBUG_INC(tx->local->tx_handlers_drop_not_assoc); in ieee80211_tx_h_check_assoc()
341 ieee80211_vif_get_num_mcast_if(tx->sdata) == 0)) { in ieee80211_tx_h_check_assoc()
404 ieee80211_tx_h_multicast_ps_buf(struct ieee80211_tx_data *tx) in ieee80211_tx_h_multicast_ps_buf() argument
406 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); in ieee80211_tx_h_multicast_ps_buf()
407 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; in ieee80211_tx_h_multicast_ps_buf()
419 if (tx->sdata->vif.type == NL80211_IFTYPE_AP || in ieee80211_tx_h_multicast_ps_buf()
420 tx->sdata->vif.type == NL80211_IFTYPE_AP_VLAN) { in ieee80211_tx_h_multicast_ps_buf()
421 if (!tx->sdata->bss) in ieee80211_tx_h_multicast_ps_buf()
424 ps = &tx->sdata->bss->ps; in ieee80211_tx_h_multicast_ps_buf()
425 } else if (ieee80211_vif_is_mesh(&tx->sdata->vif)) { in ieee80211_tx_h_multicast_ps_buf()
426 ps = &tx->sdata->u.mesh.ps; in ieee80211_tx_h_multicast_ps_buf()
439 if (ieee80211_hw_check(&tx->local->hw, QUEUE_CONTROL)) in ieee80211_tx_h_multicast_ps_buf()
440 info->hw_queue = tx->sdata->vif.cab_queue; in ieee80211_tx_h_multicast_ps_buf()
449 if (!ieee80211_hw_check(&tx->local->hw, HOST_BROADCAST_PS_BUFFERING)) in ieee80211_tx_h_multicast_ps_buf()
453 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) in ieee80211_tx_h_multicast_ps_buf()
454 purge_old_ps_buffers(tx->local); in ieee80211_tx_h_multicast_ps_buf()
457 ps_dbg(tx->sdata, in ieee80211_tx_h_multicast_ps_buf()
459 ieee80211_free_txskb(&tx->local->hw, skb_dequeue(&ps->bc_buf)); in ieee80211_tx_h_multicast_ps_buf()
461 tx->local->total_ps_buffered++; in ieee80211_tx_h_multicast_ps_buf()
463 skb_queue_tail(&ps->bc_buf, tx->skb); in ieee80211_tx_h_multicast_ps_buf()
484 ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) in ieee80211_tx_h_unicast_ps_buf() argument
486 struct sta_info *sta = tx->sta; in ieee80211_tx_h_unicast_ps_buf()
487 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); in ieee80211_tx_h_unicast_ps_buf()
488 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; in ieee80211_tx_h_unicast_ps_buf()
489 struct ieee80211_local *local = tx->local; in ieee80211_tx_h_unicast_ps_buf()
498 int ac = skb_get_queue_mapping(tx->skb); in ieee80211_tx_h_unicast_ps_buf()
508 if (tx->local->total_ps_buffered >= TOTAL_MAX_TX_BUFFER) in ieee80211_tx_h_unicast_ps_buf()
509 purge_old_ps_buffers(tx->local); in ieee80211_tx_h_unicast_ps_buf()
527 ps_dbg(tx->sdata, in ieee80211_tx_h_unicast_ps_buf()
532 tx->local->total_ps_buffered++; in ieee80211_tx_h_unicast_ps_buf()
535 info->control.vif = &tx->sdata->vif; in ieee80211_tx_h_unicast_ps_buf()
538 skb_queue_tail(&sta->ps_tx_buf[ac], tx->skb); in ieee80211_tx_h_unicast_ps_buf()
554 ps_dbg(tx->sdata, in ieee80211_tx_h_unicast_ps_buf()
563 ieee80211_tx_h_ps_buf(struct ieee80211_tx_data *tx) in ieee80211_tx_h_ps_buf() argument
565 if (unlikely(tx->flags & IEEE80211_TX_PS_BUFFERED)) in ieee80211_tx_h_ps_buf()
568 if (tx->flags & IEEE80211_TX_UNICAST) in ieee80211_tx_h_ps_buf()
569 return ieee80211_tx_h_unicast_ps_buf(tx); in ieee80211_tx_h_ps_buf()
571 return ieee80211_tx_h_multicast_ps_buf(tx); in ieee80211_tx_h_ps_buf()
575 ieee80211_tx_h_check_control_port_protocol(struct ieee80211_tx_data *tx) in ieee80211_tx_h_check_control_port_protocol() argument
577 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); in ieee80211_tx_h_check_control_port_protocol()
579 if (unlikely(tx->sdata->control_port_protocol == tx->skb->protocol)) { in ieee80211_tx_h_check_control_port_protocol()
580 if (tx->sdata->control_port_no_encrypt) in ieee80211_tx_h_check_control_port_protocol()
590 ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx) in ieee80211_tx_h_select_key() argument
593 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); in ieee80211_tx_h_select_key()
594 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; in ieee80211_tx_h_select_key()
597 tx->key = NULL; in ieee80211_tx_h_select_key()
598 else if (tx->sta && in ieee80211_tx_h_select_key()
599 (key = rcu_dereference(tx->sta->ptk[tx->sta->ptk_idx]))) in ieee80211_tx_h_select_key()
600 tx->key = key; in ieee80211_tx_h_select_key()
601 else if (ieee80211_is_group_privacy_action(tx->skb) && in ieee80211_tx_h_select_key()
602 (key = rcu_dereference(tx->sdata->default_multicast_key))) in ieee80211_tx_h_select_key()
603 tx->key = key; in ieee80211_tx_h_select_key()
606 ieee80211_is_robust_mgmt_frame(tx->skb) && in ieee80211_tx_h_select_key()
607 (key = rcu_dereference(tx->sdata->default_mgmt_key))) in ieee80211_tx_h_select_key()
608 tx->key = key; in ieee80211_tx_h_select_key()
610 (key = rcu_dereference(tx->sdata->default_multicast_key))) in ieee80211_tx_h_select_key()
611 tx->key = key; in ieee80211_tx_h_select_key()
613 (key = rcu_dereference(tx->sdata->default_unicast_key))) in ieee80211_tx_h_select_key()
614 tx->key = key; in ieee80211_tx_h_select_key()
616 tx->key = NULL; in ieee80211_tx_h_select_key()
618 if (tx->key) { in ieee80211_tx_h_select_key()
623 switch (tx->key->conf.cipher) { in ieee80211_tx_h_select_key()
628 tx->key = NULL; in ieee80211_tx_h_select_key()
635 !ieee80211_use_mfp(hdr->frame_control, tx->sta, in ieee80211_tx_h_select_key()
636 tx->skb) && in ieee80211_tx_h_select_key()
637 !ieee80211_is_group_privacy_action(tx->skb)) in ieee80211_tx_h_select_key()
638 tx->key = NULL; in ieee80211_tx_h_select_key()
640 skip_hw = (tx->key->conf.flags & in ieee80211_tx_h_select_key()
649 tx->key = NULL; in ieee80211_tx_h_select_key()
653 if (unlikely(tx->key && tx->key->flags & KEY_FLAG_TAINTED && in ieee80211_tx_h_select_key()
657 if (!skip_hw && tx->key && in ieee80211_tx_h_select_key()
658 tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE) in ieee80211_tx_h_select_key()
659 info->control.hw_key = &tx->key->conf; in ieee80211_tx_h_select_key()
666 ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx) in ieee80211_tx_h_rate_ctrl() argument
668 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); in ieee80211_tx_h_rate_ctrl()
669 struct ieee80211_hdr *hdr = (void *)tx->skb->data; in ieee80211_tx_h_rate_ctrl()
678 sband = tx->local->hw.wiphy->bands[info->band]; in ieee80211_tx_h_rate_ctrl()
680 len = min_t(u32, tx->skb->len + FCS_LEN, in ieee80211_tx_h_rate_ctrl()
681 tx->local->hw.wiphy->frag_threshold); in ieee80211_tx_h_rate_ctrl()
684 txrc.hw = &tx->local->hw; in ieee80211_tx_h_rate_ctrl()
686 txrc.bss_conf = &tx->sdata->vif.bss_conf; in ieee80211_tx_h_rate_ctrl()
687 txrc.skb = tx->skb; in ieee80211_tx_h_rate_ctrl()
689 txrc.rate_idx_mask = tx->sdata->rc_rateidx_mask[info->band]; in ieee80211_tx_h_rate_ctrl()
691 if (tx->sdata->rc_has_mcs_mask[info->band]) in ieee80211_tx_h_rate_ctrl()
693 tx->sdata->rc_rateidx_mcs_mask[info->band]; in ieee80211_tx_h_rate_ctrl()
695 txrc.bss = (tx->sdata->vif.type == NL80211_IFTYPE_AP || in ieee80211_tx_h_rate_ctrl()
696 tx->sdata->vif.type == NL80211_IFTYPE_MESH_POINT || in ieee80211_tx_h_rate_ctrl()
697 tx->sdata->vif.type == NL80211_IFTYPE_ADHOC || in ieee80211_tx_h_rate_ctrl()
698 tx->sdata->vif.type == NL80211_IFTYPE_OCB); in ieee80211_tx_h_rate_ctrl()
701 if (len > tx->local->hw.wiphy->rts_threshold) { in ieee80211_tx_h_rate_ctrl()
706 info->control.use_cts_prot = tx->sdata->vif.bss_conf.use_cts_prot; in ieee80211_tx_h_rate_ctrl()
714 if (tx->sdata->vif.bss_conf.use_short_preamble && in ieee80211_tx_h_rate_ctrl()
716 (tx->sta && test_sta_flag(tx->sta, WLAN_STA_SHORT_PREAMBLE)))) in ieee80211_tx_h_rate_ctrl()
725 if (tx->sta) in ieee80211_tx_h_rate_ctrl()
726 assoc = test_sta_flag(tx->sta, WLAN_STA_ASSOC); in ieee80211_tx_h_rate_ctrl()
732 if (WARN(test_bit(SCAN_SW_SCANNING, &tx->local->scanning) && assoc && in ieee80211_tx_h_rate_ctrl()
733 !rate_usable_index_exists(sband, &tx->sta->sta), in ieee80211_tx_h_rate_ctrl()
737 tx->sdata->name, hdr->addr1, in ieee80211_tx_h_rate_ctrl()
745 rate_control_get_rate(tx->sdata, tx->sta, &txrc); in ieee80211_tx_h_rate_ctrl()
747 if (tx->sta && !info->control.skip_table) in ieee80211_tx_h_rate_ctrl()
748 ratetbl = rcu_dereference(tx->sta->sta.rates); in ieee80211_tx_h_rate_ctrl()
761 tx->rate = rate; in ieee80211_tx_h_rate_ctrl()
766 tx->rate = info->control.rates[0]; in ieee80211_tx_h_rate_ctrl()
770 txrc.reported_rate = tx->rate; in ieee80211_tx_h_rate_ctrl()
771 if (tx->sta && ieee80211_is_data(hdr->frame_control)) in ieee80211_tx_h_rate_ctrl()
772 tx->sta->tx_stats.last_rate = txrc.reported_rate; in ieee80211_tx_h_rate_ctrl()
773 } else if (tx->sta) in ieee80211_tx_h_rate_ctrl()
774 tx->sta->tx_stats.last_rate = txrc.reported_rate; in ieee80211_tx_h_rate_ctrl()
801 ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx) in ieee80211_tx_h_sequence() argument
803 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); in ieee80211_tx_h_sequence()
804 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)tx->skb->data; in ieee80211_tx_h_sequence()
832 if (tx->flags & IEEE80211_TX_NO_SEQNO) in ieee80211_tx_h_sequence()
837 hdr->seq_ctrl = cpu_to_le16(tx->sdata->sequence_number); in ieee80211_tx_h_sequence()
838 tx->sdata->sequence_number += 0x10; in ieee80211_tx_h_sequence()
839 if (tx->sta) in ieee80211_tx_h_sequence()
840 tx->sta->tx_stats.msdu[IEEE80211_NUM_TIDS]++; in ieee80211_tx_h_sequence()
849 if (!tx->sta) in ieee80211_tx_h_sequence()
854 tx->sta->tx_stats.msdu[tid]++; in ieee80211_tx_h_sequence()
856 hdr->seq_ctrl = ieee80211_tx_next_seq(tx->sta, tid); in ieee80211_tx_h_sequence()
861 static int ieee80211_fragment(struct ieee80211_tx_data *tx, in ieee80211_fragment() argument
865 struct ieee80211_local *local = tx->local; in ieee80211_fragment()
885 tx->sdata->encrypt_headroom + in ieee80211_fragment()
890 __skb_queue_tail(&tx->skbs, tmp); in ieee80211_fragment()
893 local->tx_headroom + tx->sdata->encrypt_headroom); in ieee80211_fragment()
922 ieee80211_tx_h_fragment(struct ieee80211_tx_data *tx) in ieee80211_tx_h_fragment() argument
924 struct sk_buff *skb = tx->skb; in ieee80211_tx_h_fragment()
927 int frag_threshold = tx->local->hw.wiphy->frag_threshold; in ieee80211_tx_h_fragment()
932 __skb_queue_tail(&tx->skbs, skb); in ieee80211_tx_h_fragment()
933 tx->skb = NULL; in ieee80211_tx_h_fragment()
938 if (ieee80211_hw_check(&tx->local->hw, SUPPORTS_TX_FRAG)) in ieee80211_tx_h_fragment()
963 if (ieee80211_fragment(tx, skb, hdrlen, frag_threshold)) in ieee80211_tx_h_fragment()
969 skb_queue_walk(&tx->skbs, skb) { in ieee80211_tx_h_fragment()
975 if (!skb_queue_is_last(&tx->skbs, skb)) { in ieee80211_tx_h_fragment()
997 ieee80211_tx_h_stats(struct ieee80211_tx_data *tx) in ieee80211_tx_h_stats() argument
1002 if (!tx->sta) in ieee80211_tx_h_stats()
1005 skb_queue_walk(&tx->skbs, skb) { in ieee80211_tx_h_stats()
1007 tx->sta->tx_stats.bytes[ac] += skb->len; in ieee80211_tx_h_stats()
1010 tx->sta->tx_stats.packets[ac]++; in ieee80211_tx_h_stats()
1016 ieee80211_tx_h_encrypt(struct ieee80211_tx_data *tx) in ieee80211_tx_h_encrypt() argument
1018 if (!tx->key) in ieee80211_tx_h_encrypt()
1021 switch (tx->key->conf.cipher) { in ieee80211_tx_h_encrypt()
1024 return ieee80211_crypto_wep_encrypt(tx); in ieee80211_tx_h_encrypt()
1026 return ieee80211_crypto_tkip_encrypt(tx); in ieee80211_tx_h_encrypt()
1029 tx, IEEE80211_CCMP_MIC_LEN); in ieee80211_tx_h_encrypt()
1032 tx, IEEE80211_CCMP_256_MIC_LEN); in ieee80211_tx_h_encrypt()
1034 return ieee80211_crypto_aes_cmac_encrypt(tx); in ieee80211_tx_h_encrypt()
1036 return ieee80211_crypto_aes_cmac_256_encrypt(tx); in ieee80211_tx_h_encrypt()
1039 return ieee80211_crypto_aes_gmac_encrypt(tx); in ieee80211_tx_h_encrypt()
1042 return ieee80211_crypto_gcmp_encrypt(tx); in ieee80211_tx_h_encrypt()
1044 return ieee80211_crypto_hw_encrypt(tx); in ieee80211_tx_h_encrypt()
1051 ieee80211_tx_h_calculate_duration(struct ieee80211_tx_data *tx) in ieee80211_tx_h_calculate_duration() argument
1058 skb_queue_walk(&tx->skbs, skb) { in ieee80211_tx_h_calculate_duration()
1062 if (!skb_queue_is_last(&tx->skbs, skb)) { in ieee80211_tx_h_calculate_duration()
1063 struct sk_buff *next = skb_queue_next(&tx->skbs, skb); in ieee80211_tx_h_calculate_duration()
1070 ieee80211_duration(tx, skb, group_addr, next_len); in ieee80211_tx_h_calculate_duration()
1078 static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx, in ieee80211_tx_prep_agg() argument
1096 } else if (!tx->sta->sta.txq[tid]) { in ieee80211_tx_prep_agg()
1097 spin_lock(&tx->sta->lock); in ieee80211_tx_prep_agg()
1116 tid_tx = rcu_dereference_protected_tid_tx(tx->sta, tid); in ieee80211_tx_prep_agg()
1126 clear_sta_flag(tx->sta, WLAN_STA_SP); in ieee80211_tx_prep_agg()
1127 ps_dbg(tx->sta->sdata, in ieee80211_tx_prep_agg()
1129 tx->sta->sta.addr, tx->sta->sta.aid); in ieee80211_tx_prep_agg()
1131 info->control.vif = &tx->sdata->vif; in ieee80211_tx_prep_agg()
1138 spin_unlock(&tx->sta->lock); in ieee80211_tx_prep_agg()
1141 ieee80211_free_txskb(&tx->local->hw, purge_skb); in ieee80211_tx_prep_agg()
1158 struct ieee80211_tx_data *tx, in ieee80211_tx_prepare() argument
1166 memset(tx, 0, sizeof(*tx)); in ieee80211_tx_prepare()
1167 tx->skb = skb; in ieee80211_tx_prepare()
1168 tx->local = local; in ieee80211_tx_prepare()
1169 tx->sdata = sdata; in ieee80211_tx_prepare()
1170 __skb_queue_head_init(&tx->skbs); in ieee80211_tx_prepare()
1183 tx->sta = sta; in ieee80211_tx_prepare()
1186 tx->sta = rcu_dereference(sdata->u.vlan.sta); in ieee80211_tx_prepare()
1187 if (!tx->sta && sdata->wdev.use_4addr) in ieee80211_tx_prepare()
1191 tx->sdata->control_port_protocol == tx->skb->protocol) { in ieee80211_tx_prepare()
1192 tx->sta = sta_info_get_bss(sdata, hdr->addr1); in ieee80211_tx_prepare()
1194 if (!tx->sta && !is_multicast_ether_addr(hdr->addr1)) in ieee80211_tx_prepare()
1195 tx->sta = sta_info_get(sdata, hdr->addr1); in ieee80211_tx_prepare()
1198 if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) && in ieee80211_tx_prepare()
1206 tid_tx = rcu_dereference(tx->sta->ampdu_mlme.tid_tx[tid]); in ieee80211_tx_prepare()
1210 queued = ieee80211_tx_prep_agg(tx, skb, info, in ieee80211_tx_prepare()
1219 tx->flags &= ~IEEE80211_TX_UNICAST; in ieee80211_tx_prepare()
1222 tx->flags |= IEEE80211_TX_UNICAST; in ieee80211_tx_prepare()
1225 if (!(tx->flags & IEEE80211_TX_UNICAST) || in ieee80211_tx_prepare()
1231 if (!tx->sta) in ieee80211_tx_prepare()
1233 else if (test_and_clear_sta_flag(tx->sta, WLAN_STA_CLEAR_PS_FILT)) { in ieee80211_tx_prepare()
1235 ieee80211_check_fast_xmit(tx->sta); in ieee80211_tx_prepare()
1735 static int invoke_tx_handlers_early(struct ieee80211_tx_data *tx) in invoke_tx_handlers_early() argument
1741 res = txh(tx); \ in invoke_tx_handlers_early()
1751 if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL)) in invoke_tx_handlers_early()
1756 I802_DEBUG_INC(tx->local->tx_handlers_drop); in invoke_tx_handlers_early()
1757 if (tx->skb) in invoke_tx_handlers_early()
1758 ieee80211_free_txskb(&tx->local->hw, tx->skb); in invoke_tx_handlers_early()
1760 ieee80211_purge_tx_queue(&tx->local->hw, &tx->skbs); in invoke_tx_handlers_early()
1763 I802_DEBUG_INC(tx->local->tx_handlers_queued); in invoke_tx_handlers_early()
1774 static int invoke_tx_handlers_late(struct ieee80211_tx_data *tx) in invoke_tx_handlers_late() argument
1776 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(tx->skb); in invoke_tx_handlers_late()
1780 __skb_queue_tail(&tx->skbs, tx->skb); in invoke_tx_handlers_late()
1781 tx->skb = NULL; in invoke_tx_handlers_late()
1791 if (!ieee80211_hw_check(&tx->local->hw, HAS_RATE_CONTROL)) in invoke_tx_handlers_late()
1797 I802_DEBUG_INC(tx->local->tx_handlers_drop); in invoke_tx_handlers_late()
1798 if (tx->skb) in invoke_tx_handlers_late()
1799 ieee80211_free_txskb(&tx->local->hw, tx->skb); in invoke_tx_handlers_late()
1801 ieee80211_purge_tx_queue(&tx->local->hw, &tx->skbs); in invoke_tx_handlers_late()
1804 I802_DEBUG_INC(tx->local->tx_handlers_queued); in invoke_tx_handlers_late()
1811 static int invoke_tx_handlers(struct ieee80211_tx_data *tx) in invoke_tx_handlers() argument
1813 int r = invoke_tx_handlers_early(tx); in invoke_tx_handlers()
1817 return invoke_tx_handlers_late(tx); in invoke_tx_handlers()
1826 struct ieee80211_tx_data tx; in ieee80211_tx_prepare_skb() local
1829 if (ieee80211_tx_prepare(sdata, &tx, NULL, skb) == TX_DROP) in ieee80211_tx_prepare_skb()
1836 if (invoke_tx_handlers(&tx)) in ieee80211_tx_prepare_skb()
1840 if (tx.sta) in ieee80211_tx_prepare_skb()
1841 *sta = &tx.sta->sta; in ieee80211_tx_prepare_skb()
1847 skb2 = __skb_dequeue(&tx.skbs); in ieee80211_tx_prepare_skb()
1848 if (WARN_ON(skb2 != skb || !skb_queue_empty(&tx.skbs))) { in ieee80211_tx_prepare_skb()
1850 ieee80211_purge_tx_queue(hw, &tx.skbs); in ieee80211_tx_prepare_skb()
1866 struct ieee80211_tx_data tx; in ieee80211_tx() local
1879 res_prepare = ieee80211_tx_prepare(sdata, &tx, sta, skb); in ieee80211_tx()
1881 tx.flags |= txdata_flags; in ieee80211_tx()
1896 if (invoke_tx_handlers_early(&tx)) in ieee80211_tx()
1899 if (ieee80211_queue_skb(local, sdata, tx.sta, tx.skb)) in ieee80211_tx()
1902 if (!invoke_tx_handlers_late(&tx)) in ieee80211_tx()
1903 result = __ieee80211_tx(local, &tx.skbs, led_len, in ieee80211_tx()
1904 tx.sta, txpending); in ieee80211_tx()
3355 struct ieee80211_tx_data tx; in ieee80211_xmit_fast() local
3431 __skb_queue_head_init(&tx.skbs); in ieee80211_xmit_fast()
3433 tx.flags = IEEE80211_TX_UNICAST; in ieee80211_xmit_fast()
3434 tx.local = local; in ieee80211_xmit_fast()
3435 tx.sdata = sdata; in ieee80211_xmit_fast()
3436 tx.sta = sta; in ieee80211_xmit_fast()
3437 tx.key = fast_tx->key; in ieee80211_xmit_fast()
3440 tx.skb = skb; in ieee80211_xmit_fast()
3441 r = ieee80211_tx_h_rate_ctrl(&tx); in ieee80211_xmit_fast()
3442 skb = tx.skb; in ieee80211_xmit_fast()
3443 tx.skb = NULL; in ieee80211_xmit_fast()
3462 __skb_queue_tail(&tx.skbs, skb); in ieee80211_xmit_fast()
3463 ieee80211_tx_frags(local, &sdata->vif, &sta->sta, &tx.skbs, false); in ieee80211_xmit_fast()
3477 struct ieee80211_tx_data tx; in ieee80211_tx_dequeue() local
3499 memset(&tx, 0, sizeof(tx)); in ieee80211_tx_dequeue()
3500 __skb_queue_head_init(&tx.skbs); in ieee80211_tx_dequeue()
3501 tx.local = local; in ieee80211_tx_dequeue()
3502 tx.skb = skb; in ieee80211_tx_dequeue()
3503 tx.sdata = vif_to_sdata(info->control.vif); in ieee80211_tx_dequeue()
3506 tx.sta = container_of(txq->sta, struct sta_info, sta); in ieee80211_tx_dequeue()
3512 r = ieee80211_tx_h_select_key(&tx); in ieee80211_tx_dequeue()
3528 if (tx.key && in ieee80211_tx_dequeue()
3529 (tx.key->conf.flags & IEEE80211_KEY_FLAG_GENERATE_IV)) in ieee80211_tx_dequeue()
3533 tx.key, skb); in ieee80211_tx_dequeue()
3535 if (invoke_tx_handlers_late(&tx)) in ieee80211_tx_dequeue()
3538 skb = __skb_dequeue(&tx.skbs); in ieee80211_tx_dequeue()
3540 if (!skb_queue_empty(&tx.skbs)) in ieee80211_tx_dequeue()
3541 skb_queue_splice_tail(&tx.skbs, &txqi->frags); in ieee80211_tx_dequeue()
3552 switch (tx.sdata->vif.type) { in ieee80211_tx_dequeue()
3554 if (tx.sdata->u.mntr.flags & MONITOR_FLAG_ACTIVE) { in ieee80211_tx_dequeue()
3555 vif = &tx.sdata->vif; in ieee80211_tx_dequeue()
3558 tx.sdata = rcu_dereference(local->monitor_sdata); in ieee80211_tx_dequeue()
3559 if (tx.sdata) { in ieee80211_tx_dequeue()
3560 vif = &tx.sdata->vif; in ieee80211_tx_dequeue()
3571 tx.sdata = container_of(tx.sdata->bss, in ieee80211_tx_dequeue()
3575 vif = &tx.sdata->vif; in ieee80211_tx_dequeue()
3813 struct ieee80211_tx_data tx = { in ieee80211_build_data_template() local
3832 tx.sta = sta_info_get(sdata, hdr->addr1); in ieee80211_build_data_template()
3833 tx.skb = skb; in ieee80211_build_data_template()
3835 if (ieee80211_tx_h_select_key(&tx) != TX_CONTINUE) { in ieee80211_build_data_template()
4640 struct ieee80211_tx_data tx; in ieee80211_get_buffered_bc() local
4689 if (!ieee80211_tx_prepare(sdata, &tx, NULL, skb)) in ieee80211_get_buffered_bc()
4696 tx.flags |= IEEE80211_TX_PS_BUFFERED; in ieee80211_get_buffered_bc()
4699 if (invoke_tx_handlers(&tx)) in ieee80211_get_buffered_bc()