Lines Matching refs:fcrb
181 if (p_ccb->fcrb.wait_ack)
191 if (!alarm_is_scheduled(p_ccb->fcrb.mon_retrans_timer)) {
192 alarm_set_on_queue(p_ccb->fcrb.mon_retrans_timer, tout,
210 alarm_cancel(p_ccb->fcrb.mon_retrans_timer);
225 tL2C_FCRB *p_fcrb = &p_ccb->fcrb;
246 UINT32 dur = time_get_os_boottime_ms() - p_ccb->fcrb.connect_tick_count;
255 p_ccb->fcrb.pkts_retransmitted, p_ccb->fcrb.xmit_window_closed, p_ccb->fcrb.retrans_touts, p_ccb->fcrb.xmit_ack_touts);
257 "Times there is less than 2 packets in controller when flow controlled:%08u", p_ccb->fcrb.controller_idle);
259 "max_held_acks:%08u, in_cfg.fcr.tx_win_sz:%08u", p_ccb->fcrb.max_held_acks, p_ccb->peer_cfg.fcr.tx_win_sz );
262 p_ccb->fcrb.ertm_pkt_counts[0], p_ccb->fcrb.ertm_byte_counts[0],
263 (dur >= 10 ? (p_ccb->fcrb.ertm_byte_counts[0] * 100) / (dur / 10) : 0),
264 p_ccb->fcrb.s_frames_sent[0], p_ccb->fcrb.s_frames_sent[1], p_ccb->fcrb.s_frames_sent[2], p_ccb->fcrb.s_frames_sent[3]);
269 p_ccb->fcrb.ertm_pkt_counts[1], p_ccb->fcrb.ertm_byte_counts[1],
270 (dur >= 10 ? (p_ccb->fcrb.ertm_byte_counts[1] * 100) / (dur / 10) : 0),
271 p_ccb->fcrb.s_frames_rcvd[0], p_ccb->fcrb.s_frames_rcvd[1], p_ccb->fcrb.s_frames_rcvd[2], p_ccb->fcrb.s_frames_rcvd[3]);
280 if (i == p_ccb->fcrb.ack_delay_avg_index) {
287 i, p_ccb->fcrb.throughput[i],
288 p_ccb->fcrb.ack_delay_avg[i], p_ccb->fcrb.ack_delay_min[i], p_ccb->fcrb.ack_delay_max[i],
289 p_ccb->fcrb.ack_q_count_avg[i], p_ccb->fcrb.ack_q_count_min[i], p_ccb->fcrb.ack_q_count_max[i] );
293 throughput_avg += p_ccb->fcrb.throughput[i];
294 ack_delay_avg += p_ccb->fcrb.ack_delay_avg[i];
295 ack_q_count_avg += p_ccb->fcrb.ack_q_count_avg[i];
367 if ( (p_ccb->fcrb.remote_busy == TRUE)
368 || (fixed_queue_length(p_ccb->fcrb.waiting_for_ack_q) >= p_ccb->peer_cfg.fcr.tx_win_sz) )
373 p_ccb->fcrb.xmit_window_closed++;
376 p_ccb->fcrb.controller_idle++;
400 tL2C_FCRB *p_fcrb = &p_ccb->fcrb;
433 p_fcrb->last_ack_sent = p_ccb->fcrb.next_seq_expected;
435 alarm_cancel(p_ccb->fcrb.ack_timer);
511 p_ccb->fcrb.s_frames_sent[function_code]++;
516 p_ccb->fcrb.wait_ack = TRUE;
524 ctrl_word |= (p_ccb->fcrb.next_seq_expected << L2CAP_FCR_REQ_SEQ_BITS_SHIFT);
578 p_ccb->fcrb.last_ack_sent = p_ccb->fcrb.next_seq_expected;
580 alarm_cancel(p_ccb->fcrb.ack_timer);
659 p_ccb->fcrb.next_tx_seq, p_ccb->fcrb.last_rx_ack,
660 p_ccb->fcrb.next_seq_expected,
661 p_ccb->fcrb.last_ack_sent,
662 fixed_queue_length(p_ccb->fcrb.waiting_for_ack_q),
663 p_ccb->fcrb.num_tries);
693 if (p_ccb->fcrb.wait_ack)
700 if (p_ccb->fcrb.srej_sent)
702 else if (p_ccb->fcrb.local_busy)
711 alarm_set_on_queue(p_ccb->fcrb.mon_retrans_timer,
720 p_ccb->fcrb.wait_ack = FALSE;
726 if (fixed_queue_is_empty(p_ccb->fcrb.waiting_for_ack_q))
727 p_ccb->fcrb.num_tries = 0;
755 if ( (!p_ccb->fcrb.local_busy) && (!p_ccb->fcrb.srej_sent) &&
756 (!fixed_queue_is_empty(p_ccb->fcrb.srej_rcv_hold_q)))
758 fixed_queue_t *temp_q = p_ccb->fcrb.srej_rcv_hold_q;
759 p_ccb->fcrb.srej_rcv_hold_q = fixed_queue_new(SIZE_MAX);
772 p_ccb->fcrb.next_seq_expected);
781 if (p_ccb->fcrb.rej_after_srej)
783 p_ccb->fcrb.rej_after_srej = FALSE;
784 p_ccb->fcrb.rej_sent = TRUE;
792 if ( (!p_ccb->fcrb.local_busy) && (!p_ccb->fcrb.rej_sent) && (!p_ccb->fcrb.srej_sent)
793 && (p_ccb->fcrb.next_seq_expected != p_ccb->fcrb.last_ack_sent) )
798 p_ccb->local_cid, p_ccb->fcrb.local_busy, p_ccb->fcrb.rej_sent, p_ccb->fcrb.srej_sent, p_ccb->fcrb.next_seq_expected,
799 p_ccb->fcrb.last_ack_sent);
804 if ( (!fixed_queue_is_empty(p_ccb->fcrb.retrans_q) ||
806 && (p_ccb->fcrb.wait_ack == FALSE)
907 p_ccb->local_cid, p_ccb->fcrb.num_tries,
909 p_ccb->fcrb.wait_ack,
910 fixed_queue_length(p_ccb->fcrb.waiting_for_ack_q));
913 p_ccb->fcrb.retrans_touts++;
916 if ( (p_ccb->peer_cfg.fcr.max_transmit != 0) && (++p_ccb->fcrb.num_tries > p_ccb->peer_cfg.fcr.max_transmit) )
922 if (!p_ccb->fcrb.srej_sent && !p_ccb->fcrb.rej_sent)
924 if (p_ccb->fcrb.local_busy)
946 p_ccb->chnl_state, p_ccb->fcrb.wait_ack, p_ccb->fcrb.next_seq_expected, p_ccb->fcrb.last_ack_sent);
948 if ( (p_ccb->chnl_state == CST_OPEN) && (!p_ccb->fcrb.wait_ack)
949 && (p_ccb->fcrb.last_ack_sent != p_ccb->fcrb.next_seq_expected) )
952 p_ccb->fcrb.xmit_ack_touts++;
954 if (p_ccb->fcrb.local_busy)
974 tL2C_FCRB *p_fcrb = &p_ccb->fcrb;
1032 if (!p_ccb->fcrb.wait_ack)
1069 tL2C_FCRB *p_fcrb = &p_ccb->fcrb;
1082 p_ccb->fcrb.s_frames_rcvd[s_frame_type]++;
1155 tL2C_FCRB *p_fcrb = &p_ccb->fcrb;
1169 p_ccb->fcrb.ertm_pkt_counts[1]++;
1170 p_ccb->fcrb.ertm_byte_counts[1] += p_buf->len;
1276 alarm_cancel(p_ccb->fcrb.ack_timer);
1300 if ( (num_to_ack < p_ccb->fcrb.max_held_acks) && (!p_fcrb->local_busy) )
1310 if (!alarm_is_scheduled(p_ccb->fcrb.ack_timer)) {
1311 alarm_set_on_queue(p_ccb->fcrb.ack_timer,
1319 && fixed_queue_is_empty(p_ccb->fcrb.srej_rcv_hold_q))
1395 if (tx_seq != p_ccb->fcrb.next_seq_expected)
1398 p_ccb->local_cid, p_ccb->fcrb.next_seq_expected, tx_seq, p_ccb->fcrb.p_rx_sdu);
1401 osi_free_and_reset((void **)&p_ccb->fcrb.p_rx_sdu);
1404 p_ccb->fcrb.next_seq_expected = (tx_seq + 1) & L2CAP_FCR_SEQ_MODULO;
1409 osi_free_and_reset((void **)&p_ccb->fcrb.p_rx_sdu);
1428 tL2C_FCRB *p_fcrb = &p_ccb->fcrb;
1555 if ( (!fixed_queue_is_empty(p_ccb->fcrb.waiting_for_ack_q))
1557 && (p_ccb->fcrb.num_tries >= p_ccb->peer_cfg.fcr.max_transmit) )
1560 p_ccb->fcrb.last_rx_ack, p_ccb->local_cid, p_ccb->fcrb.num_tries, p_ccb->peer_cfg.fcr.max_transmit,
1561 fixed_queue_length(p_ccb->fcrb.waiting_for_ack_q));
1570 if (! fixed_queue_is_empty(p_ccb->fcrb.waiting_for_ack_q)) {
1571 list_ack = fixed_queue_get_list(p_ccb->fcrb.waiting_for_ack_q);
1599 fixed_queue_length(p_ccb->fcrb.waiting_for_ack_q));
1620 while (!fixed_queue_is_empty(p_ccb->fcrb.retrans_q))
1621 osi_free(fixed_queue_try_dequeue(p_ccb->fcrb.retrans_q));
1638 fixed_queue_enqueue(p_ccb->fcrb.retrans_q, p_buf2);
1648 if (fixed_queue_length(p_ccb->fcrb.waiting_for_ack_q))
1650 p_ccb->fcrb.num_tries++;
1681 p_buf = (BT_HDR *)fixed_queue_try_dequeue(p_ccb->fcrb.retrans_q);
1690 p_ccb->fcrb.pkts_retransmitted++;
1691 p_ccb->fcrb.ertm_pkt_counts[0]++;
1692 p_ccb->fcrb.ertm_byte_counts[0] += (p_buf->len - 8);
1805 fixed_queue_enqueue(p_ccb->fcrb.waiting_for_ack_q, p_xmit);
1824 fixed_queue_enqueue(p_ccb->fcrb.waiting_for_ack_q, p_wack);
1828 p_ccb->fcrb.ertm_pkt_counts[0]++;
1829 p_ccb->fcrb.ertm_byte_counts[0] += (p_xmit->len - 8);
2438 index = p_ccb->fcrb.ack_delay_avg_index;
2441 p_ccb->fcrb.ack_q_count_avg[index] +=
2442 fixed_queue_length(p_ccb->fcrb.waiting_for_ack_q);
2444 if (fixed_queue_length(p_ccb->fcrb.waiting_for_ack_q) > p_ccb->fcrb.ack_q_count_max[index])
2445 p_ccb->fcrb.ack_q_count_max[index] = fixed_queue_length(p_ccb->fcrb.waiting_for_ack_q);
2447 if (fixed_queue_length(p_ccb->fcrb.waiting_for_ack_q) < p_ccb->fcrb.ack_q_count_min[index])
2448 p_ccb->fcrb.ack_q_count_min[index] = fixed_queue_length(p_ccb->fcrb.waiting_for_ack_q);
2452 if (! fixed_queue_is_empty(p_ccb->fcrb.waiting_for_ack_q))
2453 list = fixed_queue_get_list(p_ccb->fcrb.waiting_for_ack_q);
2460 p_ccb->fcrb.throughput[index] += p_buf->len - 8;
2474 p_ccb->fcrb.ack_delay_avg[index] += delay;
2475 if ( delay > p_ccb->fcrb.ack_delay_max[index] )
2476 p_ccb->fcrb.ack_delay_max[index] = delay;
2477 if ( delay < p_ccb->fcrb.ack_delay_min[index] )
2478 p_ccb->fcrb.ack_delay_min[index] = delay;
2483 p_ccb->fcrb.ack_delay_avg_count++;
2486 if (p_ccb->fcrb.ack_delay_avg_count > L2CAP_ERTM_STATS_AVG_NUM_SAMPLES)
2488 p_ccb->fcrb.ack_delay_avg_count = 0;
2490 p_ccb->fcrb.ack_q_count_avg[index] /= L2CAP_ERTM_STATS_AVG_NUM_SAMPLES;
2491 p_ccb->fcrb.ack_delay_avg[index] /= L2CAP_ERTM_STATS_AVG_NUM_SAMPLES;
2495 if (timestamp - p_ccb->fcrb.throughput_start > 0)
2496 p_ccb->fcrb.throughput[index] /= (timestamp - p_ccb->fcrb.throughput_start);
2498 p_ccb->fcrb.throughput_start = timestamp;
2501 index, p_ccb->fcrb.throughput[index],
2502 p_ccb->fcrb.ack_delay_avg[index], p_ccb->fcrb.ack_delay_min[index], p_ccb->fcrb.ack_delay_max[index],
2503 p_ccb->fcrb.ack_q_count_avg[index], p_ccb->fcrb.ack_q_count_min[index], p_ccb->fcrb.ack_q_count_max[index] );
2508 p_ccb->fcrb.ack_delay_avg_index = index;
2510 p_ccb->fcrb.ack_q_count_max[index] = 0;
2511 p_ccb->fcrb.ack_q_count_min[index] = 0xFFFFFFFF;
2512 p_ccb->fcrb.ack_q_count_avg[index] = 0;
2515 p_ccb->fcrb.ack_delay_max[index] = 0;
2516 p_ccb->fcrb.ack_delay_min[index] = 0xFFFFFFFF;
2517 p_ccb->fcrb.ack_delay_avg[index] = 0;
2519 p_ccb->fcrb.throughput[index] = 0;