Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98323895 authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Luciano Coelho
Browse files

wl18xx: limit Tx for the AP single-STA-in-PSM case



Treat a single connected STA in PSM as a slow link and regulate Tx speed
according to slow link priority/stop thresholds.
This allows us to avoid flooding the FW, while delivering decent
throughput to a peer in forced-PSM.

[Small simplification of the if statements -- Luca]

Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent f1626fd8
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -1410,7 +1410,8 @@ static bool wl18xx_lnk_high_prio(struct wl1271 *wl, u8 hlid,
		return false;
		return false;


	/* the priority thresholds are taken from FW */
	/* the priority thresholds are taken from FW */
	if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map))
	if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map) &&
	    !test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map))
		thold = status_priv->tx_fast_link_prio_threshold;
		thold = status_priv->tx_fast_link_prio_threshold;
	else
	else
		thold = status_priv->tx_slow_link_prio_threshold;
		thold = status_priv->tx_slow_link_prio_threshold;
@@ -1428,7 +1429,8 @@ static bool wl18xx_lnk_low_prio(struct wl1271 *wl, u8 hlid,


	if (test_bit(hlid, (unsigned long *)&suspend_bitmap))
	if (test_bit(hlid, (unsigned long *)&suspend_bitmap))
		thold = status_priv->tx_suspend_threshold;
		thold = status_priv->tx_suspend_threshold;
	else if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map))
	else if (test_bit(hlid, (unsigned long *)&wl->fw_fast_lnk_map) &&
		 !test_bit(hlid, (unsigned long *)&wl->ap_fw_ps_map))
		thold = status_priv->tx_fast_stop_threshold;
		thold = status_priv->tx_fast_stop_threshold;
	else
	else
		thold = status_priv->tx_slow_stop_threshold;
		thold = status_priv->tx_slow_stop_threshold;