aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2018-11-07 09:43:14 +0100
committerRafał Miłecki <rafal@milecki.pl>2018-11-07 09:43:32 +0100
commit5932eb690f24c25b11119a55242dac4718fe8324 (patch)
tree15538177ef3bfb3fdebf6248e17c8ef8f4e8b3de /package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch
parentb50f162b3cce3d95874e4394f4765413f58765f1 (diff)
downloadupstream-5932eb690f24c25b11119a55242dac4718fe8324.tar.gz
upstream-5932eb690f24c25b11119a55242dac4718fe8324.tar.bz2
upstream-5932eb690f24c25b11119a55242dac4718fe8324.zip
mac80211: brcmfmac: backport firmware loading cleanup
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch')
-rw-r--r--package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch28
1 files changed, 16 insertions, 12 deletions
diff --git a/package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch b/package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch
index e70738322d..ed95e7a240 100644
--- a/package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch
+++ b/package/kernel/mac80211/patches/brcm/860-brcmfmac-register-wiphy-s-during-module_init.patch
@@ -31,33 +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:
+@@ -555,6 +556,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))
+@@ -579,6 +582,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
+@@ -595,6 +599,9 @@ int brcmf_fw_get_firmwares(struct device
+ fwctx->dev = dev;
fwctx->req = req;
fwctx->done = fw_cb;
-
++
+ init_completion(&completion);
+ fwctx->completion = &completion;
-+
- brcmf_fw_request_next_item(fwctx, true);
-+
+
+ ret = request_firmware_nowait(THIS_MODULE, true, first->path,
+ fwctx->dev, GFP_KERNEL, fwctx,
+@@ -602,6 +609,9 @@ int brcmf_fw_get_firmwares(struct device
+ if (ret < 0)
+ brcmf_fw_request_done(NULL, fwctx);
+
+ wait_for_completion_timeout(fwctx->completion, msecs_to_jiffies(5000));
+ fwctx->completion = NULL;
+