Bluetooth: Add flag to track Bluetooth readiness

Change-Id: I1251eccdf474d0f113bde77d7e65f02eef39bade
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2015-12-04 10:33:34 +02:00 committed by Anas Nashif
commit f443be7205
2 changed files with 6 additions and 0 deletions

View file

@ -1874,6 +1874,10 @@ static int bt_init(void)
}
#endif /* CONFIG_BLUETOOTH_CONN */
if (!err) {
atomic_set_bit(bt_dev.flags, BT_DEV_READY);
}
return err;
}

View file

@ -40,6 +40,8 @@
/* bt_dev flags: the flags defined here represent BT controller state */
enum {
BT_DEV_READY,
BT_DEV_ADVERTISING,
BT_DEV_SCANNING,
BT_DEV_EXPLICIT_SCAN,