Lines Matching full:ep
53 static void ath12k_htc_prepare_tx_skb(struct ath12k_htc_ep *ep, in ath12k_htc_prepare_tx_skb() argument
61 hdr->htc_info = le32_encode_bits(ep->eid, HTC_HDR_ENDPOINTID) | in ath12k_htc_prepare_tx_skb()
65 if (ep->tx_credit_flow_enabled) in ath12k_htc_prepare_tx_skb()
69 spin_lock_bh(&ep->htc->tx_lock); in ath12k_htc_prepare_tx_skb()
70 hdr->ctrl_info = le32_encode_bits(ep->seq_no++, HTC_HDR_CONTROLBYTES1); in ath12k_htc_prepare_tx_skb()
71 spin_unlock_bh(&ep->htc->tx_lock); in ath12k_htc_prepare_tx_skb()
78 struct ath12k_htc_ep *ep = &htc->endpoint[eid]; in ath12k_htc_send() local
92 if (ep->tx_credit_flow_enabled) { in ath12k_htc_send()
95 if (ep->tx_credits < credits) { in ath12k_htc_send()
97 "htc insufficient credits ep %d required %d available %d\n", in ath12k_htc_send()
98 eid, credits, ep->tx_credits); in ath12k_htc_send()
103 ep->tx_credits -= credits; in ath12k_htc_send()
105 "htc ep %d consumed %d credits (total %d)\n", in ath12k_htc_send()
106 eid, credits, ep->tx_credits); in ath12k_htc_send()
110 ath12k_htc_prepare_tx_skb(ep, skb); in ath12k_htc_send()
119 ret = ath12k_ce_send(htc->ab, skb, ep->ul_pipe_id, ep->eid); in ath12k_htc_send()
128 if (ep->tx_credit_flow_enabled) { in ath12k_htc_send()
130 ep->tx_credits += credits; in ath12k_htc_send()
132 "htc ep %d reverted %d credits back (total %d)\n", in ath12k_htc_send()
133 eid, credits, ep->tx_credits); in ath12k_htc_send()
136 if (ep->ep_ops.ep_tx_credits) in ath12k_htc_send()
137 ep->ep_ops.ep_tx_credits(htc->ab); in ath12k_htc_send()
151 struct ath12k_htc_ep *ep; in ath12k_htc_process_credit_report() local
164 ep = &htc->endpoint[report->eid]; in ath12k_htc_process_credit_report()
165 ep->tx_credits += report->credits; 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()
168 report->eid, report->credits, ep->tx_credits); in ath12k_htc_process_credit_report()
170 if (ep->ep_ops.ep_tx_credits) { in ath12k_htc_process_credit_report()
172 ep->ep_ops.ep_tx_credits(htc->ab); in ath12k_htc_process_credit_report()
253 struct ath12k_htc_ep *ep; in ath12k_htc_rx_completion_handler() local
270 ep = &htc->endpoint[eid]; in ath12k_htc_rx_completion_handler()
329 * sending unsolicited messages on the ep 0 in ath12k_htc_rx_completion_handler()
361 ath12k_dbg(ab, ATH12K_DBG_HTC, "htc rx completion ep %d skb %pK\n", in ath12k_htc_rx_completion_handler()
363 ep->ep_ops.ep_rx_complete(ab, skb); in ath12k_htc_rx_completion_handler()
366 ath12k_ce_poll_send_completed(ab, ep->ul_pipe_id); in ath12k_htc_rx_completion_handler()
426 struct ath12k_htc_ep *ep; in ath12k_htc_reset_endpoint_states() local
430 ep = &htc->endpoint[i]; in ath12k_htc_reset_endpoint_states()
431 ep->service_id = ATH12K_HTC_SVC_ID_UNUSED; in ath12k_htc_reset_endpoint_states()
432 ep->max_ep_message_len = 0; in ath12k_htc_reset_endpoint_states()
433 ep->max_tx_queue_depth = 0; in ath12k_htc_reset_endpoint_states()
434 ep->eid = i; in ath12k_htc_reset_endpoint_states()
435 ep->htc = htc; in ath12k_htc_reset_endpoint_states()
436 ep->tx_credit_flow_enabled = true; in ath12k_htc_reset_endpoint_states()
560 struct ath12k_htc_ep *ep; in ath12k_htc_connect_service() local
642 "HTC Service %s connect response: status: %u, assigned ep: %u\n", in ath12k_htc_connect_service()
672 ep = &htc->endpoint[assigned_eid]; in ath12k_htc_connect_service()
673 ep->eid = assigned_eid; in ath12k_htc_connect_service()
675 if (ep->service_id != ATH12K_HTC_SVC_ID_UNUSED) in ath12k_htc_connect_service()
684 ep->service_id = conn_req->service_id; in ath12k_htc_connect_service()
685 ep->max_tx_queue_depth = conn_req->max_send_queue_depth; in ath12k_htc_connect_service()
686 ep->max_ep_message_len = le32_get_bits(resp_msg->flags_len, in ath12k_htc_connect_service()
688 ep->tx_credits = tx_alloc; in ath12k_htc_connect_service()
691 ep->ep_ops = conn_req->ep_ops; in ath12k_htc_connect_service()
694 ep->service_id, in ath12k_htc_connect_service()
695 &ep->ul_pipe_id, in ath12k_htc_connect_service()
696 &ep->dl_pipe_id); in ath12k_htc_connect_service()
702 htc_service_name(ep->service_id), ep->ul_pipe_id, in ath12k_htc_connect_service()
703 ep->dl_pipe_id, ep->eid); in ath12k_htc_connect_service()
705 if (disable_credit_flow_ctrl && ep->tx_credit_flow_enabled) { in ath12k_htc_connect_service()
706 ep->tx_credit_flow_enabled = false; in ath12k_htc_connect_service()
709 htc_service_name(ep->service_id), assigned_eid); in ath12k_htc_connect_service()