Skip to content

Commit

Permalink
Bluetooth: Rename BT_BREDR to BT_CLASSIC
Browse files Browse the repository at this point in the history
Rename BT_BREDR to BT_CLASSIC
Rename CONFIG_BT_BREDR to CONFIG_BT_CLASSIC

Signed-off-by: Lyle Zhu <[email protected]>
  • Loading branch information
lylezhu2012 authored and jhedberg committed Mar 7, 2024
1 parent 459e1dd commit 40cf23d
Show file tree
Hide file tree
Showing 44 changed files with 168 additions and 176 deletions.
2 changes: 1 addition & 1 deletion cmake/linker_script/common/common-rom.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion doc/zephyr.doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/h4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/hci_b91.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions drivers/bluetooth/hci/hci_esp32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/hci_stm32wba.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/bluetooth/hci/ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions include/zephyr/bluetooth/conn.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion include/zephyr/linker/common-rom/common-rom-bt.ld
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion samples/bluetooth/handsfree/prj.conf
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/kconfig/hardened.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion subsys/bluetooth/Kconfig.logging
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
8 changes: 4 additions & 4 deletions subsys/bluetooth/common/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
14 changes: 3 additions & 11 deletions subsys/bluetooth/host/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/Kconfig.l2cap
Original file line number Diff line number Diff line change
Expand Up @@ -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 || \
Expand Down
2 changes: 1 addition & 1 deletion subsys/bluetooth/host/classic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 40cf23d

Please sign in to comment.