Bluetooth: Move supported commands reading to common_init()

Reading supported commands isn't an LE-specific feature, so the
command should be in common_init() rather than le_init().

Change-Id: I613bbe8d39b4c2b6dadc45a710bc59568ec9b488
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2016-04-01 08:37:18 +03:00
commit 4763bb9c86

View file

@ -2579,6 +2579,15 @@ static int common_init(void)
read_bdaddr_complete(rsp);
net_buf_unref(rsp);
/* Read Local Supported Commands */
err = bt_hci_cmd_send_sync(BT_HCI_OP_READ_SUPPORTED_COMMANDS, NULL,
&rsp);
if (err) {
return err;
}
read_supported_commands_complete(rsp);
net_buf_unref(rsp);
#if defined(CONFIG_BLUETOOTH_CONN)
err = set_flow_control();
if (err) {
@ -2612,15 +2621,6 @@ static int le_init(void)
read_le_features_complete(rsp);
net_buf_unref(rsp);
/* Read Local Supported Commands */
err = bt_hci_cmd_send_sync(BT_HCI_OP_READ_SUPPORTED_COMMANDS, NULL,
&rsp);
if (err) {
return err;
}
read_supported_commands_complete(rsp);
net_buf_unref(rsp);
/* Read LE Buffer Size */
err = bt_hci_cmd_send_sync(BT_HCI_OP_LE_READ_BUFFER_SIZE, NULL, &rsp);
if (err) {