Lines Matching refs:rdlen
1760 uint rdlen, pad; in brcmf_sdio_read_control() local
1781 rdlen = len - BRCMF_FIRSTREAD; in brcmf_sdio_read_control()
1782 if (bus->roundup && bus->blocksize && (rdlen > bus->blocksize)) { in brcmf_sdio_read_control()
1783 pad = bus->blocksize - (rdlen % bus->blocksize); in brcmf_sdio_read_control()
1786 rdlen += pad; in brcmf_sdio_read_control()
1787 } else if (rdlen % bus->head_align) { in brcmf_sdio_read_control()
1788 rdlen += bus->head_align - (rdlen % bus->head_align); in brcmf_sdio_read_control()
1792 if ((rdlen + BRCMF_FIRSTREAD) > bus->sdiodev->bus_if->maxctl) { in brcmf_sdio_read_control()
1794 rdlen, bus->sdiodev->bus_if->maxctl); in brcmf_sdio_read_control()
1808 sdret = brcmf_sdiod_recv_buf(bus->sdiodev, rbuf, rdlen); in brcmf_sdio_read_control()
1814 rdlen, sdret); in brcmf_sdio_read_control()
1819 memcpy(buf + BRCMF_FIRSTREAD, rbuf, rdlen); in brcmf_sdio_read_control()
1845 static void brcmf_sdio_pad(struct brcmf_sdio *bus, u16 *pad, u16 *rdlen) in brcmf_sdio_pad() argument
1847 if (bus->roundup && bus->blocksize && *rdlen > bus->blocksize) { in brcmf_sdio_pad()
1848 *pad = bus->blocksize - (*rdlen % bus->blocksize); in brcmf_sdio_pad()
1850 *rdlen + *pad + BRCMF_FIRSTREAD < MAX_RX_DATASZ) in brcmf_sdio_pad()
1851 *rdlen += *pad; in brcmf_sdio_pad()
1852 } else if (*rdlen % bus->head_align) { in brcmf_sdio_pad()
1853 *rdlen += bus->head_align - (*rdlen % bus->head_align); in brcmf_sdio_pad()