Lines Matching refs:fcnt
401 int new_z2, fcnt, maxlen;
408 if (!(fcnt = *z1r - *z2r))
411 if (fcnt <= 0)
412 fcnt += B_FIFO_SIZE; /* bytes actually buffered */
413 if (fcnt > HFCPCI_BTRANS_THRESHOLD)
414 fcnt = HFCPCI_BTRANS_THRESHOLD; /* limit size */
416 new_z2 = *z2r + fcnt; /* new position in fifo */
420 if (!(skb = dev_alloc_skb(fcnt)))
423 ptr = skb_put(skb, fcnt);
424 if (*z2r + fcnt <= B_FIFO_SIZE + B_SUB_VAL)
425 maxlen = fcnt; /* complete transfer */
431 fcnt -= maxlen;
433 if (fcnt) { /* rest remaining */
436 memcpy(ptr, ptr1, fcnt); /* rest */
520 int fcnt;
536 fcnt = df->f1 - df->f2; /* frame count actually buffered */
537 if (fcnt < 0)
538 fcnt += (MAX_D_FRAMES + 1); /* if wrap around */
539 if (fcnt > (MAX_D_FRAMES - 1)) {
591 int maxlen, fcnt;
617 fcnt = *z2t - *z1t;
618 if (fcnt <= 0)
619 fcnt += B_FIFO_SIZE; /* fcnt contains available bytes in fifo */
620 fcnt = B_FIFO_SIZE - fcnt; /* remaining bytes to send */
622 while ((fcnt < 2 * HFCPCI_BTRANS_THRESHOLD) && (bcs->tx_skb)) {
623 if (bcs->tx_skb->len < B_FIFO_SIZE - fcnt) {
644 fcnt += bcs->tx_skb->len;
670 fcnt = bz->f1 - bz->f2; /* frame count actually buffered */
671 if (fcnt < 0)
672 fcnt += (MAX_B_FRAMES + 1); /* if wrap around */
673 if (fcnt > (MAX_B_FRAMES - 1)) {