diff options
author | Andre Eisenbach <eisenbach@google.com> | 2015-05-08 17:42:10 -0700 |
---|---|---|
committer | Andre Eisenbach <eisenbach@google.com> | 2015-05-14 16:51:12 +0000 |
commit | 1287166da9c34f041d54a78800b79cb2738675a9 (patch) | |
tree | 810d92fe988a92a02f9f32c3f3185b75c9e5e99c /stack/l2cap | |
parent | b4180cf8a5d70f9e1e815b64ba5e1df25d2fdda4 (diff) | |
download | android_system_bt-1287166da9c34f041d54a78800b79cb2738675a9.tar.gz android_system_bt-1287166da9c34f041d54a78800b79cb2738675a9.tar.bz2 android_system_bt-1287166da9c34f041d54a78800b79cb2738675a9.zip |
DO NOT MERGE Fix compilation on platforms with BLE_INCLUDED == FALSE
This is not a comprehensive fix. More work is necessary to ensure the
correct separation of BLE_INCLUDED TRUE/FALSE as well as removing many
of the hacked-up if() statements resulting from this patch.
Change-Id: I1812594feba0bf43369096e472a8b18cde305255
Diffstat (limited to 'stack/l2cap')
-rw-r--r-- | stack/l2cap/l2c_api.c | 4 | ||||
-rw-r--r-- | stack/l2cap/l2c_link.c | 4 | ||||
-rw-r--r-- | stack/l2cap/l2c_main.c | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/stack/l2cap/l2c_api.c b/stack/l2cap/l2c_api.c index 3a8d5de48..e7dbf36e2 100644 --- a/stack/l2cap/l2c_api.c +++ b/stack/l2cap/l2c_api.c @@ -1420,9 +1420,11 @@ BOOLEAN L2CA_ConnectFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda) // Fixed channels are mandatory on LE transports so ignore the received // channel mask and use the locally cached LE channel mask. +#if BLE_INCLUDED == TRUE if (transport == BT_TRANSPORT_LE) peer_channel_mask = l2cb.l2c_ble_fixed_chnls_mask; else +#endif peer_channel_mask = p_lcb->peer_chnl_mask[0]; // Check for supported channel @@ -1544,9 +1546,11 @@ UINT16 L2CA_SendFixedChnlData (UINT16 fixed_cid, BD_ADDR rem_bda, BT_HDR *p_buf) tL2C_BLE_FIXED_CHNLS_MASK peer_channel_mask; // Select peer channels mask to use depending on transport +#if BLE_INCLUDED == TRUE if (transport == BT_TRANSPORT_LE) peer_channel_mask = l2cb.l2c_ble_fixed_chnls_mask; else +#endif peer_channel_mask = p_lcb->peer_chnl_mask[0]; if ((peer_channel_mask & (1 << fixed_cid)) == 0) diff --git a/stack/l2cap/l2c_link.c b/stack/l2cap/l2c_link.c index 97bf58d9b..822257e1c 100644 --- a/stack/l2cap/l2c_link.c +++ b/stack/l2cap/l2c_link.c @@ -1156,11 +1156,13 @@ void l2c_link_check_send_pkts (tL2C_LCB *p_lcb, tL2C_CCB *p_ccb, BT_HDR *p_buf) (l2cb.round_robin_unacked >= l2cb.round_robin_quota)) #if (BLE_INCLUDED == TRUE) && (p_lcb->transport == BT_TRANSPORT_BR_EDR) -#endif ) || (p_lcb->transport == BT_TRANSPORT_LE && (l2cb.ble_round_robin_unacked >= l2cb.ble_round_robin_quota || l2cb.controller_le_xmit_window == 0 ))) +#else + )) +#endif break; diff --git a/stack/l2cap/l2c_main.c b/stack/l2cap/l2c_main.c index 212d5dfcd..fcc53d5b1 100644 --- a/stack/l2cap/l2c_main.c +++ b/stack/l2cap/l2c_main.c @@ -186,10 +186,12 @@ void l2c_rcv_acl_data (BT_HDR *p_msg) STREAM_TO_UINT16 (l2cap_len, p); STREAM_TO_UINT16 (rcv_cid, p); +#if BLE_INCLUDED == TRUE /* for BLE channel, always notify connection when ACL data received on the link */ if (p_lcb && p_lcb->transport == BT_TRANSPORT_LE && p_lcb->link_state != LST_DISCONNECTING) /* only process fixed channel data as channel open indication when link is not in disconnecting mode */ l2cble_notify_le_connection(p_lcb->remote_bd_addr); +#endif /* Find the CCB for this CID */ if (rcv_cid >= L2CAP_BASE_APPL_CID) @@ -894,8 +896,10 @@ void l2c_init (void) l2cb.high_pri_min_xmit_quota = L2CAP_HIGH_PRI_MIN_XMIT_QUOTA; #endif +#if BLE_INCLUDED == TRUE l2cb.l2c_ble_fixed_chnls_mask = L2CAP_FIXED_CHNL_ATT_BIT | L2CAP_FIXED_CHNL_BLE_SIG_BIT | L2CAP_FIXED_CHNL_SMP_BIT; +#endif l2cb.rcv_pending_q = list_new(NULL); if (l2cb.rcv_pending_q == NULL) |