Lines Matching full:ab

12 struct sk_buff *ath11k_htc_alloc_skb(struct ath11k_base *ab, int size)  in ath11k_htc_alloc_skb()  argument
24 ath11k_warn(ab, "Unaligned HTC tx skb\n"); in ath11k_htc_alloc_skb()
29 static void ath11k_htc_control_tx_complete(struct ath11k_base *ab, in ath11k_htc_control_tx_complete() argument
35 static struct sk_buff *ath11k_htc_build_tx_ctrl_skb(void *ab) in ath11k_htc_build_tx_ctrl_skb() argument
80 struct device *dev = htc->ab->dev; in ath11k_htc_send()
81 struct ath11k_base *ab = htc->ab; in ath11k_htc_send() local
84 bool credit_flow_enabled = (ab->hw_params.credit_flow && in ath11k_htc_send()
88 ath11k_warn(ab, "Invalid endpoint id: %d\n", eid); in ath11k_htc_send()
98 ath11k_dbg(ab, ATH11K_DBG_HTC, in ath11k_htc_send()
106 ath11k_dbg(ab, ATH11K_DBG_HTC, in ath11k_htc_send()
122 ath11k_dbg(ab, ATH11K_DBG_HTC, "tx skb %p eid %d paddr %pad\n", in ath11k_htc_send()
125 ret = ath11k_ce_send(htc->ab, skb, ep->ul_pipe_id, ep->eid); in ath11k_htc_send()
137 ath11k_dbg(ab, ATH11K_DBG_HTC, in ath11k_htc_send()
143 ep->ep_ops.ep_tx_credits(htc->ab); in ath11k_htc_send()
156 struct ath11k_base *ab = htc->ab; in ath11k_htc_process_credit_report() local
161 ath11k_warn(ab, "Uneven credit report len %d", len); in ath11k_htc_process_credit_report()
173 ath11k_dbg(ab, ATH11K_DBG_HTC, "ep %d credits got %d total %d\n", in ath11k_htc_process_credit_report()
178 ep->ep_ops.ep_tx_credits(htc->ab); in ath11k_htc_process_credit_report()
190 struct ath11k_base *ab = htc->ab; in ath11k_htc_process_trailer() local
205 ath11k_warn(ab, "Invalid record length: %d\n", in ath11k_htc_process_trailer()
211 if (ab->hw_params.credit_flow) { in ath11k_htc_process_trailer()
216 ath11k_warn(ab, "Credit report too long\n"); in ath11k_htc_process_trailer()
226 ath11k_warn(ab, "Unhandled record: id:%d length:%d\n", in ath11k_htc_process_trailer()
243 static void ath11k_htc_suspend_complete(struct ath11k_base *ab, bool ack) in ath11k_htc_suspend_complete() argument
245 ath11k_dbg(ab, ATH11K_DBG_BOOT, "suspend complete %d\n", ack); in ath11k_htc_suspend_complete()
248 set_bit(ATH11K_FLAG_HTC_SUSPEND_COMPLETE, &ab->dev_flags); in ath11k_htc_suspend_complete()
250 clear_bit(ATH11K_FLAG_HTC_SUSPEND_COMPLETE, &ab->dev_flags); in ath11k_htc_suspend_complete()
252 complete(&ab->htc_suspend); in ath11k_htc_suspend_complete()
255 void ath11k_htc_tx_completion_handler(struct ath11k_base *ab, in ath11k_htc_tx_completion_handler() argument
258 struct ath11k_htc *htc = &ab->htc; in ath11k_htc_tx_completion_handler()
277 ep_tx_complete(htc->ab, skb); in ath11k_htc_tx_completion_handler()
280 static void ath11k_htc_wakeup_from_suspend(struct ath11k_base *ab) in ath11k_htc_wakeup_from_suspend() argument
282 ath11k_dbg(ab, ATH11K_DBG_BOOT, "wakeup from suspend is received\n"); in ath11k_htc_wakeup_from_suspend()
285 void ath11k_htc_rx_completion_handler(struct ath11k_base *ab, in ath11k_htc_rx_completion_handler() argument
289 struct ath11k_htc *htc = &ab->htc; in ath11k_htc_rx_completion_handler()
304 ath11k_warn(ab, "HTC Rx: invalid eid %d\n", eid); in ath11k_htc_rx_completion_handler()
313 ath11k_warn(ab, "HTC rx frame too long, len: %zu\n", in ath11k_htc_rx_completion_handler()
319 ath11k_warn(ab, "HTC Rx: insufficient length, got %d, expected %d\n", in ath11k_htc_rx_completion_handler()
328 ath11k_dbg(ab, ATH11K_DBG_HTC, "rx ep %d skb %p trailer_present %d\n", in ath11k_htc_rx_completion_handler()
339 ath11k_warn(ab, "Invalid trailer length: %d\n", in ath11k_htc_rx_completion_handler()
365 ath11k_dbg(ab, ATH11K_DBG_HTC, "rx ep %d skb %p message_id %d\n", in ath11k_htc_rx_completion_handler()
376 ath11k_warn(ab, "HTC rx ctrl still processing\n"); in ath11k_htc_rx_completion_handler()
391 ath11k_htc_suspend_complete(ab, true); in ath11k_htc_rx_completion_handler()
394 ath11k_htc_suspend_complete(ab, false); in ath11k_htc_rx_completion_handler()
397 ath11k_htc_wakeup_from_suspend(ab); in ath11k_htc_rx_completion_handler()
400 ath11k_warn(ab, "ignoring unsolicited htc ep0 event %ld\n", in ath11k_htc_rx_completion_handler()
407 ep->ep_ops.ep_rx_complete(ab, skb); in ath11k_htc_rx_completion_handler()
410 ath11k_ce_poll_send_completed(ab, ep->ul_pipe_id); in ath11k_htc_rx_completion_handler()
418 static void ath11k_htc_control_rx_complete(struct ath11k_base *ab, in ath11k_htc_control_rx_complete() argument
424 ath11k_warn(ab, "unexpected htc rx\n"); in ath11k_htc_control_rx_complete()
527 struct ath11k_base *ab = htc->ab; in ath11k_htc_wait_target() local
537 ath11k_warn(ab, "failed to receive control response completion, polling..\n"); in ath11k_htc_wait_target()
539 for (i = 0; i < ab->hw_params.ce_count; i++) in ath11k_htc_wait_target()
540 ath11k_ce_per_engine_service(htc->ab, i); in ath11k_htc_wait_target()
551 ath11k_warn(ab, "ctl_resp never came in (%d)\n", status); in ath11k_htc_wait_target()
556 ath11k_warn(ab, "Invalid HTC ready msg len:%d\n", in ath11k_htc_wait_target()
568 ath11k_warn(ab, "Invalid HTC ready msg: 0x%x\n", message_id); in ath11k_htc_wait_target()
575 ath11k_dbg(ab, ATH11K_DBG_HTC, in ath11k_htc_wait_target()
581 ath11k_warn(ab, "Invalid credit size received\n"); in ath11k_htc_wait_target()
588 if (ab->hw_params.supports_shadow_regs) in ath11k_htc_wait_target()
600 struct ath11k_base *ab = htc->ab; in ath11k_htc_connect_service() local
626 ath11k_dbg(ab, ATH11K_DBG_BOOT, in ath11k_htc_connect_service()
630 skb = ath11k_htc_build_tx_ctrl_skb(htc->ab); in ath11k_htc_connect_service()
632 ath11k_warn(ab, "Failed to allocate HTC packet\n"); in ath11k_htc_connect_service()
654 if (!ab->hw_params.credit_flow) { in ath11k_htc_connect_service()
675 ath11k_err(ab, "Service connect timeout\n"); in ath11k_htc_connect_service()
687 ath11k_err(ab, "Invalid resp message ID 0x%x", message_id); in ath11k_htc_connect_service()
691 ath11k_dbg(ab, ATH11K_DBG_HTC, in ath11k_htc_connect_service()
702 ath11k_err(ab, "HTC Service %s connect request failed: 0x%x)\n", in ath11k_htc_connect_service()
744 status = ath11k_hif_map_service_to_pipe(htc->ab, in ath11k_htc_connect_service()
751 ath11k_dbg(ab, ATH11K_DBG_BOOT, in ath11k_htc_connect_service()
758 ath11k_dbg(ab, ATH11K_DBG_BOOT, in ath11k_htc_connect_service()
770 struct ath11k_base *ab = htc->ab; in ath11k_htc_start() local
773 skb = ath11k_htc_build_tx_ctrl_skb(htc->ab); in ath11k_htc_start()
784 if (ab->hw_params.credit_flow) in ath11k_htc_start()
785 ath11k_dbg(ab, ATH11K_DBG_HTC, "using tx credit flow control\n"); in ath11k_htc_start()
798 int ath11k_htc_init(struct ath11k_base *ab) in ath11k_htc_init() argument
800 struct ath11k_htc *htc = &ab->htc; in ath11k_htc_init()
809 htc->ab = ab; in ath11k_htc_init()
811 switch (ab->wmi_ab.preferred_hw_mode) { in ath11k_htc_init()
823 htc->wmi_ep_count = ab->hw_params.max_radios; in ath11k_htc_init()
838 ath11k_err(ab, "could not connect to htc service (%d)\n", ret); in ath11k_htc_init()