]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: hci_conn: Set link_policy on incoming ACL connections
authorStefan Sørensen <ssorensen@roku.com>
Tue, 16 Dec 2025 09:20:10 +0000 (10:20 +0100)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 29 Jan 2026 18:23:51 +0000 (13:23 -0500)
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>
net/bluetooth/hci_conn.c
net/bluetooth/hci_sync.c

index 1b98b646748545a101a8bf9abf5b17adaa4843cb..dc085856f5e91293c3dd4ef406d5840088d7e32f 100644 (file)
@@ -1002,6 +1002,7 @@ static struct hci_conn *__hci_conn_add(struct hci_dev *hdev, int type,
        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:
index cbc3a75d7326233051dcf4badd45e935421c7743..334eb4376a266673dc9f568171851ab763ba81d6 100644 (file)
@@ -6897,8 +6897,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;