Patch fixes utility returning "Unknown error" when generating a request after a wait of a few minutes
From: Tautvydas Belgeras <[email protected]>
Fix utility returning status "Unknown error" when triggering qmi radio after a wait of a few minutes After generating a qmi request, the utility expects a response type message. In some cases the qmi radio sends a response and an indication type message. This fix adds a check for incoming message type and drops it if it's not a response type, because that's what latter parts of the code expect. Signed-off-by: Tautvydas Belgeras <[email protected]> --- diff --git a/dev.c b/dev.c index c25900b..b0c8262 100644 --- a/dev.c +++ b/dev.c @@ -101,6 +101,14 @@ static void qmi_process_msg(struct qmi_dev *qmi, struct qmi_msg *msg) uint16_t tid; if (msg->qmux.service == QMI_SERVICE_CTL) + { + if (msg->flags != QMI_CTL_FLAG_RESPONSE) + return; + } + else if (msg->flags != QMI_SERVICE_FLAG_RESPONSE) + return; + + if (msg->qmux.service == QMI_SERVICE_CTL) tid = msg->ctl.transaction; else tid = le16_to_cpu(msg->svc.transaction);
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
