brcmfmac: Increase power saving delay to 2s
authorPhil Elwell <phil@raspberrypi.com>
Mon, 3 Feb 2020 09:32:22 +0000 (09:32 +0000)
committerDom Cobley <popcornmix@gmail.com>
Mon, 19 Feb 2024 11:33:04 +0000 (11:33 +0000)
Increase the delay before entering the lower power state to 2 seconds
(the maximum allowed) in order to reduce the packet latencies,
particularly for inbound packets.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c

index efd06a7..77d9790 100644 (file)
@@ -3313,7 +3313,7 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev,
                brcmf_dbg(INFO, "Do not enable power save for P2P clients\n");
                pm = PM_OFF;
        }
-       brcmf_err("power save %s\n", (pm ? "enabled" : "disabled"));
+       brcmf_info("power save %s\n", (pm ? "enabled" : "disabled"));
 
        err = brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, pm);
        if (err) {
@@ -3323,6 +3323,7 @@ brcmf_cfg80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *ndev,
                        bphy_err(drvr, "error (%d)\n", err);
        }
 
+       timeout = 2000; /* 2000ms - the maximum */
        err = brcmf_fil_iovar_int_set(ifp, "pm2_sleep_ret",
                                min_t(u32, timeout, BRCMF_PS_MAX_TIMEOUT_MS));
        if (err)