10000 extmod/btstack: Fix marking of static addresses in set_random_address. · duncf/micropython@ba83f6d · GitHub
[go: up one dir, main page]

Skip to content

Commit ba83f6d

Browse files
peterharperukdpgeorge
authored andcommitted
extmod/btstack: Fix marking of static addresses in set_random_address.
Marking address as static was not applied to all code paths. Signed-off-by: Damien George <damien@micropython.org>
1 parent a459eaf commit ba83f6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extmod/btstack/modbluetooth_btstack.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,6 @@ STATIC void set_random_address(void) {
544544

545545
DEBUG_printf("set_random_address: Generating static address using mp_hal_get_mac\n");
546546
mp_hal_get_mac(MP_HAL_MAC_BDADDR, static_addr);
547-
// Mark it as STATIC (not RPA or NRPA).
548-
static_addr[0] |= 0xc0;
549547

550548
#else
551549

@@ -558,6 +556,8 @@ STATIC void set_random_address(void) {
558556
}
559557

560558
#endif // MICROPY_BLUETOOTH_USE_MP_HAL_GET_MAC_STATIC_ADDRESS
559+
// Mark it as STATIC (not RPA or NRPA).
560+
static_addr[0] |= 0xc0;
561561

562562
DEBUG_printf("set_random_address: Address generated.\n");
563563
gap_random_address_set(static_addr);

0 commit comments

Comments
 (0)
0