Commit 54433367 authored by Anirudh Rayabharam's avatar Anirudh Rayabharam Committed by Greg Kroah-Hartman

ath6kl: return error code in ath6kl_wmi_set_roam_lrssi_cmd()

Propagate error code from failure of ath6kl_wmi_cmd_send() to the
caller.
Signed-off-by: default avatarAnirudh Rayabharam <mail@anirudhrb.com>
Cc: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210503115736.2104747-44-gregkh@linuxfoundation.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent efba106f
...@@ -1027,14 +1027,17 @@ static ssize_t ath6kl_lrssi_roam_write(struct file *file, ...@@ -1027,14 +1027,17 @@ static ssize_t ath6kl_lrssi_roam_write(struct file *file,
{ {
struct ath6kl *ar = file->private_data; struct ath6kl *ar = file->private_data;
unsigned long lrssi_roam_threshold; unsigned long lrssi_roam_threshold;
int ret;
if (kstrtoul_from_user(user_buf, count, 0, &lrssi_roam_threshold)) if (kstrtoul_from_user(user_buf, count, 0, &lrssi_roam_threshold))
return -EINVAL; return -EINVAL;
ar->lrssi_roam_threshold = lrssi_roam_threshold; 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; return count;
} }
......
...@@ -776,10 +776,8 @@ int ath6kl_wmi_set_roam_lrssi_cmd(struct wmi *wmi, u8 lrssi) ...@@ -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->info.params.roam_rssi_floor = DEF_LRSSI_ROAM_FLOOR;
cmd->roam_ctrl = WMI_SET_LRSSI_SCAN_PARAMS; 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); NO_SYNC_WMIFLAG);
return 0;
} }
int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid) int ath6kl_wmi_force_roam_cmd(struct wmi *wmi, const u8 *bssid)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment