OSDN Git Service

Fix peer address type in LE extended create connection command
authorSubramanian Srinivasan <subrsrin@codeaurora.org>
Fri, 9 Jun 2017 00:19:05 +0000 (17:19 -0700)
committerJakub Pawlowski <jpawlowski@google.com>
Wed, 21 Jun 2017 21:15:59 +0000 (21:15 +0000)
As per BT Spec 5.0, peer address type in LE extended create
connection command can have only either 0x00 or 0x01 as valid
values. This change fixes setting of incorrect peer address
type values in extended create connection command.

Bug: 62578331
Bug: 62358300
Change-Id: I792d48be7637fc571727e7e51de1fc397158b4d5

stack/btm/btm_ble_bgconn.cc

index 26f8766..b2e1e3a 100644 (file)
@@ -372,6 +372,7 @@ void btm_send_hci_create_connection(
       phy_cfg[i].max_ce_len = max_ce_len;
     }
 
+    addr_type_peer &= ~BLE_ADDR_TYPE_ID_BIT;
     btsnd_hcic_ble_ext_create_conn(init_filter_policy, addr_type_own,
                                    addr_type_peer, bda_peer, initiating_phys,
                                    phy_cfg);