From: "Arend van Spriel" <arend@broadcom.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, "Arend van Spriel" <arend@broadcom.com>
Subject: [PATCH 02/12] brcmfmac: .txdata() bus callback should not call brcmf_txcomplete()
Date: Sat, 10 Aug 2013 12:27:20 +0200 [thread overview]
Message-ID: <1376130450-29746-3-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1376130450-29746-1-git-send-email-arend@broadcom.com>
With firmware-signalling the packet handed to the bus specific driver
layer should not be discarded with brcmf_txcomplete() in the failure
path. Instead only an error is returned and the caller decides what
to do with the packet.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 1 -
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 6 +++++-
drivers/net/wireless/brcm80211/brcmfmac/usb.c | 1 -
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
index 5cbce1d..db31312 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
@@ -2297,7 +2297,6 @@ static int brcmf_sdbrcm_bus_txdata(struct device *dev, struct sk_buff *pkt)
spin_lock_irqsave(&bus->txqlock, flags);
if (!brcmf_c_prec_enq(bus->sdiodev->dev, &bus->txq, pkt, prec)) {
skb_pull(pkt, SDPCM_HDRLEN);
- brcmf_txcomplete(bus->sdiodev->dev, pkt, false);
brcmf_err("out of bus->txq !!!\n");
ret = -ENOSR;
} else {
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
index 29b1f24..601b0d0 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
@@ -1745,6 +1745,7 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
int fifo = BRCMF_FWS_FIFO_BCMC;
bool multicast = is_multicast_ether_addr(eh->h_dest);
bool pae = eh->h_proto == htons(ETH_P_PAE);
+ int ret;
/* determine the priority */
if (!skb->priority)
@@ -1759,7 +1760,10 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
brcmf_proto_hdrpush(drvr, ifp->ifidx, 0, skb);
/* Use bus module to send data frame */
- return brcmf_bus_txdata(drvr->bus_if, skb);
+ ret = brcmf_bus_txdata(drvr->bus_if, skb);
+ if (ret < 0)
+ brcmf_txfinalize(drvr, skb, false);
+ return ret;
}
/* set control buffer information */
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
index 322cadc..39e01a7 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/usb.c
@@ -614,7 +614,6 @@ static int brcmf_usb_tx(struct device *dev, struct sk_buff *skb)
return 0;
fail:
- brcmf_txcomplete(dev, skb, false);
return ret;
}
--
1.8.1.3
next prev parent reply other threads:[~2013-08-10 10:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-10 10:27 [PATCH 00/12] brcm80211: new functionality and some cleanup fixes Arend van Spriel
2013-08-10 10:27 ` [PATCH 01/12] brcmfmac: use irq safe spinlock in brcmf_sdbrcm_txdata() Arend van Spriel
2013-08-10 10:27 ` Arend van Spriel [this message]
2013-08-10 10:27 ` [PATCH 03/12] brcmfmac: add AMPDU reordering functionality Arend van Spriel
2013-08-10 10:27 ` [PATCH 04/12] brcmfmac: always use worker thread for tx data Arend van Spriel
2013-08-10 10:27 ` [PATCH 05/12] brcmfmac: no fws locking outside fws module Arend van Spriel
2013-08-10 10:27 ` [PATCH 06/12] brcmfmac: ignore IF event if firmware indicates it Arend van Spriel
2013-08-10 10:27 ` [PATCH 07/12] brcmfmac: add support for manual TDLS operations Arend van Spriel
2013-08-10 10:27 ` [PATCH 08/12] brcmfmac: abstract tx packet processing functions Arend van Spriel
2013-08-10 10:27 ` [PATCH 09/12] brcmfmac: remove align from brcmf_bus structure Arend van Spriel
2013-08-10 10:27 ` [PATCH 10/12] brcmfmac: streamline sdio bus header code Arend van Spriel
2013-08-10 10:27 ` [PATCH 11/12] brcmfmac: use configurable sdio bus header length for tx packet Arend van Spriel
2013-08-10 10:27 ` [PATCH 12/12] brcmsmac: support 4313iPA Arend van Spriel
2013-08-11 12:48 ` Jonas Gorski
2013-08-12 10:10 ` Arend van Spriel
2013-08-12 10:22 ` David Herrmann
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=1376130450-29746-3-git-send-email-arend@broadcom.com \
--to=arend@broadcom.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox