add chaos_calmer branch
[15.05/openwrt.git] / package / kernel / mac80211 / patches / 339-brcmfmac-remove-duplication-of-ramsize-info.patch
1 From: Arend van Spriel <arend@broadcom.com>
2 Date: Wed, 11 Mar 2015 16:11:27 +0100
3 Subject: [PATCH] brcmfmac: remove duplication of ramsize info
4
5 Removing the ramsize from the brcmf_sdio structure to avoid
6 duplication. The information is available in brcmf_chip
7 structure.
8
9 Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
10 Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
11 Signed-off-by: Arend van Spriel <arend@broadcom.com>
12 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
13 ---
14
15 --- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
16 +++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c
17 @@ -432,8 +432,6 @@ struct brcmf_sdio {
18         struct brcmf_sdio_dev *sdiodev; /* sdio device handler */
19         struct brcmf_chip *ci;  /* Chip info struct */
20  
21 -       u32 ramsize;            /* Size of RAM in SOCRAM (bytes) */
22 -
23         u32 hostintmask;        /* Copy of Host Interrupt Mask */
24         atomic_t intstatus;     /* Intstatus bits (events) pending */
25         atomic_t fcstate;       /* State of dongle flow-control */
26 @@ -1075,7 +1073,7 @@ static int brcmf_sdio_readshared(struct
27         struct sdpcm_shared_le sh_le;
28         __le32 addr_le;
29  
30 -       shaddr = bus->ci->rambase + bus->ramsize - 4;
31 +       shaddr = bus->ci->rambase + bus->ci->ramsize - 4;
32  
33         /*
34          * Read last word in socram to determine
35 @@ -3871,13 +3869,6 @@ brcmf_sdio_probe_attach(struct brcmf_sdi
36                 drivestrength = DEFAULT_SDIO_DRIVE_STRENGTH;
37         brcmf_sdio_drivestrengthinit(bus->sdiodev, bus->ci, drivestrength);
38  
39 -       /* Get info on the SOCRAM cores... */
40 -       bus->ramsize = bus->ci->ramsize;
41 -       if (!(bus->ramsize)) {
42 -               brcmf_err("failed to find SOCRAM memory!\n");
43 -               goto fail;
44 -       }
45 -
46         /* Set card control so an SDIO card reset does a WLAN backplane reset */
47         reg_val = brcmf_sdiod_regrb(bus->sdiodev,
48                                     SDIO_CCCR_BRCM_CARDCTRL, &err);