diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2018-03-01 18:00:19 +0100 |
---|---|---|
committer | Rafał Miłecki <rafal@milecki.pl> | 2018-03-01 18:07:09 +0100 |
commit | bb04b7ced7047c93e907134ede6b74b0cf438aa0 (patch) | |
tree | ce279ce861c03edd7f6496402dd3778bc5ae09d4 /package/kernel/mac80211/patches/311-v4.16-0005-brcmfmac-Remove-dead-IO-code.patch | |
parent | e52e8480add7607fe9643111d34ac3efdecad29a (diff) | |
download | mtk-20170518-bb04b7ced7047c93e907134ede6b74b0cf438aa0.zip mtk-20170518-bb04b7ced7047c93e907134ede6b74b0cf438aa0.tar.gz mtk-20170518-bb04b7ced7047c93e907134ede6b74b0cf438aa0.tar.bz2 |
mac80211: brcmfmac: restructuring sdio access functions
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Diffstat (limited to 'package/kernel/mac80211/patches/311-v4.16-0005-brcmfmac-Remove-dead-IO-code.patch')
-rw-r--r-- | package/kernel/mac80211/patches/311-v4.16-0005-brcmfmac-Remove-dead-IO-code.patch | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/311-v4.16-0005-brcmfmac-Remove-dead-IO-code.patch b/package/kernel/mac80211/patches/311-v4.16-0005-brcmfmac-Remove-dead-IO-code.patch new file mode 100644 index 0000000..7d50ce9 --- /dev/null +++ b/package/kernel/mac80211/patches/311-v4.16-0005-brcmfmac-Remove-dead-IO-code.patch @@ -0,0 +1,91 @@ +From ea243e9077b3545f20d93884e91c50ac0719685a Mon Sep 17 00:00:00 2001 +From: Ian Molton <ian@mnementh.co.uk> +Date: Mon, 13 Nov 2017 21:35:42 +0100 +Subject: [PATCH] brcmfmac: Remove dead IO code + +The value passed to brcmf_sdiod_addrprep() is *always* 4 +remove this parameter and the unused code to handle it. + +Signed-off-by: Ian Molton <ian@mnementh.co.uk> +Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com> +Signed-off-by: Kalle Valo <kvalo@codeaurora.org> +--- + .../net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 18 ++++++++---------- + 1 file changed, 8 insertions(+), 10 deletions(-) + +--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c ++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c +@@ -425,7 +425,7 @@ brcmf_sdiod_set_sbaddr_window(struct brc + } + + static int +-brcmf_sdiod_addrprep(struct brcmf_sdio_dev *sdiodev, uint width, u32 *addr) ++brcmf_sdiod_addrprep(struct brcmf_sdio_dev *sdiodev, u32 *addr) + { + uint bar0 = *addr & ~SBSDIO_SB_OFT_ADDR_MASK; + int err = 0; +@@ -439,9 +439,7 @@ brcmf_sdiod_addrprep(struct brcmf_sdio_d + } + + *addr &= SBSDIO_SB_OFT_ADDR_MASK; +- +- if (width == 4) +- *addr |= SBSDIO_SB_ACCESS_2_4B_FLAG; ++ *addr |= SBSDIO_SB_ACCESS_2_4B_FLAG; + + return 0; + } +@@ -467,7 +465,7 @@ u32 brcmf_sdiod_regrl(struct brcmf_sdio_ + int retval; + + brcmf_dbg(SDIO, "addr:0x%08x\n", addr); +- retval = brcmf_sdiod_addrprep(sdiodev, 4, &addr); ++ retval = brcmf_sdiod_addrprep(sdiodev, &addr); + if (retval) + goto done; + +@@ -500,7 +498,7 @@ void brcmf_sdiod_regwl(struct brcmf_sdio + int retval; + + brcmf_dbg(SDIO, "addr:0x%08x, data:0x%08x\n", addr, data); +- retval = brcmf_sdiod_addrprep(sdiodev, 4, &addr); ++ retval = brcmf_sdiod_addrprep(sdiodev, &addr); + if (retval) + goto done; + +@@ -736,7 +734,7 @@ int brcmf_sdiod_recv_pkt(struct brcmf_sd + + brcmf_dbg(SDIO, "addr = 0x%x, size = %d\n", addr, pkt->len); + +- err = brcmf_sdiod_addrprep(sdiodev, 4, &addr); ++ err = brcmf_sdiod_addrprep(sdiodev, &addr); + if (err) + goto done; + +@@ -757,7 +755,7 @@ int brcmf_sdiod_recv_chain(struct brcmf_ + brcmf_dbg(SDIO, "addr = 0x%x, size = %d\n", + addr, pktq->qlen); + +- err = brcmf_sdiod_addrprep(sdiodev, 4, &addr); ++ err = brcmf_sdiod_addrprep(sdiodev, &addr); + if (err) + goto done; + +@@ -801,7 +799,7 @@ int brcmf_sdiod_send_buf(struct brcmf_sd + + memcpy(mypkt->data, buf, nbytes); + +- err = brcmf_sdiod_addrprep(sdiodev, 4, &addr); ++ err = brcmf_sdiod_addrprep(sdiodev, &addr); + + if (!err) + err = brcmf_sdiod_buffrw(sdiodev, SDIO_FUNC_2, true, addr, +@@ -821,7 +819,7 @@ int brcmf_sdiod_send_pkt(struct brcmf_sd + + brcmf_dbg(SDIO, "addr = 0x%x, size = %d\n", addr, pktq->qlen); + +- err = brcmf_sdiod_addrprep(sdiodev, 4, &addr); ++ err = brcmf_sdiod_addrprep(sdiodev, &addr); + if (err) + return err; + |