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

brcmfmac: rename brcmf_sdio_buffrw()

The function brcmf_sdio_buffrw() is intended to be used for
transfering list of packets using scatter-gather functionality.
Rename function to brcmf_sdio_sglist_rw() to clarify this.
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 7f9a8dc8
...@@ -315,7 +315,7 @@ void brcmf_sdio_regwl(struct brcmf_sdio_dev *sdiodev, u32 addr, ...@@ -315,7 +315,7 @@ void brcmf_sdio_regwl(struct brcmf_sdio_dev *sdiodev, u32 addr,
} }
/** /**
* brcmf_sdio_buffrw - SDIO interface function for block data access * brcmf_sdio_sglist_rw - SDIO interface function for block data access
* @sdiodev: brcmfmac sdio device * @sdiodev: brcmfmac sdio device
* @fn: SDIO function number * @fn: SDIO function number
* @write: direction flag * @write: direction flag
...@@ -326,8 +326,9 @@ void brcmf_sdio_regwl(struct brcmf_sdio_dev *sdiodev, u32 addr, ...@@ -326,8 +326,9 @@ void brcmf_sdio_regwl(struct brcmf_sdio_dev *sdiodev, u32 addr,
* stack for block data access. It assumes that the skb passed down by the * stack for block data access. It assumes that the skb passed down by the
* caller has already been padded and aligned. * caller has already been padded and aligned.
*/ */
static int brcmf_sdio_buffrw(struct brcmf_sdio_dev *sdiodev, uint fn, static int brcmf_sdio_sglist_rw(struct brcmf_sdio_dev *sdiodev, uint fn,
bool write, u32 addr, struct sk_buff_head *pktlist) bool write, u32 addr,
struct sk_buff_head *pktlist)
{ {
unsigned int req_sz, func_blk_sz, sg_cnt, sg_data_sz, pkt_offset; unsigned int req_sz, func_blk_sz, sg_cnt, sg_data_sz, pkt_offset;
unsigned int max_req_sz, orig_offset, dst_offset; unsigned int max_req_sz, orig_offset, dst_offset;
...@@ -554,7 +555,7 @@ brcmf_sdcard_recv_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn, ...@@ -554,7 +555,7 @@ brcmf_sdcard_recv_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
skb_queue_head_init(&pkt_list); skb_queue_head_init(&pkt_list);
skb_queue_tail(&pkt_list, pkt); skb_queue_tail(&pkt_list, pkt);
err = brcmf_sdio_buffrw(sdiodev, fn, false, addr, &pkt_list); err = brcmf_sdio_sglist_rw(sdiodev, fn, false, addr, &pkt_list);
skb_dequeue_tail(&pkt_list); skb_dequeue_tail(&pkt_list);
done: done:
...@@ -577,7 +578,7 @@ int brcmf_sdcard_recv_chain(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn, ...@@ -577,7 +578,7 @@ int brcmf_sdcard_recv_chain(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
goto done; goto done;
incr_fix = (flags & SDIO_REQ_FIXED) ? SDIOH_DATA_FIX : SDIOH_DATA_INC; incr_fix = (flags & SDIO_REQ_FIXED) ? SDIOH_DATA_FIX : SDIOH_DATA_INC;
err = brcmf_sdio_buffrw(sdiodev, fn, false, addr, pktq); err = brcmf_sdio_sglist_rw(sdiodev, fn, false, addr, pktq);
done: done:
return err; return err;
...@@ -622,7 +623,7 @@ brcmf_sdcard_send_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn, ...@@ -622,7 +623,7 @@ brcmf_sdcard_send_pkt(struct brcmf_sdio_dev *sdiodev, u32 addr, uint fn,
width = (flags & SDIO_REQ_4BYTE) ? 4 : 2; width = (flags & SDIO_REQ_4BYTE) ? 4 : 2;
brcmf_sdio_addrprep(sdiodev, width, &addr); brcmf_sdio_addrprep(sdiodev, width, &addr);
err = brcmf_sdio_buffrw(sdiodev, fn, true, addr, pktq); err = brcmf_sdio_sglist_rw(sdiodev, fn, true, addr, pktq);
return err; return err;
} }
...@@ -673,8 +674,8 @@ brcmf_sdio_ramrw(struct brcmf_sdio_dev *sdiodev, bool write, u32 address, ...@@ -673,8 +674,8 @@ brcmf_sdio_ramrw(struct brcmf_sdio_dev *sdiodev, bool write, u32 address,
if (write) if (write)
memcpy(pkt->data, data, dsize); memcpy(pkt->data, data, dsize);
skb_queue_tail(&pkt_list, pkt); skb_queue_tail(&pkt_list, pkt);
bcmerror = brcmf_sdio_buffrw(sdiodev, SDIO_FUNC_1, write, bcmerror = brcmf_sdio_sglist_rw(sdiodev, SDIO_FUNC_1, write,
sdaddr, &pkt_list); sdaddr, &pkt_list);
skb_dequeue_tail(&pkt_list); skb_dequeue_tail(&pkt_list);
if (bcmerror) { if (bcmerror) {
brcmf_err("membytes transfer failed\n"); brcmf_err("membytes transfer failed\n");
......
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