[PATCH 10/10] gobi: Pass QMI qmux device options to 'qmi_qmux_device_new'.
Grant Erickson <[email protected]> Tue, 11 Feb 2025 21:52:59 -0800
| Newsgroups | dev.linux.lists.ofono |
|---|---|
| Message-ID | <c3452d04ed6dca8d652ff5cbf0eadd53bf0a3ea6.1739339173.git.gerickson@nuovations.com> |
If the QMI minimum service request period property is set on the modem
object, then set the appropriate QMI QMUX device option quirk and
value.
---
plugins/gobi.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/plugins/gobi.c b/plugins/gobi.c
index 027aa91d6ade..9ec15deb6fa9 100644
--- a/plugins/gobi.c
+++ b/plugins/gobi.c
@@ -845,6 +845,8 @@ error:
static int gobi_enable(struct ofono_modem *modem)
{
struct gobi_data *data = ofono_modem_get_data(modem);
+ struct qmi_qmux_device_options options = { QMI_QMUX_DEVICE_QUIRK_NONE, 0 };
+ int min_req_period_us;
const char *device;
DBG("%p", modem);
@@ -853,7 +855,17 @@ static int gobi_enable(struct ofono_modem *modem)
if (!device)
return -EINVAL;
- data->device = qmi_qmux_device_new(device);
+ /*
+ * If the QMI minimum service request period property is set, then
+ * set the appropriate QMI QMUX device quirk and value.
+ */
+ min_req_period_us = ofono_modem_get_integer(modem, QMI_PROP_MIN_REQ_PERIOD_US);
+ if (min_req_period_us > 0) {
+ options.quirks |= QMI_QMUX_DEVICE_QUIRK_REQ_RATE_LIMIT;
+ options.min_req_period_us = min_req_period_us;
+ }
+
+ data->device = qmi_qmux_device_new(device, &options);
if (!data->device)
return -EIO;
--
2.45.0