summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2016-01-07 10:41:24 +0100
committerBjørn Mork <bjorn@mork.no>2016-01-07 10:41:24 +0100
commitf9cc5b8f69b31ab522e9c89ebfab984bad55eab0 (patch)
treee5df28f82e57a11a22b1068a41f9b545d5accb2a
parent5f3bb9900f79061fd793205260ebb0ef91669d4d (diff)
fw dl exit20160107
Signed-off-by: Bjørn Mork <bjorn@mork.no>
-rw-r--r--fwdl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fwdl.c b/fwdl.c
index a3fb84f..99515bc 100644
--- a/fwdl.c
+++ b/fwdl.c
@@ -103,6 +103,12 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw)
if (!len)
break;
+ /* failed to read register? */
+ if (len == 0xffffffff) {
+ wiphy_err(hw->wiphy,"Failed to read len from SCRATCH2 C40\n");
+ goto err_download;
+ }
+
/* this copies the next chunk of fw binary to be delivered */
memcpy((char *)&priv->pcmd_buf[0],
(fw->data + size_fw_downloaded), len);