summaryrefslogtreecommitdiff
path: root/fwdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fwdl.c')
-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);