Lines Matching defs:fcnt
403 int new_z2, fcnt, maxlen;
410 if (!(fcnt = *z1r - *z2r))
413 if (fcnt <= 0)
414 fcnt += B_FIFO_SIZE; /* bytes actually buffered */
415 if (fcnt > HFCPCI_BTRANS_THRESHOLD)
416 fcnt = HFCPCI_BTRANS_THRESHOLD; /* limit size */
418 new_z2 = *z2r + fcnt; /* new position in fifo */
422 if (!(skb = dev_alloc_skb(fcnt)))
425 ptr = skb_put(skb, fcnt);
426 if (*z2r + fcnt <= B_FIFO_SIZE + B_SUB_VAL)
427 maxlen = fcnt; /* complete transfer */
433 fcnt -= maxlen;
435 if (fcnt) { /* rest remaining */
438 memcpy(ptr, ptr1, fcnt); /* rest */
523 int fcnt;
539 fcnt = df->f1 - df->f2; /* frame count actually buffered */
540 if (fcnt < 0)
541 fcnt += (MAX_D_FRAMES + 1); /* if wrap around */
542 if (fcnt > (MAX_D_FRAMES - 1)) {
595 int maxlen, fcnt;
621 fcnt = *z2t - *z1t;
622 if (fcnt <= 0)
623 fcnt += B_FIFO_SIZE; /* fcnt contains available bytes in fifo */
624 fcnt = B_FIFO_SIZE - fcnt; /* remaining bytes to send */
626 while ((fcnt < 2 * HFCPCI_BTRANS_THRESHOLD) && (bcs->tx_skb)) {
627 if (bcs->tx_skb->len < B_FIFO_SIZE - fcnt) {
648 fcnt += bcs->tx_skb->len;
674 fcnt = bz->f1 - bz->f2; /* frame count actually buffered */
675 if (fcnt < 0)
676 fcnt += (MAX_B_FRAMES + 1); /* if wrap around */
677 if (fcnt > (MAX_B_FRAMES - 1)) {