Commit 27a29906 authored by Franky Lin's avatar Franky Lin Committed by Greg Kroah-Hartman

staging: brcm80211: remove function wrapper of getting sb window address

The address stored in sdiodev can be used directly instead of using
the wrapper function brcmf_sdcard_cur_sbwad.
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarRoland Vossen <rvossen@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a723a22d
...@@ -476,11 +476,6 @@ int brcmf_sdcard_abort(struct brcmf_sdio_dev *sdiodev, uint fn) ...@@ -476,11 +476,6 @@ int brcmf_sdcard_abort(struct brcmf_sdio_dev *sdiodev, uint fn)
return 0; return 0;
} }
u32 brcmf_sdcard_cur_sbwad(struct brcmf_sdio_dev *sdiodev)
{
return sdiodev->sbwad;
}
int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
{ {
u32 regs = 0; u32 regs = 0;
......
...@@ -1336,9 +1336,9 @@ static int brcmf_sdbrcm_txpkt(struct brcmf_bus *bus, struct sk_buff *pkt, ...@@ -1336,9 +1336,9 @@ static int brcmf_sdbrcm_txpkt(struct brcmf_bus *bus, struct sk_buff *pkt,
len = roundup(len, ALIGNMENT); len = roundup(len, ALIGNMENT);
do { do {
ret = brcmf_sdbrcm_send_buf(bus, ret = brcmf_sdbrcm_send_buf(bus, bus->sdiodev->sbwad,
brcmf_sdcard_cur_sbwad(bus->sdiodev), SDIO_FUNC_2, F2SYNC, frame,
SDIO_FUNC_2, F2SYNC, frame, len, pkt); len, pkt);
bus->f2txdata++; bus->f2txdata++;
if (ret < 0) { if (ret < 0) {
...@@ -1625,10 +1625,8 @@ brcmf_sdbrcm_bus_txctl(struct brcmf_bus *bus, unsigned char *msg, uint msglen) ...@@ -1625,10 +1625,8 @@ brcmf_sdbrcm_bus_txctl(struct brcmf_bus *bus, unsigned char *msg, uint msglen)
do { do {
bus->ctrl_frame_stat = false; bus->ctrl_frame_stat = false;
ret = brcmf_sdbrcm_send_buf(bus, ret = brcmf_sdbrcm_send_buf(bus, bus->sdiodev->sbwad,
brcmf_sdcard_cur_sbwad(bus->sdiodev), SDIO_FUNC_2, F2SYNC, frame, len, NULL);
SDIO_FUNC_2,
F2SYNC, frame, len, NULL);
if (ret < 0) { if (ret < 0) {
/* On failure, abort the command and /* On failure, abort the command and
...@@ -1976,11 +1974,9 @@ brcmf_sdbrcm_membytes(struct brcmf_bus *bus, bool write, u32 address, u8 *data, ...@@ -1976,11 +1974,9 @@ brcmf_sdbrcm_membytes(struct brcmf_bus *bus, bool write, u32 address, u8 *data,
xfer_done: xfer_done:
/* Return the window to backplane enumeration space for core access */ /* Return the window to backplane enumeration space for core access */
if (brcmf_sdcard_set_sbaddr_window(bus->sdiodev, if (brcmf_sdcard_set_sbaddr_window(bus->sdiodev, bus->sdiodev->sbwad))
brcmf_sdcard_cur_sbwad(
bus->sdiodev)))
brcmf_dbg(ERROR, "FAILED to set window back to 0x%x\n", brcmf_dbg(ERROR, "FAILED to set window back to 0x%x\n",
brcmf_sdcard_cur_sbwad(bus->sdiodev)); bus->sdiodev->sbwad);
return bcmerror; return bcmerror;
} }
...@@ -3256,7 +3252,7 @@ brcmf_sdbrcm_read_control(struct brcmf_bus *bus, u8 *hdr, uint len, uint doff) ...@@ -3256,7 +3252,7 @@ brcmf_sdbrcm_read_control(struct brcmf_bus *bus, u8 *hdr, uint len, uint doff)
/* Read remainder of frame body into the rxctl buffer */ /* Read remainder of frame body into the rxctl buffer */
sdret = brcmf_sdcard_recv_buf(bus->sdiodev, sdret = brcmf_sdcard_recv_buf(bus->sdiodev,
brcmf_sdcard_cur_sbwad(bus->sdiodev), bus->sdiodev->sbwad,
SDIO_FUNC_2, SDIO_FUNC_2,
F2SYNC, (bus->rxctl + firstread), rdlen, F2SYNC, (bus->rxctl + firstread), rdlen,
NULL); NULL);
...@@ -3412,13 +3408,13 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_bus *bus, u8 rxseq) ...@@ -3412,13 +3408,13 @@ static u8 brcmf_sdbrcm_rxglom(struct brcmf_bus *bus, u8 rxseq)
*/ */
if (usechain) { if (usechain) {
errcode = brcmf_sdcard_recv_buf(bus->sdiodev, errcode = brcmf_sdcard_recv_buf(bus->sdiodev,
brcmf_sdcard_cur_sbwad(bus->sdiodev), bus->sdiodev->sbwad,
SDIO_FUNC_2, SDIO_FUNC_2,
F2SYNC, (u8 *) pfirst->data, dlen, F2SYNC, (u8 *) pfirst->data, dlen,
pfirst); pfirst);
} else if (bus->dataptr) { } else if (bus->dataptr) {
errcode = brcmf_sdcard_recv_buf(bus->sdiodev, errcode = brcmf_sdcard_recv_buf(bus->sdiodev,
brcmf_sdcard_cur_sbwad(bus->sdiodev), bus->sdiodev->sbwad,
SDIO_FUNC_2, SDIO_FUNC_2,
F2SYNC, bus->dataptr, dlen, F2SYNC, bus->dataptr, dlen,
NULL); NULL);
...@@ -3756,8 +3752,7 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished) ...@@ -3756,8 +3752,7 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished)
rxbuf = (u8 *) (pkt->data); rxbuf = (u8 *) (pkt->data);
/* Read the entire frame */ /* Read the entire frame */
sdret = brcmf_sdcard_recv_buf(bus->sdiodev, sdret = brcmf_sdcard_recv_buf(bus->sdiodev,
brcmf_sdcard_cur_sbwad( bus->sdiodev->sbwad,
bus->sdiodev),
SDIO_FUNC_2, F2SYNC, SDIO_FUNC_2, F2SYNC,
rxbuf, rdlen, rxbuf, rdlen,
pkt); pkt);
...@@ -3910,8 +3905,7 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished) ...@@ -3910,8 +3905,7 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished)
} }
/* Read frame header (hardware and software) */ /* Read frame header (hardware and software) */
sdret = brcmf_sdcard_recv_buf(bus->sdiodev, sdret = brcmf_sdcard_recv_buf(bus->sdiodev, bus->sdiodev->sbwad,
brcmf_sdcard_cur_sbwad(bus->sdiodev),
SDIO_FUNC_2, F2SYNC, bus->rxhdr, firstread, SDIO_FUNC_2, F2SYNC, bus->rxhdr, firstread,
NULL); NULL);
bus->f2rxhdrs++; bus->f2rxhdrs++;
...@@ -4061,8 +4055,7 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished) ...@@ -4061,8 +4055,7 @@ brcmf_sdbrcm_readframes(struct brcmf_bus *bus, uint maxframes, bool *finished)
PKTALIGN(pkt, rdlen, BRCMF_SDALIGN); PKTALIGN(pkt, rdlen, BRCMF_SDALIGN);
/* Read the remaining frame data */ /* Read the remaining frame data */
sdret = brcmf_sdcard_recv_buf(bus->sdiodev, sdret = brcmf_sdcard_recv_buf(bus->sdiodev, bus->sdiodev->sbwad,
brcmf_sdcard_cur_sbwad(bus->sdiodev),
SDIO_FUNC_2, F2SYNC, ((u8 *) (pkt->data)), SDIO_FUNC_2, F2SYNC, ((u8 *) (pkt->data)),
rdlen, pkt); rdlen, pkt);
bus->f2rxdata++; bus->f2rxdata++;
...@@ -4388,8 +4381,7 @@ static bool brcmf_sdbrcm_dpc(struct brcmf_bus *bus) ...@@ -4388,8 +4381,7 @@ static bool brcmf_sdbrcm_dpc(struct brcmf_bus *bus)
(bus->clkstate == CLK_AVAIL)) { (bus->clkstate == CLK_AVAIL)) {
int ret, i; int ret, i;
ret = brcmf_sdbrcm_send_buf(bus, ret = brcmf_sdbrcm_send_buf(bus, bus->sdiodev->sbwad,
brcmf_sdcard_cur_sbwad(bus->sdiodev),
SDIO_FUNC_2, F2SYNC, (u8 *) bus->ctrl_frame_buf, SDIO_FUNC_2, F2SYNC, (u8 *) bus->ctrl_frame_buf,
(u32) bus->ctrl_frame_len, NULL); (u32) bus->ctrl_frame_len, NULL);
......
...@@ -231,9 +231,6 @@ extern void brcmf_sdio_function_cleanup(void); ...@@ -231,9 +231,6 @@ extern void brcmf_sdio_function_cleanup(void);
extern int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev); extern int brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev);
extern int brcmf_sdio_remove(struct brcmf_sdio_dev *sdiodev); extern int brcmf_sdio_remove(struct brcmf_sdio_dev *sdiodev);
/* Function to return current window addr */
extern u32 brcmf_sdcard_cur_sbwad(struct brcmf_sdio_dev *sdiodev);
extern int brcmf_sdcard_set_sbaddr_window(struct brcmf_sdio_dev *sdiodev, extern int brcmf_sdcard_set_sbaddr_window(struct brcmf_sdio_dev *sdiodev,
u32 address); u32 address);
......
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