Bluetooth: Use macro instead of hard-coded value
authorAndre Guedes <andre.guedes@openbossa.org>
Wed, 25 Jun 2014 19:44:45 +0000 (16:44 -0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 3 Jul 2014 15:42:46 +0000 (17:42 +0200)
This patch replaces the hard-coded value in hci_bdaddr_is_rpa() helper
by the corresponding macro ADDR_LE_DEV_RANDOM.

Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/hci_core.h

index 0b0597d81827944d57bdf3fa6e7174d0a4ced3df..dda7f00c07c5b012a676e57f1b2a270881eb1f99 100644 (file)
@@ -1155,7 +1155,7 @@ static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type)
 
 static inline bool hci_bdaddr_is_rpa(bdaddr_t *bdaddr, u8 addr_type)
 {
-       if (addr_type != 0x01)
+       if (addr_type != ADDR_LE_DEV_RANDOM)
                return false;
 
        if ((bdaddr->b[5] & 0xc0) == 0x40)