[source] mac80211: brcmfmac: backport 4.10 fixes & typo fix

LEDE Commits lede-commits at lists.infradead.org
Sun Feb 5 15:38:25 PST 2017


rmilecki pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/4b9bdb48d904fadb8d32510490f1b9f5c35ee6b2

commit 4b9bdb48d904fadb8d32510490f1b9f5c35ee6b2
Author: Rafał Miłecki <rafal at milecki.pl>
AuthorDate: Thu Feb 2 09:29:21 2017 +0100

    mac80211: brcmfmac: backport 4.10 fixes & typo fix
    
    This includes memory leak fix in initialization path.
    
    Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 ...-fix-memory-leak-in-brcmf_cfg80211_attach.patch | 47 ++++++++++++++++++++++
 ...x-uninitialized-field-in-scheduled-scan-s.patch | 29 +++++++++++++
 ...-brcmfmac-fix-spelling-mistakes-on-Ivalid.patch | 35 ++++++++++++++++
 3 files changed, 111 insertions(+)

diff --git a/package/kernel/mac80211/patches/358-0001-brcmfmac-fix-memory-leak-in-brcmf_cfg80211_attach.patch b/package/kernel/mac80211/patches/358-0001-brcmfmac-fix-memory-leak-in-brcmf_cfg80211_attach.patch
new file mode 100644
index 0000000..005db2b
--- /dev/null
+++ b/package/kernel/mac80211/patches/358-0001-brcmfmac-fix-memory-leak-in-brcmf_cfg80211_attach.patch
@@ -0,0 +1,47 @@
+From cb853da3a368c40300a0e940f86be582037bb082 Mon Sep 17 00:00:00 2001
+From: Arend Van Spriel <arend.vanspriel at broadcom.com>
+Date: Fri, 9 Dec 2016 11:34:13 +0000
+Subject: [PATCH] brcmfmac: fix memory leak in brcmf_cfg80211_attach()
+
+In brcmf_cfg80211_attach() there was one error path not properly
+handled as it leaked memory allocated in brcmf_btcoex_attach().
+
+Reviewed-by: Hante Meuleman <hante.meuleman at broadcom.com>
+Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts at broadcom.com>
+Reviewed-by: Franky Lin <franky.lin at broadcom.com>
+Signed-off-by: Arend van Spriel <arend.vanspriel at broadcom.com>
+Signed-off-by: Kalle Valo <kvalo at codeaurora.org>
+---
+ drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+@@ -6866,7 +6866,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+ 
+ 	err = brcmf_p2p_attach(cfg, p2pdev_forced);
+ 	if (err) {
+-		brcmf_err("P2P initilisation failed (%d)\n", err);
++		brcmf_err("P2P initialisation failed (%d)\n", err);
+ 		goto wiphy_unreg_out;
+ 	}
+ 	err = brcmf_btcoex_attach(cfg);
+@@ -6891,7 +6891,7 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+ 	err = brcmf_fweh_activate_events(ifp);
+ 	if (err) {
+ 		brcmf_err("FWEH activation failed (%d)\n", err);
+-		goto wiphy_unreg_out;
++		goto detach;
+ 	}
+ 
+ 	/* Fill in some of the advertised nl80211 supported features */
+@@ -6906,6 +6906,9 @@ struct brcmf_cfg80211_info *brcmf_cfg802
+ 
+ 	return cfg;
+ 
++detach:
++	brcmf_btcoex_detach(cfg);
++	brcmf_p2p_detach(&cfg->p2p);
+ wiphy_unreg_out:
+ 	wiphy_unregister(cfg->wiphy);
+ priv_out:
diff --git a/package/kernel/mac80211/patches/358-0002-brcmfmac-fix-uninitialized-field-in-scheduled-scan-s.patch b/package/kernel/mac80211/patches/358-0002-brcmfmac-fix-uninitialized-field-in-scheduled-scan-s.patch
new file mode 100644
index 0000000..ebdf1cc
--- /dev/null
+++ b/package/kernel/mac80211/patches/358-0002-brcmfmac-fix-uninitialized-field-in-scheduled-scan-s.patch
@@ -0,0 +1,29 @@
+From 2b66325d5ea7c2a39ac69ed83b6979afe480d81a Mon Sep 17 00:00:00 2001
+From: Arend Van Spriel <arend.vanspriel at broadcom.com>
+Date: Fri, 9 Dec 2016 11:34:14 +0000
+Subject: [PATCH] brcmfmac: fix uninitialized field in scheduled scan ssid
+ configuration
+
+The scheduled scan ssid configuration in firmware has a flags field that
+was not initialized resulting in unexpected behaviour.
+
+Fixes: e3bdb7cc0300 ("brcmfmac: fix handling ssids in .sched_scan_start() callback")
+Reviewed-by: Hante Meuleman <hante.meuleman at broadcom.com>
+Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts at broadcom.com>
+Reviewed-by: Franky Lin <franky.lin at broadcom.com>
+Signed-off-by: Arend van Spriel <arend.vanspriel at broadcom.com>
+Signed-off-by: Kalle Valo <kvalo at codeaurora.org>
+---
+ drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c
+@@ -137,6 +137,7 @@ static int brcmf_pno_add_ssid(struct brc
+ 	pfn.wpa_auth = cpu_to_le32(BRCMF_PNO_WPA_AUTH_ANY);
+ 	pfn.wsec = cpu_to_le32(0);
+ 	pfn.infra = cpu_to_le32(1);
++	pfn.flags = 0;
+ 	if (active)
+ 		pfn.flags = cpu_to_le32(1 << BRCMF_PNO_HIDDEN_BIT);
+ 	pfn.ssid.SSID_len = cpu_to_le32(ssid->ssid_len);
diff --git a/package/kernel/mac80211/patches/359-0001-brcmfmac-fix-spelling-mistakes-on-Ivalid.patch b/package/kernel/mac80211/patches/359-0001-brcmfmac-fix-spelling-mistakes-on-Ivalid.patch
new file mode 100644
index 0000000..0afc10b
--- /dev/null
+++ b/package/kernel/mac80211/patches/359-0001-brcmfmac-fix-spelling-mistakes-on-Ivalid.patch
@@ -0,0 +1,35 @@
+From ad334bbb07b07e2873942571b0c9f3c34571bd47 Mon Sep 17 00:00:00 2001
+From: Colin Ian King <colin.king at canonical.com>
+Date: Fri, 23 Dec 2016 00:43:22 +0000
+Subject: [PATCH] brcmfmac: fix spelling mistakes on "Ivalid"
+
+Trivial fixes to spelling mistake "Ivalid" to "Invalid" in
+brcmf_err error messages.
+
+Signed-off-by: Colin Ian King <colin.king at canonical.com>
+Acked-by: Arend van Spriel <arend.vanspriel at broadcom.com>
+Signed-off-by: Kalle Valo <kvalo at codeaurora.org>
+---
+ drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+@@ -3969,7 +3969,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
+ 			pval |= AES_ENABLED;
+ 			break;
+ 		default:
+-			brcmf_err("Ivalid unicast security info\n");
++			brcmf_err("Invalid unicast security info\n");
+ 		}
+ 		offset++;
+ 	}
+@@ -4013,7 +4013,7 @@ brcmf_configure_wpaie(struct brcmf_if *i
+ 			wpa_auth |= WPA2_AUTH_1X_SHA256;
+ 			break;
+ 		default:
+-			brcmf_err("Ivalid key mgmt info\n");
++			brcmf_err("Invalid key mgmt info\n");
+ 		}
+ 		offset++;
+ 	}



More information about the lede-commits mailing list