summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ti/wlcore/cmd.c
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2012-06-18 10:21:55 (GMT)
committerLuciano Coelho <coelho@ti.com>2012-06-22 07:46:34 (GMT)
commiteb96f841b9563ba34969be25615548635728faf5 (patch)
tree32964c51498fd4b5683813a8f76b91b170175c77 /drivers/net/wireless/ti/wlcore/cmd.c
parent045b9b5f4172b2b21af0b9bf5e6dda51146d51a4 (diff)
downloadlinux-fsl-qoriq-eb96f841b9563ba34969be25615548635728faf5.tar.xz
wlcore: Propagate errors from wl1271_write
Propagate errors from wl1271_write and request for recovery when appropriate. Also rename prefixes of wlcore functions which their prototypes had to be changed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wlcore/cmd.c')
-rw-r--r--drivers/net/wireless/ti/wlcore/cmd.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c
index 69f27d1..658dccb 100644
--- a/drivers/net/wireless/ti/wlcore/cmd.c
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
@@ -65,13 +65,17 @@ int wl1271_cmd_send(struct wl1271 *wl, u16 id, void *buf, size_t len,
WARN_ON(len % 4 != 0);
WARN_ON(test_bit(WL1271_FLAG_IN_ELP, &wl->flags));
- wl1271_write(wl, wl->cmd_box_addr, buf, len, false);
+ ret = wlcore_write(wl, wl->cmd_box_addr, buf, len, false);
+ if (ret < 0)
+ goto fail;
/*
* TODO: we just need this because one bit is in a different
* place. Is there any better way?
*/
- wl->ops->trigger_cmd(wl, wl->cmd_box_addr, buf, len);
+ ret = wl->ops->trigger_cmd(wl, wl->cmd_box_addr, buf, len);
+ if (ret < 0)
+ goto fail;
timeout = jiffies + msecs_to_jiffies(WL1271_COMMAND_TIMEOUT);
@@ -1764,7 +1768,9 @@ int wl12xx_stop_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif)
return -EINVAL;
/* flush all pending packets */
- wl1271_tx_work_locked(wl);
+ ret = wlcore_tx_work_locked(wl);
+ if (ret < 0)
+ goto out;
if (test_bit(wlvif->dev_role_id, wl->roc_map)) {
ret = wl12xx_croc(wl, wlvif->dev_role_id);