wl12xx: reserver buffer for read32()/write32() in struct wl12xx
authorKalle Valo <kalle.valo@nokia.com>
Fri, 12 Jun 2009 11:14:28 +0000 (14:14 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 10 Jul 2009 18:57:42 +0000 (14:57 -0400)
The buffer is needed for DMA safe transfers.

Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/wl12xx/spi.h
drivers/net/wireless/wl12xx/wl12xx.h

index fd3227e904a8db092110739befe67463cd487cf0..f3f18958657c72c855c8361d552524b4c7e1be2c 100644 (file)
@@ -94,16 +94,15 @@ void wl12xx_set_partition(struct wl12xx *wl,
 
 static inline u32 wl12xx_read32(struct wl12xx *wl, int addr)
 {
-       u32 response;
+       wl12xx_spi_read(wl, addr, &wl->buffer_32, sizeof(wl->buffer_32));
 
-       wl12xx_spi_read(wl, addr, &response, sizeof(u32));
-
-       return response;
+       return wl->buffer_32;
 }
 
 static inline void wl12xx_write32(struct wl12xx *wl, int addr, u32 val)
 {
-       wl12xx_spi_write(wl, addr, &val, sizeof(u32));
+       wl->buffer_32 = val;
+       wl12xx_spi_write(wl, addr, &wl->buffer_32, sizeof(wl->buffer_32));
 }
 
 #endif /* __WL12XX_SPI_H__ */
index 48641437414b2149d76668855fd595688b9c7e33..f252a11892548d11a1e3f0224cbcab3f5c491a42 100644 (file)
@@ -382,6 +382,8 @@ struct wl12xx {
 
        struct wl12xx_stats stats;
        struct wl12xx_debugfs debugfs;
+
+       u32 buffer_32;
 };
 
 int wl12xx_plt_start(struct wl12xx *wl);