]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
p54spi: always call p54spi_sleep in p54spi_tx_frame if p54spi_wakeup succeeded
authorMax Filippov <jcmvbkbc@gmail.com>
Sun, 17 May 2009 23:02:34 +0000 (03:02 +0400)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 20 May 2009 18:46:28 +0000 (14:46 -0400)
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>
drivers/net/wireless/p54/p54spi.c

index 5038e8aa93538e3709029450f194fab6db6a1439..e830a2e68450ecad669c29b20e323286ad2462cd 100644 (file)
@@ -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;
 }