aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Schrock <steve.schrock@getcruise.com>2024-03-18 13:37:47 -0500
committerDenis Kenzior <denkenz@gmail.com>2024-03-18 16:17:02 -0500
commit85c935720dbd1f33bb98ec32713f9eda40ec5bfc (patch)
tree315f703e10298b44ec6b154ef0f2fe3e2172993a
parentdf0a313e1c523c7bac9184ccd48074663705a506 (diff)
downloadofono-85c935720dbd1f33bb98ec32713f9eda40ec5bfc.tar.gz
qmi: Fix printing the wrong type for services
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")
-rw-r--r--drivers/qmimodem/qmi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/qmimodem/qmi.c b/drivers/qmimodem/qmi.c
index 9a6588818..9a7fc4a33 100644
--- a/drivers/qmimodem/qmi.c
+++ b/drivers/qmimodem/qmi.c
@@ -647,7 +647,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);
}
@@ -671,7 +671,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);
}