mirror of https://github.com/ARMmbed/mbed-os.git
Fix is_random_xxx_address() functions in GenericGap that I had broken :)
parent
1fdb57e82c
commit
7ef7ef553c
|
@ -230,7 +230,7 @@ static bool is_prand_24_bits_valid(const BLEProtocol::AddressBytes_t address)
|
|||
static bool is_random_static_address(const BLEProtocol::AddressBytes_t address)
|
||||
{
|
||||
// top two msb bits shall be equal to 0b11.
|
||||
if (((address[5] >> 6) & 0xC0) != 0xC0) {
|
||||
if ((address[5] & 0xC0) != 0xC0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ static bool is_random_private_non_resolvable_address(
|
|||
const BLEProtocol::AddressBytes_t address
|
||||
) {
|
||||
// top two msb bits shall be equal to 0b00.
|
||||
if (((address[5] >> 6) & 0xC0) != 0x00) {
|
||||
if ((address[5] & 0xC0) != 0x00) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ static bool is_random_private_resolvable_address(
|
|||
const BLEProtocol::AddressBytes_t address
|
||||
) {
|
||||
// top two msb bits shall be equal to 0b01.
|
||||
if (((address[5] >> 6) & 0xC0) != 0x40) {
|
||||
if ((address[5] & 0xC0) != 0x40) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue