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

Commit e965eef4 authored by Hardik Arya's avatar Hardik Arya Committed by Gerrit - the friendly Code Review server
Browse files

diag: Update diag get log request structure



Currently diag get log mask is using structure with
num_items which is not being used. The patch updates
structure for diag get log mask request.

Change-Id: I1d4d110ca1793e1c8bedcab33e2626f02af37926
Signed-off-by: default avatarHardik Arya <harya@codeaurora.org>
parent 90559830
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1206,7 +1206,7 @@ static int diag_cmd_get_log_mask(unsigned char *src_buf, int src_len,
	int rsp_header_len = sizeof(struct diag_log_config_rsp_t);
	uint32_t mask_size = 0;
	struct diag_log_mask_t *log_item = NULL;
	struct diag_log_config_req_t *req;
	struct diag_log_config_get_req_t *req;
	struct diag_log_config_rsp_t rsp;
	struct diag_mask_info *mask_info = NULL;
	struct diag_md_session_t *info = NULL;
@@ -1216,7 +1216,7 @@ static int diag_cmd_get_log_mask(unsigned char *src_buf, int src_len,

	mask_info = (!info) ? &log_mask : info->log_mask;
	if (!src_buf || !dest_buf || dest_len <= 0 || !mask_info ||
		src_len < sizeof(struct diag_log_config_req_t)) {
		src_len < sizeof(struct diag_log_config_get_req_t)) {
		pr_err("diag: Invalid input in %s, src_buf: %pK, src_len: %d, dest_buf: %pK, dest_len: %d, mask_info: %pK\n",
		       __func__, src_buf, src_len, dest_buf, dest_len,
		       mask_info);
@@ -1235,7 +1235,7 @@ static int diag_cmd_get_log_mask(unsigned char *src_buf, int src_len,
		return 0;
	}

	req = (struct diag_log_config_req_t *)src_buf;
	req = (struct diag_log_config_get_req_t *)src_buf;
	read_len += req_header_len;

	rsp.cmd_code = DIAG_CMD_LOG_CONFIG;
+8 −1
Original line number Diff line number Diff line
/* Copyright (c) 2013-2015, 2017-2018 The Linux Foundation. All rights reserved.
/* Copyright (c) 2013-2015, 2017-2019 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
@@ -40,6 +40,13 @@ struct diag_msg_mask_t {
	uint32_t *ptr;
};

struct diag_log_config_get_req_t {
	uint8_t cmd_code;
	uint8_t padding[3];
	uint32_t sub_cmd;
	uint32_t equip_id;
} __packed;

struct diag_log_config_req_t {
	uint8_t cmd_code;
	uint8_t padding[3];