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

Commit 0e535531 authored by Manoj Prabhu B's avatar Manoj Prabhu B
Browse files

diag: Proper feature mask update to Glink supported peripherals



The patch re-enables updating APPS feature mask to GLINK
supported peripheral after peripheral's feature mask has been
processed and the proper transport has been updated. The patch
also corrects code indentation in buffers initialization.

CRs-Fixed: 2092758
Change-Id: Iaff5346dae833d6dbb576ca3a4a9dbdcf789a3c4
Signed-off-by: default avatarManoj Prabhu B <bmanoj@codeaurora.org>
parent 14416b24
Loading
Loading
Loading
Loading
+6 −18
Original line number Diff line number Diff line
@@ -1004,15 +1004,6 @@ void diagfwd_close_transport(uint8_t transport, uint8_t peripheral)
		dest_info->buf_ptr[i] = fwd_info->buf_ptr[i];
	if (!check_channel_state(dest_info->ctxt))
		diagfwd_late_open(dest_info);

	/*
	 *	Open control channel to update masks after buffers are
	 *	initialized for peripherals that have transport other than
	 *	GLINK. GLINK supported peripheral mask update will
	 *	happen after glink buffers are initialized.
	 */

	if (dest_info->transport != TRANSPORT_GLINK)
	diagfwd_cntl_open(dest_info);
	init_fn(peripheral);
	mutex_unlock(&driver->diagfwd_channel_mutex[peripheral]);
@@ -1209,14 +1200,10 @@ int diagfwd_channel_open(struct diagfwd_info *fwd_info)

	/*
	 * Initialize buffers for glink supported
	 *	peripherals only. Open control channel to update
	 *	masks after buffers are initialized.
	 * peripherals only.
	 */
	if (fwd_info->transport == TRANSPORT_GLINK) {
	if (fwd_info->transport == TRANSPORT_GLINK)
		diagfwd_write_buffers_init(fwd_info);
		if (fwd_info->type == TYPE_CNTL)
			diagfwd_cntl_open(fwd_info);
	}

	if (fwd_info && fwd_info->c_ops && fwd_info->c_ops->open)
		fwd_info->c_ops->open(fwd_info);
@@ -1574,10 +1561,11 @@ void diagfwd_buffers_init(struct diagfwd_info *fwd_info)
							fwd_info->type, 2);
		}

		if (driver->feature[fwd_info->peripheral].untag_header)
		if (driver->feature[fwd_info->peripheral].untag_header) {
			ret = diagfwd_buffers_allocate(fwd_info);
			if (ret)
				goto err;
		}

		if (driver->supports_apps_hdlc_encoding) {
			/* In support of hdlc encoding */