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

Commit 0db05aa7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "diag: Add auto query support for diag over stm"

parents e1ba2552 6682f30d
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
/* Copyright (c) 2008-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2008-2018, The 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
@@ -554,14 +554,15 @@ int diag_process_stm_cmd(unsigned char *buf, unsigned char *dest_buf)
	 * Check if command is valid. If the command is asking for
	 * status, then the processor mask field is to be ignored.
	 */
	if ((version != 2) || (cmd > STATUS_STM) ||
		((cmd != STATUS_STM) && ((mask == 0) || (0 != (mask >> 4))))) {
	if ((version != 2) || (cmd > STM_AUTO_QUERY) ||
		((cmd != STATUS_STM && cmd != STM_AUTO_QUERY) &&
		((mask == 0) || (0 != (mask >> 4))))) {
		/* Command is invalid. Send bad param message response */
		dest_buf[0] = BAD_PARAM_RESPONSE_MESSAGE;
		for (i = 0; i < STM_CMD_NUM_BYTES; i++)
			dest_buf[i+1] = *(buf + i);
		return STM_CMD_NUM_BYTES+1;
	} else if (cmd != STATUS_STM) {
	} else if (cmd != STATUS_STM && cmd != STM_AUTO_QUERY) {
		if (mask & DIAG_STM_MODEM)
			diag_process_stm_mask(cmd, DIAG_STM_MODEM,
					      PERIPHERAL_MODEM);
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2018, The 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
@@ -76,7 +76,7 @@
#define DISABLE_STM	0
#define ENABLE_STM	1
#define STATUS_STM	2

#define STM_AUTO_QUERY  3
#define UPDATE_PERIPHERAL_STM_STATE	1
#define CLEAR_PERIPHERAL_STM_STATE	2