mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
Bluetooth: Fix specifying role for LE connections
The hci_connect_le_scan() is (as the name implies) a master/central role API, so it makes no sense in passing a role parameter to it. At the same time this patch also fixes the direct advertising support for LE L2CAP sockets where we now call the more appropriate hci_le_connect() API if slave/peripheral role is desired. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
parent
3dfe5905a7
commit
0ad06aa6a7
4 changed files with 11 additions and 13 deletions
|
@ -3518,8 +3518,7 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data,
|
|||
|
||||
conn = hci_connect_le_scan(hdev, &cp->addr.bdaddr,
|
||||
addr_type, sec_level,
|
||||
HCI_LE_CONN_TIMEOUT,
|
||||
HCI_ROLE_MASTER);
|
||||
HCI_LE_CONN_TIMEOUT);
|
||||
}
|
||||
|
||||
if (IS_ERR(conn)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue