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

Commit 80d6bcd8 authored by Lior David's avatar Lior David Committed by Maya Erez
Browse files

wil6210: allow empty WMI commands in debugfs wmi_send



There are many valid WMI commands with only header without any
additional payload. Such WMI commands could not be sent using
the debugfs wmi_send facility. Fix the code to allow sending
of such commands.

Change-Id: I581e099db5d2ee81be4345101aa54352b1d9564f
Signed-off-by: default avatarLior David <qca_liord@qca.qualcomm.com>
Signed-off-by: default avatarMaya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
Git-commit: 69218a48005d0c93b8e9ec483f42ead481a43034
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git


CRs-Fixed: 1015627
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent 64ac3318
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -843,7 +843,7 @@ static ssize_t wil_write_file_wmi(struct file *file, const char __user *buf,
	u16 cmdid;
	int rc, rc1;

	if (cmdlen <= 0)
	if (cmdlen < 0)
		return -EINVAL;

	wmi = kmalloc(len, GFP_KERNEL);
@@ -856,7 +856,7 @@ static ssize_t wil_write_file_wmi(struct file *file, const char __user *buf,
		return rc;
	}

	cmd = &wmi[1];
	cmd = (cmdlen > 0) ? &wmi[1] : NULL;
	cmdid = le16_to_cpu(wmi->command_id);

	rc1 = wmi_send(wil, cmdid, cmd, cmdlen);