Lines Matching refs:endpoint

45 		   ep_dist->endpoint, credits);  in ath6kl_credit_deposit()
65 if (cur_ep_dist->endpoint == ENDPOINT_0) in ath6kl_credit_init()
112 if (cur_ep_dist->endpoint == ENDPOINT_0) in ath6kl_credit_init()
136 cur_ep_dist->endpoint, in ath6kl_credit_init()
173 ep_dist->endpoint, limit); in ath6kl_credit_reduce()
191 if (cur_list->endpoint == ENDPOINT_0) in ath6kl_credit_update()
281 if (curdist_list->endpoint == ENDPOINT_0) in ath6kl_credit_seek()
302 if (curdist_list->endpoint == ENDPOINT_0) in ath6kl_credit_redistribute()
370 hdr->eid = packet->endpoint; in ath6kl_htc_tx_prep_pkt()
409 struct htc_endpoint *endpoint, in htc_tx_comp_update() argument
419 packet->status, packet->endpoint, packet->act_len, in htc_tx_comp_update()
424 endpoint->cred_dist.cred_to_dist += in htc_tx_comp_update()
426 endpoint->cred_dist.txq_depth = get_queue_depth(&endpoint->txq); in htc_tx_comp_update()
438 static void htc_tx_complete(struct htc_endpoint *endpoint, in htc_tx_complete() argument
446 endpoint->eid, get_queue_depth(txq)); in htc_tx_complete()
448 ath6kl_tx_complete(endpoint->target, txq); in htc_tx_complete()
454 struct htc_endpoint *endpoint = &target->endpoint[packet->endpoint]; in htc_tx_comp_handler() local
460 htc_tx_comp_update(target, endpoint, packet); in htc_tx_comp_handler()
464 htc_tx_complete(endpoint, &container); in htc_tx_comp_handler()
470 struct htc_endpoint *endpoint; in htc_async_tx_scat_complete() local
485 endpoint = &target->endpoint[packet->endpoint]; in htc_async_tx_scat_complete()
496 htc_tx_comp_update(target, endpoint, packet); in htc_async_tx_scat_complete()
504 htc_tx_complete(endpoint, &tx_compq); in htc_async_tx_scat_complete()
541 trace_ath6kl_htc_tx(status, packet->endpoint, packet->buf, send_len); in ath6kl_htc_tx_issue()
600 struct htc_endpoint *endpoint, in ath6kl_htc_tx_pkts_get() argument
611 if (list_empty(&endpoint->txq)) in ath6kl_htc_tx_pkts_get()
613 packet = list_first_entry(&endpoint->txq, struct htc_packet, in ath6kl_htc_tx_pkts_get()
618 packet, get_queue_depth(&endpoint->txq)); in ath6kl_htc_tx_pkts_get()
623 if (htc_check_credits(target, endpoint, &flags, in ath6kl_htc_tx_pkts_get()
624 packet->endpoint, len, &req_cred)) in ath6kl_htc_tx_pkts_get()
628 packet = list_first_entry(&endpoint->txq, struct htc_packet, in ath6kl_htc_tx_pkts_get()
638 endpoint->ep_st.tx_issued += 1; in ath6kl_htc_tx_pkts_get()
642 packet->info.tx.seqno = endpoint->seqno; in ath6kl_htc_tx_pkts_get()
643 endpoint->seqno++; in ath6kl_htc_tx_pkts_get()
680 struct htc_endpoint *endpoint, in ath6kl_htc_tx_setup_scat_list() argument
703 &len, endpoint); in ath6kl_htc_tx_setup_scat_list()
755 static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint, in ath6kl_htc_tx_bundle() argument
759 struct htc_target *target = endpoint->target; in ath6kl_htc_tx_bundle()
767 if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) && in ath6kl_htc_tx_bundle()
768 (WMI_CONTROL_SVC != endpoint->svc_id)) in ath6kl_htc_tx_bundle()
769 ac = target->dev->ar->ep2ac_map[endpoint->eid]; in ath6kl_htc_tx_bundle()
821 status = ath6kl_htc_tx_setup_scat_list(target, endpoint, in ath6kl_htc_tx_bundle()
840 trace_ath6kl_htc_tx(packet->status, packet->endpoint, in ath6kl_htc_tx_bundle()
859 struct htc_endpoint *endpoint) in ath6kl_htc_tx_from_queue() argument
870 endpoint->tx_proc_cnt++; in ath6kl_htc_tx_from_queue()
871 if (endpoint->tx_proc_cnt > 1) { in ath6kl_htc_tx_from_queue()
872 endpoint->tx_proc_cnt--; in ath6kl_htc_tx_from_queue()
884 if ((HTC_CTRL_RSVD_SVC != endpoint->svc_id) && in ath6kl_htc_tx_from_queue()
885 (WMI_CONTROL_SVC != endpoint->svc_id)) in ath6kl_htc_tx_from_queue()
886 ac = target->dev->ar->ep2ac_map[endpoint->eid]; in ath6kl_htc_tx_from_queue()
889 if (list_empty(&endpoint->txq)) in ath6kl_htc_tx_from_queue()
892 ath6kl_htc_tx_pkts_get(target, endpoint, &txq); in ath6kl_htc_tx_from_queue()
911 ath6kl_htc_tx_bundle(endpoint, &txq, in ath6kl_htc_tx_from_queue()
937 endpoint->ep_st.tx_bundles += bundle_sent; in ath6kl_htc_tx_from_queue()
938 endpoint->ep_st.tx_pkt_bundled += n_pkts_bundle; in ath6kl_htc_tx_from_queue()
961 endpoint->tx_proc_cnt = 0; in ath6kl_htc_tx_from_queue()
966 struct htc_endpoint *endpoint, in ath6kl_htc_tx_try() argument
973 ep_cb = endpoint->ep_cb; in ath6kl_htc_tx_try()
976 txq_depth = get_queue_depth(&endpoint->txq); in ath6kl_htc_tx_try()
979 if (txq_depth >= endpoint->max_txq_depth) in ath6kl_htc_tx_try()
985 endpoint->eid, txq_depth, in ath6kl_htc_tx_try()
986 endpoint->max_txq_depth); in ath6kl_htc_tx_try()
989 if (ep_cb.tx_full(endpoint->target, tx_pkt) == in ath6kl_htc_tx_try()
991 endpoint->ep_st.tx_dropped += 1; in ath6kl_htc_tx_try()
997 list_add_tail(&tx_pkt->list, &endpoint->txq); in ath6kl_htc_tx_try()
1000 ath6kl_htc_tx_from_queue(target, endpoint); in ath6kl_htc_tx_try()
1007 struct htc_endpoint *endpoint; in htc_chk_ep_txq() local
1017 endpoint = cred_dist->htc_ep; in htc_chk_ep_txq()
1020 if (!list_empty(&endpoint->txq)) { in htc_chk_ep_txq()
1023 cred_dist->endpoint, in htc_chk_ep_txq()
1024 endpoint->cred_dist.credits, in htc_chk_ep_txq()
1025 get_queue_depth(&endpoint->txq)); in htc_chk_ep_txq()
1034 ath6kl_htc_tx_from_queue(target, endpoint); in htc_chk_ep_txq()
1099 struct htc_endpoint *endpoint; in ath6kl_htc_set_credit_dist() local
1104 list_add_tail(&target->endpoint[ENDPOINT_0].cred_dist.list, in ath6kl_htc_set_credit_dist()
1109 endpoint = &target->endpoint[ep]; in ath6kl_htc_set_credit_dist()
1110 if (endpoint->svc_id == srvc_pri_order[i]) { in ath6kl_htc_set_credit_dist()
1111 list_add_tail(&endpoint->cred_dist.list, in ath6kl_htc_set_credit_dist()
1126 struct htc_endpoint *endpoint; in ath6kl_htc_mbox_tx() local
1131 packet->endpoint, packet->buf, packet->act_len); in ath6kl_htc_mbox_tx()
1133 if (packet->endpoint >= ENDPOINT_MAX) { in ath6kl_htc_mbox_tx()
1138 endpoint = &target->endpoint[packet->endpoint]; in ath6kl_htc_mbox_tx()
1140 if (!ath6kl_htc_tx_try(target, endpoint, packet)) { in ath6kl_htc_mbox_tx()
1145 htc_tx_complete(endpoint, &queue); in ath6kl_htc_mbox_tx()
1157 struct htc_endpoint *endpoint = &target->endpoint[eid]; in ath6kl_htc_mbox_flush_txep() local
1159 if (!endpoint->svc_id) { in ath6kl_htc_mbox_flush_txep()
1169 list_for_each_entry_safe(packet, tmp_pkt, &endpoint->txq, list) { in ath6kl_htc_mbox_flush_txep()
1183 packet->endpoint, packet->info.tx.tag); in ath6kl_htc_mbox_flush_txep()
1187 htc_tx_complete(endpoint, &container); in ath6kl_htc_mbox_flush_txep()
1193 struct htc_endpoint *endpoint; in ath6kl_htc_flush_txep_all() local
1199 endpoint = &target->endpoint[i]; in ath6kl_htc_flush_txep_all()
1200 if (endpoint->svc_id == 0) in ath6kl_htc_flush_txep_all()
1211 struct htc_endpoint *endpoint = &target->endpoint[eid]; in ath6kl_htc_mbox_activity_changed() local
1214 if (endpoint->svc_id == 0) { in ath6kl_htc_mbox_activity_changed()
1222 if (!(endpoint->cred_dist.dist_flags & HTC_EP_ACTIVE)) { in ath6kl_htc_mbox_activity_changed()
1223 endpoint->cred_dist.dist_flags |= HTC_EP_ACTIVE; in ath6kl_htc_mbox_activity_changed()
1227 if (endpoint->cred_dist.dist_flags & HTC_EP_ACTIVE) { in ath6kl_htc_mbox_activity_changed()
1228 endpoint->cred_dist.dist_flags &= ~HTC_EP_ACTIVE; in ath6kl_htc_mbox_activity_changed()
1234 endpoint->cred_dist.txq_depth = in ath6kl_htc_mbox_activity_changed()
1235 get_queue_depth(&endpoint->txq); in ath6kl_htc_mbox_activity_changed()
1254 static inline void ath6kl_htc_rx_update_stats(struct htc_endpoint *endpoint, in ath6kl_htc_rx_update_stats() argument
1257 endpoint->ep_st.rx_pkts++; in ath6kl_htc_rx_update_stats()
1259 endpoint->ep_st.rx_lkahds++; in ath6kl_htc_rx_update_stats()
1261 endpoint->ep_st.rx_bundle_lkahd++; in ath6kl_htc_rx_update_stats()
1339 struct htc_endpoint *endpoint, in ath6kl_htc_rx_set_indicate() argument
1344 if (htc_hdr->eid == packet->endpoint) { in ath6kl_htc_rx_set_indicate()
1345 if (!list_empty(&endpoint->rx_bufq)) in ath6kl_htc_rx_set_indicate()
1351 static void ath6kl_htc_rx_chk_water_mark(struct htc_endpoint *endpoint) in ath6kl_htc_rx_chk_water_mark() argument
1353 struct htc_ep_callbacks ep_cb = endpoint->ep_cb; in ath6kl_htc_rx_chk_water_mark()
1356 spin_lock_bh(&endpoint->target->rx_lock); in ath6kl_htc_rx_chk_water_mark()
1357 if (get_queue_depth(&endpoint->rx_bufq) in ath6kl_htc_rx_chk_water_mark()
1359 spin_unlock_bh(&endpoint->target->rx_lock); in ath6kl_htc_rx_chk_water_mark()
1360 ep_cb.rx_refill(endpoint->target, endpoint->eid); in ath6kl_htc_rx_chk_water_mark()
1363 spin_unlock_bh(&endpoint->target->rx_lock); in ath6kl_htc_rx_chk_water_mark()
1473 struct htc_endpoint *endpoint, in ath6kl_htc_rx_alloc() argument
1493 if (htc_hdr->eid != endpoint->eid) { in ath6kl_htc_rx_alloc()
1495 htc_hdr->eid, endpoint->eid, i); in ath6kl_htc_rx_alloc()
1508 if (endpoint->svc_id == 0) { in ath6kl_htc_rx_alloc()
1530 endpoint->ep_st.rx_bundle_from_hdr += 1; in ath6kl_htc_rx_alloc()
1539 status = ath6kl_htc_rx_setup(target, endpoint, &lk_ahds[i], in ath6kl_htc_rx_alloc()
1562 &target->endpoint[packet->endpoint]); in ath6kl_htc_rx_alloc()
1571 if (packets->endpoint != ENDPOINT_0) { in htc_ctrl_rx()
1591 htc_reclaim_rxbuf(context, packets, &context->endpoint[0]); in htc_ctrl_rx()
1599 struct htc_endpoint *endpoint; in htc_proc_cred_rpt() local
1612 endpoint = &target->endpoint[rpt->eid]; in htc_proc_cred_rpt()
1618 endpoint->ep_st.tx_cred_rpt += 1; in htc_proc_cred_rpt()
1619 endpoint->ep_st.cred_retnd += rpt->credits; in htc_proc_cred_rpt()
1626 endpoint->ep_st.cred_from_rx += rpt->credits; in htc_proc_cred_rpt()
1627 endpoint->ep_st.cred_rpt_from_rx += 1; in htc_proc_cred_rpt()
1630 endpoint->ep_st.cred_from_ep0 += rpt->credits; in htc_proc_cred_rpt()
1631 endpoint->ep_st.cred_rpt_ep0 += 1; in htc_proc_cred_rpt()
1633 endpoint->ep_st.cred_from_other += rpt->credits; in htc_proc_cred_rpt()
1634 endpoint->ep_st.cred_rpt_from_other += 1; in htc_proc_cred_rpt()
1639 endpoint->cred_dist.credits += rpt->credits; in htc_proc_cred_rpt()
1641 endpoint->cred_dist.cred_to_dist += rpt->credits; in htc_proc_cred_rpt()
1650 endpoint->cred_dist.txq_depth = in htc_proc_cred_rpt()
1651 get_queue_depth(&endpoint->txq); in htc_proc_cred_rpt()
1675 enum htc_endpoint_id endpoint, in htc_parse_trailer() argument
1692 len, endpoint); in htc_parse_trailer()
1754 int *n_lk_ahds, enum htc_endpoint_id endpoint) in htc_proc_trailer() argument
1788 next_lk_ahds, endpoint, n_lk_ahds); in htc_proc_trailer()
1847 if (packet->endpoint != htc_hdr->eid) { in ath6kl_htc_rx_process_hdr()
1849 htc_hdr->eid, packet->endpoint); in ath6kl_htc_rx_process_hdr()
1883 n_lkahds, packet->endpoint); in ath6kl_htc_rx_process_hdr()
1902 static void ath6kl_htc_rx_complete(struct htc_endpoint *endpoint, in ath6kl_htc_rx_complete() argument
1907 endpoint->eid, packet); in ath6kl_htc_rx_complete()
1909 endpoint->ep_cb.rx(endpoint->target, packet); in ath6kl_htc_rx_complete()
2015 ep = &target->endpoint[packet->endpoint]; in ath6kl_htc_rx_process_packets()
2017 trace_ath6kl_htc_rx(packet->status, packet->endpoint, in ath6kl_htc_rx_process_packets()
2131 &target->endpoint[packet->endpoint]); in ath6kl_htc_rx_fetch()
2137 &target->endpoint[packet->endpoint]); in ath6kl_htc_rx_fetch()
2147 struct htc_endpoint *endpoint; in ath6kl_htc_rxmsg_pending_handler() local
2170 endpoint = &target->endpoint[id]; in ath6kl_htc_rxmsg_pending_handler()
2187 num_look_ahead, endpoint, in ath6kl_htc_rxmsg_pending_handler()
2206 ath6kl_htc_rx_chk_water_mark(endpoint); in ath6kl_htc_rxmsg_pending_handler()
2234 &target->endpoint[packets->endpoint]); in ath6kl_htc_rxmsg_pending_handler()
2298 trace_ath6kl_htc_rx(packet->status, packet->endpoint, in htc_wait_for_ctrl_msg()
2324 struct htc_endpoint *endpoint; in ath6kl_htc_mbox_add_rxbuf_multiple() local
2334 if (first_pkt->endpoint >= ENDPOINT_MAX) in ath6kl_htc_mbox_add_rxbuf_multiple()
2341 first_pkt->endpoint, depth, first_pkt->buf_len); in ath6kl_htc_mbox_add_rxbuf_multiple()
2343 endpoint = &target->endpoint[first_pkt->endpoint]; in ath6kl_htc_mbox_add_rxbuf_multiple()
2352 ath6kl_htc_rx_complete(endpoint, packet); in ath6kl_htc_mbox_add_rxbuf_multiple()
2360 list_splice_tail_init(pkt_queue, &endpoint->rx_bufq); in ath6kl_htc_mbox_add_rxbuf_multiple()
2364 if (target->ep_waiting == first_pkt->endpoint) { in ath6kl_htc_mbox_add_rxbuf_multiple()
2385 struct htc_endpoint *endpoint; in ath6kl_htc_mbox_flush_rx_buf() local
2390 endpoint = &target->endpoint[i]; in ath6kl_htc_mbox_flush_rx_buf()
2391 if (!endpoint->svc_id) in ath6kl_htc_mbox_flush_rx_buf()
2397 &endpoint->rx_bufq, list) { in ath6kl_htc_mbox_flush_rx_buf()
2403 packet->endpoint); in ath6kl_htc_mbox_flush_rx_buf()
2413 if (packet->endpoint == ENDPOINT_0) { in ath6kl_htc_mbox_flush_rx_buf()
2433 struct htc_endpoint *endpoint; in ath6kl_htc_mbox_conn_service() local
2508 endpoint = &target->endpoint[assigned_ep]; in ath6kl_htc_mbox_conn_service()
2509 endpoint->eid = assigned_ep; in ath6kl_htc_mbox_conn_service()
2510 if (endpoint->svc_id) { in ath6kl_htc_mbox_conn_service()
2516 conn_resp->endpoint = assigned_ep; in ath6kl_htc_mbox_conn_service()
2522 endpoint->svc_id = conn_req->svc_id; in ath6kl_htc_mbox_conn_service()
2524 endpoint->max_txq_depth = conn_req->max_txq_depth; in ath6kl_htc_mbox_conn_service()
2525 endpoint->len_max = max_msg_sz; in ath6kl_htc_mbox_conn_service()
2526 endpoint->ep_cb = conn_req->ep_cb; in ath6kl_htc_mbox_conn_service()
2527 endpoint->cred_dist.svc_id = conn_req->svc_id; in ath6kl_htc_mbox_conn_service()
2528 endpoint->cred_dist.htc_ep = endpoint; in ath6kl_htc_mbox_conn_service()
2529 endpoint->cred_dist.endpoint = assigned_ep; in ath6kl_htc_mbox_conn_service()
2530 endpoint->cred_dist.cred_sz = target->tgt_cred_sz; in ath6kl_htc_mbox_conn_service()
2532 switch (endpoint->svc_id) { in ath6kl_htc_mbox_conn_service()
2534 endpoint->tx_drop_packet_threshold = MAX_DEF_COOKIE_NUM / 3; in ath6kl_htc_mbox_conn_service()
2537 endpoint->tx_drop_packet_threshold = MAX_HI_COOKIE_NUM; in ath6kl_htc_mbox_conn_service()
2551 endpoint->cred_dist.cred_per_msg = in ath6kl_htc_mbox_conn_service()
2554 endpoint->cred_dist.cred_per_msg = in ath6kl_htc_mbox_conn_service()
2557 if (!endpoint->cred_dist.cred_per_msg) in ath6kl_htc_mbox_conn_service()
2558 endpoint->cred_dist.cred_per_msg = 1; in ath6kl_htc_mbox_conn_service()
2561 endpoint->conn_flags = conn_req->flags; in ath6kl_htc_mbox_conn_service()
2577 struct htc_endpoint *endpoint; in reset_ep_state() local
2581 endpoint = &target->endpoint[i]; in reset_ep_state()
2582 memset(&endpoint->cred_dist, 0, sizeof(endpoint->cred_dist)); in reset_ep_state()
2583 endpoint->svc_id = 0; in reset_ep_state()
2584 endpoint->len_max = 0; in reset_ep_state()
2585 endpoint->max_txq_depth = 0; in reset_ep_state()
2586 memset(&endpoint->ep_st, 0, in reset_ep_state()
2587 sizeof(endpoint->ep_st)); in reset_ep_state()
2588 INIT_LIST_HEAD(&endpoint->rx_bufq); in reset_ep_state()
2589 INIT_LIST_HEAD(&endpoint->txq); in reset_ep_state()
2590 endpoint->target = target; in reset_ep_state()
2599 enum htc_endpoint_id endpoint) in ath6kl_htc_mbox_get_rxbuf_num() argument
2604 num = get_queue_depth(&(target->endpoint[endpoint].rx_bufq)); in ath6kl_htc_mbox_get_rxbuf_num()
2814 packet->endpoint = ENDPOINT_0; in ath6kl_htc_reset()