aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2014-02-10 06:47:30 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-02-13 15:20:16 -0500
commit41ed1a787c4940d58d5870c633ab6291dd4679dd (patch)
treecf851f43ff981c61cdd9a01adfef64e4911fb60b
parentbf4e5f1ac0e2b277424ec0d035b1fbab46dd66bb (diff)
wlcore: consider multiple APs when checking active_link_count
Each AP has its own global and broadcast links, so when checking for active sta count (according to the active_link_count) we must take them all into account. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c10
-rw-r--r--drivers/net/wireless/ti/wlcore/tx.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index d80d40cf7a22..8106c96fe6b7 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -345,12 +345,12 @@ static void wl12xx_irq_ps_regulate_link(struct wl1271 *wl,
345 * Start high-level PS if the STA is asleep with enough blocks in FW. 345 * Start high-level PS if the STA is asleep with enough blocks in FW.
346 * Make an exception if this is the only connected link. In this 346 * Make an exception if this is the only connected link. In this
347 * case FW-memory congestion is less of a problem. 347 * case FW-memory congestion is less of a problem.
348 * Note that a single connected STA means 3 active links, since we must 348 * Note that a single connected STA means 2*ap_count + 1 active links,
349 * account for the global and broadcast AP links. The "fw_ps" check 349 * since we must account for the global and broadcast AP links
350 * assures us the third link is a STA connected to the AP. Otherwise 350 * for each AP. The "fw_ps" check assures us the other link is a STA
351 * the FW would not set the PSM bit. 351 * connected to the AP. Otherwise the FW would not set the PSM bit.
352 */ 352 */
353 else if (wl->active_link_count > 3 && fw_ps && 353 else if (wl->active_link_count > (wl->ap_count*2 + 1) && fw_ps &&
354 tx_pkts >= WL1271_PS_STA_MAX_PACKETS) 354 tx_pkts >= WL1271_PS_STA_MAX_PACKETS)
355 wl12xx_ps_link_start(wl, wlvif, hlid, true); 355 wl12xx_ps_link_start(wl, wlvif, hlid, true);
356} 356}
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index 38b31a0e9687..40b43115f835 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -134,12 +134,12 @@ static void wl1271_tx_regulate_link(struct wl1271 *wl,
134 * into high-level PS and clean out its TX queues. 134 * into high-level PS and clean out its TX queues.
135 * Make an exception if this is the only connected link. In this 135 * Make an exception if this is the only connected link. In this
136 * case FW-memory congestion is less of a problem. 136 * case FW-memory congestion is less of a problem.
137 * Note that a single connected STA means 3 active links, since we must 137 * Note that a single connected STA means 2*ap_count + 1 active links,
138 * account for the global and broadcast AP links. The "fw_ps" check 138 * since we must account for the global and broadcast AP links
139 * assures us the third link is a STA connected to the AP. Otherwise 139 * for each AP. The "fw_ps" check assures us the other link is a STA
140 * the FW would not set the PSM bit. 140 * connected to the AP. Otherwise the FW would not set the PSM bit.
141 */ 141 */
142 if (wl->active_link_count > 3 && fw_ps && 142 if (wl->active_link_count > (wl->ap_count*2 + 1) && fw_ps &&
143 tx_pkts >= WL1271_PS_STA_MAX_PACKETS) 143 tx_pkts >= WL1271_PS_STA_MAX_PACKETS)
144 wl12xx_ps_link_start(wl, wlvif, hlid, true); 144 wl12xx_ps_link_start(wl, wlvif, hlid, true);
145} 145}