OSDN Git Service

Make auto connect work for multiple known BLE devices
authorMike J. Chen <mjchen@google.com>
Sat, 19 Jul 2014 00:40:12 +0000 (17:40 -0700)
committerMike J. Chen <mjchen@google.com>
Sat, 19 Jul 2014 00:40:12 +0000 (17:40 -0700)
commitdab87145ee90c71bcec1b78a55ad5a011322ce34
tree33cb9409be25ce81385299576d002813c3b2120e
parent227f6b08abb4e786a8951dde128388cd025ee63f
Make auto connect work for multiple known BLE devices

Due to a bug with wl_state not ever setting WL_INIT,
auto connect was not working for more than one known
BLE device after a reboot.  The fix is to set the WL_INIT
flag when in initiator state.

I also added code to set the WL_SCAN flag when in
scanning state.  Not sure if that fixes any bug but
it looks like it should have been done too.

WL_ADV was the only state flag previously being set.

Bug 16404692

Change-Id: Id42907c0d8301e347e603684e2c03e4905bfec49
Signed-off-by: Mike J. Chen <mjchen@google.com>
stack/btm/btm_ble_bgconn.c
stack/btm/btm_ble_gap.c