All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chi-Hsien Lin <chi-hsien.lin@cypress.com>
To: linux-wireless@vger.kernel.org
Cc: brcm80211-dev-list@broadcom.com, brcm80211-dev-list@cypress.com,
	Arend van Spriel <arend.vanspriel@broadcom.com>,
	Franky Lin <franky.lin@broadcom.com>,
	Hante Meuleman <hante.meuleman@broadcom.com>,
	Wright Feng <wright.feng@cypress.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	Raveendran Somu <raveendran.somu@cypress.com>,
	Chi-hsien Lin <chi-hsien.lin@cypress.com>
Subject: [PATCH V3 3/6] brcmfmac: fix the incorrect return value in brcmf_inform_single_bss().
Date: Wed, 25 Mar 2020 03:20:26 -0500	[thread overview]
Message-ID: <1585124429-97371-4-git-send-email-chi-hsien.lin@cypress.com> (raw)
In-Reply-To: <1585124429-97371-1-git-send-email-chi-hsien.lin@cypress.com>

From: Raveendran Somu <raveendran.somu@cypress.com>

The function brcmf_inform_single_bss returns the value as success,
even when the length exceeds the maximum value.
The fix is to send appropriate code on this error.
This issue is observed when Cypress test group reported random fmac
crashes when running their tests and the path was identified from the
crash logs. With this fix the random failure issue in Cypress test group
was resolved.

Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Raveendran Somu <raveendran.somu@cypress.com>
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@cypress.com>
---
 drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index a2328d3eee03..2ba165330038 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -2953,7 +2953,7 @@ static s32 brcmf_inform_single_bss(struct brcmf_cfg80211_info *cfg,
 
 	if (le32_to_cpu(bi->length) > WL_BSS_INFO_MAX) {
 		bphy_err(drvr, "Bss info is larger than buffer. Discarding\n");
-		return 0;
+		return -EINVAL;
 	}
 
 	if (!bi->ctl_ch) {
-- 
2.1.0


  parent reply	other threads:[~2020-03-25  8:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-25  8:20 [PATCH V3 0/6] brcmfmac: USB change series Chi-Hsien Lin
2020-03-25  8:20 ` [PATCH V3 1/6] brcmfmac: Fix driver crash on USB control transfer timeout Chi-Hsien Lin
2020-03-26  9:44   ` Kalle Valo
2020-03-25  8:20 ` [PATCH V3 2/6] brcmfmac: Fix double freeing in the fmac usb data path Chi-Hsien Lin
2020-03-25  8:20 ` Chi-Hsien Lin [this message]
2020-03-25  8:20 ` [PATCH V3 4/6] brcmfmac: increase max hanger slots from 1K to 3K in fws layer Chi-Hsien Lin
2020-03-25  8:20 ` [PATCH V3 5/6] brcmfmac: add USB autosuspend feature support Chi-Hsien Lin
2020-03-25  8:20 ` [PATCH V3 6/6] brcmfmac: To support printing USB console messages Chi-Hsien Lin
2020-03-25  8:46   ` Arend Van Spriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1585124429-97371-4-git-send-email-chi-hsien.lin@cypress.com \
    --to=chi-hsien.lin@cypress.com \
    --cc=arend.vanspriel@broadcom.com \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=brcm80211-dev-list@cypress.com \
    --cc=franky.lin@broadcom.com \
    --cc=hante.meuleman@broadcom.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=raveendran.somu@cypress.com \
    --cc=wright.feng@cypress.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.