aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorVictor Goldenshtein <victorg@ti.com>2012-05-14 09:07:38 -0400
committerLuciano Coelho <coelho@ti.com>2012-06-05 13:24:32 -0400
commita4203c6453afcd21b3a6f0be592bf74951e80c72 (patch)
tree8ea6c25cdd41480960089d287725ca2b9318a627 /drivers/net
parente832837bbb91ae8610fa0a0f3d243d42823ec815 (diff)
wlcore: wait for roc complete only for the first roc command
In some multi role scenarios the driver might send multi roc requests without sending a croc first, the fw queues those requests and starts service the next roc request as soon as the driver sends a croc for the previous one. So, if the fw rocs on channel X and driver asks to roc also on channel Y, the fw will not start service Y (and will not send roc complete event for this request) until the driver releases the fw with croc X. Signed-off-by: Victor Goldenshtein <victorg@ti.com> Signed-off-by: Igal Chernobelsky <igalc@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ti/wlcore/cmd.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c
index e8c650dec18c..df8d672b1f06 100644
--- a/drivers/net/wireless/ti/wlcore/cmd.c
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
@@ -1606,19 +1606,25 @@ out:
1606int wl12xx_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 role_id) 1606int wl12xx_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 role_id)
1607{ 1607{
1608 int ret = 0; 1608 int ret = 0;
1609 bool is_first_roc;
1609 1610
1610 if (WARN_ON(test_bit(role_id, wl->roc_map))) 1611 if (WARN_ON(test_bit(role_id, wl->roc_map)))
1611 return 0; 1612 return 0;
1612 1613
1614 is_first_roc = (find_first_bit(wl->roc_map, WL12XX_MAX_ROLES) >=
1615 WL12XX_MAX_ROLES);
1616
1613 ret = wl12xx_cmd_roc(wl, wlvif, role_id); 1617 ret = wl12xx_cmd_roc(wl, wlvif, role_id);
1614 if (ret < 0) 1618 if (ret < 0)
1615 goto out; 1619 goto out;
1616 1620
1617 ret = wl1271_cmd_wait_for_event(wl, 1621 if (is_first_roc) {
1618 REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID); 1622 ret = wl1271_cmd_wait_for_event(wl,
1619 if (ret < 0) { 1623 REMAIN_ON_CHANNEL_COMPLETE_EVENT_ID);
1620 wl1271_error("cmd roc event completion error"); 1624 if (ret < 0) {
1621 goto out; 1625 wl1271_error("cmd roc event completion error");
1626 goto out;
1627 }
1622 } 1628 }
1623 1629
1624 __set_bit(role_id, wl->roc_map); 1630 __set_bit(role_id, wl->roc_map);