summaryrefslogtreecommitdiffstats
path: root/drivers/soc
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2018-02-27 16:45:25 -0800
committerAndy Gross <andy.gross@linaro.org>2018-03-08 18:40:35 -0600
commit90c29ed7627b6b4aeb603ee197650173c8434512 (patch)
treed4c857ff348af5d0e63760cd334eeceed65897ac /drivers/soc
parentfa65f8045137d061134c15233d35a089cc85b87e (diff)
downloadlinux-0-day-90c29ed7627b6b4aeb603ee197650173c8434512.tar.gz
linux-0-day-90c29ed7627b6b4aeb603ee197650173c8434512.tar.xz
soc: qcom: wcnss_ctrl: Fix increment in NV upload
hdr.len includes both the size of the header and the fragment, so using this when stepping through the firmware causes us to skip 16 bytes every chunk of 3072 bytes; causing only the first fragment to actually be valid data. Instead use fragment size steps through the firmware blob. Fixes: ea7a1f275cf0 ("soc: qcom: Introduce WCNSS_CTRL SMD client") Reported-by: Will Newton <will.newton@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Andy Gross <andy.gross@linaro.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/qcom/wcnss_ctrl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/qcom/wcnss_ctrl.c b/drivers/soc/qcom/wcnss_ctrl.c
index d008e5b82db4b..df3ccb30bc2dd 100644
--- a/drivers/soc/qcom/wcnss_ctrl.c
+++ b/drivers/soc/qcom/wcnss_ctrl.c
@@ -249,7 +249,7 @@ static int wcnss_download_nv(struct wcnss_ctrl *wcnss, bool *expect_cbc)
/* Increment for next fragment */
req->seq++;
- data += req->hdr.len;
+ data += NV_FRAGMENT_SIZE;
left -= NV_FRAGMENT_SIZE;
} while (left > 0);