[PATCH AUTOSEL 4.4 07/16] ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()

Subsystems: atheros ath generic utilities, atheros ath6kl wireless driver, the rest

STALE1895d

3 messages, 2 authors, 2021-05-31 · open the first message on its own page

[PATCH AUTOSEL 4.4 07/16] ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()

From: Sasha Levin <sashal@kernel.org>
Date: 2021-05-24 15:20:41

From: Anirudh Rayabharam <redacted>

[ Upstream commit fc6a6521556c8250e356ddc6a3f2391aa62dc976 ]

ath6kl_wmi_cmd_send could fail, so let's return its error code upstream.

Signed-off-by: Kangjie Lu <redacted>
Signed-off-by: Kalle Valo <redacted>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/wireless/ath/ath6kl/debug.c | 5 ++++-
 drivers/net/wireless/ath/ath6kl/wmi.c   | 4 +---
 2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index e2b7809d7886..f3a786af7ece 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -1027,14 +1027,17 @@ static ssize_t ath6kl_lrssi_roam_write(struct file *file,
 {
 	struct ath6kl *ar = file->private_data;
 	unsigned long lrssi_roam_threshold;
+	int ret;
 
 	if (kstrtoul_from_user(user_buf, count, 0, &lrssi_roam_threshold))
 		return -EINVAL;
 
 	ar->lrssi_roam_threshold = lrssi_roam_threshold;
 
-	ath6kl_wmi_set_roam_lrssi_cmd(ar->wmi, ar->lrssi_roam_threshold);
+	ret = ath6kl_wmi_set_roam_lrssi_cmd(ar->wmi, ar->lrssi_roam_threshold);
 
+	if (ret)
+		return ret;
 	return count;
 }
 
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 7e1010475cfb..4aead53acf38 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -776,10 +776,8 @@ int ath6kl_wmi_set_roam_lrssi_cmd(struct wmi *wmi, u8 lrssi)
 	cmd->info.params.roam_rssi_floor = DEF_LRSSI_ROAM_FLOOR;
 	cmd->roam_ctrl = WMI_SET_LRSSI_SCAN_PARAMS;
 
-	ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_ROAM_CTRL_CMDID,
+	return ath6kl_wmi_cmd_send(wmi, 0, skb, WMI_SET_ROAM_CTRL_CMDID,
 			    NO_SYNC_WMIFLAG);
-
-	return 0;
 }
 
 int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid)
-- 
2.30.2

Re: [PATCH AUTOSEL 4.4 07/16] ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()

From: Pavel Machek <hidden>
Date: 2021-05-31 20:47:24

Hi!
From: Anirudh Rayabharam <redacted>

[ Upstream commit fc6a6521556c8250e356ddc6a3f2391aa62dc976 ]

ath6kl_wmi_cmd_send could fail, so let's return its error code
upstream.
Something went very wrong here.

Content is okay, but "upstream commit" label is wrong, pointing to
incomplete fix that was reverted (with different content and different
author).

commit fc6a6521556c8250e356ddc6a3f2391aa62dc976
Author: Kangjie Lu [off-list ref]
Date:   Wed Dec 26 00:43:28 2018 -0600

    ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()

    ath6kl_wmi_cmd_send could fail, so let's return its error code
        upstream.

    Signed-off-by: Kangjie Lu [off-list ref]
        Signed-off-by: Kalle Valo [off-list ref]

Best regards,
							Pavel
							
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Re: [PATCH AUTOSEL 4.4 07/16] ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()

From: Sasha Levin <sashal@kernel.org>
Date: 2021-05-31 21:14:49

On Mon, May 31, 2021 at 10:47:00PM +0200, Pavel Machek wrote:
Hi!
quoted
From: Anirudh Rayabharam <redacted>

[ Upstream commit fc6a6521556c8250e356ddc6a3f2391aa62dc976 ]

ath6kl_wmi_cmd_send could fail, so let's return its error code
upstream.
Something went very wrong here.

Content is okay, but "upstream commit" label is wrong, pointing to
incomplete fix that was reverted (with different content and different
author).
Yup, what ended up happening here is that my scripts got confused by the
reverted commit and the real fix having the same subject line. I've
fixed up my scripts and this patch was dropped. Thanks!

-- 
Thanks,
Sasha
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help