aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti
diff options
context:
space:
mode:
authorJanusz.Dziedzic@tieto.com <Janusz.Dziedzic@tieto.com>2012-11-07 08:42:19 -0500
committerLuciano Coelho <luca@coelho.fi>2012-11-16 12:53:01 -0500
commit4eeac22c159f053ea34527e4fea359ab10b4b5a5 (patch)
tree54aa3c8e7732412d0e97237b2aa9db3846e4ea82 /drivers/net/wireless/ti
parent99c227e3d9270840884ded780787693fd0b82dde (diff)
wlcore: SPI - fix spi transfer_list
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>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r--drivers/net/wireless/ti/wlcore/spi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c
index 76838a4a74ce..9d18f2ff57d0 100644
--- a/drivers/net/wireless/ti/wlcore/spi.c
+++ b/drivers/net/wireless/ti/wlcore/spi.c
@@ -270,7 +270,7 @@ static int __must_check wl12xx_spi_raw_write(struct device *child, int addr,
270 void *buf, size_t len, bool fixed) 270 void *buf, size_t len, bool fixed)
271{ 271{
272 struct wl12xx_spi_glue *glue = dev_get_drvdata(child->parent); 272 struct wl12xx_spi_glue *glue = dev_get_drvdata(child->parent);
273 struct spi_transfer t[2 * WSPI_MAX_NUM_OF_CHUNKS]; 273 struct spi_transfer t[2 * (WSPI_MAX_NUM_OF_CHUNKS + 1)];
274 struct spi_message m; 274 struct spi_message m;
275 u32 commands[WSPI_MAX_NUM_OF_CHUNKS]; 275 u32 commands[WSPI_MAX_NUM_OF_CHUNKS];
276 u32 *cmd; 276 u32 *cmd;