Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Daniel Mack and committed by
Kalle Valo
ffbc9197 a50c6c84

+10 -4
+10 -4
drivers/net/wireless/ath/wcn36xx/smd.c
··· 252 252 { 253 253 int ret = 0; 254 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 259 wcn36xx_dbg_dump(WCN36XX_DBG_SMD_DUMP, "HAL >>> ", wcn->hal_buf, len); 256 260 257 261 init_completion(&wcn->hal_rsp_compl); 258 262 start = jiffies; 259 263 ret = rpmsg_send(wcn->smd_channel, wcn->hal_buf, len); 260 264 if (ret) { 261 - wcn36xx_err("HAL TX failed\n"); 265 + wcn36xx_err("HAL TX failed for req %d\n", req_type); 262 266 goto out; 263 267 } 264 268 if (wait_for_completion_timeout(&wcn->hal_rsp_compl, 265 269 msecs_to_jiffies(HAL_MSG_TIMEOUT)) <= 0) { 266 - wcn36xx_err("Timeout! No SMD response in %dms\n", 267 - HAL_MSG_TIMEOUT); 270 + wcn36xx_err("Timeout! No SMD response to req %d in %dms\n", 271 + req_type, HAL_MSG_TIMEOUT); 268 272 ret = -ETIME; 269 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 278 jiffies_to_msecs(jiffies - start)); 273 279 out: 274 280 return ret;