Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08cfd914 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: f_gsi: Send zero length packet for MBIM/GPS on cable connect"

parents e22ea883 4222a9f7
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
/*
 * Copyright (c) 2015-2018, Linux Foundation. All rights reserved.
 * Copyright (c) 2015-2019, Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1436,6 +1436,7 @@ static long gsi_ctrl_dev_ioctl(struct file *fp, unsigned int cmd,
		atomic_set(&c_port->ctrl_online, 1);
		break;
	case QTI_CTRL_GET_LINE_STATE:
	case GSI_MBIM_GPS_USB_STATUS:
		val = atomic_read(&gsi->connected);
		if (gsi->prot_id == USB_PROT_RMNET_IPA ||
				gsi->prot_id == USB_PROT_RMNET_ETHER)
@@ -2485,7 +2486,9 @@ static int gsi_set_alt(struct usb_function *f, unsigned int intf,

	/* send 0 len pkt to qti to notify state change */
	if (gsi->prot_id == USB_PROT_DIAG_IPA ||
				gsi->prot_id == USB_PROT_DPL_ETHER)
				gsi->prot_id == USB_PROT_DPL_ETHER ||
				gsi->prot_id == USB_PROT_GPS_CTRL ||
				gsi->prot_id == USB_PROT_MBIM_IPA)
		gsi_ctrl_send_cpkt_tomodem(gsi, NULL, 0);

	return 0;
@@ -2521,7 +2524,7 @@ static void gsi_disable(struct usb_function *f)
	}

	gsi_ctrl_clear_cpkt_queues(gsi, false);
	/* send 0 len pkt to qti/qbi to notify state change */
	/* send 0 len pkt to qti/qbi/gps to notify state change */
	gsi_ctrl_send_cpkt_tomodem(gsi, NULL, 0);
	gsi->c_port.notify_req_queued = false;
	/* Disable Data Path  - only if it was initialized already (alt=1) */