aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrey Yurovsky <andrey@cozybit.com>2009-06-12 15:45:36 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-06-15 15:05:51 -0400
commitb3781c74373489fa325ce64efdf72f6c8567b783 (patch)
treed715fc68a73b3ef8cf697d4cce8b5f790f513260 /drivers
parent68f2d02669f7102be80aae47155f45e18950d223 (diff)
libertas: fix IEEE PS mode in GSPI driver
The card firmware does not set the Command Download Ready interrupt bit when IEEE PS mode is enabled, preventing the driver from sending commands (such as the command to exit IEEE PS mode) since there is no indication that the card is ready to accept commands. This patch works around the problem by using the the TX Download Ready bit in place of the Command Download Ready Bit while in IEEE PS mode. TX Download Ready is set in IEEE PS mode. Signed-off-by: Andrey Yurovsky <andrey@cozybit.com> Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/if_spi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index f8c2898d82b0..dc2a1f6ee36c 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -875,7 +875,12 @@ static int lbs_spi_thread(void *data)
875 err = if_spi_c2h_data(card); 875 err = if_spi_c2h_data(card);
876 if (err) 876 if (err)
877 goto err; 877 goto err;
878 if (hiStatus & IF_SPI_HIST_CMD_DOWNLOAD_RDY) { 878
879 /* workaround: in PS mode, the card does not set the Command
880 * Download Ready bit, but it sets TX Download Ready. */
881 if (hiStatus & IF_SPI_HIST_CMD_DOWNLOAD_RDY ||
882 (card->priv->psstate != PS_STATE_FULL_POWER &&
883 (hiStatus & IF_SPI_HIST_TX_DOWNLOAD_RDY))) {
879 /* This means two things. First of all, 884 /* This means two things. First of all,
880 * if there was a previous command sent, the card has 885 * if there was a previous command sent, the card has
881 * successfully received it. 886 * successfully received it.