aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorKalle Valo <kalle.valo@nokia.com>2009-06-12 07:14:55 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-10 14:57:43 -0400
commit5262c12d16334a37354c93d606bdb96499f7e5fc (patch)
tree52ed4e1cf9344aea699e76459ce62db77da1e54f /drivers/net/wireless
parent56343a3cfdea4d341c7c13d26013024037eae602 (diff)
wl12xx: allocate buffer the spi busy word from struct wl12xx
Needed for DMA transfers. Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/wl12xx/spi.c5
-rw-r--r--drivers/net/wireless/wl12xx/spi.h3
-rw-r--r--drivers/net/wireless/wl12xx/wl12xx.h2
3 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/spi.c b/drivers/net/wireless/wl12xx/spi.c
index 939274291a07..bcdcfbca77b3 100644
--- a/drivers/net/wireless/wl12xx/spi.c
+++ b/drivers/net/wireless/wl12xx/spi.c
@@ -262,10 +262,11 @@ void wl12xx_spi_read(struct wl12xx *wl, int addr, void *buf,
262{ 262{
263 struct spi_transfer t[3]; 263 struct spi_transfer t[3];
264 struct spi_message m; 264 struct spi_message m;
265 char busy_buf[TNETWIF_READ_OFFSET_BYTES]; 265 u8 *busy_buf;
266 u32 *cmd; 266 u32 *cmd;
267 267
268 cmd = &wl->buffer_cmd; 268 cmd = &wl->buffer_cmd;
269 busy_buf = wl->buffer_busyword;
269 270
270 *cmd = 0; 271 *cmd = 0;
271 *cmd |= WSPI_CMD_READ; 272 *cmd |= WSPI_CMD_READ;
@@ -281,7 +282,7 @@ void wl12xx_spi_read(struct wl12xx *wl, int addr, void *buf,
281 282
282 /* Busy and non busy words read */ 283 /* Busy and non busy words read */
283 t[1].rx_buf = busy_buf; 284 t[1].rx_buf = busy_buf;
284 t[1].len = TNETWIF_READ_OFFSET_BYTES; 285 t[1].len = WL12XX_BUSY_WORD_LEN;
285 spi_message_add_tail(&t[1], &m); 286 spi_message_add_tail(&t[1], &m);
286 287
287 t[2].rx_buf = buf; 288 t[2].rx_buf = buf;
diff --git a/drivers/net/wireless/wl12xx/spi.h b/drivers/net/wireless/wl12xx/spi.h
index 7edb218ee76c..1a19557b0b42 100644
--- a/drivers/net/wireless/wl12xx/spi.h
+++ b/drivers/net/wireless/wl12xx/spi.h
@@ -65,9 +65,8 @@
65 65
66#define WSPI_INIT_CMD_LEN 8 66#define WSPI_INIT_CMD_LEN 8
67 67
68#define TNETWIF_READ_OFFSET_BYTES 8
69#define HW_ACCESS_WSPI_FIXED_BUSY_LEN \ 68#define HW_ACCESS_WSPI_FIXED_BUSY_LEN \
70 ((TNETWIF_READ_OFFSET_BYTES - 4) / sizeof(u32)) 69 ((WL12XX_BUSY_WORD_LEN - 4) / sizeof(u32))
71#define HW_ACCESS_WSPI_INIT_CMD_MASK 0 70#define HW_ACCESS_WSPI_INIT_CMD_MASK 0
72 71
73 72
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h
index 586593563511..b81102098c7d 100644
--- a/drivers/net/wireless/wl12xx/wl12xx.h
+++ b/drivers/net/wireless/wl12xx/wl12xx.h
@@ -105,6 +105,7 @@ enum {
105 CFG_RX_AUTH_EN | \ 105 CFG_RX_AUTH_EN | \
106 CFG_RX_ASSOC_EN) 106 CFG_RX_ASSOC_EN)
107 107
108#define WL12XX_BUSY_WORD_LEN 8
108 109
109struct boot_attr { 110struct boot_attr {
110 u32 radio_type; 111 u32 radio_type;
@@ -385,6 +386,7 @@ struct wl12xx {
385 386
386 u32 buffer_32; 387 u32 buffer_32;
387 u32 buffer_cmd; 388 u32 buffer_cmd;
389 u8 buffer_busyword[WL12XX_BUSY_WORD_LEN];
388}; 390};
389 391
390int wl12xx_plt_start(struct wl12xx *wl); 392int wl12xx_plt_start(struct wl12xx *wl);