Commit 3dc05ffb authored by Nicolas Saenz Julienne's avatar Nicolas Saenz Julienne Committed by Kalle Valo

brcmfmac: Set timeout value when configuring power save

Set the timeout value as per cfg80211's set_power_mgmt() request. If the
requested value value is left undefined we set it to 2 seconds, the
maximum supported value.
Signed-off-by: default avatarNicolas Saenz Julienne <nsaenzjulienne@suse.de>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200721112302.22718-1-nsaenzjulienne@suse.de
parent a080ecb1
...@@ -84,6 +84,8 @@ ...@@ -84,6 +84,8 @@
#define BRCMF_ND_INFO_TIMEOUT msecs_to_jiffies(2000) #define BRCMF_ND_INFO_TIMEOUT msecs_to_jiffies(2000)
#define BRCMF_PS_MAX_TIMEOUT_MS 2000
#define BRCMF_ASSOC_PARAMS_FIXED_SIZE \ #define BRCMF_ASSOC_PARAMS_FIXED_SIZE \
(sizeof(struct brcmf_assoc_params_le) - sizeof(u16)) (sizeof(struct brcmf_assoc_params_le) - sizeof(u16))
...@@ -2942,6 +2944,12 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev, ...@@ -2942,6 +2944,12 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev,
else else
bphy_err(drvr, "error (%d)\n", err); bphy_err(drvr, "error (%d)\n", err);
} }
err = brcmf_fil_iovar_int_set(ifp, "pm2_sleep_ret",
min_t(u32, timeout, BRCMF_PS_MAX_TIMEOUT_MS));
if (err)
bphy_err(drvr, "Unable to set pm timeout, (%d)\n", err);
done: done:
brcmf_dbg(TRACE, "Exit\n"); brcmf_dbg(TRACE, "Exit\n");
return err; return err;
......
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