Bluetooth: Rename BT_BREDR to BT_CLASSIC
Rename BT_BREDR to BT_CLASSIC Rename CONFIG_BT_BREDR to CONFIG_BT_CLASSIC Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
This commit is contained in:
parent
459e1dd10d
commit
40cf23daff
|
@ -99,7 +99,7 @@ endif()
|
|||
|
||||
zephyr_iterable_section(NAME bt_l2cap_fixed_chan KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
|
||||
|
||||
if(CONFIG_BT_BREDR)
|
||||
if(CONFIG_BT_CLASSIC)
|
||||
zephyr_iterable_section(NAME bt_l2cap_br_fixed_chan KVMA RAM_REGION GROUP RODATA_REGION SUBALIGN 4)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -2352,7 +2352,7 @@ INCLUDE_FILE_PATTERNS =
|
|||
PREDEFINED = __DOXYGEN__ \
|
||||
CONFIG_ARCH_HAS_CUSTOM_BUSY_WAIT \
|
||||
CONFIG_ARCH_HAS_CUSTOM_SWAP_TO_MAIN \
|
||||
CONFIG_BT_BREDR \
|
||||
CONFIG_BT_CLASSIC \
|
||||
CONFIG_BT_EATT \
|
||||
CONFIG_BT_L2CAP_SEG_RECV \
|
||||
CONFIG_BT_MESH_MODEL_EXTENSIONS \
|
||||
|
|
|
@ -155,7 +155,7 @@ static inline void get_evt_hdr(void)
|
|||
rx.remaining++;
|
||||
rx.hdr_len++;
|
||||
break;
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
case BT_HCI_EVT_INQUIRY_RESULT_WITH_RSSI:
|
||||
case BT_HCI_EVT_EXTENDED_INQUIRY_RESULT:
|
||||
rx.discardable = true;
|
||||
|
|
|
@ -28,7 +28,7 @@ static bool is_hci_event_discardable(const uint8_t *evt_data)
|
|||
uint8_t evt_type = evt_data[0];
|
||||
|
||||
switch (evt_type) {
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
case BT_HCI_EVT_INQUIRY_RESULT_WITH_RSSI:
|
||||
case BT_HCI_EVT_EXTENDED_INQUIRY_RESULT:
|
||||
return true;
|
||||
|
|
|
@ -32,7 +32,7 @@ static bool is_hci_event_discardable(const uint8_t *evt_data)
|
|||
uint8_t evt_type = evt_data[0];
|
||||
|
||||
switch (evt_type) {
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
case BT_HCI_EVT_INQUIRY_RESULT_WITH_RSSI:
|
||||
case BT_HCI_EVT_EXTENDED_INQUIRY_RESULT:
|
||||
return true;
|
||||
|
@ -280,7 +280,7 @@ static int bt_esp32_ble_init(void)
|
|||
int ret;
|
||||
esp_bt_controller_config_t bt_cfg = BT_CONTROLLER_INIT_CONFIG_DEFAULT();
|
||||
|
||||
#if defined(CONFIG_BT_BREDR) && defined(CONFIG_SOC_SERIES_ESP32)
|
||||
#if defined(CONFIG_BT_CLASSIC) && defined(CONFIG_SOC_SERIES_ESP32)
|
||||
esp_bt_mode_t mode = ESP_BT_MODE_BTDM;
|
||||
#else
|
||||
esp_bt_mode_t mode = ESP_BT_MODE_BLE;
|
||||
|
|
|
@ -56,7 +56,7 @@ static bool is_hci_event_discardable(const uint8_t *evt_data)
|
|||
uint8_t evt_type = evt_data[0];
|
||||
|
||||
switch (evt_type) {
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
case BT_HCI_EVT_INQUIRY_RESULT_WITH_RSSI:
|
||||
case BT_HCI_EVT_EXTENDED_INQUIRY_RESULT:
|
||||
return true;
|
||||
|
|
|
@ -34,7 +34,7 @@ static bool is_hci_event_discardable(const uint8_t *evt_data)
|
|||
uint8_t evt_type = evt_data[0];
|
||||
|
||||
switch (evt_type) {
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
case BT_HCI_EVT_INQUIRY_RESULT_WITH_RSSI:
|
||||
case BT_HCI_EVT_EXTENDED_INQUIRY_RESULT:
|
||||
return true;
|
||||
|
|
|
@ -1067,7 +1067,7 @@ struct bt_conn_cb {
|
|||
const bt_addr_le_t *rpa,
|
||||
const bt_addr_le_t *identity);
|
||||
#endif /* CONFIG_BT_SMP */
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
/** @brief The security level of a connection has changed.
|
||||
*
|
||||
* This callback notifies the application that the security of a
|
||||
|
@ -1086,7 +1086,7 @@ struct bt_conn_cb {
|
|||
*/
|
||||
void (*security_changed)(struct bt_conn *conn, bt_security_t level,
|
||||
enum bt_security_err err);
|
||||
#endif /* defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR) */
|
||||
#endif /* defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC) */
|
||||
|
||||
#if defined(CONFIG_BT_REMOTE_INFO)
|
||||
/** @brief Remote information procedures has completed.
|
||||
|
@ -1551,7 +1551,7 @@ struct bt_conn_auth_cb {
|
|||
*/
|
||||
void (*pairing_confirm)(struct bt_conn *conn);
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
/** @brief Request the user to enter a passkey.
|
||||
*
|
||||
* This callback will be called for a BR/EDR (Bluetooth Classic)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
ITERABLE_SECTION_ROM(bt_l2cap_fixed_chan, 4)
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
ITERABLE_SECTION_ROM(bt_l2cap_br_fixed_chan, 4)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CONFIG_BT=y
|
||||
CONFIG_BT_BREDR=y
|
||||
CONFIG_BT_CLASSIC=y
|
||||
CONFIG_BT_RFCOMM=y
|
||||
CONFIG_BT_HFP_HF=y
|
||||
CONFIG_BT_PERIPHERAL=y
|
||||
|
|
|
@ -52,7 +52,7 @@ ZTEST,n
|
|||
BT_A2DP,n,experimental
|
||||
BT_AUDIO,n,experimental
|
||||
BT_AVDTP,n,experimental
|
||||
BT_BREDR,n,experimental
|
||||
BT_CLASSIC,n,experimental
|
||||
BT_CTLR_ADV_DATA_CHAIN,n,experimental
|
||||
BT_CTLR_DTM_HCI_DF_IQ_REPORT,n,experimental
|
||||
BT_CTLR_SET_HOST_FEATURE,n,experimental
|
||||
|
|
Can't render this file because it has a wrong number of fields in line 50.
|
|
@ -446,7 +446,7 @@ config BT_DEBUG_A2DP
|
|||
config BT_DEBUG_SDP
|
||||
bool "[DEPRECATED] Bluetooth Service Discovery Protocol (SDP) debug"
|
||||
select DEPRECATED
|
||||
depends on BT_BREDR
|
||||
depends on BT_CLASSIC
|
||||
help
|
||||
This option enables debug support for the Bluetooth
|
||||
Service Discovery Protocol (SDP).
|
||||
|
|
|
@ -49,7 +49,7 @@ config BT_BUF_ACL_TX_COUNT
|
|||
|
||||
config BT_BUF_ACL_RX_SIZE
|
||||
int "Maximum supported ACL size for incoming data"
|
||||
default 200 if BT_BREDR
|
||||
default 200 if BT_CLASSIC
|
||||
default 70 if BT_EATT
|
||||
default 69 if BT_SMP
|
||||
default 37 if BT_MESH_GATT
|
||||
|
@ -139,7 +139,7 @@ config BT_BUF_EVT_DISCARDABLE_SIZE
|
|||
range 43 255 if !BT_EXT_ADV
|
||||
range 58 255 if BT_EXT_ADV
|
||||
# LE Extended Advertising Report event
|
||||
default 255 if BT_BREDR
|
||||
default 255 if BT_CLASSIC
|
||||
# Le Advertising Report event
|
||||
default 43 if !BT_EXT_ADV
|
||||
default 58 if BT_EXT_ADV
|
||||
|
@ -166,10 +166,10 @@ config BT_BUF_EVT_DISCARDABLE_COUNT
|
|||
|
||||
config BT_BUF_CMD_TX_SIZE
|
||||
int "Maximum support HCI Command buffer length"
|
||||
default 255 if (BT_EXT_ADV || BT_BREDR || BT_ISO_CENTRAL)
|
||||
default 255 if (BT_EXT_ADV || BT_CLASSIC || BT_ISO_CENTRAL)
|
||||
# LE Set Connection CTE Receive Parameters. Value required to store max allowed number
|
||||
# of antenna ids for platforms other than Nordic.
|
||||
default 83 if (!BT_EXT_ADV && !BT_BREDR && BT_CTLR_DF && BT_CTLR_DF_CONN_CTE_REQ && !SOC_COMPATIBLE_NRF)
|
||||
default 83 if (!BT_EXT_ADV && !BT_CLASSIC && BT_CTLR_DF && BT_CTLR_DF_CONN_CTE_REQ && !SOC_COMPATIBLE_NRF)
|
||||
# LE Generate DHKey v2 command
|
||||
default 65
|
||||
range 65 255
|
||||
|
|
|
@ -1026,10 +1026,9 @@ config BT_CONN_DISABLE_SECURITY
|
|||
WARNING: This option enables anyone to snoop on-air traffic.
|
||||
Use of this feature in production is strongly discouraged.
|
||||
|
||||
config BT_BREDR
|
||||
config BT_CLASSIC
|
||||
bool "Bluetooth BR/EDR support [EXPERIMENTAL]"
|
||||
depends on BT_HCI_HOST
|
||||
select BT_CLASSIC
|
||||
select BT_PERIPHERAL
|
||||
select BT_CENTRAL
|
||||
select BT_SMP
|
||||
|
@ -1038,14 +1037,7 @@ config BT_BREDR
|
|||
help
|
||||
This option enables Bluetooth BR/EDR support
|
||||
|
||||
config BT_CLASSIC
|
||||
bool "Bluetooth classic(BR/EDR) support [EXPERIMENTAL]"
|
||||
depends on BT_BREDR
|
||||
select EXPERIMENTAL
|
||||
help
|
||||
This option enables Bluetooth classic(BR/EDR) support
|
||||
|
||||
if BT_BREDR
|
||||
if BT_CLASSIC
|
||||
config BT_MAX_SCO_CONN
|
||||
int "Maximum number of simultaneous SCO connections"
|
||||
default 1
|
||||
|
@ -1106,7 +1098,7 @@ config BT_COD
|
|||
consult the following link:
|
||||
https://www.bluetooth.com/specifications/assigned-numbers
|
||||
|
||||
endif # BT_BREDR
|
||||
endif # BT_CLASSIC
|
||||
|
||||
config BT_HCI_VS_EVT_USER
|
||||
bool "User Vendor-Specific event handling"
|
||||
|
|
|
@ -29,7 +29,7 @@ config BT_L2CAP_TX_FRAG_COUNT
|
|||
|
||||
config BT_L2CAP_TX_MTU
|
||||
int "Maximum supported L2CAP MTU for L2CAP TX buffers"
|
||||
default 253 if BT_BREDR
|
||||
default 253 if BT_CLASSIC
|
||||
default 66 if BT_EATT
|
||||
default 65 if BT_SMP
|
||||
default 64 if BT_BAP_UNICAST_SERVER || \
|
||||
|
|
|
@ -8,7 +8,7 @@ zephyr_library_sources_ifdef(CONFIG_BT_AVDTP avdtp.c)
|
|||
zephyr_library_sources_ifdef(CONFIG_BT_RFCOMM rfcomm.c)
|
||||
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_BREDR
|
||||
CONFIG_BT_CLASSIC
|
||||
br.c
|
||||
keys_br.c
|
||||
l2cap_br.c
|
||||
|
|
|
@ -113,20 +113,20 @@ NET_BUF_POOL_FIXED_DEFINE(frag_pool, CONFIG_BT_L2CAP_TX_FRAG_COUNT,
|
|||
|
||||
#endif /* CONFIG_BT_L2CAP_TX_FRAG_COUNT > 0 */
|
||||
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
const struct bt_conn_auth_cb *bt_auth;
|
||||
sys_slist_t bt_auth_info_cbs = SYS_SLIST_STATIC_INIT(&bt_auth_info_cbs);
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_CLASSIC */
|
||||
|
||||
static struct bt_conn_cb *callback_list;
|
||||
|
||||
static struct bt_conn_tx conn_tx[CONFIG_BT_CONN_TX_MAX];
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
static int bt_hci_connect_br_cancel(struct bt_conn *conn);
|
||||
|
||||
static struct bt_conn sco_conns[CONFIG_BT_MAX_SCO_CONN];
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
||||
#if defined(CONFIG_BT_ISO)
|
||||
|
@ -147,11 +147,11 @@ int bt_conn_iso_init(void)
|
|||
|
||||
struct k_sem *bt_conn_get_pkts(struct bt_conn *conn)
|
||||
{
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
if (conn->type == BT_CONN_TYPE_BR || !bt_dev.le.acl_mtu) {
|
||||
return &bt_dev.br.pkts;
|
||||
}
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
|
||||
#if defined(CONFIG_BT_ISO)
|
||||
/* Use ISO pkts semaphore if LE Read Buffer Size command returned
|
||||
|
@ -581,12 +581,12 @@ static int send_iso(struct bt_conn *conn, struct net_buf *buf, uint8_t flags)
|
|||
|
||||
static inline uint16_t conn_mtu(struct bt_conn *conn)
|
||||
{
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
if (conn->type == BT_CONN_TYPE_BR ||
|
||||
(conn->type != BT_CONN_TYPE_ISO && !bt_dev.le.acl_mtu)) {
|
||||
return bt_dev.br.mtu;
|
||||
}
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
#if defined(CONFIG_BT_ISO)
|
||||
if (conn->type == BT_CONN_TYPE_ISO) {
|
||||
return bt_dev.le.iso_mtu;
|
||||
|
@ -1259,7 +1259,7 @@ struct bt_conn *bt_conn_lookup_handle(uint16_t handle, enum bt_conn_type type)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
conn = conn_lookup_handle(sco_conns, ARRAY_SIZE(sco_conns), handle);
|
||||
if (conn) {
|
||||
goto found;
|
||||
|
@ -1299,7 +1299,7 @@ void bt_conn_foreach(enum bt_conn_type type,
|
|||
func(conn, data);
|
||||
bt_conn_unref(conn);
|
||||
}
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
if (type & BT_CONN_TYPE_SCO) {
|
||||
for (i = 0; i < ARRAY_SIZE(sco_conns); i++) {
|
||||
struct bt_conn *conn = bt_conn_ref(&sco_conns[i]);
|
||||
|
@ -1312,7 +1312,7 @@ void bt_conn_foreach(enum bt_conn_type type,
|
|||
bt_conn_unref(conn);
|
||||
}
|
||||
}
|
||||
#endif /* defined(CONFIG_BT_BREDR) */
|
||||
#endif /* defined(CONFIG_BT_CLASSIC) */
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
||||
#if defined(CONFIG_BT_ISO)
|
||||
|
@ -1406,7 +1406,7 @@ uint8_t bt_conn_index(const struct bt_conn *conn)
|
|||
"Invalid bt_conn pointer");
|
||||
break;
|
||||
#endif
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
case BT_CONN_TYPE_SCO:
|
||||
index = conn - sco_conns;
|
||||
__ASSERT(index >= 0 && index < ARRAY_SIZE(sco_conns),
|
||||
|
@ -1577,11 +1577,11 @@ int bt_conn_disconnect(struct bt_conn *conn, uint8_t reason)
|
|||
return conn_disconnect(conn, reason);
|
||||
}
|
||||
#endif /* CONFIG_BT_ISO */
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
else if (conn->type == BT_CONN_TYPE_BR) {
|
||||
return bt_hci_connect_br_cancel(conn);
|
||||
}
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
else {
|
||||
__ASSERT(false, "Invalid conn type %u", conn->type);
|
||||
}
|
||||
|
@ -1934,7 +1934,7 @@ static struct bt_conn *acl_conn_new(void)
|
|||
return bt_conn_new(acl_conns, ARRAY_SIZE(acl_conns));
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
void bt_sco_cleanup(struct bt_conn *sco_conn)
|
||||
{
|
||||
bt_conn_unref(sco_conn->sco.acl);
|
||||
|
@ -2188,7 +2188,7 @@ static int bt_hci_connect_br_cancel(struct bt_conn *conn)
|
|||
return err;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
|
||||
#if defined(CONFIG_BT_SMP)
|
||||
bool bt_conn_ltk_present(const struct bt_conn *conn)
|
||||
|
@ -2262,14 +2262,14 @@ int bt_conn_le_start_encryption(struct bt_conn *conn, uint8_t rand[8],
|
|||
}
|
||||
#endif /* CONFIG_BT_SMP */
|
||||
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
uint8_t bt_conn_enc_key_size(const struct bt_conn *conn)
|
||||
{
|
||||
if (!conn->encrypt) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR) &&
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC) &&
|
||||
conn->type == BT_CONN_TYPE_BR) {
|
||||
struct bt_hci_cp_read_encryption_key_size *cp;
|
||||
struct bt_hci_rp_read_encryption_key_size *rp;
|
||||
|
@ -2309,13 +2309,13 @@ uint8_t bt_conn_enc_key_size(const struct bt_conn *conn)
|
|||
|
||||
static void reset_pairing(struct bt_conn *conn)
|
||||
{
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
if (conn->type == BT_CONN_TYPE_BR) {
|
||||
atomic_clear_bit(conn->flags, BT_CONN_BR_PAIRING);
|
||||
atomic_clear_bit(conn->flags, BT_CONN_BR_PAIRING_INITIATOR);
|
||||
atomic_clear_bit(conn->flags, BT_CONN_BR_LEGACY_SECURE);
|
||||
}
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
|
||||
/* Reset required security level to current operational */
|
||||
conn->required_sec_level = conn->sec_level;
|
||||
|
@ -2348,11 +2348,11 @@ void bt_conn_security_changed(struct bt_conn *conn, uint8_t hci_err,
|
|||
bt_keys_update_usage(conn->id, bt_conn_get_dst(conn));
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
if (conn->type == BT_CONN_TYPE_BR) {
|
||||
bt_keys_link_key_update_usage(&conn->br.dst);
|
||||
}
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -2360,7 +2360,7 @@ void bt_conn_security_changed(struct bt_conn *conn, uint8_t hci_err,
|
|||
|
||||
static int start_security(struct bt_conn *conn)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR) && conn->type == BT_CONN_TYPE_BR) {
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC) && conn->type == BT_CONN_TYPE_BR) {
|
||||
return bt_ssp_start_security(conn);
|
||||
}
|
||||
|
||||
|
@ -2610,11 +2610,11 @@ int bt_conn_get_info(const struct bt_conn *conn, struct bt_conn_info *info)
|
|||
info->state = conn_internal_to_public_state(conn->state);
|
||||
info->security.flags = 0;
|
||||
info->security.level = bt_conn_get_security(conn);
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
info->security.enc_key_size = bt_conn_enc_key_size(conn);
|
||||
#else
|
||||
info->security.enc_key_size = 0;
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_CLASSIC */
|
||||
|
||||
switch (conn->type) {
|
||||
case BT_CONN_TYPE_LE:
|
||||
|
@ -2643,7 +2643,7 @@ int bt_conn_get_info(const struct bt_conn *conn, struct bt_conn_info *info)
|
|||
info->security.flags |= BT_SECURITY_FLAG_OOB;
|
||||
}
|
||||
return 0;
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
case BT_CONN_TYPE_BR:
|
||||
info->br.dst = &conn->br.dst;
|
||||
return 0;
|
||||
|
@ -2692,7 +2692,7 @@ int bt_conn_get_remote_info(struct bt_conn *conn,
|
|||
case BT_CONN_TYPE_LE:
|
||||
remote_info->le.features = conn->le.features;
|
||||
return 0;
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
case BT_CONN_TYPE_BR:
|
||||
/* TODO: Make sure the HCI commands to read br features and
|
||||
* extended features has finished. */
|
||||
|
@ -3342,7 +3342,7 @@ struct net_buf *bt_conn_create_frag_timeout(size_t reserve, k_timeout_t timeout)
|
|||
#endif /* CONFIG_NET_BUF_LOG */
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
int bt_conn_auth_cb_register(const struct bt_conn_auth_cb *cb)
|
||||
{
|
||||
if (!cb) {
|
||||
|
@ -3359,7 +3359,7 @@ int bt_conn_auth_cb_register(const struct bt_conn_auth_cb *cb)
|
|||
*/
|
||||
if (!cb->cancel &&
|
||||
(cb->passkey_display || cb->passkey_entry || cb->passkey_confirm ||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
cb->pincode_entry ||
|
||||
#endif
|
||||
cb->pairing_confirm)) {
|
||||
|
@ -3424,7 +3424,7 @@ int bt_conn_auth_passkey_entry(struct bt_conn *conn, unsigned int passkey)
|
|||
return bt_smp_auth_passkey_entry(conn, passkey);
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR) && conn->type == BT_CONN_TYPE_BR) {
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC) && conn->type == BT_CONN_TYPE_BR) {
|
||||
if (!bt_auth) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -3454,7 +3454,7 @@ int bt_conn_auth_passkey_confirm(struct bt_conn *conn)
|
|||
return bt_smp_auth_passkey_confirm(conn);
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR) && conn->type == BT_CONN_TYPE_BR) {
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC) && conn->type == BT_CONN_TYPE_BR) {
|
||||
if (!bt_auth) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -3471,7 +3471,7 @@ int bt_conn_auth_cancel(struct bt_conn *conn)
|
|||
return bt_smp_auth_cancel(conn);
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR) && conn->type == BT_CONN_TYPE_BR) {
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC) && conn->type == BT_CONN_TYPE_BR) {
|
||||
if (!bt_auth) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -3488,7 +3488,7 @@ int bt_conn_auth_pairing_confirm(struct bt_conn *conn)
|
|||
return bt_smp_auth_pairing_confirm(conn);
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR) && conn->type == BT_CONN_TYPE_BR) {
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC) && conn->type == BT_CONN_TYPE_BR) {
|
||||
if (!bt_auth) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -3498,7 +3498,7 @@ int bt_conn_auth_pairing_confirm(struct bt_conn *conn)
|
|||
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_CLASSIC */
|
||||
|
||||
struct bt_conn *bt_conn_lookup_index(uint8_t index)
|
||||
{
|
||||
|
|
|
@ -86,7 +86,7 @@ struct bt_conn_le {
|
|||
#endif
|
||||
};
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
/* For now reserve space for 2 pages of LMP remote features */
|
||||
#define LMP_MAX_PAGES 2
|
||||
|
||||
|
@ -167,11 +167,11 @@ struct bt_conn {
|
|||
/* Which local identity address this connection uses */
|
||||
uint8_t id;
|
||||
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
bt_security_t sec_level;
|
||||
bt_security_t required_sec_level;
|
||||
uint8_t encrypt;
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_CLASSIC */
|
||||
|
||||
#if defined(CONFIG_BT_DF_CONNECTION_CTE_RX)
|
||||
/**
|
||||
|
@ -217,7 +217,7 @@ struct bt_conn {
|
|||
|
||||
union {
|
||||
struct bt_conn_le le;
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
struct bt_conn_br br;
|
||||
struct bt_conn_sco sco;
|
||||
#endif
|
||||
|
@ -379,11 +379,11 @@ int bt_conn_le_start_encryption(struct bt_conn *conn, uint8_t rand[8],
|
|||
void bt_conn_identity_resolved(struct bt_conn *conn);
|
||||
#endif /* CONFIG_BT_SMP */
|
||||
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
/* Notify higher layers that connection security changed */
|
||||
void bt_conn_security_changed(struct bt_conn *conn, uint8_t hci_err,
|
||||
enum bt_security_err err);
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_CLASSIC */
|
||||
|
||||
/* Prepare a PDU to be sent over a connection */
|
||||
#if defined(CONFIG_NET_BUF_LOG)
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
#include "crypto.h"
|
||||
#include "settings.h"
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
#include "classic/br.h"
|
||||
#endif
|
||||
|
||||
|
@ -881,7 +881,7 @@ static void hci_disconn_complete(struct net_buf *buf)
|
|||
bt_conn_set_state(conn, BT_CONN_DISCONNECTED);
|
||||
|
||||
if (conn->type != BT_CONN_TYPE_LE) {
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
if (conn->type == BT_CONN_TYPE_SCO) {
|
||||
bt_sco_cleanup(conn);
|
||||
return;
|
||||
|
@ -1935,7 +1935,7 @@ static void unpair(uint8_t id, const bt_addr_le_t *addr)
|
|||
bt_conn_unref(conn);
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR)) {
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC)) {
|
||||
/* LE Public may indicate BR/EDR as well */
|
||||
if (addr->type == BT_ADDR_LE_PUBLIC) {
|
||||
bt_keys_link_key_clear_addr(&addr->a);
|
||||
|
@ -1954,7 +1954,7 @@ static void unpair(uint8_t id, const bt_addr_le_t *addr)
|
|||
|
||||
bt_gatt_clear(id, addr);
|
||||
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
struct bt_conn_auth_info_cb *listener, *next;
|
||||
|
||||
SYS_SLIST_FOR_EACH_CONTAINER_SAFE(&bt_auth_info_cbs, listener,
|
||||
|
@ -1963,7 +1963,7 @@ static void unpair(uint8_t id, const bt_addr_le_t *addr)
|
|||
listener->bond_deleted(id, addr);
|
||||
}
|
||||
}
|
||||
#endif /* defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR) */
|
||||
#endif /* defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC) */
|
||||
}
|
||||
|
||||
static void unpair_remote(const struct bt_bond_info *info, void *data)
|
||||
|
@ -1999,7 +1999,7 @@ int bt_unpair(uint8_t id, const bt_addr_le_t *addr)
|
|||
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
enum bt_security_err bt_security_err_get(uint8_t hci_err)
|
||||
{
|
||||
switch (hci_err) {
|
||||
|
@ -2019,7 +2019,7 @@ enum bt_security_err bt_security_err_get(uint8_t hci_err)
|
|||
return BT_SECURITY_ERR_UNSPECIFIED;
|
||||
}
|
||||
}
|
||||
#endif /* defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR) */
|
||||
#endif /* defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC) */
|
||||
|
||||
#if defined(CONFIG_BT_SMP)
|
||||
static bool update_sec_level(struct bt_conn *conn)
|
||||
|
@ -2039,7 +2039,7 @@ static bool update_sec_level(struct bt_conn *conn)
|
|||
}
|
||||
#endif /* CONFIG_BT_SMP */
|
||||
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
static void hci_encrypt_change(struct net_buf *buf)
|
||||
{
|
||||
struct bt_hci_evt_encrypt_change *evt = (void *)buf->data;
|
||||
|
@ -2083,7 +2083,7 @@ static void hci_encrypt_change(struct net_buf *buf)
|
|||
}
|
||||
}
|
||||
#endif /* CONFIG_BT_SMP */
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
if (conn->type == BT_CONN_TYPE_BR) {
|
||||
if (!bt_br_update_sec_level(conn)) {
|
||||
bt_conn_unref(conn);
|
||||
|
@ -2101,7 +2101,7 @@ static void hci_encrypt_change(struct net_buf *buf)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
|
||||
bt_conn_security_changed(conn, status, bt_security_err_get(status));
|
||||
|
||||
|
@ -2152,14 +2152,14 @@ static void hci_encrypt_key_refresh_complete(struct net_buf *buf)
|
|||
}
|
||||
}
|
||||
#endif /* CONFIG_BT_SMP */
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
if (conn->type == BT_CONN_TYPE_BR) {
|
||||
if (!bt_br_update_sec_level(conn)) {
|
||||
bt_conn_unref(conn);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
|
||||
bt_conn_security_changed(conn, status, bt_security_err_get(status));
|
||||
if (status) {
|
||||
|
@ -2169,7 +2169,7 @@ static void hci_encrypt_key_refresh_complete(struct net_buf *buf)
|
|||
|
||||
bt_conn_unref(conn);
|
||||
}
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_CLASSIC */
|
||||
|
||||
#if defined(CONFIG_BT_REMOTE_VERSION)
|
||||
static void bt_hci_evt_read_remote_version_complete(struct net_buf *buf)
|
||||
|
@ -2292,9 +2292,9 @@ static void hci_reset_complete(struct net_buf *buf)
|
|||
bt_scan_reset();
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
bt_br_discovery_reset();
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
|
||||
flags = (atomic_get(bt_dev.flags) & BT_DEV_PERSISTENT_FLAGS);
|
||||
atomic_set(bt_dev.flags, flags);
|
||||
|
@ -2658,7 +2658,7 @@ static const struct event_handler normal_events[] = {
|
|||
sizeof(struct bt_hci_evt_vs)),
|
||||
EVENT_HANDLER(BT_HCI_EVT_LE_META_EVENT, hci_le_meta_event,
|
||||
sizeof(struct bt_hci_evt_le_meta_event)),
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
EVENT_HANDLER(BT_HCI_EVT_CONN_REQUEST, bt_hci_conn_req,
|
||||
sizeof(struct bt_hci_evt_conn_request)),
|
||||
EVENT_HANDLER(BT_HCI_EVT_CONN_COMPLETE, bt_hci_conn_complete,
|
||||
|
@ -2705,18 +2705,18 @@ static const struct event_handler normal_events[] = {
|
|||
sizeof(struct bt_hci_evt_role_change)),
|
||||
EVENT_HANDLER(BT_HCI_EVT_SYNC_CONN_COMPLETE, bt_hci_synchronous_conn_complete,
|
||||
sizeof(struct bt_hci_evt_sync_conn_complete)),
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
#if defined(CONFIG_BT_CONN)
|
||||
EVENT_HANDLER(BT_HCI_EVT_DISCONN_COMPLETE, hci_disconn_complete,
|
||||
sizeof(struct bt_hci_evt_disconn_complete)),
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
EVENT_HANDLER(BT_HCI_EVT_ENCRYPT_CHANGE, hci_encrypt_change,
|
||||
sizeof(struct bt_hci_evt_encrypt_change)),
|
||||
EVENT_HANDLER(BT_HCI_EVT_ENCRYPT_KEY_REFRESH_COMPLETE,
|
||||
hci_encrypt_key_refresh_complete,
|
||||
sizeof(struct bt_hci_evt_encrypt_key_refresh_complete)),
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_CLASSIC */
|
||||
#if defined(CONFIG_BT_REMOTE_VERSION)
|
||||
EVENT_HANDLER(BT_HCI_EVT_REMOTE_VERSION_INFO,
|
||||
bt_hci_evt_read_remote_version_complete,
|
||||
|
@ -2898,7 +2898,7 @@ static void read_le_features_complete(struct net_buf *buf)
|
|||
}
|
||||
|
||||
#if defined(CONFIG_BT_CONN)
|
||||
#if !defined(CONFIG_BT_BREDR)
|
||||
#if !defined(CONFIG_BT_CLASSIC)
|
||||
static void read_buffer_size_complete(struct net_buf *buf)
|
||||
{
|
||||
struct bt_hci_rp_read_buffer_size *rp = (void *)buf->data;
|
||||
|
@ -2918,7 +2918,7 @@ static void read_buffer_size_complete(struct net_buf *buf)
|
|||
|
||||
k_sem_init(&bt_dev.le.acl_pkts, pkts, pkts);
|
||||
}
|
||||
#endif /* !defined(CONFIG_BT_BREDR) */
|
||||
#endif /* !defined(CONFIG_BT_CLASSIC) */
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
||||
static void le_read_buffer_size_complete(struct net_buf *buf)
|
||||
|
@ -3433,7 +3433,7 @@ static int le_init(void)
|
|||
return le_set_event_mask();
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_BT_BREDR)
|
||||
#if !defined(CONFIG_BT_CLASSIC)
|
||||
static int bt_br_init(void)
|
||||
{
|
||||
#if defined(CONFIG_BT_CONN)
|
||||
|
@ -3456,7 +3456,7 @@ static int bt_br_init(void)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif /* !defined(CONFIG_BT_BREDR) */
|
||||
#endif /* !defined(CONFIG_BT_CLASSIC) */
|
||||
|
||||
static int set_event_mask(void)
|
||||
{
|
||||
|
@ -3471,7 +3471,7 @@ static int set_event_mask(void)
|
|||
|
||||
ev = net_buf_add(buf, sizeof(*ev));
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR)) {
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC)) {
|
||||
/* Since we require LE support, we can count on a
|
||||
* Bluetooth 4.0 feature set
|
||||
*/
|
||||
|
@ -3748,7 +3748,7 @@ static int hci_init(void)
|
|||
if (err) {
|
||||
return err;
|
||||
}
|
||||
} else if (IS_ENABLED(CONFIG_BT_BREDR)) {
|
||||
} else if (IS_ENABLED(CONFIG_BT_CLASSIC)) {
|
||||
LOG_ERR("Non-BR/EDR controller detected");
|
||||
return -EIO;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#define LE_CONN_LATENCY 0x0000
|
||||
#define LE_CONN_TIMEOUT 0x002a
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
#define LMP_FEAT_PAGES_COUNT 3
|
||||
#else
|
||||
#define LMP_FEAT_PAGES_COUNT 1
|
||||
|
@ -49,11 +49,11 @@ enum {
|
|||
BT_DEV_ID_PENDING,
|
||||
BT_DEV_STORE_ID,
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
BT_DEV_ISCAN,
|
||||
BT_DEV_PSCAN,
|
||||
BT_DEV_INQUIRY,
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
|
||||
/* Total number of flags - must be at the end of the enum */
|
||||
BT_DEV_NUM_FLAGS,
|
||||
|
@ -277,7 +277,7 @@ struct bt_dev_le {
|
|||
#endif /* CONFIG_BT_SMP */
|
||||
};
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
struct bt_dev_br {
|
||||
/* Max controller's acceptable ACL packet length */
|
||||
uint16_t mtu;
|
||||
|
@ -355,7 +355,7 @@ struct bt_dev {
|
|||
/* LE controller specific features */
|
||||
struct bt_dev_le le;
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
/* BR/EDR controller specific features */
|
||||
struct bt_dev_br br;
|
||||
#endif
|
||||
|
@ -404,11 +404,11 @@ struct bt_dev {
|
|||
};
|
||||
|
||||
extern struct bt_dev bt_dev;
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
extern const struct bt_conn_auth_cb *bt_auth;
|
||||
extern sys_slist_t bt_auth_info_cbs;
|
||||
enum bt_security_err bt_security_err_get(uint8_t hci_err);
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_CLASSIC */
|
||||
|
||||
/* Data type to store state related with command to be updated
|
||||
* when command completes successfully.
|
||||
|
|
|
@ -1902,7 +1902,7 @@ int bt_id_set_adv_own_addr(struct bt_le_ext_adv *adv, uint32_t options,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
int bt_br_oob_get_local(struct bt_br_oob *oob)
|
||||
{
|
||||
CHECKIF(oob == NULL) {
|
||||
|
@ -1913,7 +1913,7 @@ int bt_br_oob_get_local(struct bt_br_oob *oob)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
|
||||
int bt_le_oob_get_local(uint8_t id, struct bt_le_oob *oob)
|
||||
{
|
||||
|
|
|
@ -357,7 +357,7 @@ void bt_l2cap_connected(struct bt_conn *conn)
|
|||
{
|
||||
struct bt_l2cap_chan *chan;
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR) &&
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC) &&
|
||||
conn->type == BT_CONN_TYPE_BR) {
|
||||
bt_l2cap_br_connected(conn);
|
||||
return;
|
||||
|
@ -399,7 +399,7 @@ void bt_l2cap_disconnected(struct bt_conn *conn)
|
|||
{
|
||||
struct bt_l2cap_chan *chan, *next;
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR) &&
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC) &&
|
||||
conn->type == BT_CONN_TYPE_BR) {
|
||||
bt_l2cap_br_disconnected(conn);
|
||||
return;
|
||||
|
@ -606,7 +606,7 @@ void bt_l2cap_security_changed(struct bt_conn *conn, uint8_t hci_status)
|
|||
{
|
||||
struct bt_l2cap_chan *chan, *next;
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR) &&
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC) &&
|
||||
conn->type == BT_CONN_TYPE_BR) {
|
||||
l2cap_br_encrypt_change(conn, hci_status);
|
||||
return;
|
||||
|
@ -2671,7 +2671,7 @@ void bt_l2cap_recv(struct bt_conn *conn, struct net_buf *buf, bool complete)
|
|||
struct bt_l2cap_chan *chan;
|
||||
uint16_t cid;
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR) &&
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC) &&
|
||||
conn->type == BT_CONN_TYPE_BR) {
|
||||
bt_l2cap_br_recv(conn, buf);
|
||||
return;
|
||||
|
@ -2772,7 +2772,7 @@ BT_L2CAP_CHANNEL_DEFINE(le_fixed_chan, BT_L2CAP_CID_LE_SIG, l2cap_accept, NULL);
|
|||
|
||||
void bt_l2cap_init(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR)) {
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC)) {
|
||||
bt_l2cap_br_init();
|
||||
}
|
||||
}
|
||||
|
@ -3000,7 +3000,7 @@ int bt_l2cap_chan_connect(struct bt_conn *conn, struct bt_l2cap_chan *chan,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR) &&
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC) &&
|
||||
conn->type == BT_CONN_TYPE_BR) {
|
||||
return bt_l2cap_br_chan_connect(conn, chan, psm);
|
||||
}
|
||||
|
@ -3025,7 +3025,7 @@ int bt_l2cap_chan_disconnect(struct bt_l2cap_chan *chan)
|
|||
return -ENOTCONN;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR) &&
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC) &&
|
||||
conn->type == BT_CONN_TYPE_BR) {
|
||||
return bt_l2cap_br_chan_disconnect(chan);
|
||||
}
|
||||
|
@ -3119,7 +3119,7 @@ int bt_l2cap_chan_send(struct bt_l2cap_chan *chan, struct net_buf *buf)
|
|||
return -ESHUTDOWN;
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_BT_BREDR) &&
|
||||
if (IS_ENABLED(CONFIG_BT_CLASSIC) &&
|
||||
chan->conn->type == BT_CONN_TYPE_BR) {
|
||||
return bt_l2cap_br_chan_send_cb(chan, buf, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ static struct {
|
|||
atomic_t evt;
|
||||
atomic_t acl_tx;
|
||||
atomic_t acl_rx;
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
atomic_t sco_tx;
|
||||
atomic_t sco_rx;
|
||||
#endif
|
||||
|
@ -79,7 +79,7 @@ static void drop_add(uint16_t opcode)
|
|||
case BT_MONITOR_ACL_RX_PKT:
|
||||
atomic_inc(&drops.acl_rx);
|
||||
break;
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
case BT_MONITOR_SCO_TX_PKT:
|
||||
atomic_inc(&drops.sco_tx);
|
||||
break;
|
||||
|
@ -194,7 +194,7 @@ static inline void encode_hdr(struct bt_monitor_hdr *hdr, uint32_t timestamp,
|
|||
encode_drops(hdr, BT_MONITOR_EVENT_DROPS, &drops.evt);
|
||||
encode_drops(hdr, BT_MONITOR_ACL_TX_DROPS, &drops.acl_tx);
|
||||
encode_drops(hdr, BT_MONITOR_ACL_RX_DROPS, &drops.acl_rx);
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
encode_drops(hdr, BT_MONITOR_SCO_TX_DROPS, &drops.sco_tx);
|
||||
encode_drops(hdr, BT_MONITOR_SCO_RX_DROPS, &drops.sco_rx);
|
||||
#endif
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
#define BT_MONITOR_BASE_HDR_LEN 6
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
#define BT_MONITOR_EXT_HDR_MAX 19
|
||||
#else
|
||||
#define BT_MONITOR_EXT_HDR_MAX 15
|
||||
|
|
|
@ -57,7 +57,7 @@ LOG_MODULE_REGISTER(bt_smp);
|
|||
#define ID_DIST 0
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
#define LINK_DIST BT_SMP_DIST_LINK_KEY
|
||||
#else
|
||||
#define LINK_DIST 0
|
||||
|
@ -81,7 +81,7 @@ LOG_MODULE_REGISTER(bt_smp);
|
|||
#define BT_SMP_AUTH_BONDING_FLAGS 0
|
||||
#endif /* CONFIG_BT_BONDABLE */
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
|
||||
#define BT_SMP_AUTH_MASK_SC 0x2f
|
||||
#if defined(CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY)
|
||||
|
@ -100,7 +100,7 @@ LOG_MODULE_REGISTER(bt_smp);
|
|||
#define BT_SMP_AUTH_DEFAULT (BT_SMP_AUTH_BONDING_FLAGS | BT_SMP_AUTH_SC)
|
||||
#endif /* CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY */
|
||||
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
|
||||
enum pairing_method {
|
||||
JUST_WORKS, /* JustWorks pairing */
|
||||
|
@ -247,7 +247,7 @@ static const uint8_t gen_method_sc[5 /* remote */][5 /* local */] = {
|
|||
};
|
||||
#endif /* !CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY */
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
/* SMP over BR/EDR channel specific context */
|
||||
struct bt_smp_br {
|
||||
/* Commands that remote is allowed to send */
|
||||
|
@ -276,7 +276,7 @@ struct bt_smp_br {
|
|||
};
|
||||
|
||||
static struct bt_smp_br bt_smp_br_pool[CONFIG_BT_MAX_CONN];
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
|
||||
static struct bt_smp bt_smp_pool[CONFIG_BT_MAX_CONN];
|
||||
static bool bondable = IS_ENABLED(CONFIG_BT_BONDABLE);
|
||||
|
@ -616,7 +616,7 @@ static bool update_debug_keys_check(struct bt_smp *smp)
|
|||
!defined(CONFIG_BT_SMP_SC_PAIR_ONLY)
|
||||
/* For TX callbacks */
|
||||
static void smp_pairing_complete(struct bt_smp *smp, uint8_t status);
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
static void smp_pairing_br_complete(struct bt_smp_br *smp, uint8_t status);
|
||||
#endif
|
||||
|
||||
|
@ -641,7 +641,7 @@ static void smp_check_complete(struct bt_conn *conn, uint8_t dist_complete)
|
|||
return;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
if (conn->type == BT_CONN_TYPE_BR) {
|
||||
struct bt_smp_br *smp;
|
||||
|
||||
|
@ -678,7 +678,7 @@ static void smp_sign_info_sent(struct bt_conn *conn, void *user_data, int err)
|
|||
}
|
||||
#endif /* CONFIG_BT_SIGNING */
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
static void sc_derive_link_key(struct bt_smp *smp)
|
||||
{
|
||||
/* constants as specified in Core Spec Vol.3 Part H 2.4.2.4 */
|
||||
|
@ -1590,7 +1590,7 @@ int bt_smp_br_send_pairing_req(struct bt_conn *conn)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
|
||||
static void smp_reset(struct bt_smp *smp)
|
||||
{
|
||||
|
@ -1659,7 +1659,7 @@ static void smp_pairing_complete(struct bt_smp *smp, uint8_t status)
|
|||
}
|
||||
|
||||
if (!status) {
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
/*
|
||||
* Don't derive if Debug Keys are used.
|
||||
* TODO should we allow this if BR/EDR is already connected?
|
||||
|
@ -1669,7 +1669,7 @@ static void smp_pairing_complete(struct bt_smp *smp, uint8_t status)
|
|||
IS_ENABLED(CONFIG_BT_STORE_DEBUG_KEYS))) {
|
||||
sc_derive_link_key(smp);
|
||||
}
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
bool bond_flag = atomic_test_bit(smp->flags, SMP_FLAG_BOND);
|
||||
struct bt_conn_auth_info_cb *listener, *next;
|
||||
|
||||
|
@ -5182,7 +5182,7 @@ static int smp_g2_test(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
static int smp_h6_test(void)
|
||||
{
|
||||
uint8_t w[16] = { 0x9b, 0x7d, 0x39, 0x0a, 0xa6, 0x10, 0x10, 0x34,
|
||||
|
@ -5227,7 +5227,7 @@ static int smp_h7_test(void)
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
|
||||
static int smp_h8_test(void)
|
||||
{
|
||||
|
@ -5294,7 +5294,7 @@ static int smp_self_test(void)
|
|||
return err;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
err = smp_h6_test();
|
||||
if (err) {
|
||||
LOG_ERR("SMP h6 self test failed");
|
||||
|
@ -5306,7 +5306,7 @@ static int smp_self_test(void)
|
|||
LOG_ERR("SMP h7 self test failed");
|
||||
return err;
|
||||
}
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
err = smp_h8_test();
|
||||
if (err) {
|
||||
LOG_ERR("SMP h8 self test failed");
|
||||
|
@ -5946,10 +5946,10 @@ static int bt_smp_accept(struct bt_conn *conn, struct bt_l2cap_chan **chan)
|
|||
}
|
||||
|
||||
BT_L2CAP_CHANNEL_DEFINE(smp_fixed_chan, BT_L2CAP_CID_SMP, bt_smp_accept, NULL);
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
BT_L2CAP_CHANNEL_DEFINE(smp_br_fixed_chan, BT_L2CAP_CID_BR_SMP,
|
||||
bt_smp_br_accept, NULL);
|
||||
#endif /* CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_CLASSIC */
|
||||
|
||||
int bt_smp_init(void)
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ zephyr_library_sources_ifdef(
|
|||
gatt.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
CONFIG_BT_BREDR
|
||||
CONFIG_BT_CLASSIC
|
||||
bredr.c
|
||||
)
|
||||
zephyr_library_sources_ifdef(
|
||||
|
|
|
@ -52,9 +52,9 @@ struct bt_conn *default_conn;
|
|||
static struct bt_conn *pairing_conn;
|
||||
|
||||
static struct bt_le_oob oob_local;
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
static struct bt_le_oob oob_remote;
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_BREDR) */
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_CLASSIC) */
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
||||
#if defined(CONFIG_BT_SMP)
|
||||
|
@ -631,7 +631,7 @@ void conn_addr_str(struct bt_conn *conn, char *addr, size_t len)
|
|||
}
|
||||
|
||||
switch (info.type) {
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
case BT_CONN_TYPE_BR:
|
||||
bt_addr_to_str(info.br.dst, addr, len);
|
||||
break;
|
||||
|
@ -773,7 +773,7 @@ static void identity_resolved(struct bt_conn *conn, const bt_addr_le_t *rpa,
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
static const char *security_err_str(enum bt_security_err err)
|
||||
{
|
||||
switch (err) {
|
||||
|
@ -902,7 +902,7 @@ static struct bt_conn_cb conn_callbacks = {
|
|||
#if defined(CONFIG_BT_SMP)
|
||||
.identity_resolved = identity_resolved,
|
||||
#endif
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
.security_changed = security_changed,
|
||||
#endif
|
||||
#if defined(CONFIG_BT_REMOTE_INFO)
|
||||
|
@ -1636,7 +1636,7 @@ static ssize_t ad_init(struct bt_data *data_array, const size_t data_array_size,
|
|||
size_t ad_len = 0;
|
||||
|
||||
/* Set BR/EDR Not Supported if LE-only device */
|
||||
ad_flags = IS_ENABLED(CONFIG_BT_BREDR) ? 0 : BT_LE_AD_NO_BREDR;
|
||||
ad_flags = IS_ENABLED(CONFIG_BT_CLASSIC) ? 0 : BT_LE_AD_NO_BREDR;
|
||||
|
||||
if (discoverable) {
|
||||
/* A privacy-enabled Set Member should advertise RSI values only when in
|
||||
|
@ -3096,14 +3096,14 @@ static int cmd_info(const struct shell *sh, size_t argc, char *argv[])
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
if (info.type == BT_CONN_TYPE_BR) {
|
||||
char addr_str[BT_ADDR_STR_LEN];
|
||||
|
||||
bt_addr_to_str(info.br.dst, addr_str, sizeof(addr_str));
|
||||
shell_print(ctx_shell, "Peer address %s", addr_str);
|
||||
}
|
||||
#endif /* defined(CONFIG_BT_BREDR) */
|
||||
#endif /* defined(CONFIG_BT_CLASSIC) */
|
||||
|
||||
done:
|
||||
bt_conn_unref(conn);
|
||||
|
@ -3284,7 +3284,7 @@ static int cmd_oob(const struct shell *sh, size_t argc, char *argv[])
|
|||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
static int cmd_oob_remote(const struct shell *sh, size_t argc,
|
||||
char *argv[])
|
||||
{
|
||||
|
@ -3320,7 +3320,7 @@ static int cmd_oob_clear(const struct shell *sh, size_t argc, char *argv[])
|
|||
|
||||
return 0;
|
||||
}
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_BREDR) */
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_CLASSIC) */
|
||||
|
||||
static int cmd_clear(const struct shell *sh, size_t argc, char *argv[])
|
||||
{
|
||||
|
@ -3341,7 +3341,7 @@ static int cmd_clear(const struct shell *sh, size_t argc, char *argv[])
|
|||
}
|
||||
|
||||
if (argc < 3) {
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
addr.type = BT_ADDR_LE_PUBLIC;
|
||||
err = bt_addr_from_str(argv[1], &addr.a);
|
||||
#else
|
||||
|
@ -3368,7 +3368,7 @@ static int cmd_clear(const struct shell *sh, size_t argc, char *argv[])
|
|||
}
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
static int cmd_security(const struct shell *sh, size_t argc, char *argv[])
|
||||
{
|
||||
int err, sec;
|
||||
|
@ -3478,7 +3478,7 @@ static void connection_info(struct bt_conn *conn, void *user_data)
|
|||
}
|
||||
|
||||
switch (info.type) {
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
case BT_CONN_TYPE_BR:
|
||||
bt_addr_to_str(info.br.dst, addr, sizeof(addr));
|
||||
shell_print(ctx_shell, " #%u [BR][%s] %s", info.id, role_str(info.role), addr);
|
||||
|
@ -3677,7 +3677,7 @@ static void auth_pairing_failed(struct bt_conn *conn, enum bt_security_err err)
|
|||
security_err_str(err), err);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
static void auth_pincode_entry(struct bt_conn *conn, bool highsec)
|
||||
{
|
||||
char addr[BT_ADDR_STR_LEN];
|
||||
|
@ -3740,7 +3740,7 @@ static struct bt_conn_auth_cb auth_cb_display = {
|
|||
#endif
|
||||
.passkey_entry = NULL,
|
||||
.passkey_confirm = NULL,
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
.pincode_entry = auth_pincode_entry,
|
||||
#endif
|
||||
.oob_data_request = NULL,
|
||||
|
@ -3755,7 +3755,7 @@ static struct bt_conn_auth_cb auth_cb_display_yes_no = {
|
|||
.passkey_display = auth_passkey_display,
|
||||
.passkey_entry = NULL,
|
||||
.passkey_confirm = auth_passkey_confirm,
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
.pincode_entry = auth_pincode_entry,
|
||||
#endif
|
||||
.oob_data_request = NULL,
|
||||
|
@ -3770,7 +3770,7 @@ static struct bt_conn_auth_cb auth_cb_input = {
|
|||
.passkey_display = NULL,
|
||||
.passkey_entry = auth_passkey_entry,
|
||||
.passkey_confirm = NULL,
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
.pincode_entry = auth_pincode_entry,
|
||||
#endif
|
||||
.oob_data_request = NULL,
|
||||
|
@ -3782,7 +3782,7 @@ static struct bt_conn_auth_cb auth_cb_input = {
|
|||
};
|
||||
|
||||
static struct bt_conn_auth_cb auth_cb_confirm = {
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
.pincode_entry = auth_pincode_entry,
|
||||
#endif
|
||||
.oob_data_request = NULL,
|
||||
|
@ -3797,7 +3797,7 @@ static struct bt_conn_auth_cb auth_cb_all = {
|
|||
.passkey_display = auth_passkey_display,
|
||||
.passkey_entry = auth_passkey_entry,
|
||||
.passkey_confirm = auth_passkey_confirm,
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
.pincode_entry = auth_pincode_entry,
|
||||
#endif
|
||||
.oob_data_request = auth_pairing_oob_data_request,
|
||||
|
@ -3812,7 +3812,7 @@ static struct bt_conn_auth_cb auth_cb_oob = {
|
|||
.passkey_display = NULL,
|
||||
.passkey_entry = NULL,
|
||||
.passkey_confirm = NULL,
|
||||
#if defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_CLASSIC)
|
||||
.pincode_entry = NULL,
|
||||
#endif
|
||||
.oob_data_request = auth_pairing_oob_data_request,
|
||||
|
@ -4125,7 +4125,7 @@ static int cmd_auth_oob_tk(const struct shell *sh, size_t argc, char *argv[])
|
|||
return 0;
|
||||
}
|
||||
#endif /* !defined(CONFIG_BT_SMP_SC_PAIR_ONLY) */
|
||||
#endif /* CONFIG_BT_SMP) || CONFIG_BT_BREDR */
|
||||
#endif /* CONFIG_BT_SMP) || CONFIG_BT_CLASSIC */
|
||||
|
||||
static int cmd_default_handler(const struct shell *sh, size_t argc, char **argv)
|
||||
{
|
||||
|
@ -4308,7 +4308,7 @@ SHELL_STATIC_SUBCMD_SET_CREATE(bt_cmds,
|
|||
#endif /* CONFIG_BT_CENTRAL */
|
||||
SHELL_CMD_ARG(oob, NULL, HELP_NONE, cmd_oob, 1, 0),
|
||||
SHELL_CMD_ARG(clear, NULL, "[all] ["HELP_ADDR_LE"]", cmd_clear, 2, 1),
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_BREDR)
|
||||
#if defined(CONFIG_BT_SMP) || defined(CONFIG_BT_CLASSIC)
|
||||
SHELL_CMD_ARG(security, NULL, "<security level BR/EDR: 0 - 3, "
|
||||
"LE: 1 - 4> [force-pair]",
|
||||
cmd_security, 1, 2),
|
||||
|
@ -4351,7 +4351,7 @@ SHELL_STATIC_SUBCMD_SET_CREATE(bt_cmds,
|
|||
SHELL_CMD_ARG(fixed-passkey, NULL, "[passkey]", cmd_fixed_passkey,
|
||||
1, 1),
|
||||
#endif
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_BREDR) */
|
||||
#endif /* CONFIG_BT_SMP || CONFIG_BT_CLASSIC) */
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
#if defined(CONFIG_BT_HCI_MESH_EXT)
|
||||
SHELL_CMD(mesh_adv, NULL, HELP_ONOFF, cmd_mesh_adv),
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CONFIG_BT=y
|
||||
CONFIG_BT_BREDR=y
|
||||
CONFIG_BT_CLASSIC=y
|
||||
CONFIG_BT_HFP_HF=y
|
||||
CONFIG_NET_BUF=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
CONFIG_ZTEST=y
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_PERIPHERAL=y
|
||||
CONFIG_BT_BREDR=y
|
||||
CONFIG_BT_CLASSIC=y
|
||||
CONFIG_BT_SMP=y
|
||||
CONFIG_BT_ID_MAX=4
|
||||
CONFIG_ASSERT=y
|
||||
|
|
|
@ -18,5 +18,5 @@ CONFIG_BT_HCI_DRIVER_LOG_LEVEL_DBG=y
|
|||
CONFIG_BT_SMP_SELFTEST=y
|
||||
CONFIG_BT_ATT_LOG_LEVEL_DBG=y
|
||||
CONFIG_BT_GATT_LOG_LEVEL_DBG=y
|
||||
CONFIG_BT_BREDR=y
|
||||
CONFIG_BT_CLASSIC=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
CONFIG_BT=y
|
||||
CONFIG_BT_PERIPHERAL=y
|
||||
CONFIG_BT_BREDR=y
|
||||
CONFIG_BT_CLASSIC=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
CONFIG_BT=y
|
||||
CONFIG_BT_CENTRAL=y
|
||||
CONFIG_BT_BREDR=y
|
||||
CONFIG_BT_CLASSIC=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -19,7 +19,7 @@ CONFIG_BT_HCI_DRIVER_LOG_LEVEL_DBG=y
|
|||
CONFIG_BT_SMP_SELFTEST=y
|
||||
CONFIG_BT_ATT_LOG_LEVEL_DBG=y
|
||||
CONFIG_BT_GATT_LOG_LEVEL_DBG=y
|
||||
CONFIG_BT_BREDR=y
|
||||
CONFIG_BT_CLASSIC=y
|
||||
CONFIG_BT_RFCOMM=y
|
||||
CONFIG_BT_AVDTP=y
|
||||
CONFIG_BT_AVDTP_LOG_LEVEL_DBG=y
|
||||
|
|
|
@ -18,5 +18,5 @@ CONFIG_BT_HCI_DRIVER_LOG_LEVEL_DBG=y
|
|||
CONFIG_BT_SMP_SELFTEST=y
|
||||
CONFIG_BT_ATT_LOG_LEVEL_DBG=y
|
||||
CONFIG_BT_GATT_LOG_LEVEL_DBG=y
|
||||
CONFIG_BT_BREDR=y
|
||||
CONFIG_BT_CLASSIC=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
CONFIG_BT=y
|
||||
CONFIG_BT_BREDR=y
|
||||
CONFIG_BT_CLASSIC=y
|
||||
CONFIG_BT_PERIPHERAL=y
|
||||
CONFIG_BT_SMP=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -10,7 +10,7 @@ CONFIG_BT_SMP_SC_ONLY=y
|
|||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
|
||||
CONFIG_BT_GATT_CLIENT=y
|
||||
CONFIG_BT_BREDR=n
|
||||
CONFIG_BT_CLASSIC=n
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_SOC_FLASH_NRF_RADIO_SYNC_TICKER=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -33,7 +33,7 @@ CONFIG_BT_SIGNING=y
|
|||
CONFIG_BT_SMP_SC_ONLY=y
|
||||
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
|
||||
CONFIG_BT_GATT_CLIENT=y
|
||||
CONFIG_BT_BREDR=n
|
||||
CONFIG_BT_CLASSIC=n
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_SOC_FLASH_NRF_RADIO_SYNC_TICKER=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -35,7 +35,7 @@ CONFIG_BT_SIGNING=y
|
|||
CONFIG_BT_SMP_SC_ONLY=y
|
||||
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
|
||||
CONFIG_BT_GATT_CLIENT=y
|
||||
CONFIG_BT_BREDR=n
|
||||
CONFIG_BT_CLASSIC=n
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_SOC_FLASH_NRF_RADIO_SYNC_TICKER=y
|
||||
CONFIG_ZTEST=y
|
||||
|
|
|
@ -71,7 +71,7 @@ CONFIG_BT_HCI_DRIVER_LOG_LEVEL_DBG=y
|
|||
CONFIG_BT_SMP_SELFTEST=y
|
||||
CONFIG_BT_ATT_LOG_LEVEL_DBG=y
|
||||
CONFIG_BT_GATT_LOG_LEVEL_DBG=y
|
||||
CONFIG_BT_BREDR=n
|
||||
CONFIG_BT_CLASSIC=n
|
||||
CONFIG_DEBUG=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_SOC_FLASH_NRF_RADIO_SYNC_TICKER=n
|
||||
|
|
|
@ -53,7 +53,7 @@ CONFIG_BT_HCI_DRIVER_LOG_LEVEL_DBG=y
|
|||
CONFIG_BT_SMP_SELFTEST=y
|
||||
CONFIG_BT_ATT_LOG_LEVEL_DBG=y
|
||||
CONFIG_BT_GATT_LOG_LEVEL_DBG=y
|
||||
CONFIG_BT_BREDR=n
|
||||
CONFIG_BT_CLASSIC=n
|
||||
CONFIG_DEBUG=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_SOC_FLASH_NRF_RADIO_SYNC_TICKER=n
|
||||
|
|
|
@ -56,7 +56,7 @@ CONFIG_BT_HCI_DRIVER_LOG_LEVEL_DBG=y
|
|||
CONFIG_BT_SMP_SELFTEST=y
|
||||
CONFIG_BT_ATT_LOG_LEVEL_DBG=y
|
||||
CONFIG_BT_GATT_LOG_LEVEL_DBG=y
|
||||
CONFIG_BT_BREDR=n
|
||||
CONFIG_BT_CLASSIC=n
|
||||
CONFIG_DEBUG=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_SOC_FLASH_NRF_RADIO_SYNC_TICKER=n
|
||||
|
|
|
@ -38,7 +38,7 @@ CONFIG_BT_SMP_SC_ONLY=y
|
|||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
|
||||
CONFIG_BT_GATT_CLIENT=y
|
||||
CONFIG_BT_BREDR=n
|
||||
CONFIG_BT_CLASSIC=n
|
||||
CONFIG_BT_ASSERT=n
|
||||
CONFIG_ASSERT=n
|
||||
CONFIG_FLASH=y
|
||||
|
|
|
@ -10,7 +10,7 @@ CONFIG_BT_SMP_SC_ONLY=y
|
|||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y
|
||||
CONFIG_BT_GATT_CLIENT=y
|
||||
CONFIG_BT_BREDR=n
|
||||
CONFIG_BT_CLASSIC=n
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_SOC_FLASH_NRF_RADIO_SYNC_TICKER=y
|
||||
CONFIG_BT_CTLR_ADVANCED_FEATURES=y
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_BREDR=y
|
||||
CONFIG_BT_CLASSIC=y
|
||||
CONFIG_BT_RFCOMM=y
|
||||
CONFIG_BT_SHELL=y
|
||||
CONFIG_LOG=y
|
||||
|
|
Loading…
Reference in a new issue