fix build without BLE

This commit is contained in:
andryblack 2018-01-21 17:01:12 +03:00
parent e4f5dd75d9
commit 3e329ddf9d
2 changed files with 4 additions and 2 deletions

View File

@ -4698,14 +4698,14 @@ uint16_t hci_get_manufacturer(void){
return hci_stack->manufacturer;
}
#ifdef ENABLE_BLE
static sm_connection_t * sm_get_connection_for_handle(hci_con_handle_t con_handle){
hci_connection_t * hci_con = hci_connection_for_handle(con_handle);
if (!hci_con) return NULL;
return &hci_con->sm_connection;
}
#ifdef ENABLE_BLE
// extracted from sm.c to allow enabling of l2cap le data channels without adding sm.c to the build
// without sm.c default values from create_connection_for_bd_addr_and_type() resulg in non-encrypted, not-authenticated

View File

@ -1212,6 +1212,7 @@ uint16_t l2cap_max_mtu(void){
return HCI_ACL_PAYLOAD_SIZE - L2CAP_HEADER_SIZE;
}
#ifdef ENABLE_BLE
uint16_t l2cap_max_le_mtu(void){
if (l2cap_le_custom_max_mtu != 0) return l2cap_le_custom_max_mtu;
return l2cap_max_mtu();
@ -1222,6 +1223,7 @@ void l2cap_set_max_le_mtu(uint16_t max_mtu){
l2cap_le_custom_max_mtu = max_mtu;
}
}
#endif
#ifdef ENABLE_CLASSIC