diff options
author | Franky Lin <franky.lin@broadcom.com> | 2017-03-11 00:17:03 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-03-20 20:14:51 +0300 |
commit | 7b584396b7a760bc77bbde4625f83ef173159d3e (patch) | |
tree | 60220bd7eedba446d8cba10da4afe723abe38478 /drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | |
parent | 20ec4f57498f8770c7a1a3e2a316fa752a424178 (diff) | |
download | linux-7b584396b7a760bc77bbde4625f83ef173159d3e.tar.xz |
brcmfmac: move brcmf_txcomplete to bcdc layer
brcmf_txcomplete is invoked by sdio and usb bus module which are using
bcdc protocol. So move it from core module into bcdc layer.
Signed-off-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c')
-rw-r--r-- | drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c index 4c7dafa162ac..bee70f3bd4db 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c @@ -355,6 +355,26 @@ void brcmf_proto_bcdc_txflowblock(struct device *dev, bool state) brcmf_fws_bus_blocked(drvr, state); } +void +brcmf_proto_bcdc_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; + struct brcmf_if *ifp; + + /* await txstatus signal for firmware if active */ + if (brcmf_fws_fc_active(drvr->fws)) { + if (!success) + brcmf_fws_bustxfail(drvr->fws, txp); + } else { + if (brcmf_proto_bcdc_hdrpull(drvr, false, txp, &ifp)) + brcmu_pkt_buf_free_skb(txp); + else + brcmf_txfinalize(ifp, txp, success); + } +} + static void brcmf_proto_bcdc_configure_addr_mode(struct brcmf_pub *drvr, int ifidx, enum proto_addr_mode addr_mode) |