Bluetooth: Fix clearing BT_DEV_ENABLE on HCI reset complete
BT_DEV_ENABLE flag value must be preserved after HCI reset is complete to not allow calling bt_enable more then once. Change-Id: I77bf6111d4fc2a209e0c5a56717decba156068a6 Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
parent
07fb2e106b
commit
05bdba7768
1 changed files with 3 additions and 1 deletions
|
@ -2021,7 +2021,9 @@ static void hci_reset_complete(struct net_buf *buf)
|
|||
discovery_results_size = 0;
|
||||
discovery_results_count = 0;
|
||||
#endif /* CONFIG_BLUETOOTH_BREDR */
|
||||
atomic_set(bt_dev.flags, 0);
|
||||
|
||||
/* we only allow to enable once so this bit must be keep set */
|
||||
atomic_set(bt_dev.flags, BIT(BT_DEV_ENABLE));
|
||||
}
|
||||
|
||||
static void hci_cmd_done(uint16_t opcode, uint8_t status, struct net_buf *buf)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue