From 1a98081b29afa74fb3af0699a2c2f0100257f3d5 Mon Sep 17 00:00:00 2001 From: Ashwin Date: Wed, 17 Sep 2014 15:49:57 -0700 Subject: dhdutil: Fix issue with dhd_upload which causes kernel panic Bug: 18608773 Change-Id: I6cc6a8a36c5ba386171bd7285d4d4729f44ad9e1 Signed-off-by: Dmitry Shmidt --- bcmdhd/dhdutil/dhdu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bcmdhd/dhdutil') diff --git a/bcmdhd/dhdutil/dhdu.c b/bcmdhd/dhdutil/dhdu.c index 6b2007c..2c628c2 100644 --- a/bcmdhd/dhdutil/dhdu.c +++ b/bcmdhd/dhdutil/dhdu.c @@ -2154,7 +2154,7 @@ dhd_upload(void *dhd, cmd_t *cmd, char **argv) ramsize = *(uint32*)buf; if (!ramsize) - ramsize = start + size; + ramsize = size; if ((fp = fopen(fname, "wb")) == NULL) { fprintf(stderr, "%s: Could not open %s: %s\n", @@ -2165,7 +2165,7 @@ dhd_upload(void *dhd, cmd_t *cmd, char **argv) /* default size to full RAM */ if (!size) - size = ramsize - start; + size = ramsize; /* read memory and write to file */ while (size) { -- cgit v1.1