Commit c8cce1f9 authored by Arend van Spriel's avatar Arend van Spriel Committed by John W. Linville

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: default avatarFranky Lin <frankyl@broadcom.com>
Reviewed-by: default avatarHante Meuleman <meuleman@broadcom.com>
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 667931e8
...@@ -620,6 +620,7 @@ int ...@@ -620,6 +620,7 @@ int
brcmf_sdcard_send_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn, brcmf_sdcard_send_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
uint flags, struct sk_buff_head *pktq) uint flags, struct sk_buff_head *pktq)
{ {
struct sk_buff *skb;
uint width; uint width;
int err; int err;
...@@ -631,9 +632,16 @@ brcmf_sdcard_send_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn, ...@@ -631,9 +632,16 @@ brcmf_sdcard_send_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
if (err) if (err)
return err; return err;
if (pktq->qlen == 1) if (pktq->qlen == 1 || !sdiodev->sg_support)
return brcmf_sdio_buffrw(sdiodev, fn, true, addr, pktq->next); skb_queue_walk(pktq, skb) {
return brcmf_sdio_sglist_rw(sdiodev, fn, true, addr, pktq); 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 int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment