Skip to content

Commit

Permalink
wlcore: SPI - fix spi transfer_list
Browse files Browse the repository at this point in the history
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: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Signed-off-by: Luciano Coelho <luca@coelho.fi>
  • Loading branch information
Janusz.Dziedzic@tieto.com authored and Luciano Coelho committed Nov 16, 2012
1 parent 99c227e commit 4eeac22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/ti/wlcore/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ static int __must_check wl12xx_spi_raw_write(struct device *child, int addr,
void *buf, size_t len, bool fixed)
{
struct wl12xx_spi_glue *glue = dev_get_drvdata(child->parent);
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;
Expand Down

0 comments on commit 4eeac22

Please sign in to comment.