aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/brcm80211
diff options
context:
space:
mode:
authorArend van Spriel2013-10-15 15:44:55 +0200
committerJohn W. Linville2013-10-18 14:06:58 -0400
commitc8cce1f9a714b90ab454e3ac4a9968445e228b81 (patch)
treeeb13d0472d68df9616a40856d906762cb09ebde1 /drivers/net/wireless/brcm80211
parent667931e8aad7f2ef2417a458a635db54f512be17 (diff)
brcmfmac: fix brcmf_sdcard_send_pkt() for host without sg support
If the host does not support scatter-gather transmit the packets in the pktq individually using brcmf_sdio_buffrw(). Reviewed-by: Franky Lin <frankyl@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@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')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
index 92818d790de5..1103dc1cc9dc 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c
@@ -620,6 +620,7 @@ int
brcmf_sdcard_send_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
uint flags, struct sk_buff_head *pktq)
{
+ struct sk_buff *skb;
uint width;
int err;
@@ -631,9 +632,16 @@ brcmf_sdcard_send_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
if (err)
return err;
- if (pktq->qlen == 1)
- return brcmf_sdio_buffrw(sdiodev, fn, true, addr, pktq->next);
- return brcmf_sdio_sglist_rw(sdiodev, fn, true, addr, pktq);
+ if (pktq->qlen == 1 || !sdiodev->sg_support)
+ skb_queue_walk(pktq, skb) {
+ err = brcmf_sdio_buffrw(sdiodev, fn, true, addr, skb);
+ if (err)
+ break;
+ }
+ else
+ err = brcmf_sdio_sglist_rw(sdiodev, fn, true, addr, pktq);
+
+ return err;
}
int