Lines Matching defs:htc
10888 wmi_ep_count = sc->htc.wmi_ep_count;
10892 for (i = 0; i < sc->htc.wmi_ep_count; i++) {
13582 struct qwx_htc *htc = &sc->htc;
13593 struct qwx_htc_ep *ep = &htc->endpoint[i];
13620 status = qwx_htc_connect_service(&sc->htc, &conn_req, &conn_resp);
13641 wmi_ep_count = sc->htc.wmi_ep_count;
13652 qwx_htc_reset_endpoint_states(struct qwx_htc *htc)
13658 ep = &htc->endpoint[i];
13663 ep->htc = htc;
13685 qwx_htc_get_credit_allocation(struct qwx_htc *htc, uint16_t service_id)
13690 if (htc->service_alloc_table[i].service_id == service_id) {
13692 htc->service_alloc_table[i].credit_allocation;
13788 spin_lock_bh(&ep->htc->tx_lock);
13792 spin_unlock_bh(&ep->htc->tx_lock);
13797 qwx_htc_send(struct qwx_htc *htc, enum ath11k_htc_ep_id eid, struct mbuf *m)
13799 struct qwx_htc_ep *ep = &htc->endpoint[eid];
13800 struct qwx_softc *sc = htc->sc;
13815 credits = howmany(m->m_pkthdr.len, htc->target_credit_size);
13817 spin_lock_bh(&htc->tx_lock);
13825 spin_unlock_bh(&htc->tx_lock);
13833 spin_unlock_bh(&htc->tx_lock);
13868 ret = qwx_ce_send(htc->sc, m, ep->ul_pipe_id, ep->eid);
13879 spin_lock_bh(&htc->tx_lock);
13885 spin_unlock_bh(&htc->tx_lock);
13889 ep->ep_ops.ep_tx_credits(htc->sc);
13895 qwx_htc_connect_service(struct qwx_htc *htc,
13899 struct qwx_softc *sc = htc->sc;
13922 tx_alloc = qwx_htc_get_credit_allocation(htc, conn_req->service_id);
13925 "%s: htc service %s does not allocate target credits\n",
13966 status = qwx_htc_send(htc, ATH11K_HTC_EP_0, m);
13984 resp_msg = (struct ath11k_htc_conn_svc_resp *)htc->control_resp_buffer;
13989 (htc->control_resp_len < sizeof(*resp_msg))) {
14024 ep = &htc->endpoint[assigned_eid];
14045 status = sc->ops.map_service_to_pipe(htc->sc, ep->service_id,
14051 "%s: htc service '%s' ul pipe %d dl pipe %d eid %d ready\n",
14058 "%s: htc service '%s' eid %d tx flow control disabled\n",
14067 qwx_htc_start(struct qwx_htc *htc)
14071 struct qwx_softc *sc = htc->sc;
14092 status = qwx_htc_send(htc, ATH11K_HTC_EP_0, m);
14104 struct qwx_htc *htc = &sc->htc;
14109 spin_lock_init(&htc->tx_lock);
14111 qwx_htc_reset_endpoint_states(htc);
14113 htc->sc = sc;
14117 htc->wmi_ep_count = 1;
14121 htc->wmi_ep_count = 2;
14124 htc->wmi_ep_count = 3;
14127 htc->wmi_ep_count = sc->hw_params.max_radios;
14140 ret = qwx_htc_connect_service(htc, &conn_req, &conn_resp);
14142 printf("%s: could not connect to htc service (%d)\n",
14151 qwx_htc_setup_target_buffer_assignments(struct qwx_htc *htc)
14161 credits = htc->total_transmit_credits;
14162 serv_entry = htc->service_alloc_table;
14164 if ((htc->wmi_ep_count == 0) ||
14165 (htc->wmi_ep_count > nitems(svc_id)))
14169 credits = credits / htc->wmi_ep_count;
14170 for (i = 0; i < htc->wmi_ep_count; i++) {
14181 struct qwx_htc *htc = &sc->htc;
14212 if (htc->control_resp_len < sizeof(*ready)) {
14214 htc->control_resp_len);
14218 ready = (struct ath11k_htc_ready *)htc->control_resp_buffer;
14230 htc->total_transmit_credits = credit_count;
14231 htc->target_credit_size = credit_size;
14235 htc->total_transmit_credits, htc->target_credit_size);
14237 if ((htc->total_transmit_credits == 0) ||
14238 (htc->target_credit_size == 0)) {
14247 htc->total_transmit_credits = 1;
14249 qwx_htc_setup_target_buffer_assignments(htc);
14457 status = qwx_htc_connect_service(&dp->sc->htc, &conn_req, &conn_resp);
15056 ret = qwx_htc_send(&sc->htc, sc->dp.eid, m);
15095 ret = qwx_htc_send(&sc->htc, dp->eid, m);
15160 ret = qwx_htc_send(&sc->htc, sc->dp.eid, m);
15327 ret = qwx_htc_send(&sc->htc, dp->eid, m);
17652 return qwx_htc_send(&sc->htc, wmi->eid, m);
17665 struct qwx_htc *htc = &sc->htc;
17666 struct qwx_htc_ep *ep = &htc->endpoint[wmi->eid];
19568 printf("%s: failed to init htc: %d\n",
19603 ret = qwx_htc_start(&sc->htc);
20981 qwx_htc_process_credit_report(struct qwx_htc *htc,
20985 struct qwx_softc *sc = htc->sc;
20994 spin_lock_bh(&htc->tx_lock);
21000 ep = &htc->endpoint[report->eid];
21008 spin_unlock_bh(&htc->tx_lock);
21012 spin_lock_bh(&htc->tx_lock);
21017 spin_unlock_bh(&htc->tx_lock);
21022 qwx_htc_process_trailer(struct qwx_htc *htc, uint8_t *buffer, int length,
21025 struct qwx_softc *sc = htc->sc;
21056 qwx_htc_process_credit_report(htc,
21094 struct qwx_htc *htc = &sc->htc;
21120 ep = &htc->endpoint[eid];
21163 status = qwx_htc_process_trailer(htc, trailer,
21200 htc->control_resp_len =
21203 m_copydata(m, 0, htc->control_resp_len,
21204 htc->control_resp_buffer);
21219 printf("%s: ignoring unsolicited htc ep0 event %ld\n",