diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2009-06-12 14:15:08 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 14:57:43 -0400 |
commit | 4721213fdde4456a36a5e63f02e5c2556a4df398 (patch) | |
tree | 4dd00bb4827642316e84f3a97a54f470017a826f /drivers/net/wireless/wl12xx/rx.c | |
parent | 53d65423ba1bc3c38d53b27656395c632b073590 (diff) | |
download | lwn-4721213fdde4456a36a5e63f02e5c2556a4df398.tar.gz lwn-4721213fdde4456a36a5e63f02e5c2556a4df398.zip |
wl12xx: fix rx descriptor use
Rx descriptor was incorrectly allocated from stack, use struct wl12xx
instead. 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/wl12xx/rx.c')
-rw-r--r-- | drivers/net/wireless/wl12xx/rx.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/wl12xx/rx.c b/drivers/net/wireless/wl12xx/rx.c index 5fd916a0b254..7ac26ef209b7 100644 --- a/drivers/net/wireless/wl12xx/rx.c +++ b/drivers/net/wireless/wl12xx/rx.c @@ -39,8 +39,7 @@ static void wl12xx_rx_header(struct wl12xx *wl, if (wl->rx_current_buffer) rx_packet_ring_addr += wl->data_path->rx_packet_ring_chunk_size; - wl12xx_spi_mem_read(wl, rx_packet_ring_addr, desc, - sizeof(struct wl12xx_rx_descriptor)); + wl12xx_spi_mem_read(wl, rx_packet_ring_addr, desc, sizeof(*desc)); } static void wl12xx_rx_status(struct wl12xx *wl, @@ -175,16 +174,18 @@ static void wl12xx_rx_ack(struct wl12xx *wl) void wl12xx_rx(struct wl12xx *wl) { - struct wl12xx_rx_descriptor rx_desc; + struct wl12xx_rx_descriptor *rx_desc; if (wl->state != WL12XX_STATE_ON) return; + rx_desc = wl->rx_descriptor; + /* We first read the frame's header */ - wl12xx_rx_header(wl, &rx_desc); + wl12xx_rx_header(wl, rx_desc); /* Now we can read the body */ - wl12xx_rx_body(wl, &rx_desc); + wl12xx_rx_body(wl, rx_desc); /* Finally, we need to ACK the RX */ wl12xx_rx_ack(wl); |