|
@@ -40,15 +40,16 @@ Signed-off-by: Rafał Miłecki <[email protected]>
|
|
|
kfree(fwctx);
|
|
|
}
|
|
|
|
|
|
-@@ -673,6 +676,7 @@ int brcmf_fw_get_firmwares(struct device
|
|
|
+@@ -673,6 +676,8 @@ int brcmf_fw_get_firmwares(struct device
|
|
|
{
|
|
|
struct brcmf_fw_item *first = &req->items[0];
|
|
|
struct brcmf_fw *fwctx;
|
|
|
+ struct completion completion;
|
|
|
++ unsigned long time_left;
|
|
|
int ret;
|
|
|
|
|
|
brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(dev));
|
|
|
-@@ -689,6 +693,9 @@ int brcmf_fw_get_firmwares(struct device
|
|
|
+@@ -689,6 +694,9 @@ int brcmf_fw_get_firmwares(struct device
|
|
|
fwctx->dev = dev;
|
|
|
fwctx->req = req;
|
|
|
fwctx->done = fw_cb;
|
|
@@ -58,11 +59,15 @@ Signed-off-by: Rafał Miłecki <[email protected]>
|
|
|
|
|
|
ret = request_firmware_nowait(THIS_MODULE, true, first->path,
|
|
|
fwctx->dev, GFP_KERNEL, fwctx,
|
|
|
-@@ -696,6 +703,8 @@ int brcmf_fw_get_firmwares(struct device
|
|
|
+@@ -696,6 +704,12 @@ int brcmf_fw_get_firmwares(struct device
|
|
|
if (ret < 0)
|
|
|
brcmf_fw_request_done(NULL, fwctx);
|
|
|
|
|
|
-+ wait_for_completion_timeout(&completion, msecs_to_jiffies(5000));
|
|
|
++
|
|
|
++ time_left = wait_for_completion_timeout(&completion,
|
|
|
++ msecs_to_jiffies(5000));
|
|
|
++ if (!time_left && fwctx)
|
|
|
++ fwctx->completion = NULL;
|
|
|
+
|
|
|
return 0;
|
|
|
}
|