Skip to content

Commit 3ae8a9c

Browse files
jhedbergkartben
authored andcommitted
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]>
1 parent a2eb78c commit 3ae8a9c

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
@@ -245,14 +245,10 @@ int bt_pub_key_gen(struct bt_pub_key_cb *new_cb)
245245
struct bt_pub_key_cb *cb;
246246

247247
if (IS_ENABLED(CONFIG_BT_USE_DEBUG_KEYS)) {
248-
if (!BT_CMD_TEST(bt_dev.supported_commands, 41, 2)) {
249-
LOG_WRN("ECC Debug keys HCI command not available");
250-
} else {
251-
atomic_set_bit(bt_dev.flags, BT_DEV_HAS_PUB_KEY);
252-
__ASSERT_NO_MSG(new_cb->func != NULL);
253-
new_cb->func(debug_public_key);
254-
return 0;
255-
}
248+
atomic_set_bit(bt_dev.flags, BT_DEV_HAS_PUB_KEY);
249+
__ASSERT_NO_MSG(new_cb->func != NULL);
250+
new_cb->func(debug_public_key);
251+
return 0;
256252
}
257253

258254
if (!new_cb) {
@@ -301,8 +297,7 @@ void bt_pub_key_hci_disrupted(void)
301297

302298
const uint8_t *bt_pub_key_get(void)
303299
{
304-
if (IS_ENABLED(CONFIG_BT_USE_DEBUG_KEYS) &&
305-
BT_CMD_TEST(bt_dev.supported_commands, 41, 2)) {
300+
if (IS_ENABLED(CONFIG_BT_USE_DEBUG_KEYS)) {
306301
return debug_public_key;
307302
}
308303

0 commit comments

Comments
 (0)