Skip to content

Commit b7bfc6b

Browse files
jhedbergm-alperen-sener
authored andcommitted
[nrf fromtree] Bluetooth: Host: Remove leftover HCI ECC command checks
The code shouldn't be checking for HCI command support anymore, rather in the case of debug keys we can just start immediately using them. Fixes commit 09e86f3. Signed-off-by: Johan Hedberg <[email protected]> (cherry picked from commit 3ae8a9c)
1 parent eed013e commit b7bfc6b

File tree

1 file changed

+5
-10
lines changed
  • subsys/bluetooth/host

1 file changed

+5
-10
lines changed

subsys/bluetooth/host/ecc.c

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,10 @@ int bt_pub_key_gen(struct bt_pub_key_cb *new_cb)
252252
struct bt_pub_key_cb *cb;
253253

254254
if (IS_ENABLED(CONFIG_BT_USE_DEBUG_KEYS)) {
255-
if (!BT_CMD_TEST(bt_dev.supported_commands, 41, 2)) {
256-
LOG_WRN("ECC Debug keys HCI command not available");
257-
} else {
258-
atomic_set_bit(bt_dev.flags, BT_DEV_HAS_PUB_KEY);
259-
__ASSERT_NO_MSG(new_cb->func != NULL);
260-
new_cb->func(debug_public_key);
261-
return 0;
262-
}
255+
atomic_set_bit(bt_dev.flags, BT_DEV_HAS_PUB_KEY);
256+
__ASSERT_NO_MSG(new_cb->func != NULL);
257+
new_cb->func(debug_public_key);
258+
return 0;
263259
}
264260

265261
if (!new_cb) {
@@ -312,8 +308,7 @@ void bt_pub_key_hci_disrupted(void)
312308

313309
const uint8_t *bt_pub_key_get(void)
314310
{
315-
if (IS_ENABLED(CONFIG_BT_USE_DEBUG_KEYS) &&
316-
BT_CMD_TEST(bt_dev.supported_commands, 41, 2)) {
311+
if (IS_ENABLED(CONFIG_BT_USE_DEBUG_KEYS)) {
317312
return debug_public_key;
318313
}
319314

0 commit comments

Comments
 (0)