Home | History | Annotate | Download | only in l2cap

Lines Matching refs:fcrb

180     if (p_ccb->fcrb.wait_ack)
190 tout, p_ccb->timer_entry.in_use, p_ccb->fcrb.wait_ack, p_ccb->fcrb.waiting_for_ack_q.count);
193 if (p_ccb->fcrb.mon_retrans_timer.in_use == 0)
194 btu_start_quick_timer (&p_ccb->fcrb.mon_retrans_timer, BTU_TTYPE_L2CAP_CHNL, tout*QUICK_TIMER_TICKS_PER_SEC/1000);
208 if (p_ccb->fcrb.mon_retrans_timer.in_use)
212 p_ccb->fcrb.wait_ack, p_ccb->fcrb.waiting_for_ack_q.count);
214 btu_stop_quick_timer (&p_ccb->fcrb.mon_retrans_timer);
229 tL2C_FCRB *p_fcrb = &p_ccb->fcrb;
246 btu_stop_quick_timer (&p_ccb->fcrb.mon_retrans_timer);
251 UINT32 dur = GKI_get_os_tick_count() - p_ccb->fcrb.connect_tick_count;
261 p_ccb->fcrb.pkts_retransmitted, p_ccb->fcrb.xmit_window_closed, p_ccb->fcrb.retrans_touts, p_ccb->fcrb.xmit_ack_touts);
263 "Times there is less than 2 packets in controller when flow controlled:%08u", p_ccb->fcrb.controller_idle);
265 "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 );
269 p_ccb->fcrb.ertm_pkt_counts[0], p_ccb->fcrb.ertm_byte_counts[0],
270 (dur >= 10 ? (p_ccb->fcrb.ertm_byte_counts[0] * 100) / (dur / 10) : 0),
271 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]);
276 p_ccb->fcrb.ertm_pkt_counts[1], p_ccb->fcrb.ertm_byte_counts[1],
277 (dur >= 10 ? (p_ccb->fcrb.ertm_byte_counts[1] * 100) / (dur / 10) : 0),
278 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]);
288 if (i == p_ccb->fcrb.ack_delay_avg_index )
296 i, p_ccb->fcrb.throughput[i],
297 p_ccb->fcrb.ack_delay_avg[i], p_ccb->fcrb.ack_delay_min[i], p_ccb->fcrb.ack_delay_max[i],
298 p_ccb->fcrb.ack_q_count_avg[i], p_ccb->fcrb.ack_q_count_min[i], p_ccb->fcrb.ack_q_count_max[i] );
302 throughput_avg += p_ccb->fcrb.throughput[i];
303 ack_delay_avg += p_ccb->fcrb.ack_delay_avg[i];
304 ack_q_count_avg += p_ccb->fcrb.ack_q_count_avg[i];
392 if ( (p_ccb->fcrb.remote_busy == TRUE)
393 || (p_ccb->fcrb.waiting_for_ack_q.count >= p_ccb->peer_cfg.fcr.tx_win_sz) )
398 p_ccb->fcrb.xmit_window_closed++;
401 p_ccb->fcrb.controller_idle++;
423 tL2C_FCRB *p_fcrb = &p_ccb->fcrb;
456 p_fcrb->last_ack_sent = p_ccb->fcrb.next_seq_expected;
458 if (p_ccb->fcrb.ack_timer.in_use)
459 btu_stop_quick_timer (&p_ccb->fcrb.ack_timer);
537 p_ccb->fcrb.s_frames_sent[function_code]++;
542 p_ccb->fcrb.wait_ack = TRUE;
550 ctrl_word |= (p_ccb->fcrb.next_seq_expected << L2CAP_FCR_REQ_SEQ_BITS_SHIFT);
615 p_ccb->fcrb.last_ack_sent = p_ccb->fcrb.next_seq_expected;
617 if (p_ccb->fcrb.ack_timer.in_use)
618 btu_stop_quick_timer (&p_ccb->fcrb.ack_timer);
701 p_ccb->fcrb.next_tx_seq, p_ccb->fcrb.last_rx_ack, p_ccb->fcrb.next_seq_expected,
702 p_ccb->fcrb.last_ack_sent, p_ccb->fcrb.waiting_for_ack_q.count, p_ccb->fcrb.num_tries);
741 if (p_ccb->fcrb.wait_ack)
748 if (p_ccb->fcrb.srej_sent)
750 else if (p_ccb->fcrb.local_busy)
759 btu_start_quick_timer (&p_ccb->fcrb.mon_retrans_timer, BTU_TTYPE_L2CAP_CHNL, QUICK_TIMER_TICKS_PER_SEC);
765 p_ccb->fcrb.wait_ack = FALSE;
771 if (p_ccb->fcrb.waiting_for_ack_q.count == 0)
772 p_ccb->fcrb.num_tries = 0;
800 if ( (!p_ccb->fcrb.local_busy) && (!p_ccb->fcrb.srej_sent) && (p_ccb->fcrb.srej_rcv_hold_q.count > 0) )
802 BUFFER_Q temp_q = p_ccb->fcrb.srej_rcv_hold_q;
804 GKI_init_q (&p_ccb->fcrb.srej_rcv_hold_q);
817 p_ccb->fcrb.next_seq_expected);
826 if (p_ccb->fcrb.rej_after_srej)
828 p_ccb->fcrb.rej_after_srej = FALSE;
829 p_ccb->fcrb.rej_sent = TRUE;
836 if ( (!p_ccb->fcrb.local_busy) && (!p_ccb->fcrb.rej_sent) && (!p_ccb->fcrb.srej_sent)
837 && (p_ccb->fcrb.next_seq_expected != p_ccb->fcrb.last_ack_sent) )
842 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,
843 p_ccb->fcrb.last_ack_sent);
848 if ( (p_ccb->fcrb.retrans_q.count || p_ccb->xmit_hold_q.count)
849 && (p_ccb->fcrb.wait_ack == FALSE)
868 p_ccb->local_cid, p_ccb->fcrb.num_tries, p_ccb->peer_cfg.fcr.max_transmit,
869 p_ccb->fcrb.wait_ack, p_ccb->fcrb.waiting_for_ack_q.count);
872 p_ccb->fcrb.retrans_touts++;
875 if ( (p_ccb->peer_cfg.fcr.max_transmit != 0) && (++p_ccb->fcrb.num_tries > p_ccb->peer_cfg.fcr.max_transmit) )
881 if (!p_ccb->fcrb.srej_sent && !p_ccb->fcrb.rej_sent)
883 if (p_ccb->fcrb.local_busy)
904 p_ccb->chnl_state, p_ccb->fcrb.wait_ack, p_ccb->fcrb.next_seq_expected, p_ccb->fcrb.last_ack_sent);
906 if ( (p_ccb->chnl_state == CST_OPEN) && (!p_ccb->fcrb.wait_ack)
907 && (p_ccb->fcrb.last_ack_sent != p_ccb->fcrb.next_seq_expected) )
910 p_ccb->fcrb.xmit_ack_touts++;
912 if (p_ccb->fcrb.local_busy)
931 tL2C_FCRB *p_fcrb = &p_ccb->fcrb;
991 if (!p_ccb->fcrb.wait_ack)
1024 tL2C_FCRB *p_fcrb = &p_ccb->fcrb;
1037 p_ccb->fcrb.s_frames_rcvd[s_frame_type]++;
1107 tL2C_FCRB *p_fcrb = &p_ccb->fcrb;
1121 p_ccb->fcrb.ertm_pkt_counts[1]++;
1122 p_ccb->fcrb.ertm_byte_counts[1] += p_buf->len;
1238 btu_stop_quick_timer (&p_ccb->fcrb.ack_timer);
1262 if ( (num_to_ack < p_ccb->fcrb.max_held_acks) && (!p_fcrb->local_busy) )
1272 if (!p_ccb->fcrb.ack_timer.in_use)
1274 btu_start_quick_timer (&p_ccb->fcrb.ack_timer, BTU_TTYPE_L2CAP_FCR_ACK,
1279 && (p_ccb->fcrb.srej_rcv_hold_q.count == 0) )
1352 if (tx_seq != p_ccb->fcrb.next_seq_expected)
1355 p_ccb->local_cid, p_ccb->fcrb.next_seq_expected, tx_seq, p_ccb->fcrb.p_rx_sdu);
1358 if (p_ccb->fcrb.p_rx_sdu != NULL)
1360 GKI_freebuf (p_ccb->fcrb.p_rx_sdu);
1361 p_ccb->fcrb.p_rx_sdu = NULL;
1365 p_ccb->fcrb.next_seq_expected = (tx_seq + 1) & L2CAP_FCR_SEQ_MODULO;
1370 if (p_ccb->fcrb.p_rx_sdu != NULL)
1372 GKI_freebuf (p_ccb->fcrb.p_rx_sdu);
1373 p_ccb->fcrb.p_rx_sdu = NULL;
1390 tL2C_FCRB *p_fcrb = &p_ccb->fcrb;
1520 if ( (p_ccb->fcrb.waiting_for_ack_q.p_first)
1522 && (p_ccb->fcrb.num_tries >= p_ccb->peer_cfg.fcr.max_transmit) )
1525 p_ccb->fcrb.last_rx_ack, p_ccb->local_cid, p_ccb->fcrb.num_tries, p_ccb->peer_cfg.fcr.max_transmit,
1526 p_ccb->fcrb.waiting_for_ack_q.count);
1537 for (p_buf = (BT_HDR *)p_ccb->fcrb.waiting_for_ack_q.p_first; p_buf; p_buf = (BT_HDR *)GKI_getnext (p_buf))
1554 L2CAP_TRACE_ERROR ("retransmit_i_frames() UNKNOWN seq: %u q_count: %u", tx_seq, p_ccb->fcrb.waiting_for_ack_q.count);
1580 while (p_ccb->fcrb.retrans_q.p_first)
1581 GKI_freebuf (GKI_dequeue (&p_ccb->fcrb.retrans_q));
1583 p_buf = (BT_HDR *)p_ccb->fcrb.waiting_for_ack_q.p_first;
1594 GKI_enqueue (&p_ccb->fcrb.retrans_q, p_buf2);
1605 if (p_ccb->fcrb.waiting_for_ack_q.count)
1607 p_ccb->fcrb.num_tries++;
1636 if (p_ccb->fcrb.retrans_q.p_first)
1638 p_buf = (BT_HDR *)GKI_dequeue (&p_ccb->fcrb.retrans_q);
1656 p_ccb->fcrb.pkts_retransmitted++;
1657 p_ccb->fcrb.ertm_pkt_counts[0]++;
1658 p_ccb->fcrb.ertm_byte_counts[0] += (p_buf->len - 8);
1771 GKI_enqueue (&p_ccb->fcrb.waiting_for_ack_q, p_xmit);
1786 GKI_enqueue (&p_ccb->fcrb.waiting_for_ack_q, p_wack);
1801 p_ccb->fcrb.ertm_pkt_counts[0]++;
1802 p_ccb->fcrb.ertm_byte_counts[0] += (p_xmit->len - 8);
2306 if (!p_ccb || !p_ccb->fcrb.test_cb.cfg.in_use)
2315 p_cfg = &p_ccb->fcrb.test_cb.cfg;
2338 p_ccb->fcrb.test_cb.cfg.in_use = FALSE;
2459 p_test_cb = &p_ccb->fcrb.test_cb;
2547 if (p_ccb && p_ccb->fcrb.test_cb.cfm.in_use)
2549 if (p_ccb->fcrb.test_cb.cfm.skip_sframe_count > 0)
2552 p_ccb->fcrb.test_cb.cfm.skip_sframe_count);
2554 if (--p_ccb->fcrb.test_cb.cfm.skip_sframe_count == 0)
2555 p_ccb->fcrb.test_cb.cfm.in_use = FALSE;
2561 p_ccb->fcrb.test_cb.cfm.in_use = FALSE;
2593 p_test_cb = &p_ccb->fcrb.test_cb.cfm;
2631 index = p_ccb->fcrb.ack_delay_avg_index;
2634 p_ccb->fcrb.ack_q_count_avg[index] += p_ccb->fcrb.waiting_for_ack_q.count;
2636 if ( p_ccb->fcrb.waiting_for_ack_q.count > p_ccb->fcrb.ack_q_count_max[index] )
2637 p_ccb->fcrb.ack_q_count_max[index] = p_ccb->fcrb.waiting_for_ack_q.count;
2639 if ( p_ccb->fcrb.waiting_for_ack_q.count < p_ccb->fcrb.ack_q_count_min[index] )
2640 p_ccb->fcrb.ack_q_count_min[index] = p_ccb->fcrb.waiting_for_ack_q.count;
2643 p_buf = (BT_HDR *)(p_ccb->fcrb.waiting_for_ack_q.p_first);
2647 p_ccb->fcrb.throughput[index] += p_buf->len - 8;
2661 p_ccb->fcrb.ack_delay_avg[index] += delay;
2662 if ( delay > p_ccb->fcrb.ack_delay_max[index] )
2663 p_ccb->fcrb.ack_delay_max[index] = delay;
2664 if ( delay < p_ccb->fcrb.ack_delay_min[index] )
2665 p_ccb->fcrb.ack_delay_min[index] = delay;
2671 p_ccb->fcrb.ack_delay_avg_count++;
2674 if (p_ccb->fcrb.ack_delay_avg_count > L2CAP_ERTM_STATS_AVG_NUM_SAMPLES)
2676 p_ccb->fcrb.ack_delay_avg_count = 0;
2678 p_ccb->fcrb.ack_q_count_avg[index] /= L2CAP_ERTM_STATS_AVG_NUM_SAMPLES;
2679 p_ccb->fcrb.ack_delay_avg[index] /= L2CAP_ERTM_STATS_AVG_NUM_SAMPLES;
2683 if (timestamp - p_ccb->fcrb.throughput_start > 0 )
2684 p_ccb->fcrb.throughput[index] /= (timestamp - p_ccb->fcrb.throughput_start);
2686 p_ccb->fcrb.throughput_start = timestamp;
2689 index, p_ccb->fcrb.throughput[index],
2690 p_ccb->fcrb.ack_delay_avg[index], p_ccb->fcrb.ack_delay_min[index], p_ccb->fcrb.ack_delay_max[index],
2691 p_ccb->fcrb.ack_q_count_avg[index], p_ccb->fcrb.ack_q_count_min[index], p_ccb->fcrb.ack_q_count_max[index] );
2696 p_ccb->fcrb.ack_delay_avg_index = index;
2698 p_ccb->fcrb.ack_q_count_max[index] = 0;
2699 p_ccb->fcrb.ack_q_count_min[index] = 0xFFFFFFFF;
2700 p_ccb->fcrb.ack_q_count_avg[index] = 0;
2703 p_ccb->fcrb.ack_delay_max[index] = 0;
2704 p_ccb->fcrb.ack_delay_min[index] = 0xFFFFFFFF;
2705 p_ccb->fcrb.ack_delay_avg[index] = 0;
2707 p_ccb->fcrb.throughput[index] = 0;