Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5477610f authored by Johan Hedberg's avatar Johan Hedberg Committed by Marcel Holtmann
Browse files

Bluetooth: Optimize connection parameter lookup for LE connections



When we get an LE connection complete event there's really no reason to
look through the entire connection parameter list as the entry should be
present in the hdev->pend_le_conns list too. This patch changes the
lookup code to do a more restricted lookup only in the pend_le_conns
list.

Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 08853f18
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -4225,7 +4225,8 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)


	hci_proto_connect_cfm(conn, ev->status);
	hci_proto_connect_cfm(conn, ev->status);


	params = hci_conn_params_lookup(hdev, &conn->dst, conn->dst_type);
	params = hci_pend_le_action_lookup(&hdev->pend_le_conns, &conn->dst,
					   conn->dst_type);
	if (params) {
	if (params) {
		list_del_init(&params->action);
		list_del_init(&params->action);
		if (params->conn) {
		if (params->conn) {