Lines Matching refs:rdlen

6237 	uint rdlen, pad;  in dhdsdio_read_control()  local
6270 rdlen = len - firstread; in dhdsdio_read_control()
6271 if (bus->roundup && bus->blocksize && (rdlen > bus->blocksize)) { in dhdsdio_read_control()
6272 pad = bus->blocksize - (rdlen % bus->blocksize); in dhdsdio_read_control()
6275 rdlen += pad; in dhdsdio_read_control()
6276 } else if (rdlen % DHD_SDALIGN) { in dhdsdio_read_control()
6277 rdlen += DHD_SDALIGN - (rdlen % DHD_SDALIGN); in dhdsdio_read_control()
6281 if (forcealign && (rdlen & (ALIGNMENT - 1))) in dhdsdio_read_control()
6282 rdlen = ROUNDUP(rdlen, ALIGNMENT); in dhdsdio_read_control()
6285 if ((rdlen + firstread) > bus->dhd->maxctl) { in dhdsdio_read_control()
6287 __FUNCTION__, rdlen, bus->dhd->maxctl)); in dhdsdio_read_control()
6305 (bus->rxctl + firstread), rdlen, NULL, NULL, NULL); in dhdsdio_read_control()
6311 DHD_ERROR(("%s: read %d control bytes failed: %d\n", __FUNCTION__, rdlen, sdret)); in dhdsdio_read_control()
6773 uint16 rdlen; /* Total number of bytes to read */ in dhdsdio_readframes() local
6900 rdlen = len = nextlen; in dhdsdio_readframes()
6902 rdlen = len = nextlen << 4; in dhdsdio_readframes()
6905 if (bus->roundup && bus->blocksize && (rdlen > bus->blocksize)) { in dhdsdio_readframes()
6906 pad = bus->blocksize - (rdlen % bus->blocksize); in dhdsdio_readframes()
6908 ((rdlen + pad + firstread) < MAX_RX_DATASZ)) in dhdsdio_readframes()
6909 rdlen += pad; in dhdsdio_readframes()
6910 } else if (rdlen % DHD_SDALIGN) { in dhdsdio_readframes()
6911 rdlen += DHD_SDALIGN - (rdlen % DHD_SDALIGN); in dhdsdio_readframes()
6923 if (!(pkt = PKTGET(osh, rdlen + DHD_SDALIGN, FALSE))) { in dhdsdio_readframes()
6939 F2SYNC, rxbuf, rdlen, in dhdsdio_readframes()
6954 __FUNCTION__, rdlen)); in dhdsdio_readframes()
6965 __FUNCTION__, rdlen, sdret)); in dhdsdio_readframes()
6977 __FUNCTION__, len, rdlen, rxseq)); in dhdsdio_readframes()
6988 PKTALIGN(osh, pkt, rdlen, DHD_SDALIGN); in dhdsdio_readframes()
6993 F2SYNC, rxbuf, rdlen, in dhdsdio_readframes()
7006 __FUNCTION__, rdlen)); in dhdsdio_readframes()
7016 __FUNCTION__, rdlen, sdret)); in dhdsdio_readframes()
7360 rdlen = (len > firstread) ? (len - firstread) : 0; in dhdsdio_readframes()
7363 if (bus->roundup && bus->blocksize && (rdlen > bus->blocksize)) { in dhdsdio_readframes()
7364 pad = bus->blocksize - (rdlen % bus->blocksize); in dhdsdio_readframes()
7366 ((rdlen + pad + firstread) < MAX_RX_DATASZ)) in dhdsdio_readframes()
7367 rdlen += pad; in dhdsdio_readframes()
7368 } else if (rdlen % DHD_SDALIGN) { in dhdsdio_readframes()
7369 rdlen += DHD_SDALIGN - (rdlen % DHD_SDALIGN); in dhdsdio_readframes()
7373 if (forcealign && (rdlen & (ALIGNMENT - 1))) in dhdsdio_readframes()
7374 rdlen = ROUNDUP(rdlen, ALIGNMENT); in dhdsdio_readframes()
7376 if ((rdlen + firstread) > MAX_RX_DATASZ) { in dhdsdio_readframes()
7378 DHD_ERROR(("%s: too long: len %d rdlen %d\n", __FUNCTION__, len, rdlen)); in dhdsdio_readframes()
7385 if (!(pkt = PKTGET(osh, (rdlen + firstread + DHD_SDALIGN), FALSE))) { in dhdsdio_readframes()
7388 __FUNCTION__, rdlen, chan)); in dhdsdio_readframes()
7402 PKTALIGN(osh, pkt, rdlen, DHD_SDALIGN); in dhdsdio_readframes()
7406 ((uint8 *)PKTDATA(osh, pkt)), rdlen, pkt, NULL, NULL); in dhdsdio_readframes()
7411 DHD_ERROR(("%s: read %d %s bytes failed: %d\n", __FUNCTION__, rdlen, in dhdsdio_readframes()