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:
Luiz Augusto von Dentz 2016-02-02 14:59:55 +02:00 committed by Anas Nashif
commit 94210770fd

View file

@ -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)