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

Commit c9482851 authored by Sreelakshmi Gownipalli's avatar Sreelakshmi Gownipalli Committed by Matt Wagantall
Browse files

diag: Forward commands to diag clients registered on apps



Diag fails to  forward the commands registered on apps to
the user space clients since the proc id in the command
registration table is compared with the wrong proc id for
apps. Added a change to check the correct proc id for apps
while forwarding the command from kernel to userspace.

Change-Id: I4baac98fb752061b7621a6f725ce586bacd58a30
Signed-off-by: default avatarSreelakshmi Gownipalli <sgownipa@codeaurora.org>
parent 19b2677c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@
#define LAST_PERIPHERAL		SENSORS_DATA
#define APPS_DATA		(LAST_PERIPHERAL + 1)
#define REMOTE_DATA		4
#define APPS_PROC		1

#define USER_SPACE_DATA		16384

+1 −1
Original line number Diff line number Diff line
@@ -658,7 +658,7 @@ struct diag_cmd_reg_entry_t *diag_cmd_search(
			    (proc == item->proc || proc == ALL_PROC)) {
				if (entry->cmd_code == MODE_CMD &&
				    entry->subsys_id == RESET_ID &&
				    item->proc != APPS_PROC) {
				    item->proc != APPS_DATA) {
					continue;
				}
				return &item->entry;
+1 −1
Original line number Diff line number Diff line
@@ -972,7 +972,7 @@ static int diag_send_data(struct diag_cmd_reg_t *entry, unsigned char *buf,
	if (!entry)
		return -EIO;

	if (entry->proc == APPS_PROC) {
	if (entry->proc == APPS_DATA) {
		diag_update_pkt_buffer(buf, len, PKT_TYPE);
		diag_update_sleeping_process(entry->pid, PKT_TYPE);
		return 0;
+0 −1
Original line number Diff line number Diff line
@@ -14,7 +14,6 @@
#define DIAGFWD_H

#define NO_PROCESS	0
#define NON_APPS_PROC	-1

#define RESET_AND_NO_QUEUE 0
#define RESET_AND_QUEUE 1