aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx/spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl12xx/spi.c')
-rw-r--r--drivers/net/wireless/wl12xx/spi.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/spi.c b/drivers/net/wireless/wl12xx/spi.c
index c3d5b737861..9c9943f9867 100644
--- a/drivers/net/wireless/wl12xx/spi.c
+++ b/drivers/net/wireless/wl12xx/spi.c
@@ -301,7 +301,7 @@ void wl12xx_spi_read(struct wl12xx *wl, int addr, void *buf,
}
void wl12xx_spi_write(struct wl12xx *wl, int addr, void *buf,
- size_t len)
+ size_t len, bool fixed)
{
struct spi_transfer t[2];
struct spi_message m;
@@ -314,6 +314,9 @@ void wl12xx_spi_write(struct wl12xx *wl, int addr, void *buf,
*cmd |= (len << WSPI_CMD_BYTE_LENGTH_OFFSET) & WSPI_CMD_BYTE_LENGTH;
*cmd |= addr & WSPI_CMD_BYTE_ADDR;
+ if (fixed)
+ *cmd |= WSPI_CMD_FIXED;
+
spi_message_init(&m);
memset(t, 0, sizeof(t));
@@ -348,7 +351,7 @@ void wl12xx_spi_mem_write(struct wl12xx *wl, int addr, void *buf,
physical = wl12xx_translate_mem_addr(wl, addr);
- wl12xx_spi_write(wl, physical, buf, len);
+ wl12xx_spi_write(wl, physical, buf, len, false);
}
void wl12xx_spi_reg_read(struct wl12xx *wl, int addr, void *buf, size_t len,
@@ -361,13 +364,14 @@ void wl12xx_spi_reg_read(struct wl12xx *wl, int addr, void *buf, size_t len,
wl12xx_spi_read(wl, physical, buf, len, fixed);
}
-void wl12xx_spi_reg_write(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,
+ bool fixed)
{
int physical;
physical = wl12xx_translate_reg_addr(wl, addr);
- wl12xx_spi_write(wl, physical, buf, len);
+ wl12xx_spi_write(wl, physical, buf, len, fixed);
}
u32 wl12xx_mem_read32(struct wl12xx *wl, int addr)