Lines Matching full:ab

12 struct sk_buff *ath12k_htc_alloc_skb(struct ath12k_base *ab, int size)  in ath12k_htc_alloc_skb()  argument
24 ath12k_warn(ab, "Unaligned HTC tx skb\n"); in ath12k_htc_alloc_skb()
29 static void ath12k_htc_control_tx_complete(struct ath12k_base *ab, in ath12k_htc_control_tx_complete() argument
80 struct device *dev = htc->ab->dev; in ath12k_htc_send()
81 struct ath12k_base *ab = htc->ab; in ath12k_htc_send() local
86 ath12k_warn(ab, "Invalid endpoint id: %d\n", eid); in ath12k_htc_send()
96 ath12k_dbg(ab, ATH12K_DBG_HTC, in ath12k_htc_send()
104 ath12k_dbg(ab, ATH12K_DBG_HTC, in ath12k_htc_send()
119 ret = ath12k_ce_send(htc->ab, skb, ep->ul_pipe_id, ep->eid); in ath12k_htc_send()
131 ath12k_dbg(ab, ATH12K_DBG_HTC, in ath12k_htc_send()
137 ep->ep_ops.ep_tx_credits(htc->ab); in ath12k_htc_send()
150 struct ath12k_base *ab = htc->ab; in ath12k_htc_process_credit_report() local
155 ath12k_warn(ab, "Uneven credit report len %d", len); in ath12k_htc_process_credit_report()
167 ath12k_dbg(ab, ATH12K_DBG_HTC, "htc ep %d got %d credits (total %d)\n", in ath12k_htc_process_credit_report()
172 ep->ep_ops.ep_tx_credits(htc->ab); in ath12k_htc_process_credit_report()
184 struct ath12k_base *ab = htc->ab; in ath12k_htc_process_trailer() local
199 ath12k_warn(ab, "Invalid record length: %d\n", in ath12k_htc_process_trailer()
209 ath12k_warn(ab, "Credit report too long\n"); in ath12k_htc_process_trailer()
219 ath12k_warn(ab, "Unhandled record: id:%d length:%d\n", in ath12k_htc_process_trailer()
235 static void ath12k_htc_suspend_complete(struct ath12k_base *ab, bool ack) in ath12k_htc_suspend_complete() argument
237 ath12k_dbg(ab, ATH12K_DBG_BOOT, "boot suspend complete %d\n", ack); in ath12k_htc_suspend_complete()
240 set_bit(ATH12K_FLAG_HTC_SUSPEND_COMPLETE, &ab->dev_flags); in ath12k_htc_suspend_complete()
242 clear_bit(ATH12K_FLAG_HTC_SUSPEND_COMPLETE, &ab->dev_flags); in ath12k_htc_suspend_complete()
244 complete(&ab->htc_suspend); in ath12k_htc_suspend_complete()
247 static void ath12k_htc_wakeup_from_suspend(struct ath12k_base *ab) in ath12k_htc_wakeup_from_suspend() argument
249 ath12k_dbg(ab, ATH12K_DBG_BOOT, "boot wakeup from suspend is received\n"); in ath12k_htc_wakeup_from_suspend()
252 void ath12k_htc_rx_completion_handler(struct ath12k_base *ab, in ath12k_htc_rx_completion_handler() argument
256 struct ath12k_htc *htc = &ab->htc; in ath12k_htc_rx_completion_handler()
271 ath12k_warn(ab, "HTC Rx: invalid eid %d\n", eid); in ath12k_htc_rx_completion_handler()
280 ath12k_warn(ab, "HTC rx frame too long, len: %zu\n", in ath12k_htc_rx_completion_handler()
286 ath12k_warn(ab, "HTC Rx: insufficient length, got %d, expected %d\n", in ath12k_htc_rx_completion_handler()
304 ath12k_warn(ab, "Invalid trailer length: %d\n", in ath12k_htc_rx_completion_handler()
336 ath12k_warn(ab, "HTC rx ctrl still processing\n"); in ath12k_htc_rx_completion_handler()
351 ath12k_htc_suspend_complete(ab, true); in ath12k_htc_rx_completion_handler()
354 ath12k_htc_suspend_complete(ab, false); in ath12k_htc_rx_completion_handler()
357 ath12k_htc_wakeup_from_suspend(ab); in ath12k_htc_rx_completion_handler()
360 ath12k_warn(ab, "ignoring unsolicited htc ep0 event %u\n", in ath12k_htc_rx_completion_handler()
367 ath12k_dbg(ab, ATH12K_DBG_HTC, "htc rx completion ep %d skb %p\n", in ath12k_htc_rx_completion_handler()
369 ep->ep_ops.ep_rx_complete(ab, skb); in ath12k_htc_rx_completion_handler()
372 ath12k_ce_poll_send_completed(ab, ep->ul_pipe_id); in ath12k_htc_rx_completion_handler()
380 static void ath12k_htc_control_rx_complete(struct ath12k_base *ab, in ath12k_htc_control_rx_complete() argument
386 ath12k_warn(ab, "unexpected htc rx\n"); in ath12k_htc_control_rx_complete()
494 struct ath12k_base *ab = htc->ab; in ath12k_htc_wait_target() local
504 ath12k_warn(ab, "failed to receive control response completion, polling..\n"); in ath12k_htc_wait_target()
506 for (i = 0; i < ab->hw_params->ce_count; i++) in ath12k_htc_wait_target()
507 ath12k_ce_per_engine_service(htc->ab, i); in ath12k_htc_wait_target()
518 ath12k_warn(ab, "ctl_resp never came in (%d)\n", status); in ath12k_htc_wait_target()
523 ath12k_warn(ab, "Invalid HTC ready msg len:%d\n", in ath12k_htc_wait_target()
535 ath12k_warn(ab, "Invalid HTC ready msg: 0x%x\n", message_id); in ath12k_htc_wait_target()
542 ath12k_dbg(ab, ATH12K_DBG_HTC, in ath12k_htc_wait_target()
548 ath12k_warn(ab, "Invalid credit size received\n"); in ath12k_htc_wait_target()
561 struct ath12k_base *ab = htc->ab; in ath12k_htc_connect_service() local
587 ath12k_dbg(ab, ATH12K_DBG_BOOT, in ath12k_htc_connect_service()
593 ath12k_warn(ab, "Failed to allocate HTC packet\n"); in ath12k_htc_connect_service()
631 ath12k_err(ab, "Service connect timeout\n"); in ath12k_htc_connect_service()
643 ath12k_err(ab, "Invalid resp message ID 0x%x", message_id); in ath12k_htc_connect_service()
647 ath12k_dbg(ab, ATH12K_DBG_HTC, in ath12k_htc_connect_service()
658 ath12k_err(ab, "HTC Service %s connect request failed: 0x%x)\n", in ath12k_htc_connect_service()
699 status = ath12k_hif_map_service_to_pipe(htc->ab, in ath12k_htc_connect_service()
706 ath12k_dbg(ab, ATH12K_DBG_BOOT, in ath12k_htc_connect_service()
713 ath12k_dbg(ab, ATH12K_DBG_BOOT, in ath12k_htc_connect_service()
725 struct ath12k_base *ab = htc->ab; in ath12k_htc_start() local
739 ath12k_dbg(ab, ATH12K_DBG_HTC, "HTC is using TX credit flow control\n"); in ath12k_htc_start()
750 int ath12k_htc_init(struct ath12k_base *ab) in ath12k_htc_init() argument
752 struct ath12k_htc *htc = &ab->htc; in ath12k_htc_init()
761 htc->ab = ab; in ath12k_htc_init()
763 switch (ab->wmi_ab.preferred_hw_mode) { in ath12k_htc_init()
775 htc->wmi_ep_count = ab->hw_params->max_radios; in ath12k_htc_init()
788 ath12k_err(ab, "could not connect to htc service (%d)\n", ret); in ath12k_htc_init()