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

Commit 66a1a978 authored by Manoj Prabhu B's avatar Manoj Prabhu B
Browse files

diag: Allow DCI packets to be copied separately



Presently DCI packets are copied to userspace together with
few other packet types like mask update, hdlc updates failing
dci packet processing in diag library. Allow DCI packets
to be copied to userspace separately by changing the exit
condition for copying other packet types.

Change-Id: I19dc4a0bcc63ba1829a4da670ca7a1cfd33503ed
Signed-off-by: default avatarManoj Prabhu B <quic_bmanoj@quicinc.com>
parent e904060a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3986,7 +3986,6 @@ static ssize_t diagchar_read(struct file *file, char __user *buf, size_t count,
		goto exit;
	}

exit:
	if (driver->data_ready[index] & DCI_DATA_TYPE) {
		data_type = driver->data_ready[index] & DCI_DATA_TYPE;
		mutex_unlock(&driver->diagchar_mutex);
@@ -4056,7 +4055,9 @@ static ssize_t diagchar_read(struct file *file, char __user *buf, size_t count,
		mutex_unlock(&driver->dci_mutex);
		goto end;
	}
exit:
	mutex_unlock(&driver->diagchar_mutex);
	goto ret_end;
end:
	/*
	 * Flush any read that is currently pending on DCI data and
@@ -4067,6 +4068,7 @@ static ssize_t diagchar_read(struct file *file, char __user *buf, size_t count,
		diag_ws_on_copy_complete(DIAG_WS_DCI);
		flush_workqueue(driver->diag_dci_wq);
	}
ret_end:
	return ret;
}