From: Sujith Manoharan Date: Sun, 28 Apr 2013 21:01:29 +0530 Subject: [ath9k-devel] [PATCH 11/20] ath10k: Disable credit flow control for EP0 In-Reply-To: <1367163098-22787-1-git-send-email-sujith@msujith.org> References: <1367163098-22787-1-git-send-email-sujith@msujith.org> Message-ID: <1367163098-22787-11-git-send-email-sujith@msujith.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org From: Sujith Manoharan As the comment says, EP0 doesn't require flow control, so disable it explicitly. Signed-off-by: Sujith Manoharan --- drivers/net/wireless/ath/ath10k/htc.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index 71c13f3..3641973 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c @@ -232,22 +232,13 @@ static struct sk_buff *ath10k_htc_get_skb_credit_based(struct ath10k_htc *htc, ath10k_dbg(ATH10K_DBG_HTC, "%s: creds required %d got %d\n", __func__, credits_required, ep->tx_credits); - /* - * EP 0 is special, it always has a credit and does not require - * credit based flow control. - */ - if (ep->eid == ATH10K_HTC_EP_0) { - credits_required = 0; - } else { - if (ep->tx_credits < credits_required) { - __skb_queue_head(&ep->tx_queue, skb); - ath10k_htc_recalc_queue(ep, 1); - return NULL; - } - - ep->tx_credits -= credits_required; + if (ep->tx_credits < credits_required) { + __skb_queue_head(&ep->tx_queue, skb); + ath10k_htc_recalc_queue(ep, 1); + return NULL; } + ep->tx_credits -= credits_required; *credits = credits_required; return skb; } @@ -767,6 +758,7 @@ int ath10k_htc_connect_service(struct ath10k_htc *htc, /* special case for HTC pseudo control service */ if (conn_req->service_id == ATH10K_HTC_SVC_ID_RSVD_CTRL) { + disable_credit_flow_ctrl = true; assigned_eid = ATH10K_HTC_EP_0; max_msg_size = ATH10K_HTC_MAX_CTRL_MSG_LEN; memset(&resp_msg_dummy, 0, sizeof(resp_msg_dummy)); -- 1.8.2.2