aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/6lowpan.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2014-01-07 07:07:47 -0500
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2014-01-07 08:32:11 -0500
commitb071a620995def138bf5f5da8440d93bde4171d3 (patch)
treedb8e1afd4010e05534ac5a4ccedb37d9f993d443 /net/bluetooth/6lowpan.c
parentf86772af6a0f643d3e13eb3f4f9213ae0c333ee4 (diff)
Bluetooth: Fix setting Universal/Local bit
This patch fixes the Bluetooth Low Energy Address type checking when setting Universal/Local bit for the 6loWPAN network device or for the peer device connection. ADDR_LE_DEV_PUBLIC or ADDR_LE_DEV_RANDOM are the values allowed for "src_type" and "dst_type" in the hci_conn struct. The Bluetooth link type can be obtainned reading the "type" field in the same struct. Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/6lowpan.c')
-rw-r--r--net/bluetooth/6lowpan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index 5f0b11d94d95..ab4e7712457b 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -623,7 +623,7 @@ static void set_addr(u8 *eui, u8 *addr, u8 addr_type)
623 eui[0] ^= 2; 623 eui[0] ^= 2;
624 624
625 /* Universal/local bit set, RFC 4291 */ 625 /* Universal/local bit set, RFC 4291 */
626 if (addr_type == BDADDR_LE_PUBLIC) 626 if (addr_type == ADDR_LE_DEV_PUBLIC)
627 eui[0] |= 1; 627 eui[0] |= 1;
628 else 628 else
629 eui[0] &= ~1; 629 eui[0] &= ~1;