diff --git a/doc/releases/release-notes-4.3.rst b/doc/releases/release-notes-4.3.rst index b7a137c68cf84..ef14e755eae16 100644 --- a/doc/releases/release-notes-4.3.rst +++ b/doc/releases/release-notes-4.3.rst @@ -73,6 +73,10 @@ Deprecated APIs and options * :c:enum:`bt_hci_bus` was deprecated as it was not used. :c:macro:`BT_DT_HCI_BUS_GET` should be used instead. +* :kconfig:option:`CONFIG_BT_AUTO_PHY_UPDATE` was deprecated and has been replaced with + role-specific (central vs peripheral) options that allow specifying exactly which PHY is + preferred for automatic updates. + * :kconfig:option:`CONFIG_POSIX_READER_WRITER_LOCKS` is deprecated. Use :kconfig:option:`CONFIG_POSIX_RW_LOCKS` instead. * :c:func:`bt_ctlr_set_public_addr` is deprecated in favor of using @@ -125,6 +129,14 @@ New APIs and options * :c:struct:`bt_iso_broadcaster_info` now contains a ``big_handle`` and a ``bis_number`` field * :c:struct:`bt_iso_sync_receiver_info` now contains a ``big_handle`` and a ``bis_number`` field * :c:struct:`bt_le_ext_adv_info` now contains an ``sid`` field with the Advertising Set ID. + * :kconfig:option:`CONFIG_BT_AUTO_PHY_PERIPHERAL_NONE` + * :kconfig:option:`CONFIG_BT_AUTO_PHY_PERIPHERAL_1M` + * :kconfig:option:`CONFIG_BT_AUTO_PHY_PERIPHERAL_2M` + * :kconfig:option:`CONFIG_BT_AUTO_PHY_PERIPHERAL_CODED` + * :kconfig:option:`CONFIG_BT_AUTO_PHY_CENTRAL_NONE` + * :kconfig:option:`CONFIG_BT_AUTO_PHY_CENTRAL_1M` + * :kconfig:option:`CONFIG_BT_AUTO_PHY_CENTRAL_2M` + * :kconfig:option:`CONFIG_BT_AUTO_PHY_CENTRAL_CODED` * CPUFreq diff --git a/samples/bluetooth/central_hr/overlay-phy_coded.conf b/samples/bluetooth/central_hr/overlay-phy_coded.conf index 17d46e52ed243..371ecba8249fa 100644 --- a/samples/bluetooth/central_hr/overlay-phy_coded.conf +++ b/samples/bluetooth/central_hr/overlay-phy_coded.conf @@ -4,7 +4,7 @@ CONFIG_BT_EXT_ADV=y CONFIG_BT_CTLR_PHY_CODED=y # Disable auto PHY update, to switch to 2M PHY -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y # Increase Scan Data Length, as Complete Local Name is placed in the # AUX_ADV_IND PDU compared to when it is placed in ADV_SCAN_IND PDU in the case diff --git a/samples/bluetooth/central_hr/sample.yaml b/samples/bluetooth/central_hr/sample.yaml index cbef811794f77..9dbcf35d978b7 100644 --- a/samples/bluetooth/central_hr/sample.yaml +++ b/samples/bluetooth/central_hr/sample.yaml @@ -59,6 +59,6 @@ tests: - nrf5340dk/nrf5340/cpuapp extra_args: - CONFIG_BT_EXT_ADV=y - - CONFIG_BT_AUTO_PHY_UPDATE=n + - CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y tags: bluetooth sysbuild: true diff --git a/samples/bluetooth/central_multilink/prj.conf b/samples/bluetooth/central_multilink/prj.conf index d3830b0de515d..dc04f2428e30f 100644 --- a/samples/bluetooth/central_multilink/prj.conf +++ b/samples/bluetooth/central_multilink/prj.conf @@ -1,6 +1,6 @@ CONFIG_BT=y CONFIG_BT_CENTRAL=y -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_PRIVACY=y CONFIG_BT_MAX_CONN=62 diff --git a/samples/bluetooth/channel_sounding/connected_cs/initiator/prj.conf b/samples/bluetooth/channel_sounding/connected_cs/initiator/prj.conf index c18f598faf40a..47838a45c9bea 100644 --- a/samples/bluetooth/channel_sounding/connected_cs/initiator/prj.conf +++ b/samples/bluetooth/channel_sounding/connected_cs/initiator/prj.conf @@ -2,7 +2,7 @@ CONFIG_BT=y CONFIG_BT_SMP=y CONFIG_BT_CENTRAL=y CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_GATT_CLIENT=y CONFIG_BT_GATT_DYNAMIC_DB=y CONFIG_BT_ATT_PREPARE_COUNT=3 diff --git a/samples/bluetooth/channel_sounding/connected_cs/reflector/prj.conf b/samples/bluetooth/channel_sounding/connected_cs/reflector/prj.conf index 86bb2fb052433..016d0de98c2b2 100644 --- a/samples/bluetooth/channel_sounding/connected_cs/reflector/prj.conf +++ b/samples/bluetooth/channel_sounding/connected_cs/reflector/prj.conf @@ -2,7 +2,6 @@ CONFIG_BT=y CONFIG_BT_SMP=y CONFIG_BT_PERIPHERAL=y CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n -CONFIG_BT_AUTO_PHY_UPDATE=n CONFIG_BT_GATT_CLIENT=y CONFIG_BT_CHANNEL_SOUNDING=y diff --git a/samples/bluetooth/peripheral_hr/overlay-phy_coded.conf b/samples/bluetooth/peripheral_hr/overlay-phy_coded.conf index 31805e66d4ca0..116268222a1d0 100644 --- a/samples/bluetooth/peripheral_hr/overlay-phy_coded.conf +++ b/samples/bluetooth/peripheral_hr/overlay-phy_coded.conf @@ -3,9 +3,6 @@ CONFIG_BT_EXT_ADV=y # Enable Coded PHY support CONFIG_BT_CTLR_PHY_CODED=y -# Disable auto PHY update, to switch to 2M PHY -CONFIG_BT_AUTO_PHY_UPDATE=n - # Increase Advertising Data Length, as Complete Local Name too needs to be # placed in the AUX_ADV_IND PDU compared to when it is placed in ADV_SCAN_IND # PDU in the case of legacy advertising. diff --git a/samples/bluetooth/peripheral_hr/sample.yaml b/samples/bluetooth/peripheral_hr/sample.yaml index 6e10cce70a36d..42c42b29a972a 100644 --- a/samples/bluetooth/peripheral_hr/sample.yaml +++ b/samples/bluetooth/peripheral_hr/sample.yaml @@ -98,7 +98,6 @@ tests: - nrf5340dk/nrf5340/cpuapp extra_args: - CONFIG_BT_EXT_ADV=y - - CONFIG_BT_AUTO_PHY_UPDATE=n tags: bluetooth sysbuild: true sample.bluetooth.peripheral_hr_rv32m1_vega_openisa_rv32m1_ri5cy: diff --git a/samples/bluetooth/peripheral_identity/prj.conf b/samples/bluetooth/peripheral_identity/prj.conf index 8bd97851e3684..e9f8a4bde00a5 100644 --- a/samples/bluetooth/peripheral_identity/prj.conf +++ b/samples/bluetooth/peripheral_identity/prj.conf @@ -1,6 +1,5 @@ CONFIG_BT=y CONFIG_BT_PERIPHERAL=y -CONFIG_BT_AUTO_PHY_UPDATE=n CONFIG_BT_PRIVACY=y CONFIG_BT_DEVICE_NAME="Zephyr Peripheral" diff --git a/subsys/bluetooth/common/hci_common_internal.h b/subsys/bluetooth/common/hci_common_internal.h index 910ea4b4af34e..de137e1a79bb2 100644 --- a/subsys/bluetooth/common/hci_common_internal.h +++ b/subsys/bluetooth/common/hci_common_internal.h @@ -16,7 +16,9 @@ /* Auto initiated additional HCI command buffers enqueued in the Host */ #define BT_BUF_CMD_TX_REMOTE_VERSION COND_CODE_1(CONFIG_BT_REMOTE_VERSION, (1), (0)) -#define BT_BUF_CMD_TX_AUTO_PHY_UPDATE COND_CODE_1(CONFIG_BT_AUTO_PHY_UPDATE, (1), (0)) +#define BT_BUF_CMD_TX_AUTO_PHY_UPDATE (IS_ENABLED(CONFIG_BT_PHY_UPDATE) && \ + (!IS_ENABLED(CONFIG_BT_AUTO_PHY_PERIPHERAL_NONE) || \ + !IS_ENABLED(CONFIG_BT_AUTO_PHY_CENTRAL_NONE))) #define BT_BUF_CMD_TX_AUTO_DATA_LEN_UPDATE COND_CODE_1(CONFIG_BT_AUTO_DATA_LEN_UPDATE, (1), (0)) #else /* CONFIG_BT_HCI_RAW */ diff --git a/subsys/bluetooth/host/Kconfig b/subsys/bluetooth/host/Kconfig index 72deb4343dc45..27adc99419dd2 100644 --- a/subsys/bluetooth/host/Kconfig +++ b/subsys/bluetooth/host/Kconfig @@ -384,9 +384,10 @@ config BT_CONN_CHECK_NULL_BEFORE_CREATE dereferencing, the connection object stays alive which can lead to an unpredictable behavior. +if BT_PHY_UPDATE + config BT_USER_PHY_UPDATE bool "User control of PHY Update Procedure" - depends on BT_PHY_UPDATE help Enable application access to initiate the PHY Update Procedure. The application can also register a callback to be notified about PHY @@ -394,15 +395,57 @@ config BT_USER_PHY_UPDATE connection info. config BT_AUTO_PHY_UPDATE - bool "Auto-initiate PHY Update Procedure" - depends on BT_PHY_UPDATE - default y if !BT_USER_PHY_UPDATE + bool "Auto-initiate PHY Update Procedure [DEPRECATED]" + select DEPRECATED help - Initiate PHY Update Procedure on connection establishment. + Initiate PHY Update Procedure on connection establishment. This will attempt + to update the connection to use 2M PHY, however it doesn't actually guarantee + that this is what will be used in the end. + + This option has been deprecated in favor of role specific options. The equivalent + behavior can be accomplished by enabling BT_AUTO_PHY_PERIPHERAL_2M and + BT_AUTO_PHY_CENTRAL_2M. + +choice + prompt "Auto PHY update for peripheral role" + depends on BT_PERIPHERAL + default BT_AUTO_PHY_PERIPHERAL_2M if BT_AUTO_PHY_UPDATE + default BT_AUTO_PHY_PERIPHERAL_NONE + +config BT_AUTO_PHY_PERIPHERAL_NONE + bool "No PHY preference" + +config BT_AUTO_PHY_PERIPHERAL_1M + bool "1M PHY" + +config BT_AUTO_PHY_PERIPHERAL_2M + bool "2M PHY" + +config BT_AUTO_PHY_PERIPHERAL_CODED + bool "Coded PHY" + +endchoice # BT_AUTO_PHY_PERIPHERAL + +choice + prompt "Auto PHY update for central role" + depends on BT_CENTRAL + default BT_AUTO_PHY_CENTRAL_2M + +config BT_AUTO_PHY_CENTRAL_NONE + bool "No PHY preference" + +config BT_AUTO_PHY_CENTRAL_1M + bool "1M PHY" + +config BT_AUTO_PHY_CENTRAL_2M + bool "2M PHY" + +config BT_AUTO_PHY_CENTRAL_CODED + bool "Coded PHY" + +endchoice # BT_AUTO_PHY_CENTRAL - Disable this if you want the PHY Update Procedure feature supported - but want to rely on the remote device to initiate the procedure at its - discretion or want to initiate manually. +endif # BT_PHY_UPDATE config BT_USER_DATA_LEN_UPDATE bool "User control of Data Length Update Procedure" diff --git a/subsys/bluetooth/host/conn.c b/subsys/bluetooth/host/conn.c index 6702073ce69f1..10d8cd666d211 100644 --- a/subsys/bluetooth/host/conn.c +++ b/subsys/bluetooth/host/conn.c @@ -1681,26 +1681,85 @@ int bt_conn_disconnect(struct bt_conn *conn, uint8_t reason) /* Group Connected BT_CONN only in this */ #if defined(CONFIG_BT_CONN) -/* We don't want the application to get a PHY update callback upon connection - * establishment on 2M PHY. Therefore we must prevent issuing LE Set PHY - * in this scenario. - * - * It is ifdef'd because the struct fields don't exist in some configs. - */ -static bool uses_symmetric_2mbit_phy(struct bt_conn *conn) +#if defined(CONFIG_BT_AUTO_PHY_PERIPHERAL_1M) +#define AUTO_PHY_PERIPHERAL BT_HCI_LE_PHY_1M +#define AUTO_PHY_PERIPHERAL_PREF BT_HCI_LE_PHY_PREFER_1M +#define AUTO_PHY_PERIPHERAL_SUPPORTED(_feat) (true) +#elif defined(CONFIG_BT_AUTO_PHY_PERIPHERAL_2M) +#define AUTO_PHY_PERIPHERAL BT_HCI_LE_PHY_2M +#define AUTO_PHY_PERIPHERAL_PREF BT_HCI_LE_PHY_PREFER_2M +#define AUTO_PHY_PERIPHERAL_SUPPORTED(feat) BT_FEAT_LE_PHY_2M(feat) +#elif defined(CONFIG_BT_AUTO_PHY_PERIPHERAL_CODED) +#define AUTO_PHY_PERIPHERAL BT_HCI_LE_PHY_CODED +#define AUTO_PHY_PERIPHERAL_PREF BT_HCI_LE_PHY_PREFER_CODED +#define AUTO_PHY_PERIPHERAL_SUPPORTED(feat) BT_FEAT_LE_PHY_CODED(feat) +#else +/* Dummy values when there's no preference */ +#define AUTO_PHY_PERIPHERAL (0) +#define AUTO_PHY_PERIPHERAL_PREF (0) +#define AUTO_PHY_PERIPHERAL_SUPPORTED(_feat) (false) +#endif + +#if defined(CONFIG_BT_AUTO_PHY_CENTRAL_1M) +#define AUTO_PHY_CENTRAL BT_HCI_LE_PHY_1M +#define AUTO_PHY_CENTRAL_PREF BT_HCI_LE_PHY_PREFER_1M +#define AUTO_PHY_CENTRAL_SUPPORTED(_feat) (true) +#elif defined(CONFIG_BT_AUTO_PHY_CENTRAL_2M) +#define AUTO_PHY_CENTRAL BT_HCI_LE_PHY_2M +#define AUTO_PHY_CENTRAL_PREF BT_HCI_LE_PHY_PREFER_2M +#define AUTO_PHY_CENTRAL_SUPPORTED(feat) BT_FEAT_LE_PHY_2M(feat) +#elif defined(CONFIG_BT_AUTO_PHY_CENTRAL_CODED) +#define AUTO_PHY_CENTRAL BT_HCI_LE_PHY_CODED +#define AUTO_PHY_CENTRAL_PREF BT_HCI_LE_PHY_PREFER_CODED +#define AUTO_PHY_CENTRAL_SUPPORTED(feat) BT_FEAT_LE_PHY_CODED(feat) +#else +/* Dummy values when there's no preference */ +#define AUTO_PHY_CENTRAL (0) +#define AUTO_PHY_CENTRAL_PREF (0) +#define AUTO_PHY_CENTRAL_SUPPORTED(_feat) (false) +#endif + +static int do_phy_update(struct bt_conn *conn) { + uint8_t phy, pref; + bool supported; + + switch (conn->role) { +#if !defined(CONFIG_BT_AUTO_PHY_CENTRAL_NONE) + case BT_HCI_ROLE_CENTRAL: + phy = AUTO_PHY_CENTRAL; + pref = AUTO_PHY_CENTRAL_PREF; + supported = AUTO_PHY_CENTRAL_SUPPORTED(bt_dev.le.features); + break; +#endif +#if !defined(CONFIG_BT_AUTO_PHY_PERIPHERAL_NONE) + case BT_HCI_ROLE_PERIPHERAL: + phy = AUTO_PHY_PERIPHERAL; + pref = AUTO_PHY_PERIPHERAL_PREF; + supported = AUTO_PHY_PERIPHERAL_SUPPORTED(bt_dev.le.features); + break; +#endif + default: + return 0; + } + + if (!supported) { + LOG_WRN("PHY 0x%02x not supported", phy); + return 0; + } + #if defined(CONFIG_BT_USER_PHY_UPDATE) if (IS_ENABLED(CONFIG_BT_EXT_ADV)) { - if (conn->le.phy.tx_phy == BT_HCI_LE_PHY_2M && - conn->le.phy.rx_phy == BT_HCI_LE_PHY_2M) { - return true; + /* If the current PHYs are already the preferred PHYs, no need to issue + * a PHY update procedure. + */ + if (conn->le.phy.tx_phy == phy && conn->le.phy.rx_phy == phy) { + return 0; } } -#else - ARG_UNUSED(conn); #endif - return false; + return bt_le_set_phy(conn, 0U, pref, pref, BT_HCI_LE_PHY_CODED_ANY); } static bool can_initiate_feature_exchange(struct bt_conn *conn) @@ -1767,13 +1826,14 @@ static void perform_auto_initiated_procedures(struct bt_conn *conn, void *unused } } - if (IS_ENABLED(CONFIG_BT_AUTO_PHY_UPDATE) && BT_FEAT_LE_PHY_2M(bt_dev.le.features) && - !uses_symmetric_2mbit_phy(conn)) { - err = bt_le_set_phy(conn, 0U, BT_HCI_LE_PHY_PREFER_2M, BT_HCI_LE_PHY_PREFER_2M, - BT_HCI_LE_PHY_CODED_ANY); + if (IS_ENABLED(CONFIG_BT_PHY_UPDATE) && + (!IS_ENABLED(CONFIG_BT_AUTO_PHY_CENTRAL_NONE) || + !IS_ENABLED(CONFIG_BT_AUTO_PHY_PERIPHERAL_NONE))) { + err = do_phy_update(conn); if (err) { LOG_ERR("Failed LE Set PHY (%d)", err); } + if (conn->state != BT_CONN_CONNECTED) { return; } diff --git a/tests/bluetooth/shell/audio.conf b/tests/bluetooth/shell/audio.conf index bae871f97cb2c..f4143e31aac3e 100644 --- a/tests/bluetooth/shell/audio.conf +++ b/tests/bluetooth/shell/audio.conf @@ -50,7 +50,6 @@ CONFIG_BT_USER_DATA_LEN_UPDATE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=y CONFIG_BT_USER_PHY_UPDATE=y -CONFIG_BT_AUTO_PHY_UPDATE=y CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n # Set preferred values based on BT_BAP_CONN_PARAM_RELAXED diff --git a/tests/bluetooth/shell/log.conf b/tests/bluetooth/shell/log.conf index 7a9aa9b8680ff..746a3bbe57021 100644 --- a/tests/bluetooth/shell/log.conf +++ b/tests/bluetooth/shell/log.conf @@ -47,7 +47,6 @@ CONFIG_BT_USER_DATA_LEN_UPDATE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=y CONFIG_BT_USER_PHY_UPDATE=y -CONFIG_BT_AUTO_PHY_UPDATE=y CONFIG_BT_ISO_BROADCASTER=y CONFIG_BT_ISO_SYNC_RECEIVER=y diff --git a/tests/bluetooth/shell/prj.conf b/tests/bluetooth/shell/prj.conf index 510d0988262c1..85f9ae0072057 100644 --- a/tests/bluetooth/shell/prj.conf +++ b/tests/bluetooth/shell/prj.conf @@ -47,7 +47,6 @@ CONFIG_BT_AUTO_DATA_LEN_UPDATE=y CONFIG_BT_EAD=y CONFIG_BT_USER_PHY_UPDATE=y -CONFIG_BT_AUTO_PHY_UPDATE=y CONFIG_BT_ISO_BROADCASTER=y CONFIG_BT_ISO_SYNC_RECEIVER=y diff --git a/tests/bsim/bluetooth/audio/prj.conf b/tests/bsim/bluetooth/audio/prj.conf index 5e8d989898aa9..027ca3e947353 100644 --- a/tests/bsim/bluetooth/audio/prj.conf +++ b/tests/bsim/bluetooth/audio/prj.conf @@ -10,6 +10,7 @@ CONFIG_BT_EXT_ADV=y CONFIG_BT_PER_ADV_SYNC=y CONFIG_BT_ISO_SYNC_RECEIVER=y CONFIG_BT_PERIPHERAL=y +CONFIG_BT_AUTO_PHY_PERIPHERAL_2M=y CONFIG_BT_DEVICE_NAME="bsim_test_audio" # TBS Client may require up to 12 buffers CONFIG_BT_ATT_TX_COUNT=12 diff --git a/tests/bsim/bluetooth/host/att/pipeline/dut/prj.conf b/tests/bsim/bluetooth/host/att/pipeline/dut/prj.conf index ed24dfcb947c0..4bc496cfb1bc5 100644 --- a/tests/bsim/bluetooth/host/att/pipeline/dut/prj.conf +++ b/tests/bsim/bluetooth/host/att/pipeline/dut/prj.conf @@ -36,7 +36,7 @@ CONFIG_BT_USER_DATA_LEN_UPDATE=y # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/att/sequential/dut/prj.conf b/tests/bsim/bluetooth/host/att/sequential/dut/prj.conf index 34fe43f0950ac..aeb73d951fd04 100644 --- a/tests/bsim/bluetooth/host/att/sequential/dut/prj.conf +++ b/tests/bsim/bluetooth/host/att/sequential/dut/prj.conf @@ -34,7 +34,7 @@ CONFIG_BT_USER_DATA_LEN_UPDATE=y # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/gatt/device_name/prj.conf b/tests/bsim/bluetooth/host/gatt/device_name/prj.conf index 364cccfca48bf..e817772f583c1 100644 --- a/tests/bsim/bluetooth/host/gatt/device_name/prj.conf +++ b/tests/bsim/bluetooth/host/gatt/device_name/prj.conf @@ -10,7 +10,7 @@ CONFIG_BT_DEVICE_NAME_GATT_WRITABLE=y # Dependency of testlib/adv and testlib/scan. CONFIG_BT_EXT_ADV=y -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_GATT_AUTO_UPDATE_MTU=n CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/gatt/notify_stress/prj.conf b/tests/bsim/bluetooth/host/gatt/notify_stress/prj.conf index 5e04334eecc4c..d518175885091 100644 --- a/tests/bsim/bluetooth/host/gatt/notify_stress/prj.conf +++ b/tests/bsim/bluetooth/host/gatt/notify_stress/prj.conf @@ -11,7 +11,7 @@ CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y CONFIG_BT_L2CAP_ECRED=y CONFIG_BT_EATT=y -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_ASSERT=y diff --git a/tests/bsim/bluetooth/host/gatt/settings/prj.conf b/tests/bsim/bluetooth/host/gatt/settings/prj.conf index 86936059598d2..eddb4df111cca 100644 --- a/tests/bsim/bluetooth/host/gatt/settings/prj.conf +++ b/tests/bsim/bluetooth/host/gatt/settings/prj.conf @@ -7,7 +7,7 @@ CONFIG_LOG=y CONFIG_ASSERT=y CONFIG_BT_TESTING=y -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/gatt/settings_clear/prj.conf b/tests/bsim/bluetooth/host/gatt/settings_clear/prj.conf index 2b349758d843f..6886caeca1f2e 100644 --- a/tests/bsim/bluetooth/host/gatt/settings_clear/prj.conf +++ b/tests/bsim/bluetooth/host/gatt/settings_clear/prj.conf @@ -8,7 +8,7 @@ CONFIG_BT_DEVICE_NAME="GATT settings clear" # Dependency of testlib/adv and testlib/scan. CONFIG_BT_EXT_ADV=y -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/l2cap/credits/prj.conf b/tests/bsim/bluetooth/host/l2cap/credits/prj.conf index 83465202dd076..4c889e5250229 100644 --- a/tests/bsim/bluetooth/host/l2cap/credits/prj.conf +++ b/tests/bsim/bluetooth/host/l2cap/credits/prj.conf @@ -11,7 +11,7 @@ CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/prj.conf b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/prj.conf index df208f161e159..a5f5039882823 100644 --- a/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/prj.conf +++ b/tests/bsim/bluetooth/host/l2cap/credits_seg_recv/prj.conf @@ -11,7 +11,7 @@ CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/l2cap/ecred/dut/prj.conf b/tests/bsim/bluetooth/host/l2cap/ecred/dut/prj.conf index ba574d9f20046..aca5f3659d3c9 100644 --- a/tests/bsim/bluetooth/host/l2cap/ecred/dut/prj.conf +++ b/tests/bsim/bluetooth/host/l2cap/ecred/dut/prj.conf @@ -8,7 +8,7 @@ CONFIG_BT_L2CAP_ECRED=y # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/l2cap/ecred/peer/prj.conf b/tests/bsim/bluetooth/host/l2cap/ecred/peer/prj.conf index e7941a800a826..49ceca06bb7c1 100644 --- a/tests/bsim/bluetooth/host/l2cap/ecred/peer/prj.conf +++ b/tests/bsim/bluetooth/host/l2cap/ecred/peer/prj.conf @@ -8,7 +8,6 @@ CONFIG_BT_L2CAP_ECRED=n # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/l2cap/einprogress/prj.conf b/tests/bsim/bluetooth/host/l2cap/einprogress/prj.conf index e2540cd6f6a88..f37fd74a0d6df 100644 --- a/tests/bsim/bluetooth/host/l2cap/einprogress/prj.conf +++ b/tests/bsim/bluetooth/host/l2cap/einprogress/prj.conf @@ -20,6 +20,6 @@ CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/l2cap/many_conns/prj.conf b/tests/bsim/bluetooth/host/l2cap/many_conns/prj.conf index 1fbf1683bb9e0..42050a2464254 100644 --- a/tests/bsim/bluetooth/host/l2cap/many_conns/prj.conf +++ b/tests/bsim/bluetooth/host/l2cap/many_conns/prj.conf @@ -11,7 +11,7 @@ CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/prj.conf b/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/prj.conf index 3813b9840b724..2cfdc035cb5b6 100644 --- a/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/prj.conf +++ b/tests/bsim/bluetooth/host/l2cap/multilink_peripheral/prj.conf @@ -35,7 +35,7 @@ CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/l2cap/reassembly/dut/prj.conf b/tests/bsim/bluetooth/host/l2cap/reassembly/dut/prj.conf index 0ec3db7fd21d9..5760a218cac49 100644 --- a/tests/bsim/bluetooth/host/l2cap/reassembly/dut/prj.conf +++ b/tests/bsim/bluetooth/host/l2cap/reassembly/dut/prj.conf @@ -20,7 +20,7 @@ CONFIG_ARCH_POSIX_TRAP_ON_FATAL=y # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/l2cap/split/dut/prj.conf b/tests/bsim/bluetooth/host/l2cap/split/dut/prj.conf index 253149a961ff6..8554d6290998d 100644 --- a/tests/bsim/bluetooth/host/l2cap/split/dut/prj.conf +++ b/tests/bsim/bluetooth/host/l2cap/split/dut/prj.conf @@ -15,7 +15,7 @@ CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/l2cap/stress/prj.conf b/tests/bsim/bluetooth/host/l2cap/stress/prj.conf index f984d840e3b7b..aa7e683d5d8e2 100644 --- a/tests/bsim/bluetooth/host/l2cap/stress/prj.conf +++ b/tests/bsim/bluetooth/host/l2cap/stress/prj.conf @@ -11,7 +11,7 @@ CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/misc/acl_tx_frag/prj.conf b/tests/bsim/bluetooth/host/misc/acl_tx_frag/prj.conf index a520656fcf45a..b79ce95e81c1e 100644 --- a/tests/bsim/bluetooth/host/misc/acl_tx_frag/prj.conf +++ b/tests/bsim/bluetooth/host/misc/acl_tx_frag/prj.conf @@ -20,7 +20,7 @@ CONFIG_ARCH_POSIX_TRAP_ON_FATAL=y # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/misc/conn_stress/central/prj.conf b/tests/bsim/bluetooth/host/misc/conn_stress/central/prj.conf index ff7d61dfb053b..3255ff8e86f69 100644 --- a/tests/bsim/bluetooth/host/misc/conn_stress/central/prj.conf +++ b/tests/bsim/bluetooth/host/misc/conn_stress/central/prj.conf @@ -14,7 +14,7 @@ CONFIG_BT_BUF_ACL_TX_SIZE=251 CONFIG_BT_L2CAP_TX_MTU=247 # variations of this =n or =y on central/per produce different errors -CONFIG_BT_AUTO_PHY_UPDATE=y +CONFIG_BT_AUTO_PHY_CENTRAL_2M=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=y CONFIG_ASSERT=y @@ -33,7 +33,7 @@ CONFIG_BT_RECV_WORKQ_BT=y # CONFIG_BT_RECV_WORKQ_SYS=y # TODO: remove when test is stable -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/misc/conn_stress/peripheral/prj.conf b/tests/bsim/bluetooth/host/misc/conn_stress/peripheral/prj.conf index 769316c7835bb..c414a9a66361b 100644 --- a/tests/bsim/bluetooth/host/misc/conn_stress/peripheral/prj.conf +++ b/tests/bsim/bluetooth/host/misc/conn_stress/peripheral/prj.conf @@ -31,7 +31,6 @@ CONFIG_ASSERT_ON_ERRORS=y CONFIG_BT_LOG_SNIFFER_INFO=y # TODO: remove when test is stable -CONFIG_BT_AUTO_PHY_UPDATE=n CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/misc/disconnect/dut/prj.conf b/tests/bsim/bluetooth/host/misc/disconnect/dut/prj.conf index 4da2a5c35044a..55458bbc9ffa7 100644 --- a/tests/bsim/bluetooth/host/misc/disconnect/dut/prj.conf +++ b/tests/bsim/bluetooth/host/misc/disconnect/dut/prj.conf @@ -31,7 +31,7 @@ CONFIG_BT_USER_DATA_LEN_UPDATE=y # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/host/misc/hfc_multilink/dut/prj.conf b/tests/bsim/bluetooth/host/misc/hfc_multilink/dut/prj.conf index daa5dd196eebc..4c10496e7f080 100644 --- a/tests/bsim/bluetooth/host/misc/hfc_multilink/dut/prj.conf +++ b/tests/bsim/bluetooth/host/misc/hfc_multilink/dut/prj.conf @@ -22,7 +22,7 @@ CONFIG_BT_L2CAP_DYNAMIC_CHANNEL=y # Disable auto-initiated procedures so they don't # mess with the test's execution. -CONFIG_BT_AUTO_PHY_UPDATE=n +CONFIG_BT_AUTO_PHY_CENTRAL_NONE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=n CONFIG_BT_GAP_AUTO_UPDATE_CONN_PARAMS=n diff --git a/tests/bsim/bluetooth/ll/conn/prj_split_tx_defer.conf b/tests/bsim/bluetooth/ll/conn/prj_split_tx_defer.conf index 22dc32be4c429..08af6a0b07ce8 100644 --- a/tests/bsim/bluetooth/ll/conn/prj_split_tx_defer.conf +++ b/tests/bsim/bluetooth/ll/conn/prj_split_tx_defer.conf @@ -2,6 +2,7 @@ CONFIG_BT=y CONFIG_LOG=y CONFIG_BT_CENTRAL=y CONFIG_BT_PERIPHERAL=y +CONFIG_BT_AUTO_PHY_PERIPHERAL_2M=y CONFIG_BT_PRIVACY=y CONFIG_BT_SMP=y CONFIG_BT_SIGNING=y diff --git a/tests/bsim/bluetooth/ll/conn/src/test_connect2.c b/tests/bsim/bluetooth/ll/conn/src/test_connect2.c index f648d2d2d905f..0aa5c9ca20ecd 100644 --- a/tests/bsim/bluetooth/ll/conn/src/test_connect2.c +++ b/tests/bsim/bluetooth/ll/conn/src/test_connect2.c @@ -151,14 +151,7 @@ static void bt_ready(void) printk("Peripheral Bluetooth initialized\n"); - err = bt_le_adv_start(BT_LE_ADV_CONN_FAST_1, ad, ARRAY_SIZE(ad), NULL, 0); - if (err) { - FAIL("Advertising failed to start (err %d)\n", err); - return; - } - err = start_advertising(); - if (!err) { printk("Advertising successfully started\n"); } diff --git a/tests/bsim/bluetooth/ll/multiple_id/prj.conf b/tests/bsim/bluetooth/ll/multiple_id/prj.conf index c0aefff8be552..865bb2ff81ee9 100644 --- a/tests/bsim/bluetooth/ll/multiple_id/prj.conf +++ b/tests/bsim/bluetooth/ll/multiple_id/prj.conf @@ -6,7 +6,7 @@ CONFIG_BT_PRIVACY=y CONFIG_BT_DEVICE_NAME="Multiple" CONFIG_BT_USER_PHY_UPDATE=y -CONFIG_BT_AUTO_PHY_UPDATE=y +CONFIG_BT_AUTO_PHY_PERIPHERAL_2M=y CONFIG_BT_USER_DATA_LEN_UPDATE=y CONFIG_BT_AUTO_DATA_LEN_UPDATE=y diff --git a/tests/bsim/bluetooth/ll/throughput/prj.conf b/tests/bsim/bluetooth/ll/throughput/prj.conf index 5b699d7e892f0..58e9cafcb0bd6 100644 --- a/tests/bsim/bluetooth/ll/throughput/prj.conf +++ b/tests/bsim/bluetooth/ll/throughput/prj.conf @@ -8,7 +8,7 @@ CONFIG_BT_GATT_CLIENT=y CONFIG_BT_L2CAP_TX_MTU=247 # Auto initiated PHY update on connection established -CONFIG_BT_AUTO_PHY_UPDATE=y +CONFIG_BT_AUTO_PHY_PERIPHERAL_2M=y # Enable user initiated PHY update support CONFIG_BT_USER_PHY_UPDATE=y