summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2009-05-18 03:02:34 +0400
committerJohn W. Linville <linville@tuxdriver.com>2009-05-20 14:46:28 -0400
commit6edf534a3214e8fad943d7acd903603f0a5b9ac8 (patch)
tree983a69a0a90c459d33046ee33566fb9384652e26 /drivers/net/wireless/p54
parent465b63537f93e82a2606332830801acb64467ec9 (diff)
downloadblackbird-obmc-linux-6edf534a3214e8fad943d7acd903603f0a5b9ac8.tar.gz
blackbird-obmc-linux-6edf534a3214e8fad943d7acd903603f0a5b9ac8.zip
p54spi: always call p54spi_sleep in p54spi_tx_frame if p54spi_wakeup succeeded
Put chip into sleep state, once it's been awaken. Also, propagate error code to the caller. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54')
-rw-r--r--drivers/net/wireless/p54/p54spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
index 5038e8aa9353..e830a2e68450 100644
--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -434,16 +434,16 @@ static int p54spi_tx_frame(struct p54s_priv *priv, struct sk_buff *skb)
if (!p54spi_wait_bit(priv, SPI_ADRS_HOST_INTERRUPTS,
cpu_to_le32(SPI_HOST_INT_WR_READY))) {
dev_err(&priv->spi->dev, "WR_READY timeout\n");
- ret = -1;
+ ret = -EAGAIN;
goto out;
}
p54spi_int_ack(priv, SPI_HOST_INT_WR_READY);
- p54spi_sleep(priv);
if (FREE_AFTER_TX(skb))
p54_free_skb(priv->hw, skb);
out:
+ p54spi_sleep(priv);
return ret;
}
OpenPOWER on IntegriCloud