Commit 1d3b8130 authored by Kalle Valo's avatar Kalle Valo Committed by John W. Linville

wl12xx: reserver buffer for read32()/write32() in struct wl12xx

The buffer is needed for DMA safe transfers.
Signed-off-by: default avatarKalle Valo <kalle.valo@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ff25839b
......@@ -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__ */
......@@ -382,6 +382,8 @@ struct wl12xx {
struct wl12xx_stats stats;
struct wl12xx_debugfs debugfs;
u32 buffer_32;
};
int wl12xx_plt_start(struct wl12xx *wl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment