Skip to content

Commit 3dc05ff

Browse files
Nicolas Saenz JulienneKalle Valo
authored andcommitted
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: Nicolas Saenz Julienne <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a080ecb commit 3dc05ff

File tree

1 file changed

+8
-0
lines changed
  • drivers/net/wireless/broadcom/brcm80211/brcmfmac

1 file changed

+8
-0
lines changed

drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@
8484

8585
#define BRCMF_ND_INFO_TIMEOUT msecs_to_jiffies(2000)
8686

87+
#define BRCMF_PS_MAX_TIMEOUT_MS 2000
88+
8789
#define BRCMF_ASSOC_PARAMS_FIXED_SIZE \
8890
(sizeof(struct brcmf_assoc_params_le) - sizeof(u16))
8991

@@ -2942,6 +2944,12 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev,
29422944
else
29432945
bphy_err(drvr, "error (%d)\n", err);
29442946
}
2947+
2948+
err = brcmf_fil_iovar_int_set(ifp, "pm2_sleep_ret",
2949+
min_t(u32, timeout, BRCMF_PS_MAX_TIMEOUT_MS));
2950+
if (err)
2951+
bphy_err(drvr, "Unable to set pm timeout, (%d)\n", err);
2952+
29452953
done:
29462954
brcmf_dbg(TRACE, "Exit\n");
29472955
return err;

0 commit comments

Comments
 (0)