Lines Matching full:ep
52 static void ath11k_htc_prepare_tx_skb(struct ath11k_htc_ep *ep, in ath11k_htc_prepare_tx_skb() argument
60 hdr->htc_info = FIELD_PREP(HTC_HDR_ENDPOINTID, ep->eid) | in ath11k_htc_prepare_tx_skb()
64 if (ep->tx_credit_flow_enabled) in ath11k_htc_prepare_tx_skb()
68 spin_lock_bh(&ep->htc->tx_lock); in ath11k_htc_prepare_tx_skb()
69 hdr->ctrl_info = FIELD_PREP(HTC_HDR_CONTROLBYTES1, ep->seq_no++); in ath11k_htc_prepare_tx_skb()
70 spin_unlock_bh(&ep->htc->tx_lock); in ath11k_htc_prepare_tx_skb()
77 struct ath11k_htc_ep *ep = &htc->endpoint[eid]; in ath11k_htc_send() local
84 ep->tx_credit_flow_enabled); in ath11k_htc_send()
96 if (ep->tx_credits < credits) { in ath11k_htc_send()
98 "ep %d insufficient credits required %d total %d\n", in ath11k_htc_send()
99 eid, credits, ep->tx_credits); in ath11k_htc_send()
104 ep->tx_credits -= credits; in ath11k_htc_send()
106 "ep %d credits consumed %d total %d\n", in ath11k_htc_send()
107 eid, credits, ep->tx_credits); in ath11k_htc_send()
111 ath11k_htc_prepare_tx_skb(ep, skb); in ath11k_htc_send()
124 ret = ath11k_ce_send(htc->ab, skb, ep->ul_pipe_id, ep->eid); in ath11k_htc_send()
135 ep->tx_credits += credits; in ath11k_htc_send()
137 "ep %d credits reverted %d total %d\n", in ath11k_htc_send()
138 eid, credits, ep->tx_credits); in ath11k_htc_send()
141 if (ep->ep_ops.ep_tx_credits) in ath11k_htc_send()
142 ep->ep_ops.ep_tx_credits(htc->ab); in ath11k_htc_send()
156 struct ath11k_htc_ep *ep; in ath11k_htc_process_credit_report() local
169 ep = &htc->endpoint[report->eid]; in ath11k_htc_process_credit_report()
170 ep->tx_credits += report->credits; in ath11k_htc_process_credit_report()
172 ath11k_dbg(ab, ATH11K_DBG_HTC, "ep %d credits got %d total %d\n", in ath11k_htc_process_credit_report()
173 report->eid, report->credits, ep->tx_credits); in ath11k_htc_process_credit_report()
175 if (ep->ep_ops.ep_tx_credits) { in ath11k_htc_process_credit_report()
177 ep->ep_ops.ep_tx_credits(htc->ab); in ath11k_htc_process_credit_report()
258 struct ath11k_htc_ep *ep; in ath11k_htc_tx_completion_handler() local
268 ep = &htc->endpoint[eid]; in ath11k_htc_tx_completion_handler()
270 ep_tx_complete = ep->ep_ops.ep_tx_complete; in ath11k_htc_tx_completion_handler()
290 struct ath11k_htc_ep *ep; in ath11k_htc_rx_completion_handler() local
307 ep = &htc->endpoint[eid]; in ath11k_htc_rx_completion_handler()
327 ath11k_dbg(ab, ATH11K_DBG_HTC, "rx ep %d skb %p trailer_present %d\n", in ath11k_htc_rx_completion_handler()
364 ath11k_dbg(ab, ATH11K_DBG_HTC, "rx ep %d skb %p message_id %d\n", in ath11k_htc_rx_completion_handler()
373 * sending unsolicited messages on the ep 0 in ath11k_htc_rx_completion_handler()
406 ep->ep_ops.ep_rx_complete(ab, skb); in ath11k_htc_rx_completion_handler()
409 ath11k_ce_poll_send_completed(ab, ep->ul_pipe_id); in ath11k_htc_rx_completion_handler()
467 struct ath11k_htc_ep *ep; in ath11k_htc_reset_endpoint_states() local
471 ep = &htc->endpoint[i]; in ath11k_htc_reset_endpoint_states()
472 ep->service_id = ATH11K_HTC_SVC_ID_UNUSED; in ath11k_htc_reset_endpoint_states()
473 ep->max_ep_message_len = 0; in ath11k_htc_reset_endpoint_states()
474 ep->max_tx_queue_depth = 0; in ath11k_htc_reset_endpoint_states()
475 ep->eid = i; in ath11k_htc_reset_endpoint_states()
476 ep->htc = htc; in ath11k_htc_reset_endpoint_states()
477 ep->tx_credit_flow_enabled = true; in ath11k_htc_reset_endpoint_states()
604 struct ath11k_htc_ep *ep; in ath11k_htc_connect_service() local
691 "service %s connect response status 0x%lx assigned ep 0x%lx\n", in ath11k_htc_connect_service()
722 ep = &htc->endpoint[assigned_eid]; in ath11k_htc_connect_service()
723 ep->eid = assigned_eid; in ath11k_htc_connect_service()
725 if (ep->service_id != ATH11K_HTC_SVC_ID_UNUSED) in ath11k_htc_connect_service()
734 ep->service_id = conn_req->service_id; in ath11k_htc_connect_service()
735 ep->max_tx_queue_depth = conn_req->max_send_queue_depth; in ath11k_htc_connect_service()
736 ep->max_ep_message_len = FIELD_GET(HTC_SVC_RESP_MSG_MAXMSGSIZE, in ath11k_htc_connect_service()
738 ep->tx_credits = tx_alloc; in ath11k_htc_connect_service()
741 ep->ep_ops = conn_req->ep_ops; in ath11k_htc_connect_service()
744 ep->service_id, in ath11k_htc_connect_service()
745 &ep->ul_pipe_id, in ath11k_htc_connect_service()
746 &ep->dl_pipe_id); in ath11k_htc_connect_service()
752 htc_service_name(ep->service_id), ep->ul_pipe_id, in ath11k_htc_connect_service()
753 ep->dl_pipe_id, ep->eid); in ath11k_htc_connect_service()
755 if (disable_credit_flow_ctrl && ep->tx_credit_flow_enabled) { in ath11k_htc_connect_service()
756 ep->tx_credit_flow_enabled = false; in ath11k_htc_connect_service()
759 htc_service_name(ep->service_id), assigned_eid); in ath11k_htc_connect_service()