linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH for-4.10 0/2] brcmfmac: small fixes for after merge window
@ 2016-12-09 11:34 Arend van Spriel
  2016-12-09 11:34 ` [PATCH for-4.10 1/2] brcmfmac: fix memory leak in brcmf_cfg80211_attach() Arend van Spriel
  2016-12-09 11:34 ` [PATCH for-4.10 2/2] brcmfmac: fix uninitialized field in scheduled scan ssid configuration Arend van Spriel
  0 siblings, 2 replies; 4+ messages in thread
From: Arend van Spriel @ 2016-12-09 11:34 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, Arend van Spriel

Two issues found during more testing. The first patch fixes a memory leak
in error path. The second one fixes a regression introduced by a change
that currently sits in wireless-drivers-next.

These patches have been applied on top of wireless-drivers-next/master branch
so it can apply on wireless-drivers/master after the merge window (fingers
crossed).

Arend van Spriel (2):
  brcmfmac: fix memory leak in brcmf_cfg80211_attach()
  brcmfmac: fix uninitialized field in scheduled scan ssid configuration

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 7 +++++--
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c      | 1 +
 2 files changed, 6 insertions(+), 2 deletions(-)

--
1.9.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH for-4.10 1/2] brcmfmac: fix memory leak in brcmf_cfg80211_attach()
  2016-12-09 11:34 [PATCH for-4.10 0/2] brcmfmac: small fixes for after merge window Arend van Spriel
@ 2016-12-09 11:34 ` Arend van Spriel
  2016-12-20 14:10   ` [for-4.10, " Kalle Valo
  2016-12-09 11:34 ` [PATCH for-4.10 2/2] brcmfmac: fix uninitialized field in scheduled scan ssid configuration Arend van Spriel
  1 sibling, 1 reply; 4+ messages in thread
From: Arend van Spriel @ 2016-12-09 11:34 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, Arend van Spriel

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@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index ccae3bb..7ffc4ab 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -6868,7 +6868,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr,

 	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);
@@ -6893,7 +6893,7 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr,
 	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 */
@@ -6908,6 +6908,9 @@ struct brcmf_cfg80211_info *brcmf_cfg80211_attach(struct brcmf_pub *drvr,

 	return cfg;

+detach:
+	brcmf_btcoex_detach(cfg);
+	brcmf_p2p_detach(&cfg->p2p);
 wiphy_unreg_out:
 	wiphy_unregister(cfg->wiphy);
 priv_out:
--
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH for-4.10 2/2] brcmfmac: fix uninitialized field in scheduled scan ssid configuration
  2016-12-09 11:34 [PATCH for-4.10 0/2] brcmfmac: small fixes for after merge window Arend van Spriel
  2016-12-09 11:34 ` [PATCH for-4.10 1/2] brcmfmac: fix memory leak in brcmf_cfg80211_attach() Arend van Spriel
@ 2016-12-09 11:34 ` Arend van Spriel
  1 sibling, 0 replies; 4+ messages in thread
From: Arend van Spriel @ 2016-12-09 11:34 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, Arend van Spriel

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@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
Reviewed-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pno.c
index f273cab..9a25e79 100644
--- 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 brcmf_if *ifp, struct cfg80211_ssid *ssid,
 	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);
--
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [for-4.10, 1/2] brcmfmac: fix memory leak in brcmf_cfg80211_attach()
  2016-12-09 11:34 ` [PATCH for-4.10 1/2] brcmfmac: fix memory leak in brcmf_cfg80211_attach() Arend van Spriel
@ 2016-12-20 14:10   ` Kalle Valo
  0 siblings, 0 replies; 4+ messages in thread
From: Kalle Valo @ 2016-12-20 14:10 UTC (permalink / raw)
  To: Arend Van Spriel; +Cc: linux-wireless, Arend van Spriel

Arend Van Spriel <arend.vanspriel@broadcom.com> wrote:
> 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@broadcom.com>
> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com>
> Reviewed-by: Franky Lin <franky.lin@broadcom.com>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>

2 patches applied to wireless-drivers.git, thanks.

cb853da3a368 brcmfmac: fix memory leak in brcmf_cfg80211_attach()
2b66325d5ea7 brcmfmac: fix uninitialized field in scheduled scan ssid configuration

-- 
https://patchwork.kernel.org/patch/9467971/

Documentation about submitting wireless patches and checking status
from patchwork:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-20 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-09 11:34 [PATCH for-4.10 0/2] brcmfmac: small fixes for after merge window Arend van Spriel
2016-12-09 11:34 ` [PATCH for-4.10 1/2] brcmfmac: fix memory leak in brcmf_cfg80211_attach() Arend van Spriel
2016-12-20 14:10   ` [for-4.10, " Kalle Valo
2016-12-09 11:34 ` [PATCH for-4.10 2/2] brcmfmac: fix uninitialized field in scheduled scan ssid configuration Arend van Spriel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).