patch-2.1.67 linux/net/802/llc_macinit.c

Next file: linux/net/802/llc_sendpdu.c
Previous file: linux/net/802/fddi.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.66/linux/net/802/llc_macinit.c linux/net/802/llc_macinit.c
@@ -36,15 +36,14 @@
 
 /*
  *	All incoming frames pass thru mac_data_indicate().
- *	Here an llc structure is associated with an skb depending on the source
- *	MAC address in the pdu.
+ *	On entry the llc structure related to the frame is passed as parameter. 
  *	The received sk_buffs with pdus other than I_CMD and I_RSP
  *	are freed by mac_data_indicate() after processing,
  *	the I pdu buffers are freed by the cl2llc client when it no longer needs
  *	the skb.
 */
 
-int llc_mac_data_indicate(llcptr lp, struct sk_buff *skb, struct device *dev, struct packet_type *pt)
+int llc_mac_data_indicate(llcptr lp, struct sk_buff *skb)
 {
 	int ll;      		/* logical length == 802.3 length field */
 	unsigned char p_flag;
@@ -142,7 +141,7 @@
 
 	if(lp->llc_callbacks)
 	{
-		lp->llc_event(lp);
+		if ( lp->llc_event != NULL ) lp->llc_event(lp);
 		lp->llc_callbacks=0;
 	}
 	return 0;
@@ -173,8 +172,7 @@
 	lp->timer_interval[BUSY_TIMER] = HZ*2;
 	lp->local_sap = ssap;
 	lp->llc_event = event;
-	lp->remote_mac_len = lp->dev->addr_len;
-	memcpy(lp->remote_mac, rmac, lp->remote_mac_len);
+	memcpy(lp->remote_mac, rmac, sizeof(lp->remote_mac));
 	lp->state = 0;
 	lp->llc_mode = MODE_ADM;
 	lp->remote_sap = dsap;
@@ -199,7 +197,8 @@
 EXPORT_SYMBOL(llc_unit_data_request);
 EXPORT_SYMBOL(llc_test_request);
 EXPORT_SYMBOL(llc_xid_request);
-
+EXPORT_SYMBOL(llc_mac_data_indicate);
+EXPORT_SYMBOL(llc_cancel_timers);
 
 #define ALL_TYPES_8022 0
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov