Commit 2cb83853 authored by Janusz.Dziedzic@tieto.com's avatar Janusz.Dziedzic@tieto.com Committed by Ben Hutchings

wlcore: SPI - fix spi transfer_list

commit 4eeac22c upstream.

In corner case for wl12xx_spi_raw_write() when
	len == SPI_AGGR_BUFFER_SIZE
we don't setup correctly spi transfer_list.
Next we will have garbage and strange errors
reported by SPI framework (eg. wrong speed_hz,
failed to transfer one message from queue)
when iterate transfer_list.
Signed-off-by: default avatarJanusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: default avatarLuciano Coelho <luca@coelho.fi>
[bwh: Backported to 3.2: adjust filename, context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 5ad6094b
......@@ -274,7 +274,7 @@ static void wl1271_spi_raw_read(struct wl1271 *wl, int addr, void *buf,
static void wl1271_spi_raw_write(struct wl1271 *wl, int addr, void *buf,
size_t len, bool fixed)
{
struct spi_transfer t[2 * WSPI_MAX_NUM_OF_CHUNKS];
struct spi_transfer t[2 * (WSPI_MAX_NUM_OF_CHUNKS + 1)];
struct spi_message m;
u32 commands[WSPI_MAX_NUM_OF_CHUNKS];
u32 *cmd;
......
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