From: Johan Hedberg Date: Fri, 15 Aug 2014 18:06:56 +0000 (+0300) Subject: Bluetooth: Optimize connection parameter lookup for LE connections X-Git-Tag: v4.9.8~5486^2~75^2~228 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5477610fc187d4aae0f699d21dfb0e3f440f7de7;p=platform%2Fkernel%2Flinux-rpi3.git 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: Johan Hedberg Signed-off-by: Marcel Holtmann --- diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index e8f35a9..d2ee162 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -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); - 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) { list_del_init(¶ms->action); if (params->conn) {