Lines Matching full:ab
20 struct ath11k_base *ab = arvif->ar->ab; in ath11k_dp_tx_get_encap_type() local
22 if (test_bit(ATH11K_FLAG_RAW_MODE, &ab->dev_flags)) in ath11k_dp_tx_get_encap_type()
86 struct ath11k_base *ab = ar->ab; in ath11k_dp_tx() local
87 struct ath11k_dp *dp = &ab->dp; in ath11k_dp_tx()
102 if (unlikely(test_bit(ATH11K_FLAG_CRASH_FLUSH, &ar->ab->dev_flags))) in ath11k_dp_tx()
111 ring_selector = ab->hw_params.hw_ops->get_ring_selector(skb); in ath11k_dp_tx()
116 ti.ring_id = ring_selector % ab->hw_params.max_tx_ring; in ath11k_dp_tx()
117 ti.rbm_id = ab->hw_params.hal_params->tcl2wbm_rbm_map[ti.ring_id].rbm_id; in ath11k_dp_tx()
129 if (ring_map == (BIT(ab->hw_params.max_tx_ring) - 1) || in ath11k_dp_tx()
130 !ab->hw_params.tcl_ring_retry) { in ath11k_dp_tx()
131 atomic_inc(&ab->soc_stats.tx_err.misc_fail); in ath11k_dp_tx()
196 if (!test_bit(ATH11K_FLAG_RAW_MODE, &ab->dev_flags)) { in ath11k_dp_tx()
208 atomic_inc(&ab->soc_stats.tx_err.misc_fail); in ath11k_dp_tx()
212 ti.paddr = dma_map_single(ab->dev, skb->data, skb->len, DMA_TO_DEVICE); in ath11k_dp_tx()
213 if (unlikely(dma_mapping_error(ab->dev, ti.paddr))) { in ath11k_dp_tx()
214 atomic_inc(&ab->soc_stats.tx_err.misc_fail); in ath11k_dp_tx()
215 ath11k_warn(ab, "failed to DMA map data Tx buffer\n"); in ath11k_dp_tx()
226 tcl_ring = &ab->hal.srng_list[hal_ring_id]; in ath11k_dp_tx()
230 ath11k_hal_srng_access_begin(ab, tcl_ring); in ath11k_dp_tx()
232 hal_tcl_desc = (void *)ath11k_hal_srng_src_get_next_entry(ab, tcl_ring); in ath11k_dp_tx()
237 ath11k_hal_srng_access_end(ab, tcl_ring); in ath11k_dp_tx()
238 ab->soc_stats.tx_err.desc_na[ti.ring_id]++; in ath11k_dp_tx()
247 if (unlikely(ring_map != (BIT(ab->hw_params.max_tx_ring)) - 1) && in ath11k_dp_tx()
248 ab->hw_params.tcl_ring_retry && ab->hw_params.max_tx_ring > 1) { in ath11k_dp_tx()
256 ath11k_hal_tx_cmd_desc_setup(ab, hal_tcl_desc + in ath11k_dp_tx()
259 ath11k_hal_srng_access_end(ab, tcl_ring); in ath11k_dp_tx()
261 ath11k_dp_shadow_start_timer(ab, tcl_ring, &dp->tx_ring_timer[ti.ring_id]); in ath11k_dp_tx()
265 ath11k_dbg_dump(ab, ATH11K_DBG_DP_TX, NULL, "dp tx msdu: ", in ath11k_dp_tx()
273 dma_unmap_single(ab->dev, ti.paddr, ti.data_len, DMA_TO_DEVICE); in ath11k_dp_tx()
287 static void ath11k_dp_tx_free_txbuf(struct ath11k_base *ab, u8 mac_id, in ath11k_dp_tx_free_txbuf() argument
300 ath11k_warn(ab, "tx completion for unknown msdu_id %d\n", in ath11k_dp_tx_free_txbuf()
307 dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE); in ath11k_dp_tx_free_txbuf()
310 ar = ab->pdevs[mac_id].ar; in ath11k_dp_tx_free_txbuf()
316 ath11k_dp_tx_htt_tx_complete_buf(struct ath11k_base *ab, in ath11k_dp_tx_htt_tx_complete_buf() argument
332 ath11k_warn(ab, "htt tx completion for unknown msdu_id %d\n", in ath11k_dp_tx_htt_tx_complete_buf()
345 dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE); in ath11k_dp_tx_htt_tx_complete_buf()
360 ab->wmi_ab.svc_map)) in ath11k_dp_tx_htt_tx_complete_buf()
370 spin_lock_bh(&ab->base_lock); in ath11k_dp_tx_htt_tx_complete_buf()
371 peer = ath11k_peer_find_by_id(ab, ts->peer_id); in ath11k_dp_tx_htt_tx_complete_buf()
373 ath11k_dbg(ab, ATH11K_DBG_DATA, in ath11k_dp_tx_htt_tx_complete_buf()
376 spin_unlock_bh(&ab->base_lock); in ath11k_dp_tx_htt_tx_complete_buf()
380 spin_unlock_bh(&ab->base_lock); in ath11k_dp_tx_htt_tx_complete_buf()
390 ath11k_dp_tx_process_htt_tx_complete(struct ath11k_base *ab, in ath11k_dp_tx_process_htt_tx_complete() argument
417 ath11k_dp_tx_htt_tx_complete_buf(ab, tx_ring, &ts); in ath11k_dp_tx_process_htt_tx_complete()
422 ath11k_dp_tx_free_txbuf(ab, mac_id, msdu_id, tx_ring); in ath11k_dp_tx_process_htt_tx_complete()
430 ath11k_warn(ab, "Unknown htt tx status %d\n", wbm_status); in ath11k_dp_tx_process_htt_tx_complete()
454 struct ath11k_base *ab = ar->ab; in ath11k_dp_tx_update_txcompl() local
466 spin_lock_bh(&ab->base_lock); in ath11k_dp_tx_update_txcompl()
467 peer = ath11k_peer_find_by_id(ab, ts->peer_id); in ath11k_dp_tx_update_txcompl()
469 ath11k_dbg(ab, ATH11K_DBG_DP_TX, in ath11k_dp_tx_update_txcompl()
507 ath11k_warn(ab, "Invalid HT mcs index %d\n", mcs); in ath11k_dp_tx_update_txcompl()
518 ath11k_warn(ab, "Invalid VHT mcs index %d\n", mcs); in ath11k_dp_tx_update_txcompl()
528 ath11k_warn(ab, "Invalid HE mcs index %d\n", mcs); in ath11k_dp_tx_update_txcompl()
548 spin_unlock_bh(&ab->base_lock); in ath11k_dp_tx_update_txcompl()
557 struct ath11k_base *ab = ar->ab; in ath11k_dp_tx_complete_msdu() local
571 dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE); in ath11k_dp_tx_complete_msdu()
573 if (unlikely(!rcu_access_pointer(ab->pdevs_active[ar->pdev_idx]))) { in ath11k_dp_tx_complete_msdu()
595 ab->wmi_ab.svc_map)) in ath11k_dp_tx_complete_msdu()
606 ab->hw_params.single_pdev_only) { in ath11k_dp_tx_complete_msdu()
629 spin_lock_bh(&ab->base_lock); in ath11k_dp_tx_complete_msdu()
630 peer = ath11k_peer_find_by_id(ab, ts->peer_id); in ath11k_dp_tx_complete_msdu()
632 ath11k_dbg(ab, ATH11K_DBG_DATA, in ath11k_dp_tx_complete_msdu()
635 spin_unlock_bh(&ab->base_lock); in ath11k_dp_tx_complete_msdu()
651 spin_unlock_bh(&ab->base_lock); in ath11k_dp_tx_complete_msdu()
656 static inline void ath11k_dp_tx_status_parse(struct ath11k_base *ab, in ath11k_dp_tx_status_parse() argument
687 void ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id) in ath11k_dp_tx_completion_handler() argument
690 struct ath11k_dp *dp = &ab->dp; in ath11k_dp_tx_completion_handler()
692 struct hal_srng *status_ring = &ab->hal.srng_list[hal_ring_id]; in ath11k_dp_tx_completion_handler()
702 ath11k_hal_srng_access_begin(ab, status_ring); in ath11k_dp_tx_completion_handler()
706 (desc = ath11k_hal_srng_dst_get_next_entry(ab, status_ring))) { in ath11k_dp_tx_completion_handler()
713 if (unlikely((ath11k_hal_srng_dst_peek(ab, status_ring) != NULL) && in ath11k_dp_tx_completion_handler()
717 …ath11k_warn(ab, "Unable to process some of the tx_status ring desc because status_fifo is full\n"); in ath11k_dp_tx_completion_handler()
720 ath11k_hal_srng_access_end(ab, status_ring); in ath11k_dp_tx_completion_handler()
731 ath11k_dp_tx_status_parse(ab, tx_status, &ts); in ath11k_dp_tx_completion_handler()
739 ath11k_dp_tx_process_htt_tx_complete(ab, in ath11k_dp_tx_completion_handler()
749 ath11k_warn(ab, "tx completion for unknown msdu_id %d\n", in ath11k_dp_tx_completion_handler()
757 ar = ab->pdevs[mac_id].ar; in ath11k_dp_tx_completion_handler()
766 int ath11k_dp_tx_send_reo_cmd(struct ath11k_base *ab, struct dp_rx_tid *rx_tid, in ath11k_dp_tx_send_reo_cmd() argument
772 struct ath11k_dp *dp = &ab->dp; in ath11k_dp_tx_send_reo_cmd()
777 if (test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags)) in ath11k_dp_tx_send_reo_cmd()
780 cmd_ring = &ab->hal.srng_list[dp->reo_cmd_ring.ring_id]; in ath11k_dp_tx_send_reo_cmd()
781 cmd_num = ath11k_hal_reo_cmd_send(ab, cmd_ring, type, cmd); in ath11k_dp_tx_send_reo_cmd()
815 ath11k_dp_tx_get_ring_id_type(struct ath11k_base *ab, in ath11k_dp_tx_get_ring_id_type() argument
831 if (!ab->hw_params.rx_mac_buf_ring) { in ath11k_dp_tx_get_ring_id_type()
871 ath11k_warn(ab, "Unsupported ring type in DP :%d\n", ring_type); in ath11k_dp_tx_get_ring_id_type()
877 int ath11k_dp_tx_htt_srng_setup(struct ath11k_base *ab, u32 ring_id, in ath11k_dp_tx_htt_srng_setup() argument
881 struct hal_srng *srng = &ab->hal.srng_list[ring_id]; in ath11k_dp_tx_htt_srng_setup()
891 skb = ath11k_htc_alloc_skb(ab, len); in ath11k_dp_tx_htt_srng_setup()
896 ath11k_hal_srng_get_params(ab, srng, ¶ms); in ath11k_dp_tx_htt_srng_setup()
898 hp_addr = ath11k_hal_srng_get_hp_addr(ab, srng); in ath11k_dp_tx_htt_srng_setup()
899 tp_addr = ath11k_hal_srng_get_tp_addr(ab, srng); in ath11k_dp_tx_htt_srng_setup()
901 ret = ath11k_dp_tx_get_ring_id_type(ab, mac_id, ring_id, in ath11k_dp_tx_htt_srng_setup()
928 ret = ath11k_hal_srng_get_entrysize(ab, ring_type); in ath11k_dp_tx_htt_srng_setup()
976 ath11k_dbg(ab, ATH11K_DBG_DP_TX, in ath11k_dp_tx_htt_srng_setup()
981 ret = ath11k_htc_send(&ab->htc, ab->dp.eid, skb); in ath11k_dp_tx_htt_srng_setup()
995 int ath11k_dp_tx_htt_h2t_ver_req_msg(struct ath11k_base *ab) in ath11k_dp_tx_htt_h2t_ver_req_msg() argument
997 struct ath11k_dp *dp = &ab->dp; in ath11k_dp_tx_htt_h2t_ver_req_msg()
1005 skb = ath11k_htc_alloc_skb(ab, len); in ath11k_dp_tx_htt_h2t_ver_req_msg()
1014 ret = ath11k_htc_send(&ab->htc, dp->eid, skb); in ath11k_dp_tx_htt_h2t_ver_req_msg()
1023 ath11k_warn(ab, "htt target version request timed out\n"); in ath11k_dp_tx_htt_h2t_ver_req_msg()
1028 ath11k_err(ab, "unsupported htt major version %d supported version is %d\n", in ath11k_dp_tx_htt_h2t_ver_req_msg()
1038 struct ath11k_base *ab = ar->ab; in ath11k_dp_tx_htt_h2t_ppdu_stats_req() local
1039 struct ath11k_dp *dp = &ab->dp; in ath11k_dp_tx_htt_h2t_ppdu_stats_req()
1047 for (i = 0; i < ab->hw_params.num_rxdma_per_pdev; i++) { in ath11k_dp_tx_htt_h2t_ppdu_stats_req()
1048 skb = ath11k_htc_alloc_skb(ab, len); in ath11k_dp_tx_htt_h2t_ppdu_stats_req()
1061 ret = ath11k_htc_send(&ab->htc, dp->eid, skb); in ath11k_dp_tx_htt_h2t_ppdu_stats_req()
1071 int ath11k_dp_tx_htt_rx_filter_setup(struct ath11k_base *ab, u32 ring_id, in ath11k_dp_tx_htt_rx_filter_setup() argument
1077 struct hal_srng *srng = &ab->hal.srng_list[ring_id]; in ath11k_dp_tx_htt_rx_filter_setup()
1085 skb = ath11k_htc_alloc_skb(ab, len); in ath11k_dp_tx_htt_rx_filter_setup()
1090 ath11k_hal_srng_get_params(ab, srng, ¶ms); in ath11k_dp_tx_htt_rx_filter_setup()
1092 ret = ath11k_dp_tx_get_ring_id_type(ab, mac_id, ring_id, in ath11k_dp_tx_htt_rx_filter_setup()
1126 ret = ath11k_htc_send(&ab->htc, ab->dp.eid, skb); in ath11k_dp_tx_htt_rx_filter_setup()
1143 struct ath11k_base *ab = ar->ab; in ath11k_dp_tx_htt_h2t_ext_stats_req() local
1144 struct ath11k_dp *dp = &ab->dp; in ath11k_dp_tx_htt_h2t_ext_stats_req()
1151 skb = ath11k_htc_alloc_skb(ab, len); in ath11k_dp_tx_htt_h2t_ext_stats_req()
1161 if (ab->hw_params.single_pdev_only) in ath11k_dp_tx_htt_h2t_ext_stats_req()
1176 ret = ath11k_htc_send(&ab->htc, dp->eid, skb); in ath11k_dp_tx_htt_h2t_ext_stats_req()
1178 ath11k_warn(ab, "failed to send htt type stats request: %d", in ath11k_dp_tx_htt_h2t_ext_stats_req()
1190 struct ath11k_base *ab = ar->ab; in ath11k_dp_tx_htt_monitor_mode_ring_config() local
1194 if (ab->hw_params.full_monitor_mode) { in ath11k_dp_tx_htt_monitor_mode_ring_config()
1195 ret = ath11k_dp_tx_htt_rx_full_mon_setup(ab, in ath11k_dp_tx_htt_monitor_mode_ring_config()
1198 ath11k_err(ab, "failed to setup full monitor %d\n", ret); in ath11k_dp_tx_htt_monitor_mode_ring_config()
1223 if (ab->hw_params.rxdma1_enable) { in ath11k_dp_tx_htt_monitor_mode_ring_config()
1224 ret = ath11k_dp_tx_htt_rx_filter_setup(ar->ab, ring_id, dp->mac_id, in ath11k_dp_tx_htt_monitor_mode_ring_config()
1230 for (i = 0; i < ab->hw_params.num_rxdma_per_pdev; i++) { in ath11k_dp_tx_htt_monitor_mode_ring_config()
1232 ret = ath11k_dp_tx_htt_rx_filter_setup(ar->ab, ring_id, in ath11k_dp_tx_htt_monitor_mode_ring_config()
1243 for (i = 0; i < ab->hw_params.num_rxdma_per_pdev; i++) { in ath11k_dp_tx_htt_monitor_mode_ring_config()
1255 ret = ath11k_dp_tx_htt_rx_filter_setup(ab, ring_id, in ath11k_dp_tx_htt_monitor_mode_ring_config()
1262 if (!ar->ab->hw_params.rxdma1_enable) in ath11k_dp_tx_htt_monitor_mode_ring_config()
1263 mod_timer(&ar->ab->mon_reap_timer, jiffies + in ath11k_dp_tx_htt_monitor_mode_ring_config()
1269 int ath11k_dp_tx_htt_rx_full_mon_setup(struct ath11k_base *ab, int mac_id, in ath11k_dp_tx_htt_rx_full_mon_setup() argument
1276 skb = ath11k_htc_alloc_skb(ab, len); in ath11k_dp_tx_htt_rx_full_mon_setup()
1296 ret = ath11k_htc_send(&ab->htc, ab->dp.eid, skb); in ath11k_dp_tx_htt_rx_full_mon_setup()