2021-05-24 15:14:08

by Sasha Levin

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

From: Anirudh Rayabharam <[email protected]>

[ Upstream commit fc6a6521556c8250e356ddc6a3f2391aa62dc976 ]

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

Signed-off-by: Kangjie Lu <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
---
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


2021-05-31 20:47:30

by Pavel Machek

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

Hi!

> From: Anirudh Rayabharam <[email protected]>
>
> [ 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 <[email protected]>
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 <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>

Best regards,
Pavel

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


Attachments:
(No filename) (970.00 B)
signature.asc (188.00 B)
Digital signature
Download all attachments

2021-05-31 21:16:39

by Sasha Levin

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

On Mon, May 31, 2021 at 10:47:00PM +0200, Pavel Machek wrote:
>Hi!
>
>> From: Anirudh Rayabharam <[email protected]>
>>
>> [ 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