patch-2.4.4 linux/drivers/isdn/hysdn/hysdn_sched.c

Next file: linux/drivers/isdn/icn/icn.c
Previous file: linux/drivers/isdn/hysdn/hysdn_procconf.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.3/linux/drivers/isdn/hysdn/hysdn_sched.c linux/drivers/isdn/hysdn/hysdn_sched.c
@@ -47,7 +47,10 @@
 
 	switch (chan) {
 		case CHAN_NDIS_DATA:
-			hysdn_rx_netpkt(card, buf, len);	/* give packet to network handler */
+			if (hynet_enable & (1 << card->myid)) {
+                          /* give packet to network handler */
+				hysdn_rx_netpkt(card, buf, len);
+			}
 			break;
 
 		case CHAN_ERRLOG:
@@ -58,7 +61,9 @@
 #ifdef CONFIG_HYSDN_CAPI
          	case CHAN_CAPI:
 /* give packet to CAPI handler */
-			hycapi_rx_capipkt(card, buf, len);
+			if (hycapi_enable & (1 << card->myid)) {
+				hycapi_rx_capipkt(card, buf, len);
+			}
 			break;
 #endif /* CONFIG_HYSDN_CAPI */
 		default:
@@ -115,7 +120,9 @@
 		return (1);	/* tell that data should be send */
 	}			/* error log start and able to send */
 	/* now handle network interface packets */
-	if ((skb = hysdn_tx_netget(card)) != NULL) {
+	if ((hynet_enable & (1 << card->myid)) && 
+	    (skb = hysdn_tx_netget(card)) != NULL) 
+	{
 		if (skb->len <= maxlen) {
 			memcpy(buf, skb->data, skb->len);	/* copy the packet to the buffer */
 			*len = skb->len;
@@ -126,7 +133,9 @@
 			hysdn_tx_netack(card);	/* aknowledge packet -> throw away */
 	}			/* send a network packet if available */
 #ifdef CONFIG_HYSDN_CAPI
-	if((skb = hycapi_tx_capiget(card)) != NULL) {
+	if( ((hycapi_enable & (1 << card->myid))) && 
+	    ((skb = hycapi_tx_capiget(card)) != NULL) )
+	{
 		if (skb->len <= maxlen) {
 			memcpy(buf, skb->data, skb->len);
 			*len = skb->len;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)