c587f413d525d0cf75cdebc6a867672148de23b3
[openwrt/staging/blocktrron.git] /
1 From 378f6a16043e5d3346301fc618f503e97aea335b Mon Sep 17 00:00:00 2001
2 From: Arend Van Spriel <arend.vanspriel@broadcom.com>
3 Date: Tue, 9 Jan 2018 13:22:54 +0100
4 Subject: [PATCH] brcmfmac: rename brcmf_sdiod_buff_{read,write}() functions
5
6 Rename functions to brcmf_sdio_skbuff_{read,write}() as we pass an
7 skbuff to this function.
8
9 Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
10 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
11 ---
12 .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 48 +++++++++++-----------
13 1 file changed, 24 insertions(+), 24 deletions(-)
14
15 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
16 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
17 @@ -292,24 +292,24 @@ out:
18 *ret = retval;
19 }
20
21 -static int brcmf_sdiod_buff_read(struct brcmf_sdio_dev *sdiodev,
22 - struct sdio_func *func, u32 addr,
23 - struct sk_buff *pkt)
24 +static int brcmf_sdiod_skbuff_read(struct brcmf_sdio_dev *sdiodev,
25 + struct sdio_func *func, u32 addr,
26 + struct sk_buff *skb)
27 {
28 unsigned int req_sz;
29 int err;
30
31 /* Single skb use the standard mmc interface */
32 - req_sz = pkt->len + 3;
33 + req_sz = skb->len + 3;
34 req_sz &= (uint)~3;
35
36 switch (func->num) {
37 case 1:
38 - err = sdio_memcpy_fromio(func, ((u8 *)(pkt->data)), addr,
39 + err = sdio_memcpy_fromio(func, ((u8 *)(skb->data)), addr,
40 req_sz);
41 break;
42 case 2:
43 - err = sdio_readsb(func, ((u8 *)(pkt->data)), addr, req_sz);
44 + err = sdio_readsb(func, ((u8 *)(skb->data)), addr, req_sz);
45 break;
46 default:
47 /* bail out as things are really fishy here */
48 @@ -323,18 +323,18 @@ static int brcmf_sdiod_buff_read(struct
49 return err;
50 }
51
52 -static int brcmf_sdiod_buff_write(struct brcmf_sdio_dev *sdiodev,
53 - struct sdio_func *func, u32 addr,
54 - struct sk_buff *pkt)
55 +static int brcmf_sdiod_skbuff_write(struct brcmf_sdio_dev *sdiodev,
56 + struct sdio_func *func, u32 addr,
57 + struct sk_buff *skb)
58 {
59 unsigned int req_sz;
60 int err;
61
62 /* Single skb use the standard mmc interface */
63 - req_sz = pkt->len + 3;
64 + req_sz = skb->len + 3;
65 req_sz &= (uint)~3;
66
67 - err = sdio_memcpy_toio(func, addr, ((u8 *)(pkt->data)), req_sz);
68 + err = sdio_memcpy_toio(func, addr, ((u8 *)(skb->data)), req_sz);
69
70 if (err == -ENOMEDIUM)
71 brcmf_sdiod_change_state(sdiodev, BRCMF_SDIOD_NOMEDIUM);
72 @@ -550,7 +550,7 @@ int brcmf_sdiod_recv_pkt(struct brcmf_sd
73 addr &= SBSDIO_SB_OFT_ADDR_MASK;
74 addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
75
76 - err = brcmf_sdiod_buff_read(sdiodev, sdiodev->func2, addr, pkt);
77 + err = brcmf_sdiod_skbuff_read(sdiodev, sdiodev->func2, addr, pkt);
78
79 done:
80 return err;
81 @@ -575,14 +575,14 @@ int brcmf_sdiod_recv_chain(struct brcmf_
82 addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
83
84 if (pktq->qlen == 1)
85 - err = brcmf_sdiod_buff_read(sdiodev, sdiodev->func2, addr,
86 - pktq->next);
87 + err = brcmf_sdiod_skbuff_read(sdiodev, sdiodev->func2, addr,
88 + pktq->next);
89 else if (!sdiodev->sg_support) {
90 glom_skb = brcmu_pkt_buf_get_skb(totlen);
91 if (!glom_skb)
92 return -ENOMEM;
93 - err = brcmf_sdiod_buff_read(sdiodev, sdiodev->func2, addr,
94 - glom_skb);
95 + err = brcmf_sdiod_skbuff_read(sdiodev, sdiodev->func2, addr,
96 + glom_skb);
97 if (err)
98 goto done;
99
100 @@ -623,8 +623,8 @@ int brcmf_sdiod_send_buf(struct brcmf_sd
101 addr |= SBSDIO_SB_ACCESS_2_4B_FLAG;
102
103 if (!err)
104 - err = brcmf_sdiod_buff_write(sdiodev, sdiodev->func2, addr,
105 - mypkt);
106 + err = brcmf_sdiod_skbuff_write(sdiodev, sdiodev->func2, addr,
107 + mypkt);
108
109 brcmu_pkt_buf_free_skb(mypkt);
110
111 @@ -649,8 +649,8 @@ int brcmf_sdiod_send_pkt(struct brcmf_sd
112
113 if (pktq->qlen == 1 || !sdiodev->sg_support) {
114 skb_queue_walk(pktq, skb) {
115 - err = brcmf_sdiod_buff_write(sdiodev, sdiodev->func2,
116 - addr, skb);
117 + err = brcmf_sdiod_skbuff_write(sdiodev, sdiodev->func2,
118 + addr, skb);
119 if (err)
120 break;
121 }
122 @@ -706,11 +706,11 @@ brcmf_sdiod_ramrw(struct brcmf_sdio_dev
123
124 if (write) {
125 memcpy(pkt->data, data, dsize);
126 - err = brcmf_sdiod_buff_write(sdiodev, sdiodev->func1,
127 - sdaddr, pkt);
128 + err = brcmf_sdiod_skbuff_write(sdiodev, sdiodev->func1,
129 + sdaddr, pkt);
130 } else {
131 - err = brcmf_sdiod_buff_read(sdiodev, sdiodev->func1,
132 - sdaddr, pkt);
133 + err = brcmf_sdiod_skbuff_read(sdiodev, sdiodev->func1,
134 + sdaddr, pkt);
135 }
136
137 if (err) {