aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2018-05-23 04:15:03 -0400
committerKalle Valo <kvalo@codeaurora.org>2018-05-25 06:08:19 -0400
commitffbc9197b4721634dc6c0fefa9b31e565fa89cee (patch)
tree7a68bba4a0b5dabd894fef8c070e86b9fd6d4a93 /drivers/net/wireless/ath
parenta50c6c8412f7114cbb0514dbea7a5a9a3d317479 (diff)
wcn36xx: improve debug and error messages for SMD
Add a missing newline in wcn36xx_smd_send_and_wait() and also log the command request and response type that was processed. Signed-off-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/wcn36xx/smd.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 43c8aa79fad4..b855a58d5aac 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -252,23 +252,29 @@ static int wcn36xx_smd_send_and_wait(struct wcn36xx *wcn, size_t len)
252{ 252{
253 int ret = 0; 253 int ret = 0;
254 unsigned long start; 254 unsigned long start;
255 struct wcn36xx_hal_msg_header *hdr =
256 (struct wcn36xx_hal_msg_header *)wcn->hal_buf;
257 u16 req_type = hdr->msg_type;
258
255 wcn36xx_dbg_dump(WCN36XX_DBG_SMD_DUMP, "HAL >>> ", wcn->hal_buf, len); 259 wcn36xx_dbg_dump(WCN36XX_DBG_SMD_DUMP, "HAL >>> ", wcn->hal_buf, len);
256 260
257 init_completion(&wcn->hal_rsp_compl); 261 init_completion(&wcn->hal_rsp_compl);
258 start = jiffies; 262 start = jiffies;
259 ret = rpmsg_send(wcn->smd_channel, wcn->hal_buf, len); 263 ret = rpmsg_send(wcn->smd_channel, wcn->hal_buf, len);
260 if (ret) { 264 if (ret) {
261 wcn36xx_err("HAL TX failed\n"); 265 wcn36xx_err("HAL TX failed for req %d\n", req_type);
262 goto out; 266 goto out;
263 } 267 }
264 if (wait_for_completion_timeout(&wcn->hal_rsp_compl, 268 if (wait_for_completion_timeout(&wcn->hal_rsp_compl,
265 msecs_to_jiffies(HAL_MSG_TIMEOUT)) <= 0) { 269 msecs_to_jiffies(HAL_MSG_TIMEOUT)) <= 0) {
266 wcn36xx_err("Timeout! No SMD response in %dms\n", 270 wcn36xx_err("Timeout! No SMD response to req %d in %dms\n",
267 HAL_MSG_TIMEOUT); 271 req_type, HAL_MSG_TIMEOUT);
268 ret = -ETIME; 272 ret = -ETIME;
269 goto out; 273 goto out;
270 } 274 }
271 wcn36xx_dbg(WCN36XX_DBG_SMD, "SMD command completed in %dms", 275 wcn36xx_dbg(WCN36XX_DBG_SMD,
276 "SMD command (req %d, rsp %d) completed in %dms\n",
277 req_type, hdr->msg_type,
272 jiffies_to_msecs(jiffies - start)); 278 jiffies_to_msecs(jiffies - start));
273out: 279out:
274 return ret; 280 return ret;