提交 c8cce1f9 编写于 作者: A Arend van Spriel 提交者: 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: NFranky Lin <frankyl@broadcom.com>
Reviewed-by: NHante Meuleman <meuleman@broadcom.com>
Reviewed-by: NPieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: NArend van Spriel <arend@broadcom.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 667931e8
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册