summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2013-04-03 14:40:39 +0400
committerJohn W. Linville <linville@tuxdriver.com>2013-04-03 23:07:06 +0400
commitc7f34a69a2e32b139a6b66c8599252c46f37abba (patch)
treefe924689dda2164ce5affe3448e003a168254ea6 /drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
parente2432b6787a15e0b3c255a017d16033ba30204c0 (diff)
downloadlinux-c7f34a69a2e32b139a6b66c8599252c46f37abba.tar.xz
brcmfmac: add flow-control mode to firmware signalling
Upcoming patches will add firmware signalled flow control. Prepare by adding the mode, which defaults to disable it. The mode can be queried by brcmf_fws_fc_active() and set by a module parameter. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index 3ba9e1049f3b..05c8840392e5 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -363,21 +363,20 @@ void brcmf_rx_frames(struct device *dev, struct sk_buff_head *skb_list)
}
}
-void brcmf_txcomplete(struct device *dev, struct sk_buff *txp, bool success)
+void brcmf_txfinalize(struct brcmf_pub *drvr, struct sk_buff *txp,
+ bool success)
{
- u8 ifidx;
+ struct brcmf_if *ifp;
struct ethhdr *eh;
+ u8 ifidx;
u16 type;
- struct brcmf_bus *bus_if = dev_get_drvdata(dev);
- struct brcmf_pub *drvr = bus_if->drvr;
- struct brcmf_if *ifp;
int res;
res = brcmf_proto_hdrpull(drvr, false, &ifidx, txp);
ifp = drvr->iflist[ifidx];
if (!ifp)
- goto done;
+ return;
if (res == 0) {
eh = (struct ethhdr *)(txp->data);
@@ -391,8 +390,18 @@ void brcmf_txcomplete(struct device *dev, struct sk_buff *txp, bool success)
}
if (!success)
ifp->stats.tx_errors++;
+}
-done:
+void brcmf_txcomplete(struct device *dev, struct sk_buff *txp, bool success)
+{
+ struct brcmf_bus *bus_if = dev_get_drvdata(dev);
+ struct brcmf_pub *drvr = bus_if->drvr;
+
+ /* await txstatus signal for firmware is active */
+ if (success && brcmf_fws_fc_active(drvr->fws))
+ return;
+
+ brcmf_txfinalize(drvr, txp, success);
brcmu_pkt_buf_free_skb(txp);
}