Lines Matching refs:ab
17 struct ath11k_base *ab = arvif->ar->ab; in ath11k_dp_tx_get_encap_type() local
19 if (test_bit(ATH11K_FLAG_RAW_MODE, &ab->dev_flags)) in ath11k_dp_tx_get_encap_type()
83 struct ath11k_base *ab = ar->ab; in ath11k_dp_tx() local
84 struct ath11k_dp *dp = &ab->dp; in ath11k_dp_tx()
98 if (test_bit(ATH11K_FLAG_CRASH_FLUSH, &ar->ab->dev_flags)) in ath11k_dp_tx()
119 ti.ring_id = ring_selector % ab->hw_params.max_tx_ring; in ath11k_dp_tx()
131 if (ring_map == (BIT(ab->hw_params.max_tx_ring) - 1)) { in ath11k_dp_tx()
132 atomic_inc(&ab->soc_stats.tx_err.misc_fail); in ath11k_dp_tx()
197 if (!test_bit(ATH11K_FLAG_RAW_MODE, &ab->dev_flags)) { in ath11k_dp_tx()
209 atomic_inc(&ab->soc_stats.tx_err.misc_fail); in ath11k_dp_tx()
213 ti.paddr = dma_map_single(ab->dev, skb->data, skb->len, DMA_TO_DEVICE); in ath11k_dp_tx()
214 if (dma_mapping_error(ab->dev, ti.paddr)) { in ath11k_dp_tx()
215 atomic_inc(&ab->soc_stats.tx_err.misc_fail); in ath11k_dp_tx()
216 ath11k_warn(ab, "failed to DMA map data Tx buffer\n"); in ath11k_dp_tx()
227 tcl_ring = &ab->hal.srng_list[hal_ring_id]; in ath11k_dp_tx()
231 ath11k_hal_srng_access_begin(ab, tcl_ring); in ath11k_dp_tx()
233 hal_tcl_desc = (void *)ath11k_hal_srng_src_get_next_entry(ab, tcl_ring); in ath11k_dp_tx()
238 ath11k_hal_srng_access_end(ab, tcl_ring); in ath11k_dp_tx()
239 ab->soc_stats.tx_err.desc_na[ti.ring_id]++; in ath11k_dp_tx()
248 if (ring_map != (BIT(ab->hw_params.max_tx_ring) - 1) && in ath11k_dp_tx()
249 ab->hw_params.max_tx_ring > 1) { in ath11k_dp_tx()
257 ath11k_hal_tx_cmd_desc_setup(ab, hal_tcl_desc + in ath11k_dp_tx()
260 ath11k_hal_srng_access_end(ab, tcl_ring); in ath11k_dp_tx()
262 ath11k_dp_shadow_start_timer(ab, tcl_ring, &dp->tx_ring_timer[ti.ring_id]); in ath11k_dp_tx()
266 ath11k_dbg_dump(ab, ATH11K_DBG_DP_TX, NULL, "dp tx msdu: ", in ath11k_dp_tx()
274 dma_unmap_single(ab->dev, ti.paddr, ti.data_len, DMA_TO_DEVICE); in ath11k_dp_tx()
288 static void ath11k_dp_tx_free_txbuf(struct ath11k_base *ab, u8 mac_id, in ath11k_dp_tx_free_txbuf() argument
299 ath11k_warn(ab, "tx completion for unknown msdu_id %d\n", in ath11k_dp_tx_free_txbuf()
310 dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE); in ath11k_dp_tx_free_txbuf()
313 ar = ab->pdevs[mac_id].ar; in ath11k_dp_tx_free_txbuf()
319 ath11k_dp_tx_htt_tx_complete_buf(struct ath11k_base *ab, in ath11k_dp_tx_htt_tx_complete_buf() argument
331 ath11k_warn(ab, "htt tx completion for unknown msdu_id %d\n", in ath11k_dp_tx_htt_tx_complete_buf()
348 dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE); in ath11k_dp_tx_htt_tx_complete_buf()
367 ath11k_dp_tx_process_htt_tx_complete(struct ath11k_base *ab, in ath11k_dp_tx_process_htt_tx_complete() argument
387 ath11k_dp_tx_htt_tx_complete_buf(ab, tx_ring, &ts); in ath11k_dp_tx_process_htt_tx_complete()
391 ath11k_dp_tx_free_txbuf(ab, mac_id, msdu_id, tx_ring); in ath11k_dp_tx_process_htt_tx_complete()
399 ath11k_warn(ab, "Unknown htt tx status %d\n", wbm_status); in ath11k_dp_tx_process_htt_tx_complete()
425 struct ath11k_base *ab = ar->ab; in ath11k_dp_tx_complete_msdu() local
436 dma_unmap_single(ab->dev, skb_cb->paddr, msdu->len, DMA_TO_DEVICE); in ath11k_dp_tx_complete_msdu()
440 if (!rcu_dereference(ab->pdevs_active[ar->pdev_idx])) { in ath11k_dp_tx_complete_msdu()
502 static inline void ath11k_dp_tx_status_parse(struct ath11k_base *ab, in ath11k_dp_tx_status_parse() argument
533 void ath11k_dp_tx_completion_handler(struct ath11k_base *ab, int ring_id) in ath11k_dp_tx_completion_handler() argument
536 struct ath11k_dp *dp = &ab->dp; in ath11k_dp_tx_completion_handler()
538 struct hal_srng *status_ring = &ab->hal.srng_list[hal_ring_id]; in ath11k_dp_tx_completion_handler()
548 ath11k_hal_srng_access_begin(ab, status_ring); in ath11k_dp_tx_completion_handler()
552 (desc = ath11k_hal_srng_dst_get_next_entry(ab, status_ring))) { in ath11k_dp_tx_completion_handler()
559 if ((ath11k_hal_srng_dst_peek(ab, status_ring) != NULL) && in ath11k_dp_tx_completion_handler()
562 …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()
565 ath11k_hal_srng_access_end(ab, status_ring); in ath11k_dp_tx_completion_handler()
576 ath11k_dp_tx_status_parse(ab, tx_status, &ts); in ath11k_dp_tx_completion_handler()
584 ath11k_dp_tx_process_htt_tx_complete(ab, in ath11k_dp_tx_completion_handler()
594 ath11k_warn(ab, "tx completion for unknown msdu_id %d\n", in ath11k_dp_tx_completion_handler()
602 ar = ab->pdevs[mac_id].ar; in ath11k_dp_tx_completion_handler()
611 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
617 struct ath11k_dp *dp = &ab->dp; in ath11k_dp_tx_send_reo_cmd()
622 if (test_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags)) in ath11k_dp_tx_send_reo_cmd()
625 cmd_ring = &ab->hal.srng_list[dp->reo_cmd_ring.ring_id]; in ath11k_dp_tx_send_reo_cmd()
626 cmd_num = ath11k_hal_reo_cmd_send(ab, cmd_ring, type, cmd); in ath11k_dp_tx_send_reo_cmd()
660 ath11k_dp_tx_get_ring_id_type(struct ath11k_base *ab, in ath11k_dp_tx_get_ring_id_type() argument
676 if (!ab->hw_params.rx_mac_buf_ring) { in ath11k_dp_tx_get_ring_id_type()
716 ath11k_warn(ab, "Unsupported ring type in DP :%d\n", ring_type); in ath11k_dp_tx_get_ring_id_type()
722 int ath11k_dp_tx_htt_srng_setup(struct ath11k_base *ab, u32 ring_id, in ath11k_dp_tx_htt_srng_setup() argument
726 struct hal_srng *srng = &ab->hal.srng_list[ring_id]; in ath11k_dp_tx_htt_srng_setup()
736 skb = ath11k_htc_alloc_skb(ab, len); in ath11k_dp_tx_htt_srng_setup()
741 ath11k_hal_srng_get_params(ab, srng, ¶ms); in ath11k_dp_tx_htt_srng_setup()
743 hp_addr = ath11k_hal_srng_get_hp_addr(ab, srng); in ath11k_dp_tx_htt_srng_setup()
744 tp_addr = ath11k_hal_srng_get_tp_addr(ab, srng); in ath11k_dp_tx_htt_srng_setup()
746 ret = ath11k_dp_tx_get_ring_id_type(ab, mac_id, ring_id, in ath11k_dp_tx_htt_srng_setup()
773 ret = ath11k_hal_srng_get_entrysize(ab, ring_type); in ath11k_dp_tx_htt_srng_setup()
821 ath11k_dbg(ab, ATH11k_DBG_HAL, in ath11k_dp_tx_htt_srng_setup()
826 ath11k_dbg(ab, ATH11k_DBG_HAL, in ath11k_dp_tx_htt_srng_setup()
830 ret = ath11k_htc_send(&ab->htc, ab->dp.eid, skb); in ath11k_dp_tx_htt_srng_setup()
844 int ath11k_dp_tx_htt_h2t_ver_req_msg(struct ath11k_base *ab) in ath11k_dp_tx_htt_h2t_ver_req_msg() argument
846 struct ath11k_dp *dp = &ab->dp; in ath11k_dp_tx_htt_h2t_ver_req_msg()
854 skb = ath11k_htc_alloc_skb(ab, len); in ath11k_dp_tx_htt_h2t_ver_req_msg()
863 ret = ath11k_htc_send(&ab->htc, dp->eid, skb); in ath11k_dp_tx_htt_h2t_ver_req_msg()
872 ath11k_warn(ab, "htt target version request timed out\n"); in ath11k_dp_tx_htt_h2t_ver_req_msg()
877 ath11k_err(ab, "unsupported htt major version %d supported version is %d\n", in ath11k_dp_tx_htt_h2t_ver_req_msg()
887 struct ath11k_base *ab = ar->ab; in ath11k_dp_tx_htt_h2t_ppdu_stats_req() local
888 struct ath11k_dp *dp = &ab->dp; in ath11k_dp_tx_htt_h2t_ppdu_stats_req()
896 for (i = 0; i < ab->hw_params.num_rxmda_per_pdev; i++) { in ath11k_dp_tx_htt_h2t_ppdu_stats_req()
897 skb = ath11k_htc_alloc_skb(ab, len); in ath11k_dp_tx_htt_h2t_ppdu_stats_req()
910 ret = ath11k_htc_send(&ab->htc, dp->eid, skb); in ath11k_dp_tx_htt_h2t_ppdu_stats_req()
920 int ath11k_dp_tx_htt_rx_filter_setup(struct ath11k_base *ab, u32 ring_id, in ath11k_dp_tx_htt_rx_filter_setup() argument
926 struct hal_srng *srng = &ab->hal.srng_list[ring_id]; in ath11k_dp_tx_htt_rx_filter_setup()
934 skb = ath11k_htc_alloc_skb(ab, len); in ath11k_dp_tx_htt_rx_filter_setup()
939 ath11k_hal_srng_get_params(ab, srng, ¶ms); in ath11k_dp_tx_htt_rx_filter_setup()
941 ret = ath11k_dp_tx_get_ring_id_type(ab, mac_id, ring_id, in ath11k_dp_tx_htt_rx_filter_setup()
975 ret = ath11k_htc_send(&ab->htc, ab->dp.eid, skb); in ath11k_dp_tx_htt_rx_filter_setup()
992 struct ath11k_base *ab = ar->ab; in ath11k_dp_tx_htt_h2t_ext_stats_req() local
993 struct ath11k_dp *dp = &ab->dp; in ath11k_dp_tx_htt_h2t_ext_stats_req()
999 skb = ath11k_htc_alloc_skb(ab, len); in ath11k_dp_tx_htt_h2t_ext_stats_req()
1019 ret = ath11k_htc_send(&ab->htc, dp->eid, skb); in ath11k_dp_tx_htt_h2t_ext_stats_req()
1021 ath11k_warn(ab, "failed to send htt type stats request: %d", in ath11k_dp_tx_htt_h2t_ext_stats_req()
1033 struct ath11k_base *ab = ar->ab; in ath11k_dp_tx_htt_monitor_mode_ring_config() local
1057 if (ab->hw_params.rxdma1_enable) { in ath11k_dp_tx_htt_monitor_mode_ring_config()
1058 ret = ath11k_dp_tx_htt_rx_filter_setup(ar->ab, ring_id, dp->mac_id, in ath11k_dp_tx_htt_monitor_mode_ring_config()
1064 for (i = 0; i < ab->hw_params.num_rxmda_per_pdev; i++) { in ath11k_dp_tx_htt_monitor_mode_ring_config()
1066 ret = ath11k_dp_tx_htt_rx_filter_setup(ar->ab, ring_id, in ath11k_dp_tx_htt_monitor_mode_ring_config()
1077 for (i = 0; i < ab->hw_params.num_rxmda_per_pdev; i++) { in ath11k_dp_tx_htt_monitor_mode_ring_config()
1089 ret = ath11k_dp_tx_htt_rx_filter_setup(ab, ring_id, in ath11k_dp_tx_htt_monitor_mode_ring_config()
1096 if (!ar->ab->hw_params.rxdma1_enable) in ath11k_dp_tx_htt_monitor_mode_ring_config()
1097 mod_timer(&ar->ab->mon_reap_timer, jiffies + in ath11k_dp_tx_htt_monitor_mode_ring_config()