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>
static inline u32 wl12xx_read32(struct wl12xx *wl, int addr)
{
static inline u32 wl12xx_read32(struct wl12xx *wl, int addr)
{
+ wl12xx_spi_read(wl, addr, &wl->buffer_32, sizeof(wl->buffer_32));
- wl12xx_spi_read(wl, addr, &response, sizeof(u32));
-
- return response;
}
static inline void wl12xx_write32(struct wl12xx *wl, int addr, u32 val)
{
}
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__ */
}
#endif /* __WL12XX_SPI_H__ */
struct wl12xx_stats stats;
struct wl12xx_debugfs debugfs;
struct wl12xx_stats stats;
struct wl12xx_debugfs debugfs;
};
int wl12xx_plt_start(struct wl12xx *wl);
};
int wl12xx_plt_start(struct wl12xx *wl);