drivers/nble: Only call ready callback once get_version completes
There could be commands that depend on the firmware version the stack needs to wait until version is complete. Change-Id: If8ded19c4cd4eb3c33df64b3cde29da11b0de8df Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
6948fc437a
commit
94210770fd
1 changed files with 5 additions and 4 deletions
|
@ -38,10 +38,6 @@ void on_nble_up(void)
|
|||
{
|
||||
BT_DBG("");
|
||||
|
||||
if (bt_ready_cb) {
|
||||
bt_ready_cb(0);
|
||||
}
|
||||
|
||||
ble_get_version_req(NULL);
|
||||
}
|
||||
|
||||
|
@ -50,6 +46,11 @@ void on_ble_get_version_rsp(const struct ble_version_response *rsp)
|
|||
BT_DBG("VERSION: %d.%d.%d %.20s", rsp->version.major,
|
||||
rsp->version.minor, rsp->version.patch,
|
||||
rsp->version.version_string);
|
||||
|
||||
if (bt_ready_cb) {
|
||||
bt_ready_cb(0);
|
||||
bt_ready_cb = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
int bt_enable(bt_ready_cb_t cb)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue