mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Bluetooth: Fix sending unnecessary HCI_LE_Host_Enable
This patch fixes sending an unnecessary HCI_LE_Host_Enable command if the command has already been sent as part of the default HCI init sequence. Signed-off-by: Johan Hedberg <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]>
This commit is contained in:
parent
1225a6bdf8
commit
430a61b803
1 changed files with 8 additions and 2 deletions
|
|
@ -2926,8 +2926,14 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered)
|
|||
cp.le = 1;
|
||||
cp.simul = !!lmp_le_br_capable(hdev);
|
||||
|
||||
hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED,
|
||||
sizeof(cp), &cp);
|
||||
/* Check first if we already have the right
|
||||
* host state (host features set)
|
||||
*/
|
||||
if (cp.le != !!lmp_host_le_capable(hdev) ||
|
||||
cp.simul != !!lmp_host_le_br_capable(hdev))
|
||||
hci_send_cmd(hdev,
|
||||
HCI_OP_WRITE_LE_HOST_SUPPORTED,
|
||||
sizeof(cp), &cp);
|
||||
}
|
||||
|
||||
if (lmp_bredr_capable(hdev)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue