diff mbox series

[v3,08/33] gobi: Remove qrtr support

Message ID 20240620145139.1135899-8-denkenz@gmail.com (mailing list archive)
State Accepted
Commit 69335b285ac87f280ad8802a107e088b4de8ac70
Headers show
Series [v3,01/33] qmi: Remove qmi_free() | expand

Commit Message

Denis Kenzior June 20, 2024, 2:50 p.m. UTC
QRTR based devices will now be managed by the qrtrqmi driver.
---
 plugins/gobi.c | 38 ++++----------------------------------
 1 file changed, 4 insertions(+), 34 deletions(-)
diff mbox series

Patch

diff --git a/plugins/gobi.c b/plugins/gobi.c
index d8fd90153054..d1da5fbc366b 100644
--- a/plugins/gobi.c
+++ b/plugins/gobi.c
@@ -55,11 +55,6 @@ 
 #define GOBI_VOICE	(1 << 6)
 #define GOBI_WDA	(1 << 7)
 
-enum qmi_protocol {
-	QMI_PROTOCOL_QMUX,
-	QMI_PROTOCOL_QRTR,
-};
-
 struct service_request {
 	struct qmi_service **member;
 	uint32_t service_type;
@@ -87,7 +82,6 @@  struct gobi_data {
 	char main_net_name[IFNAMSIZ];
 	uint32_t max_aggregation_size;
 	uint32_t set_powered_id;
-	enum qmi_protocol protocol;
 };
 
 static void gobi_debug(const char *str, void *user_data)
@@ -101,10 +95,6 @@  static void gobi_debug(const char *str, void *user_data)
  * Probe the modem.  The following modem properties are expected to be set
  * in order to initialize the driver properly:
  *
- * DeviceProtocol
- *   Can be "qrtr" or "qmux", tells the driver which QMI encapsulation protocol
- *   is being used.
- *
  * NetworkInterface
  *   The string that contains the 'main' network device.  This can be
  *   "rmnet_ipa" on SoC systems, or "wwan0" for upstream linux systems.
@@ -122,8 +112,6 @@  static void gobi_debug(const char *str, void *user_data)
 static int gobi_probe(struct ofono_modem *modem)
 {
 	struct gobi_data *data;
-	const char *value;
-	enum qmi_protocol protocol;
 	const char *if_driver;
 	const char *ifname;
 	int ifindex;
@@ -131,15 +119,6 @@  static int gobi_probe(struct ofono_modem *modem)
 
 	DBG("%p", modem);
 
-	value = ofono_modem_get_string(modem, "DeviceProtocol");
-
-	if (l_streq0(value, "qrtr"))
-		protocol = QMI_PROTOCOL_QRTR;
-	else if (l_streq0(value, "qmux"))
-		protocol = QMI_PROTOCOL_QMUX;
-	else
-		return -EPROTO;
-
 	if_driver = ofono_modem_get_string(modem,
 						"NetworkInterfaceKernelDriver");
 	ifname = ofono_modem_get_string(modem, "NetworkInterface");
@@ -152,7 +131,6 @@  static int gobi_probe(struct ofono_modem *modem)
 		return -EPROTO;
 
 	data = l_new(struct gobi_data, 1);
-	data->protocol = protocol;
 
 	if (!strcmp(if_driver, "qmi_wwan_q"))
 		data->using_qmi_wwan_q = true;
@@ -519,19 +497,11 @@  static int gobi_enable(struct ofono_modem *modem)
 
 	DBG("%p", modem);
 
-	switch (data->protocol) {
-	case QMI_PROTOCOL_QRTR:
-		data->device = qmi_device_new_qrtr();
-		break;
-	case QMI_PROTOCOL_QMUX:
-		device = ofono_modem_get_string(modem, "Device");
-		if (!device)
-			return -EINVAL;
-
-		data->device = qmi_device_new_qmux(device);
-		break;
-	}
+	device = ofono_modem_get_string(modem, "Device");
+	if (!device)
+		return -EINVAL;
 
+	data->device = qmi_device_new_qmux(device);
 	if (!data->device)
 		return -EIO;