summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorStefan Sørensen <ssorensen@roku.com>2025-12-16 12:20:10 +0300
committerSasha Levin <sashal@kernel.org>2026-03-04 15:20:48 +0300
commitc06dbfd954c9b500467afeeef20fc40bfce6b41a (patch)
tree7146a61564e1426f3bc540c864ff8309df7d98b5 /net
parent9eaeba5600e576c82ba0a3c023b3b2a253ddd761 (diff)
downloadlinux-c06dbfd954c9b500467afeeef20fc40bfce6b41a.tar.xz
Bluetooth: hci_conn: Set link_policy on incoming ACL connections
[ Upstream commit 4bb091013ab0f2edfed3f58bebe658a798cbcc4d ] The connection link policy is only set when establishing an outgoing ACL connection causing connection idle modes not to be available on incoming connections. Move the setting of the link policy to the creation of the connection so all ACL connection will use the link policy set on the HCI device. Signed-off-by: Stefan Sørensen <ssorensen@roku.com> Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_conn.c1
-rw-r--r--net/bluetooth/hci_sync.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index ff9d2520ba74..a7a37dfa47d5 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -951,6 +951,7 @@ static struct hci_conn *__hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t
switch (type) {
case ACL_LINK:
conn->pkt_type = hdev->pkt_type & ACL_PTYPE_MASK;
+ conn->link_policy = hdev->link_policy;
conn->mtu = hdev->acl_mtu;
break;
case LE_LINK:
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index f0eb52d5c058..6a14f7607107 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -6860,8 +6860,6 @@ static int hci_acl_create_conn_sync(struct hci_dev *hdev, void *data)
conn->attempt++;
- conn->link_policy = hdev->link_policy;
-
memset(&cp, 0, sizeof(cp));
bacpy(&cp.bdaddr, &conn->dst);
cp.pscan_rep_mode = 0x02;