Bluetooth: host: Refactor out BR/EDR from hci_core to br

Refactor out the BR/EDR handling from hci_core.c to its own source file
in br.c.
BR/EDR consists of inquiry and discovery roles in addition to
initialization. SSP is still kept separate.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
Joakim Andersson 2021-03-09 17:31:37 +01:00 committed by Johan Hedberg
commit a7e3e32ea5
5 changed files with 1142 additions and 1098 deletions

View file

@ -15,6 +15,7 @@ zephyr_library_sources_ifdef(CONFIG_BT_HOST_CCM aes_ccm.c)
zephyr_library_sources_ifdef(
CONFIG_BT_BREDR
br.c
keys_br.c
l2cap_br.c
sdp.c

1090
subsys/bluetooth/host/br.c Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,12 @@
/*
* Copyright (c) 2017-2021 Nordic Semiconductor ASA
* Copyright (c) 2015-2016 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
int bt_br_init(void);
void bt_br_discovery_reset(void);
bool bt_br_update_sec_level(struct bt_conn *conn);

File diff suppressed because it is too large Load diff

View file

@ -395,3 +395,18 @@ void bt_hci_le_past_received(struct net_buf *buf);
/* Adv HCI event handlers */
void bt_hci_le_adv_set_terminated(struct net_buf *buf);
void bt_hci_le_scan_req_received(struct net_buf *buf);
/* BR/EDR HCI event handlers */
void bt_hci_conn_req(struct net_buf *buf);
void bt_hci_conn_complete(struct net_buf *buf);
void bt_hci_inquiry_complete(struct net_buf *buf);
void bt_hci_inquiry_result_with_rssi(struct net_buf *buf);
void bt_hci_extended_inquiry_result(struct net_buf *buf);
void bt_hci_remote_name_request_complete(struct net_buf *buf);
void bt_hci_read_remote_features_complete(struct net_buf *buf);
void bt_hci_read_remote_ext_features_complete(struct net_buf *buf);
void bt_hci_role_change(struct net_buf *buf);
void bt_hci_synchronous_conn_complete(struct net_buf *buf);