Lines Matching refs:ep

37 static void do_send_completion(struct htc_endpoint *ep,  in do_send_completion()  argument
47 if (ep->ep_cb.tx_comp_multi != NULL) { in do_send_completion()
50 __func__, ep->eid, in do_send_completion()
56 ep->ep_cb.tx_comp_multi(ep->target, queue_to_indicate); in do_send_completion()
71 __func__, ep->eid, packet); in do_send_completion()
72 ep->ep_cb.tx_complete(ep->target, packet); in do_send_completion()
80 struct htc_endpoint *ep = &target->endpoint[packet->endpoint]; in send_packet_completion() local
88 do_send_completion(ep, &container); in send_packet_completion()
92 struct htc_endpoint *ep, in get_htc_packet_credit_based() argument
106 if (list_empty(&ep->txq)) in get_htc_packet_credit_based()
110 packet = list_first_entry(&ep->txq, struct htc_packet, list); in get_htc_packet_credit_based()
114 __func__, packet, get_queue_depth(&ep->txq)); in get_htc_packet_credit_based()
130 __func__, credits_required, ep->cred_dist.credits); in get_htc_packet_credit_based()
132 if (ep->eid == ENDPOINT_0) { in get_htc_packet_credit_based()
140 if (ep->cred_dist.credits < credits_required) in get_htc_packet_credit_based()
143 ep->cred_dist.credits -= credits_required; in get_htc_packet_credit_based()
144 ep->ep_st.cred_cosumd += credits_required; in get_htc_packet_credit_based()
147 if (ep->cred_dist.credits < in get_htc_packet_credit_based()
148 ep->cred_dist.cred_per_msg) { in get_htc_packet_credit_based()
151 ep->ep_st.cred_low_indicate += 1; in get_htc_packet_credit_based()
159 packet = list_first_entry(&ep->txq, struct htc_packet, list); in get_htc_packet_credit_based()
166 packet->info.tx.seqno = ep->seqno; in get_htc_packet_credit_based()
167 ep->seqno++; in get_htc_packet_credit_based()
174 struct htc_endpoint *ep, in get_htc_packet() argument
183 if (list_empty(&ep->txq)) in get_htc_packet()
186 packet = list_first_entry(&ep->txq, struct htc_packet, list); in get_htc_packet()
191 __func__, packet, get_queue_depth(&ep->txq)); in get_htc_packet()
192 packet->info.tx.seqno = ep->seqno; in get_htc_packet()
195 ep->seqno++; in get_htc_packet()
204 struct htc_endpoint *ep, in htc_issue_packets() argument
251 list_add_tail(&packet->list, &ep->pipe.tx_lookup_queue); in htc_issue_packets()
252 ep->ep_st.tx_issued += 1; in htc_issue_packets()
256 ep->pipe.pipeid_ul, NULL, skb); in htc_issue_packets()
273 ep->cred_dist.credits += packet->info.tx.cred_used; in htc_issue_packets()
302 struct htc_endpoint *ep, in htc_try_send() argument
331 txqueue_depth = get_queue_depth(&ep->txq); in htc_try_send()
334 if (txqueue_depth >= ep->max_txq_depth) { in htc_try_send()
342 overflow -= ep->max_txq_depth; in htc_try_send()
349 __func__, ep->eid, overflow, txqueue_depth, in htc_try_send()
350 ep->max_txq_depth); in htc_try_send()
353 (ep->ep_cb.tx_full == NULL)) { in htc_try_send()
388 action = ep->ep_cb.tx_full(ep->target, packet); in htc_try_send()
391 ep->ep_st.tx_dropped += 1; in htc_try_send()
411 if (!ep->pipe.tx_credit_flow_enabled) { in htc_try_send()
414 ep->pipe.pipeid_ul); in htc_try_send()
422 list_splice_tail_init(&send_queue, &ep->txq); in htc_try_send()
432 ep->tx_proc_cnt++; in htc_try_send()
434 if (ep->tx_proc_cnt > 1) { in htc_try_send()
440 ep->tx_proc_cnt--; in htc_try_send()
452 if (get_queue_depth(&ep->txq) == 0) in htc_try_send()
455 if (ep->pipe.tx_credit_flow_enabled) { in htc_try_send()
463 get_htc_packet_credit_based(target, ep, &send_queue); in htc_try_send()
469 get_htc_packet(target, ep, &send_queue, tx_resources); in htc_try_send()
483 htc_issue_packets(target, ep, &send_queue); in htc_try_send()
485 if (!ep->pipe.tx_credit_flow_enabled) { in htc_try_send()
486 pipeid = ep->pipe.pipeid_ul; in htc_try_send()
495 ep->tx_proc_cnt = 0; in htc_try_send()
661 struct htc_endpoint *ep; in htc_process_credit_report() local
673 ep = &target->endpoint[rpt->eid]; in htc_process_credit_report()
674 ep->cred_dist.credits += rpt->credits; in htc_process_credit_report()
676 if (ep->cred_dist.credits && get_queue_depth(&ep->txq)) { in htc_process_credit_report()
678 htc_try_send(target, ep, NULL); in htc_process_credit_report()
693 struct htc_endpoint *ep, u16 tag) in htc_flush_tx_endpoint() argument
698 while (get_queue_depth(&ep->txq)) { in htc_flush_tx_endpoint()
699 packet = list_first_entry(&ep->txq, struct htc_packet, list); in htc_flush_tx_endpoint()
715 struct htc_endpoint *ep, in htc_lookup_tx_packet() argument
727 list_for_each_entry_safe(packet, tmp_pkt, &ep->pipe.tx_lookup_queue, in htc_lookup_tx_packet()
747 struct htc_endpoint *ep; in ath6kl_htc_pipe_tx_complete() local
758 ep = &target->endpoint[ep_id]; in ath6kl_htc_pipe_tx_complete()
760 packet = htc_lookup_tx_packet(target, ep, skb); in ath6kl_htc_pipe_tx_complete()
771 if (!ep->pipe.tx_credit_flow_enabled) { in ath6kl_htc_pipe_tx_complete()
777 htc_try_send(target, ep, NULL); in ath6kl_htc_pipe_tx_complete()
786 struct htc_endpoint *ep; in htc_send_packets_multiple() local
799 ep = &target->endpoint[packet->endpoint]; in htc_send_packets_multiple()
801 htc_try_send(target, ep, pkt_queue); in htc_send_packets_multiple()
809 do_send_completion(ep, pkt_queue); in htc_send_packets_multiple()
919 static void do_recv_completion(struct htc_endpoint *ep, in do_recv_completion() argument
934 ep->ep_cb.rx(ep->target, packet); in do_recv_completion()
941 struct htc_endpoint *ep, in recv_packet_completion() argument
949 do_recv_completion(ep, &container); in recv_packet_completion()
960 struct htc_endpoint *ep; in ath6kl_htc_pipe_rx_complete() local
992 ep = &target->endpoint[htc_hdr->eid]; in ath6kl_htc_pipe_rx_complete()
1093 recv_packet_completion(target, ep, packet); in ath6kl_htc_pipe_rx_complete()
1106 struct htc_endpoint *ep) in htc_flush_rx_queue() argument
1114 if (list_empty(&ep->rx_bufq)) in htc_flush_rx_queue()
1117 packet = list_first_entry(&ep->rx_bufq, in htc_flush_rx_queue()
1134 do_recv_completion(ep, &container); in htc_flush_rx_queue()
1184 struct htc_endpoint *ep; in reset_endpoint_states() local
1188 ep = &target->endpoint[i]; in reset_endpoint_states()
1189 ep->svc_id = 0; in reset_endpoint_states()
1190 ep->len_max = 0; in reset_endpoint_states()
1191 ep->max_txq_depth = 0; in reset_endpoint_states()
1192 ep->eid = i; in reset_endpoint_states()
1193 INIT_LIST_HEAD(&ep->txq); in reset_endpoint_states()
1194 INIT_LIST_HEAD(&ep->pipe.tx_lookup_queue); in reset_endpoint_states()
1195 INIT_LIST_HEAD(&ep->rx_bufq); in reset_endpoint_states()
1196 ep->target = target; in reset_endpoint_states()
1197 ep->pipe.tx_credit_flow_enabled = true; in reset_endpoint_states()
1239 struct htc_endpoint *ep; in ath6kl_htc_pipe_conn_service() local
1363 ep = &target->endpoint[assigned_epid]; in ath6kl_htc_pipe_conn_service()
1364 ep->eid = assigned_epid; in ath6kl_htc_pipe_conn_service()
1365 if (ep->svc_id != 0) { in ath6kl_htc_pipe_conn_service()
1376 ep->svc_id = conn_req->svc_id; /* this marks ep in use */ in ath6kl_htc_pipe_conn_service()
1377 ep->max_txq_depth = conn_req->max_txq_depth; in ath6kl_htc_pipe_conn_service()
1378 ep->len_max = max_msg_size; in ath6kl_htc_pipe_conn_service()
1379 ep->cred_dist.credits = tx_alloc; in ath6kl_htc_pipe_conn_service()
1380 ep->cred_dist.cred_sz = target->tgt_cred_sz; in ath6kl_htc_pipe_conn_service()
1381 ep->cred_dist.cred_per_msg = max_msg_size / target->tgt_cred_sz; in ath6kl_htc_pipe_conn_service()
1383 ep->cred_dist.cred_per_msg++; in ath6kl_htc_pipe_conn_service()
1386 ep->ep_cb = conn_req->ep_cb; in ath6kl_htc_pipe_conn_service()
1389 ep->tx_drop_packet_threshold = MAX_HI_COOKIE_NUM; in ath6kl_htc_pipe_conn_service()
1391 status = ath6kl_hif_pipe_map_service(ar, ep->svc_id, in ath6kl_htc_pipe_conn_service()
1392 &ep->pipe.pipeid_ul, in ath6kl_htc_pipe_conn_service()
1393 &ep->pipe.pipeid_dl); in ath6kl_htc_pipe_conn_service()
1399 ep->svc_id, ep->pipe.pipeid_ul, in ath6kl_htc_pipe_conn_service()
1400 ep->pipe.pipeid_dl, ep->eid); in ath6kl_htc_pipe_conn_service()
1402 if (disable_credit_flowctrl && ep->pipe.tx_credit_flow_enabled) { in ath6kl_htc_pipe_conn_service()
1403 ep->pipe.tx_credit_flow_enabled = false; in ath6kl_htc_pipe_conn_service()
1406 ep->svc_id, assigned_epid); in ath6kl_htc_pipe_conn_service()
1419 struct htc_endpoint *ep = NULL; in ath6kl_htc_pipe_create() local
1454 ep = &target->endpoint[ENDPOINT_0]; in ath6kl_htc_pipe_create()
1456 ath6kl_hif_pipe_get_default(ar, &ep->pipe.pipeid_ul, in ath6kl_htc_pipe_create()
1457 &ep->pipe.pipeid_dl); in ath6kl_htc_pipe_create()
1526 struct htc_endpoint *ep; in ath6kl_htc_pipe_stop() local
1530 ep = &target->endpoint[i]; in ath6kl_htc_pipe_stop()
1531 htc_flush_rx_queue(target, ep); in ath6kl_htc_pipe_stop()
1532 htc_flush_tx_endpoint(target, ep, HTC_TX_PACKET_TAG_ALL); in ath6kl_htc_pipe_stop()
1623 struct htc_endpoint *ep = &target->endpoint[endpoint]; in ath6kl_htc_pipe_flush_txep() local
1625 if (ep->svc_id == 0) { in ath6kl_htc_pipe_flush_txep()
1631 htc_flush_tx_endpoint(target, ep, tag); in ath6kl_htc_pipe_flush_txep()
1638 struct htc_endpoint *ep; in ath6kl_htc_pipe_add_rxbuf_multiple() local
1655 ep = &target->endpoint[first->endpoint]; in ath6kl_htc_pipe_add_rxbuf_multiple()
1660 list_splice_tail_init(pkt_queue, &ep->rx_bufq); in ath6kl_htc_pipe_add_rxbuf_multiple()
1670 do_recv_completion(ep, pkt_queue); in ath6kl_htc_pipe_add_rxbuf_multiple()
1677 enum htc_endpoint_id ep, in ath6kl_htc_pipe_activity_changed() argument