/* Search connection list of the SAP and finds connection using the remote mac, remote sap, local mac, and local sap. Returns pointer for connection found, NULL otherwise. Caller has to make sure local_bh is disabled.  */
static struct sock* __llc_lookup_established(struct llc_sap *sap, struct llc_addr *daddr, struct llc_addr *laddr)
/* Search connection list of the SAP and finds connection using the remote mac, remote sap, local mac, and local sap. Returns pointer for connection found, NULL otherwise. Caller has to make sure local_bh is disabled.  */
static struct sock* __llc_lookup_established(struct llc_sap *sap, struct llc_addr *daddr, struct llc_addr *laddr)
{
	struct sock *rc;
	struct hlist_node *node;
	read_lock(&sap->sk_list.lock);
	sk_for_each(rc, node, &sap->sk_list.list) {
		struct llc_sock *llc = llc_sk(rc);
		if (llc->laddr.lsap == laddr->lsap &&
		    llc->daddr.lsap == daddr->lsap &&
		    llc_mac_match(llc->laddr.mac, laddr->mac) &&
		    llc_mac_match(llc->daddr.mac, daddr->mac)) {
			sock_hold(rc);
			goto found;
		}
	}
	rc = NULL;
found:
	read_unlock(&sap->sk_list.lock);
	return rc;
}