/* Interface function to upper layer. Each one who wants to get a SAP (for example NetBEUI) should call this function. Returns the opened SAP for success, NULL for failure.  */
struct llc_sap* llc_sap_open(unsigned char lsap, int(*func)(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev))
/* Interface function to upper layer. Each one who wants to get a SAP (for example NetBEUI) should call this function. Returns the opened SAP for success, NULL for failure.  */
struct llc_sap* llc_sap_open(unsigned char lsap, int(*func)(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev))
{
	struct llc_sap *sap = NULL;
	write_lock_bh(&llc_sap_list_lock);
	if (__llc_sap_find(lsap))
		goto out;
	sap = llc_sap_alloc();
	if (!sap)
		goto out;
	sap->laddr.lsap = lsap;
	sap->rcv_func	= func;
	llc_add_sap(sap);
out:
	write_unlock_bh(&llc_sap_list_lock);
	return sap;
}