diff --git a/drivers/net/wireless/wl12xx/spi.c b/drivers/net/wireless/wl12xx/spi.c index bcdcfbca77b33bcfd9cd2c2ea0f7469a2295231a..0d2b13a550e6e063057080f1f5a772329e06c3eb 100644 --- a/drivers/net/wireless/wl12xx/spi.c +++ b/drivers/net/wireless/wl12xx/spi.c @@ -348,6 +348,24 @@ void wl12xx_spi_mem_write(struct wl12xx *wl, int addr, void *buf, wl12xx_spi_write(wl, physical, buf, len); } +void wl12xx_spi_reg_read(struct wl12xx *wl, int addr, void *buf, size_t len) +{ + int physical; + + physical = wl12xx_translate_reg_addr(wl, addr); + + wl12xx_spi_read(wl, physical, buf, len); +} + +void wl12xx_spi_reg_write(struct wl12xx *wl, int addr, void *buf, size_t len) +{ + int physical; + + physical = wl12xx_translate_reg_addr(wl, addr); + + wl12xx_spi_write(wl, physical, buf, len); +} + u32 wl12xx_mem_read32(struct wl12xx *wl, int addr) { return wl12xx_read32(wl, wl12xx_translate_mem_addr(wl, addr)); diff --git a/drivers/net/wireless/wl12xx/spi.h b/drivers/net/wireless/wl12xx/spi.h index 1a19557b0b427d95319597fe41e3e4e1a441e87a..0996e48af9f9d855d4a4a2e213e3a35805556efd 100644 --- a/drivers/net/wireless/wl12xx/spi.h +++ b/drivers/net/wireless/wl12xx/spi.h @@ -81,6 +81,8 @@ u32 wl12xx_mem_read32(struct wl12xx *wl, int addr); void wl12xx_mem_write32(struct wl12xx *wl, int addr, u32 val); /* Registers IO */ +void wl12xx_spi_reg_read(struct wl12xx *wl, int addr, void *buf, size_t len); +void wl12xx_spi_reg_write(struct wl12xx *wl, int addr, void *buf,size_t len); u32 wl12xx_reg_read32(struct wl12xx *wl, int addr); void wl12xx_reg_write32(struct wl12xx *wl, int addr, u32 val);