32#define L2CAP_MIN_MTU 48
36#define L2CAP_LINK_ROLE_SWITCH_TOUT 10
37#define L2CAP_LINK_CONNECT_TOUT 60
38#define L2CAP_LINK_CONNECT_TOUT_EXT 120
39#define L2CAP_ECHO_RSP_TOUT 30
40#define L2CAP_LINK_FLOW_CONTROL_TOUT 2
41#define L2CAP_LINK_DISCONNECT_TOUT 30
43#ifndef L2CAP_CHNL_CONNECT_TOUT
44#define L2CAP_CHNL_CONNECT_TOUT 60
47#define L2CAP_CHNL_CONNECT_TOUT_EXT 120
48#define L2CAP_CHNL_CFG_TIMEOUT 30
49#define L2CAP_CHNL_DISCONNECT_TOUT 10
50#define L2CAP_DELAY_CHECK_SM4 2
51#define L2CAP_WAIT_INFO_RSP_TOUT 3
52#define L2CAP_WAIT_UNPARK_TOUT 2
53#define L2CAP_LINK_INFO_RESP_TOUT 2
54#define L2CAP_BLE_LINK_CONNECT_TOUT 30
57#define L2CAP_DEFAULT_RETRANS_TOUT 2000
58#define L2CAP_DEFAULT_MONITOR_TOUT 12000
59#define L2CAP_FCR_ACK_TOUT 200
70 CST_W4_L2CAP_CONNECT_RSP,
71 CST_W4_L2CA_CONNECT_RSP,
74 CST_W4_L2CAP_DISCONNECT_RSP,
75 CST_W4_L2CA_DISCONNECT_RSP
84 LST_CONNECTING_WAIT_SWITCH,
96#define L2CEVT_LP_CONNECT_CFM 0
97#define L2CEVT_LP_CONNECT_CFM_NEG 1
98#define L2CEVT_LP_CONNECT_IND 2
99#define L2CEVT_LP_DISCONNECT_IND 3
100#define L2CEVT_LP_QOS_CFM 4
101#define L2CEVT_LP_QOS_CFM_NEG 5
102#define L2CEVT_LP_QOS_VIOLATION_IND 6
104#define L2CEVT_SEC_COMP 7
105#define L2CEVT_SEC_COMP_NEG 8
107#define L2CEVT_L2CAP_CONNECT_REQ 10
108#define L2CEVT_L2CAP_CONNECT_RSP 11
109#define L2CEVT_L2CAP_CONNECT_RSP_PND 12
110#define L2CEVT_L2CAP_CONNECT_RSP_NEG 13
111#define L2CEVT_L2CAP_CONFIG_REQ 14
112#define L2CEVT_L2CAP_CONFIG_RSP 15
113#define L2CEVT_L2CAP_CONFIG_RSP_NEG 16
114#define L2CEVT_L2CAP_DISCONNECT_REQ 17
115#define L2CEVT_L2CAP_DISCONNECT_RSP 18
116#define L2CEVT_L2CAP_INFO_RSP 19
117#define L2CEVT_L2CAP_DATA 20
119#define L2CEVT_L2CA_CONNECT_REQ 21
120#define L2CEVT_L2CA_CONNECT_RSP 22
121#define L2CEVT_L2CA_CONNECT_RSP_NEG 23
122#define L2CEVT_L2CA_CONFIG_REQ 24
123#define L2CEVT_L2CA_CONFIG_RSP 25
124#define L2CEVT_L2CA_CONFIG_RSP_NEG 26
125#define L2CEVT_L2CA_DISCONNECT_REQ 27
126#define L2CEVT_L2CA_DISCONNECT_RSP 28
127#define L2CEVT_L2CA_DATA_READ 29
128#define L2CEVT_L2CA_DATA_WRITE 30
129#define L2CEVT_L2CA_FLUSH_REQ 31
131#define L2CEVT_TIMEOUT 32
132#define L2CEVT_SEC_RE_SEND_CMD 33
134#define L2CEVT_ACK_TIMEOUT 34
139#define L2CAP_ADJ_BRCM_ID 0x1
140#define L2CAP_ADJ_ZERO_ID 0x2
141#define L2CAP_ADJ_ID 0x3
144#define L2CAP_PEER_CFG_UNACCEPTABLE 0
145#define L2CAP_PEER_CFG_OK 1
146#define L2CAP_PEER_CFG_DISCONNECT 2
149#define L2CAP_MIN_RETRANS_TOUT 2000
150#define L2CAP_MIN_MONITOR_TOUT 12000
152#define L2CAP_MAX_FCR_CFG_TRIES 2
156#if L2CAP_CORRUPT_ERTM_PKTS == TRUE
171 UINT8 skip_sframe_count;
186 UINT8 next_seq_expected;
197 BOOLEAN rej_after_srej;
207 TIMER_LIST_ENT ack_timer;
208 TIMER_LIST_ENT mon_retrans_timer;
210#if (L2CAP_ERTM_STATS == TRUE)
211 UINT32 connect_tick_count;
212 UINT32 ertm_pkt_counts[2];
213 UINT32 ertm_byte_counts[2];
214 UINT32 s_frames_sent[4];
215 UINT32 s_frames_rcvd[4];
216 UINT32 xmit_window_closed;
217 UINT32 controller_idle;
219 UINT32 pkts_retransmitted;
220 UINT32 retrans_touts;
221 UINT32 xmit_ack_touts;
223#define L2CAP_ERTM_STATS_NUM_AVG 10
224#define L2CAP_ERTM_STATS_AVG_NUM_SAMPLES 100
225 UINT32 ack_delay_avg_count;
226 UINT32 ack_delay_avg_index;
227 UINT32 throughput_start;
228 UINT32 throughput[L2CAP_ERTM_STATS_NUM_AVG];
229 UINT32 ack_delay_avg[L2CAP_ERTM_STATS_NUM_AVG];
230 UINT32 ack_delay_min[L2CAP_ERTM_STATS_NUM_AVG];
231 UINT32 ack_delay_max[L2CAP_ERTM_STATS_NUM_AVG];
232 UINT32 ack_q_count_avg[L2CAP_ERTM_STATS_NUM_AVG];
233 UINT32 ack_q_count_min[L2CAP_ERTM_STATS_NUM_AVG];
234 UINT32 ack_q_count_max[L2CAP_ERTM_STATS_NUM_AVG];
237#if L2CAP_CORRUPT_ERTM_PKTS == TRUE
247#if (L2CAP_UCD_INCLUDED == TRUE)
248#define L2C_UCD_RCB_ID 0x00
249#define L2C_UCD_STATE_UNUSED 0x00
250#define L2C_UCD_STATE_W4_DATA 0x01
251#define L2C_UCD_STATE_W4_RECEPTION 0x02
252#define L2C_UCD_STATE_W4_MTU 0x04
267#if (L2CAP_UCD_INCLUDED == TRUE)
283 tL2C_CHNL_STATE chnl_state;
292 TIMER_LIST_ENT timer_entry;
296#define IB_CFG_DONE 0x01
297#define OB_CFG_DONE 0x02
298#define RECONFIG_FLAG 0x04
299#define CFG_DONE_MASK (IB_CFG_DONE | OB_CFG_DONE)
305#define CCB_FLAG_NO_RETRY 0x01
306#define CCB_FLAG_SENT_PENDING 0x02
310 tL2CAP_CH_CFG_BITS peer_cfg_bits;
318 tL2CAP_CHNL_PRIORITY ccb_priority;
319 tL2CAP_CHNL_DATA_RATE tx_data_rate;
320 tL2CAP_CHNL_DATA_RATE rx_data_rate;
328 BOOLEAN peer_cfg_already_rejected;
329 BOOLEAN out_cfg_fcr_present;
331#define L2CAP_CFG_FCS_OUR 0x01
332#define L2CAP_CFG_FCS_PEER 0x02
333#define L2CAP_BYPASS_FCS (L2CAP_CFG_FCS_OUR | L2CAP_CFG_FCS_PEER)
336#if (L2CAP_NON_FLUSHABLE_PB_INCLUDED == TRUE)
337 BOOLEAN is_flushable;
340#if (L2CAP_NUM_FIXED_CHNLS > 0) || (L2CAP_UCD_INCLUDED == TRUE)
341 UINT16 fixed_chnl_idle_tout;
351 tL2C_CCB *p_first_ccb;
352 tL2C_CCB *p_last_ccb;
355#if (L2CAP_ROUND_ROBIN_CHANNEL_SERVICE == TRUE)
358#define L2CAP_NUM_CHNL_PRIORITY 3
359#define L2CAP_CHNL_PRIORITY_WEIGHT 5
360#define L2CAP_GET_PRIORITY_QUOTA(pri) ((L2CAP_NUM_CHNL_PRIORITY - (pri)) * L2CAP_CHNL_PRIORITY_WEIGHT)
369 tL2C_CCB *p_serve_ccb;
370 tL2C_CCB *p_first_ccb;
383 tL2C_LINK_STATE link_state;
385 TIMER_LIST_ENT timer_entry;
390 tL2C_CCB *p_pending_ccb;
391 TIMER_LIST_ENT info_timer_entry;
392 BD_ADDR remote_bd_addr;
396 tL2CA_ECHO_RSP_CB *p_echo_rsp_cb;
400 UINT16 link_flush_tout;
402 UINT16 link_xmit_quota;
403 UINT16 sent_not_acked;
405 BOOLEAN partial_segment_being_sent;
412 UINT8 peer_chnl_mask[L2CAP_FIXED_CHNL_ARRAY_SIZE];
413#if (L2CAP_UCD_INCLUDED == TRUE)
419#if (L2CAP_HOST_FLOW_CTRL == TRUE)
420 UINT16 link_pkts_unacked;
421 UINT16 link_ack_thresh;
425 UINT16 idle_timeout_sv;
427 tL2CA_NOCP_CB *p_nocp_cb;
429#if (L2CAP_NUM_FIXED_CHNLS > 0)
430 tL2C_CCB *p_fixed_ccbs[L2CAP_NUM_FIXED_CHNLS];
434#if (BLE_INCLUDED == TRUE)
436 tBLE_ADDR_TYPE ble_addr_type;
439#define UPD_DISABLED 1
451#if (L2CAP_ROUND_ROBIN_CHANNEL_SERVICE == TRUE)
464 UINT8 l2cap_trace_level;
465 UINT16 controller_xmit_window;
467 UINT16 round_robin_quota;
468 UINT16 round_robin_unacked;
469 BOOLEAN check_round_robin;
471 BOOLEAN is_cong_cback_context;
473 tL2C_LCB lcb_pool[MAX_L2CAP_LINKS];
474 tL2C_CCB ccb_pool[MAX_L2CAP_CHANNELS];
475 tL2C_RCB rcb_pool[MAX_L2CAP_CLIENTS];
477 tL2C_CCB *p_free_ccb_first;
478 tL2C_CCB *p_free_ccb_last;
481 BOOLEAN disallow_switch;
482 UINT16 num_lm_acl_bufs;
486 TIMER_LIST_ENT rcv_hold_tle;
488 tL2C_LCB *p_cur_hcit_lcb;
489 UINT16 num_links_active;
491#if (L2CAP_NON_FLUSHABLE_PB_INCLUDED == TRUE)
492 UINT16 non_flushable_pbf;
494 BOOLEAN is_flush_active;
497#if L2CAP_CONFORMANCE_TESTING == TRUE
498 UINT32 test_info_resp;
501#if (L2CAP_NUM_FIXED_CHNLS > 0)
505#if (BLE_INCLUDED == TRUE)
506 BOOLEAN is_ble_connecting;
507 BD_ADDR ble_connecting_bda;
508 UINT16 controller_le_xmit_window;
509 UINT16 num_lm_ble_bufs;
512 tL2CA_ECHO_DATA_CB *p_echo_data_cb;
514#if (defined(L2CAP_HIGH_PRI_CHAN_QUOTA_IS_CONFIGURABLE) && (L2CAP_HIGH_PRI_CHAN_QUOTA_IS_CONFIGURABLE == TRUE))
515 UINT16 high_pri_min_xmit_quota;
538typedef void (tL2C_FCR_MGMT_EVT_HDLR) (UINT8, tL2C_CCB *);
542#define L2CAP_SEND_CMD_OFFSET 0
547#if (!defined(L2CAP_HIGH_PRI_CHAN_QUOTA_IS_CONFIGURABLE) || (L2CAP_HIGH_PRI_CHAN_QUOTA_IS_CONFIGURABLE == FALSE))
548#define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA_A (L2CAP_HIGH_PRI_MIN_XMIT_QUOTA)
550#define L2CAP_HIGH_PRI_MIN_XMIT_QUOTA_A (l2cb.high_pri_min_xmit_quota)
561#if (!defined L2C_DYNAMIC_MEMORY) || (L2C_DYNAMIC_MEMORY == FALSE)
564L2C_API
extern tL2C_CB *l2c_cb_ptr;
565#define l2cb (*l2c_cb_ptr)
572extern void l2c_init (
void);
573extern void l2c_process_timeout (TIMER_LIST_ENT *p_tle);
574extern UINT8 l2c_data_write (UINT16 cid,
BT_HDR *p_data, UINT16 flag);
575extern void l2c_rcv_acl_data (
BT_HDR *p_msg);
576extern void l2c_process_held_packets (BOOLEAN timed_out);
581extern tL2C_LCB *l2cu_allocate_lcb (BD_ADDR p_bd_addr, BOOLEAN is_bonding);
582extern BOOLEAN l2cu_start_post_bond_timer (UINT16 handle);
583extern void l2cu_release_lcb (tL2C_LCB *p_lcb);
584extern tL2C_LCB *l2cu_find_lcb_by_bd_addr (BD_ADDR p_bd_addr);
585extern tL2C_LCB *l2cu_find_lcb_by_handle (UINT16 handle);
586extern void l2cu_update_lcb_4_bonding (BD_ADDR p_bd_addr, BOOLEAN is_bonding);
588extern UINT8 l2cu_get_conn_role (tL2C_LCB *p_this_lcb);
589extern BOOLEAN l2cu_set_acl_priority (BD_ADDR bd_addr, UINT8 priority, BOOLEAN reset_after_rs);
591extern void l2cu_enqueue_ccb (tL2C_CCB *p_ccb);
592extern void l2cu_dequeue_ccb (tL2C_CCB *p_ccb);
593extern void l2cu_change_pri_ccb (tL2C_CCB *p_ccb, tL2CAP_CHNL_PRIORITY priority);
595extern tL2C_CCB *l2cu_allocate_ccb (tL2C_LCB *p_lcb, UINT16 cid);
596extern void l2cu_release_ccb (tL2C_CCB *p_ccb);
597extern tL2C_CCB *l2cu_find_ccb_by_cid (tL2C_LCB *p_lcb, UINT16 local_cid);
598extern tL2C_CCB *l2cu_find_ccb_by_remote_cid (tL2C_LCB *p_lcb, UINT16 remote_cid);
599extern void l2cu_adj_id (tL2C_LCB *p_lcb, UINT8 adj_mask);
601extern void l2cu_send_peer_cmd_reject (tL2C_LCB *p_lcb, UINT16 reason,
602 UINT8 rem_id,UINT16 p1, UINT16 p2);
603extern void l2cu_send_peer_connect_req (tL2C_CCB *p_ccb);
604extern void l2cu_send_peer_connect_rsp (tL2C_CCB *p_ccb, UINT16 result, UINT16 status);
605extern void l2cu_send_peer_config_req (tL2C_CCB *p_ccb,
tL2CAP_CFG_INFO *p_cfg);
606extern void l2cu_send_peer_config_rsp (tL2C_CCB *p_ccb,
tL2CAP_CFG_INFO *p_cfg);
607extern void l2cu_send_peer_config_rej (tL2C_CCB *p_ccb, UINT8 *p_data, UINT16 data_len, UINT16 rej_len);
608extern void l2cu_send_peer_disc_req (tL2C_CCB *p_ccb);
609extern void l2cu_send_peer_disc_rsp (tL2C_LCB *p_lcb, UINT8 remote_id, UINT16 local_cid, UINT16 remote_cid);
610extern void l2cu_send_peer_echo_req (tL2C_LCB *p_lcb, UINT8 *p_data, UINT16 data_len);
611extern void l2cu_send_peer_echo_rsp (tL2C_LCB *p_lcb, UINT8
id, UINT8 *p_data, UINT16 data_len);
612extern void l2cu_send_peer_info_rsp (tL2C_LCB *p_lcb, UINT8
id, UINT16 info_type);
613extern void l2cu_reject_connection (tL2C_LCB *p_lcb, UINT16 remote_cid, UINT8 rem_id, UINT16 result);
614extern void l2cu_send_peer_info_req (tL2C_LCB *p_lcb, UINT16 info_type);
615extern void l2cu_set_acl_hci_header (
BT_HDR *p_buf, tL2C_CCB *p_ccb);
616extern void l2cu_check_channel_congestion (tL2C_CCB *p_ccb);
617extern void l2cu_disconnect_chnl (tL2C_CCB *p_ccb);
619#if (L2CAP_NON_FLUSHABLE_PB_INCLUDED == TRUE)
620extern void l2cu_set_non_flushable_pbf(BOOLEAN);
623#if (BLE_INCLUDED == TRUE)
624extern void l2cu_send_peer_ble_par_req (tL2C_LCB *p_lcb, UINT16 min_int, UINT16 max_int, UINT16 latency, UINT16 timeout);
625extern void l2cu_send_peer_ble_par_rsp (tL2C_LCB *p_lcb, UINT16 reason, UINT8 rem_id);
628extern BOOLEAN l2cu_initialize_fixed_ccb (tL2C_LCB *p_lcb, UINT16 fixed_cid,
tL2CAP_FCR_OPTS *p_fcr);
629extern void l2cu_no_dynamic_ccbs (tL2C_LCB *p_lcb);
630extern void l2cu_process_fixed_chnl_resp (tL2C_LCB *p_lcb);
635#if (L2CAP_UCD_INCLUDED == TRUE)
636void l2c_ucd_delete_sec_pending_q(tL2C_LCB *p_lcb);
637void l2c_ucd_enqueue_pending_out_sec_q(tL2C_CCB *p_ccb,
void *p_data);
638BOOLEAN l2c_ucd_check_pending_info_req(tL2C_CCB *p_ccb);
639BOOLEAN l2c_ucd_check_pending_out_sec_q(tL2C_CCB *p_ccb);
640void l2c_ucd_send_pending_out_sec_q(tL2C_CCB *p_ccb);
641void l2c_ucd_discard_pending_out_sec_q(tL2C_CCB *p_ccb);
642BOOLEAN l2c_ucd_check_pending_in_sec_q(tL2C_CCB *p_ccb);
643void l2c_ucd_send_pending_in_sec_q(tL2C_CCB *p_ccb);
644void l2c_ucd_discard_pending_in_sec_q(tL2C_CCB *p_ccb);
645BOOLEAN l2c_ucd_check_rx_pkts(tL2C_LCB *p_lcb,
BT_HDR *p_msg);
646BOOLEAN l2c_ucd_process_event(tL2C_CCB *p_ccb, UINT16 event,
void *p_data);
649#if (BLE_INCLUDED == TRUE)
650extern void l2cu_send_peer_ble_par_req (tL2C_LCB *p_lcb, UINT16 min_int, UINT16 max_int, UINT16 latency, UINT16 timeout);
651extern void l2cu_send_peer_ble_par_rsp (tL2C_LCB *p_lcb, UINT16 reason, UINT8 rem_id);
654extern BOOLEAN l2cu_initialize_fixed_ccb (tL2C_LCB *p_lcb, UINT16 fixed_cid,
tL2CAP_FCR_OPTS *p_fcr);
655extern void l2cu_no_dynamic_ccbs (tL2C_LCB *p_lcb);
656extern void l2cu_process_fixed_chnl_resp (tL2C_LCB *p_lcb);
662extern BOOLEAN l2cu_check_feature_req (tL2C_LCB *p_lcb, UINT8
id, UINT8 *p_data, UINT16 data_len);
663extern void l2cu_check_feature_rsp (tL2C_LCB *p_lcb, UINT8
id, UINT8 *p_data, UINT16 data_len);
664extern void l2cu_send_feature_req (tL2C_CCB *p_ccb);
666extern tL2C_RCB *l2cu_allocate_rcb (UINT16 psm);
667extern tL2C_RCB *l2cu_find_rcb_by_psm (UINT16 psm);
668extern void l2cu_release_rcb (
tL2C_RCB *p_rcb);
670extern UINT8 l2cu_process_peer_cfg_req (tL2C_CCB *p_ccb,
tL2CAP_CFG_INFO *p_cfg);
671extern void l2cu_process_peer_cfg_rsp (tL2C_CCB *p_ccb,
tL2CAP_CFG_INFO *p_cfg);
672extern void l2cu_process_our_cfg_req (tL2C_CCB *p_ccb,
tL2CAP_CFG_INFO *p_cfg);
673extern void l2cu_process_our_cfg_rsp (tL2C_CCB *p_ccb,
tL2CAP_CFG_INFO *p_cfg);
675extern void l2cu_device_reset (
void);
676extern tL2C_LCB *l2cu_find_lcb_by_state (tL2C_LINK_STATE state);
677extern BOOLEAN l2cu_lcb_disconnecting (
void);
679extern BOOLEAN l2cu_create_conn (tL2C_LCB *p_lcb);
680extern BOOLEAN l2cu_create_conn_after_switch (tL2C_LCB *p_lcb);
681extern BT_HDR *l2cu_get_next_buffer_to_send (tL2C_LCB *p_lcb);
682extern void l2cu_resubmit_pending_sec_req (BD_ADDR p_bda);
683extern void l2cu_initialize_amp_ccb (tL2C_LCB *p_lcb);
684extern void l2cu_adjust_out_mps (tL2C_CCB *p_ccb);
689extern BOOLEAN l2c_link_hci_conn_req (BD_ADDR bd_addr);
690extern BOOLEAN l2c_link_hci_conn_comp (UINT8 status, UINT16 handle, BD_ADDR p_bda);
691extern BOOLEAN l2c_link_hci_disc_comp (UINT16 handle, UINT8 reason);
692extern BOOLEAN l2c_link_hci_qos_violation (UINT16 handle);
693extern void l2c_link_timeout (tL2C_LCB *p_lcb);
694extern void l2c_info_timeout (tL2C_LCB *p_lcb);
695extern void l2c_link_check_send_pkts (tL2C_LCB *p_lcb, tL2C_CCB *p_ccb,
BT_HDR *p_buf);
696extern void l2c_link_adjust_allocation (
void);
697extern void l2c_link_process_num_completed_pkts (UINT8 *p);
698extern void l2c_link_process_num_completed_blocks (UINT8 controller_id, UINT8 *p, UINT16 evt_len);
699extern void l2c_link_processs_num_bufs (UINT16 num_lm_acl_bufs);
700extern UINT8 l2c_link_pkts_rcvd (UINT16 *num_pkts, UINT16 *handles);
701extern void l2c_link_role_changed (BD_ADDR bd_addr, UINT8 new_role, UINT8 hci_status);
702extern void l2c_link_sec_comp (BD_ADDR p_bda,
void *p_ref_data, UINT8 status);
703extern void l2c_link_segments_xmitted (
BT_HDR *p_msg);
704extern void l2c_pin_code_request (BD_ADDR bd_addr);
705extern void l2c_link_adjust_chnl_allocation (
void);
707#if (BLE_INCLUDED == TRUE)
708extern void l2c_link_processs_ble_num_bufs (UINT16 num_lm_acl_bufs);
711#if ((BTM_PWR_MGR_INCLUDED == TRUE) && L2CAP_WAKE_PARKED_LINK == TRUE)
712extern BOOLEAN l2c_link_check_power_mode ( tL2C_LCB *p_lcb );
713#define L2C_LINK_CHECK_POWER_MODE(x) l2c_link_check_power_mode ((x))
715#define L2C_LINK_CHECK_POWER_MODE(x) (FALSE)
718#if L2CAP_CONFORMANCE_TESTING == TRUE
720L2C_API
extern void l2cu_set_info_rsp_mask (UINT32 mask);
726extern void l2c_csm_execute (tL2C_CCB *p_ccb, UINT16 event,
void *p_data);
728L2C_API
extern BT_HDR *l2cap_link_chk_pkt_start(
BT_HDR *);
729L2C_API
extern BOOLEAN l2cap_link_chk_pkt_end (
void);
731L2C_API
extern void l2c_enqueue_peer_data (tL2C_CCB *p_ccb,
BT_HDR *p_buf);
737extern void l2c_fcr_cleanup (tL2C_CCB *p_ccb);
738extern void l2c_fcr_proc_pdu (tL2C_CCB *p_ccb,
BT_HDR *p_buf);
739extern void l2c_fcr_proc_tout (tL2C_CCB *p_ccb);
740extern void l2c_fcr_proc_ack_tout (tL2C_CCB *p_ccb);
741extern void l2c_fcr_send_S_frame (tL2C_CCB *p_ccb, UINT16 function_code, UINT16 pf_bit);
742extern BT_HDR *l2c_fcr_clone_buf (
BT_HDR *p_buf, UINT16 new_offset, UINT16 no_of_bytes, UINT8 pool);
743extern BOOLEAN l2c_fcr_is_flow_controlled (tL2C_CCB *p_ccb);
744extern BT_HDR *l2c_fcr_get_next_xmit_sdu_seg (tL2C_CCB *p_ccb, UINT16 max_packet_length);
745extern void l2c_fcr_start_timer (tL2C_CCB *p_ccb);
748extern UINT8 l2c_fcr_chk_chan_modes (tL2C_CCB *p_ccb);
749extern BOOLEAN l2c_fcr_adj_our_req_options (tL2C_CCB *p_ccb,
tL2CAP_CFG_INFO *p_cfg);
750extern void l2c_fcr_adj_our_rsp_options (tL2C_CCB *p_ccb,
tL2CAP_CFG_INFO *p_peer_cfg);
751extern BOOLEAN l2c_fcr_renegotiate_chan(tL2C_CCB *p_ccb,
tL2CAP_CFG_INFO *p_cfg);
752extern UINT8 l2c_fcr_process_peer_cfg_req(tL2C_CCB *p_ccb,
tL2CAP_CFG_INFO *p_cfg);
753extern void l2c_fcr_adj_monitor_retran_timeout (tL2C_CCB *p_ccb);
754extern void l2c_fcr_stop_timer (tL2C_CCB *p_ccb);
759#if (BLE_INCLUDED == TRUE)
760extern BOOLEAN l2cble_create_conn (tL2C_LCB *p_lcb);
761extern void l2cble_process_sig_cmd (tL2C_LCB *p_lcb, UINT8 *p, UINT16 pkt_len);
762extern void l2cble_conn_comp (UINT16 handle, UINT8 role, BD_ADDR bda, tBLE_ADDR_TYPE type,
763 UINT16 conn_interval, UINT16 conn_latency, UINT16 conn_timeout);