aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-06-16 02:27:12 -0700
committerDavid S. Miller <davem@davemloft.net>2009-06-16 02:27:12 -0700
commita1870b9cc280fe16fed13994810f8a1687be3bcf (patch)
treed482018f5cc8ff0412c0c4d02f984960a5ec2385 /drivers/net/wireless/libertas
parent6cc90a5a6061428358d0f726a53fb44af5254111 (diff)
parent1fa6f4af9f55bc1b753af04276984429d6b5a613 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r--drivers/net/wireless/libertas/if_spi.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index f8c2898d82b..923ed58d58e 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -812,7 +812,6 @@ out:
static void if_spi_e2h(struct if_spi_card *card)
{
int err = 0;
- unsigned long flags;
u32 cause;
struct lbs_private *priv = card->priv;
@@ -827,10 +826,7 @@ static void if_spi_e2h(struct if_spi_card *card)
/* generate a card interrupt */
spu_write_u16(card, IF_SPI_CARD_INT_CAUSE_REG, IF_SPI_CIC_HOST_EVENT);
- spin_lock_irqsave(&priv->driver_lock, flags);
lbs_queue_event(priv, cause & 0xff);
- spin_unlock_irqrestore(&priv->driver_lock, flags);
-
out:
if (err)
lbs_pr_err("%s: error %d\n", __func__, err);
@@ -875,7 +871,12 @@ static int lbs_spi_thread(void *data)
err = if_spi_c2h_data(card);
if (err)
goto err;
- if (hiStatus & IF_SPI_HIST_CMD_DOWNLOAD_RDY) {
+
+ /* workaround: in PS mode, the card does not set the Command
+ * Download Ready bit, but it sets TX Download Ready. */
+ if (hiStatus & IF_SPI_HIST_CMD_DOWNLOAD_RDY ||
+ (card->priv->psstate != PS_STATE_FULL_POWER &&
+ (hiStatus & IF_SPI_HIST_TX_DOWNLOAD_RDY))) {
/* This means two things. First of all,
* if there was a previous command sent, the card has
* successfully received it.