linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arend van Spriel <arend@broadcom.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Franky Lin <frankyl@broadcom.com>,
	Arend van Spriel <arend@broadcom.com>
Subject: [PATCH 04/11] brcmfmac: no retries on rxglom superframe errors
Date: Wed, 25 Nov 2015 11:32:40 +0100	[thread overview]
Message-ID: <1448447567-12189-5-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1448447567-12189-1-git-send-email-arend@broadcom.com>

From: Franky Lin <frankyl@broadcom.com>

Aborting the current read attempt on the superframe also removes the
packet from the pipeline. Retries should not be attempted on the next
packet since it would not be a superframe(either a superframe descriptor
or other data packet) and should not be handled by brcmf_sdio_rxglom

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 .../wireless/broadcom/brcm80211/brcmfmac/sdio.c    | 30 ++++++----------------
 1 file changed, 8 insertions(+), 22 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
index 7e74ac3..bf3c281 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c
@@ -460,7 +460,6 @@ struct brcmf_sdio {
 
 	struct sk_buff *glomd;	/* Packet containing glomming descriptor */
 	struct sk_buff_head glom; /* Packet list for glommed superframe */
-	uint glomerr;		/* Glom packet read errors */
 
 	u8 *rxbuf;		/* Buffer for receiving control packets */
 	uint rxblen;		/* Allocated length of rxbuf */
@@ -1654,20 +1653,15 @@ static u8 brcmf_sdio_rxglom(struct brcmf_sdio *bus, u8 rxseq)
 		sdio_release_host(bus->sdiodev->func[1]);
 		bus->sdcnt.f2rxdata++;
 
-		/* On failure, kill the superframe, allow a couple retries */
+		/* On failure, kill the superframe */
 		if (errcode < 0) {
 			brcmf_err("glom read of %d bytes failed: %d\n",
 				  dlen, errcode);
 
 			sdio_claim_host(bus->sdiodev->func[1]);
-			if (bus->glomerr++ < 3) {
-				brcmf_sdio_rxfail(bus, true, true);
-			} else {
-				bus->glomerr = 0;
-				brcmf_sdio_rxfail(bus, true, false);
-				bus->sdcnt.rxglomfail++;
-				brcmf_sdio_free_glom(bus);
-			}
+			brcmf_sdio_rxfail(bus, true, false);
+			bus->sdcnt.rxglomfail++;
+			brcmf_sdio_free_glom(bus);
 			sdio_release_host(bus->sdiodev->func[1]);
 			return 0;
 		}
@@ -1708,19 +1702,11 @@ static u8 brcmf_sdio_rxglom(struct brcmf_sdio *bus, u8 rxseq)
 		}
 
 		if (errcode) {
-			/* Terminate frame on error, request
-				 a couple retries */
+			/* Terminate frame on error */
 			sdio_claim_host(bus->sdiodev->func[1]);
-			if (bus->glomerr++ < 3) {
-				/* Restore superframe header space */
-				skb_push(pfirst, sfdoff);
-				brcmf_sdio_rxfail(bus, true, true);
-			} else {
-				bus->glomerr = 0;
-				brcmf_sdio_rxfail(bus, true, false);
-				bus->sdcnt.rxglomfail++;
-				brcmf_sdio_free_glom(bus);
-			}
+			brcmf_sdio_rxfail(bus, true, false);
+			bus->sdcnt.rxglomfail++;
+			brcmf_sdio_free_glom(bus);
 			sdio_release_host(bus->sdiodev->func[1]);
 			bus->cur_read.len = 0;
 			return 0;
-- 
1.9.1


  parent reply	other threads:[~2015-11-25 10:32 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25 10:32 [PATCH 00/11] brcmfmac: beamforming support and cleanup Arend van Spriel
2015-11-25 10:32 ` [PATCH 01/11] brcmfmac: Cleanup ssid storage Arend van Spriel
2015-11-30 12:48   ` [01/11] " Kalle Valo
2015-11-30 12:49     ` Kalle Valo
2015-11-25 10:32 ` [PATCH 02/11] brcmfmac: Return actual error by fwil Arend van Spriel
2015-11-25 10:32 ` [PATCH 03/11] brcmfmac: Change error print on wlan0 existence Arend van Spriel
2015-11-25 10:32 ` Arend van Spriel [this message]
2015-11-25 10:32 ` [PATCH 05/11] brcmfmac: Remove redundant parameter action from scan Arend van Spriel
2015-11-25 10:32 ` [PATCH 06/11] brcmfmac: Cleanup roaming configuration Arend van Spriel
2015-11-25 10:32 ` [PATCH 07/11] brcmfmac: Add beamforming support Arend van Spriel
2015-11-25 10:32 ` [PATCH 08/11] brcmfmac: Make 5G join preference configurable Arend van Spriel
2015-11-30 10:58   ` Kalle Valo
2015-12-01  8:33     ` Arend van Spriel
2015-12-01  9:48       ` Kalle Valo
2015-12-01 11:08         ` Jouni Malinen
2015-12-02 13:32           ` Arend van Spriel
2015-12-02 15:12             ` Jouni Malinen
2015-12-02 16:38             ` Dan Williams
2015-12-02 18:00               ` Paul Stewart
2015-12-02 21:07                 ` Dan Williams
2015-12-03 21:28                 ` Arend van Spriel
2015-11-25 10:32 ` [PATCH 09/11] brcmfmac: assure net_ratelimit() is declared before use Arend van Spriel
2015-11-25 10:32 ` [PATCH 10/11] brcmfmac: Unify methods to define and map firmware files Arend van Spriel
2015-11-25 10:32 ` [PATCH 11/11] brcmfmac: Fix double free on exception at module load Arend van Spriel
2015-11-30 11:00   ` Kalle Valo

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=1448447567-12189-5-git-send-email-arend@broadcom.com \
    --to=arend@broadcom.com \
    --cc=frankyl@broadcom.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /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 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).