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

Commit 16d71260 authored by Ravi Aravamudhan's avatar Ravi Aravamudhan
Browse files

diag: Fix issues with peripheral buffering control packets



Diag driver is performing incorrect checks before forwarding
the peripheral buffering mode control packets. Make changes to
fix this issue.

Change-Id: Ie41762e9450c8af97d41ea864793d8cba13fd4a4
Signed-off-by: default avatarRavi Aravamudhan <aravamud@codeaurora.org>
parent a5eb2c93
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1146,9 +1146,12 @@ int diag_send_buffering_tx_mode_pkt(uint8_t peripheral,
	int err = 0;
	struct diag_ctrl_peripheral_tx_mode ctrl_pkt;

	if (!peripheral || !params)
	if (!params)
		return -EIO;

	if (peripheral >= NUM_PERIPHERALS)
		return -EINVAL;

	if (!driver->feature[peripheral].peripheral_buffering) {
		pr_debug("diag: In %s, peripheral  %d doesn't support buffering\n",
			 __func__, peripheral);
@@ -1198,7 +1201,7 @@ int diag_send_buffering_wm_values(uint8_t peripheral,
		return -EIO;

	if (peripheral >= NUM_PERIPHERALS)
		return -EIO;
		return -EINVAL;

	if (!driver->feature[peripheral].peripheral_buffering) {
		pr_debug("diag: In %s, peripheral  %d doesn't support buffering\n",