diff --git a/subsys/bluetooth/host/conn.c b/subsys/bluetooth/host/conn.c index 31640af9eee..f043e08b785 100644 --- a/subsys/bluetooth/host/conn.c +++ b/subsys/bluetooth/host/conn.c @@ -1721,15 +1721,12 @@ static bool can_initiate_feature_exchange(struct bt_conn *conn) * controller, as we know at compile time whether it supports or not * peripheral feature exchange. */ - bool onboard_controller = IS_ENABLED(CONFIG_HAS_BT_CTLR); - bool supports_peripheral_feature_exchange = IS_ENABLED(CONFIG_BT_CTLR_PER_INIT_FEAT_XCHG); - bool is_central = IS_ENABLED(CONFIG_BT_CENTRAL) && conn->role == BT_HCI_ROLE_CENTRAL; - if (is_central) { + if (IS_ENABLED(CONFIG_BT_CENTRAL) && (conn->role == BT_HCI_ROLE_CENTRAL)) { return true; } - if (onboard_controller && supports_peripheral_feature_exchange) { + if (IS_ENABLED(CONFIG_HAS_BT_CTLR) && IS_ENABLED(CONFIG_BT_CTLR_PER_INIT_FEAT_XCHG)) { return true; }