.. | .. |
---|
| 1 | +// SPDX-License-Identifier: ISC |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2005-2011 Atheros Communications Inc. |
---|
3 | 4 | * Copyright (c) 2011-2017 Qualcomm Atheros, Inc. |
---|
4 | | - * |
---|
5 | | - * Permission to use, copy, modify, and/or distribute this software for any |
---|
6 | | - * purpose with or without fee is hereby granted, provided that the above |
---|
7 | | - * copyright notice and this permission notice appear in all copies. |
---|
8 | | - * |
---|
9 | | - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
---|
10 | | - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
---|
11 | | - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
---|
12 | | - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
---|
13 | | - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
---|
14 | | - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
---|
15 | | - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
---|
16 | 5 | */ |
---|
17 | 6 | |
---|
18 | 7 | #include <linux/slab.h> |
---|
.. | .. |
---|
21 | 10 | #include "htt.h" |
---|
22 | 11 | #include "core.h" |
---|
23 | 12 | #include "debug.h" |
---|
| 13 | +#include "hif.h" |
---|
24 | 14 | |
---|
25 | 15 | static const enum htt_t2h_msg_type htt_main_t2h_msg_types[] = { |
---|
26 | 16 | [HTT_MAIN_T2H_MSG_TYPE_VERSION_CONF] = HTT_T2H_MSG_TYPE_VERSION_CONF, |
---|
.. | .. |
---|
145 | 135 | { |
---|
146 | 136 | struct ath10k_htc_svc_conn_req conn_req; |
---|
147 | 137 | struct ath10k_htc_svc_conn_resp conn_resp; |
---|
| 138 | + struct ath10k *ar = htt->ar; |
---|
| 139 | + struct ath10k_htc_ep *ep; |
---|
148 | 140 | int status; |
---|
149 | 141 | |
---|
150 | 142 | memset(&conn_req, 0, sizeof(conn_req)); |
---|
.. | .. |
---|
152 | 144 | |
---|
153 | 145 | conn_req.ep_ops.ep_tx_complete = ath10k_htt_htc_tx_complete; |
---|
154 | 146 | conn_req.ep_ops.ep_rx_complete = ath10k_htt_htc_t2h_msg_handler; |
---|
| 147 | + conn_req.ep_ops.ep_tx_credits = ath10k_htt_op_ep_tx_credits; |
---|
155 | 148 | |
---|
156 | 149 | /* connect to control service */ |
---|
157 | 150 | conn_req.service_id = ATH10K_HTC_SVC_ID_HTT_DATA_MSG; |
---|
.. | .. |
---|
164 | 157 | |
---|
165 | 158 | htt->eid = conn_resp.eid; |
---|
166 | 159 | |
---|
| 160 | + if (ar->bus_param.dev_type == ATH10K_DEV_TYPE_HL) { |
---|
| 161 | + ep = &ar->htc.endpoint[htt->eid]; |
---|
| 162 | + ath10k_htc_setup_tx_req(ep); |
---|
| 163 | + } |
---|
| 164 | + |
---|
| 165 | + htt->disable_tx_comp = ath10k_hif_get_htt_tx_complete(htt->ar); |
---|
| 166 | + if (htt->disable_tx_comp) |
---|
| 167 | + ath10k_htc_change_tx_credit_flow(&htt->ar->htc, htt->eid, true); |
---|
| 168 | + |
---|
167 | 169 | return 0; |
---|
168 | 170 | } |
---|
169 | 171 | |
---|