Put chip into sleep state, once it's been awaken. Also, propagate error code to the caller. Signed-off-by: Max Filippov <jcmvbkbc@xxxxxxxxx> --- drivers/net/wireless/p54/p54spi.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c index 13566b1..9e0c1a2 100644 --- a/drivers/net/wireless/p54/p54spi.c +++ b/drivers/net/wireless/p54/p54spi.c @@ -420,16 +420,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; } -- 1.6.0.6 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html