diff mbox series

[v2,2/3] qmi: Fix printing the wrong type for services

Message ID 20240318183754.71578-2-steve.schrock@getcruise.com (mailing list archive)
State Accepted
Commit 85c935720dbd1f33bb98ec32713f9eda40ec5bfc
Headers show
Series [v2,1/3] qmi: Discover timeout could cause a crash | expand

Commit Message

Steve Schrock March 18, 2024, 6:37 p.m. UTC
The __debug_msg refactoring introduced a bug where the service
transactions would not display the correct type in the log. The service
transaction type is shifted to the left by one bit compared to the
control transaction type so we need to perform a shift to be able to
share a common debug logging function.

Fixes: afa96ae4fa99 ("qmi: Clean up the __debug_msg function")
---
 drivers/qmimodem/qmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/qmimodem/qmi.c b/drivers/qmimodem/qmi.c
index 6eda68d7a571..555a4afe562e 100644
--- a/drivers/qmimodem/qmi.c
+++ b/drivers/qmimodem/qmi.c
@@ -648,7 +648,7 @@  static void __qmux_debug_msg(const char dir, const void *buf, size_t len,
 		srv = buf + QMI_MUX_HDR_SIZE;
 		msg = buf + QMI_MUX_HDR_SIZE + QMI_SERVICE_HDR_SIZE;
 
-		transaction_type = srv->type;
+		transaction_type = srv->type >> 1;
 		tid = L_LE16_TO_CPU(srv->transaction);
 	}
 
@@ -672,7 +672,7 @@  static void __qrtr_debug_msg(const char dir, const void *buf, size_t len,
 
 	tid = L_LE16_TO_CPU(srv->transaction);
 
-	__debug_msg(dir, msg, service_type, srv->type, tid, 0, len,
+	__debug_msg(dir, msg, service_type, srv->type >> 1, tid, 0, len,
 						function, user_data);
 }