aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/860-brcmfmac-register-wiphy-s-during-module_init.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/kernel/mac80211/patches/860-brcmfmac-register-wiphy-s-during-module_init.patch')
-rw-r--r--package/kernel/mac80211/patches/860-brcmfmac-register-wiphy-s-during-module_init.patch26
1 files changed, 14 insertions, 12 deletions
diff --git a/package/kernel/mac80211/patches/860-brcmfmac-register-wiphy-s-during-module_init.patch b/package/kernel/mac80211/patches/860-brcmfmac-register-wiphy-s-during-module_init.patch
index e70738322d..2e710d3d62 100644
--- a/package/kernel/mac80211/patches/860-brcmfmac-register-wiphy-s-during-module_init.patch
+++ b/package/kernel/mac80211/patches/860-brcmfmac-register-wiphy-s-during-module_init.patch
@@ -31,35 +31,37 @@ Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
};
static void brcmf_fw_request_done(const struct firmware *fw, void *ctx);
-@@ -589,6 +590,8 @@ fail:
- fwctx->req = NULL;
- done:
+@@ -574,6 +575,8 @@ static void brcmf_fw_request_done(const
+ fwctx->req = NULL;
+ }
fwctx->done(fwctx->dev, ret, fwctx->req);
+ if (fwctx->completion)
+ complete(fwctx->completion);
kfree(fwctx);
}
-@@ -612,6 +615,8 @@ int brcmf_fw_get_firmwares(struct device
- struct brcmf_fw_request *req))
+@@ -598,6 +601,7 @@ int brcmf_fw_get_firmwares(struct device
{
+ struct brcmf_fw_item *first = &req->items[0];
struct brcmf_fw *fwctx;
+ struct completion completion;
-+ int err;
+ int ret;
brcmf_dbg(TRACE, "enter: dev=%s\n", dev_name(dev));
- if (!fw_cb)
-@@ -628,7 +633,14 @@ int brcmf_fw_get_firmwares(struct device
+@@ -615,12 +619,17 @@ int brcmf_fw_get_firmwares(struct device
fwctx->req = req;
fwctx->done = fw_cb;
+ init_completion(&completion);
+ fwctx->completion = &completion;
+
- brcmf_fw_request_next_item(fwctx, true);
-+
-+ wait_for_completion_timeout(fwctx->completion, msecs_to_jiffies(5000));
-+ fwctx->completion = NULL;
+ ret = request_firmware_nowait(THIS_MODULE, true, first->path,
+ fwctx->dev, GFP_KERNEL, fwctx,
+ brcmf_fw_request_done);
+ if (ret < 0)
+ brcmf_fw_request_done(NULL, fwctx);
+
++ wait_for_completion_timeout(&completion, msecs_to_jiffies(5000));
+
return 0;
}