patch-2.3.99-pre3 linux/drivers/isdn/eicon/eicon_idi.c

Next file: linux/drivers/isdn/hisax/callc.c
Previous file: linux/drivers/isdn/divert/divert_procfs.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre2/linux/drivers/isdn/eicon/eicon_idi.c linux/drivers/isdn/eicon/eicon_idi.c
@@ -1,4 +1,4 @@
-/* $Id: eicon_idi.c,v 1.31 2000/02/22 16:26:40 armin Exp $
+/* $Id: eicon_idi.c,v 1.33 2000/03/06 15:45:17 armin Exp $
  *
  * ISDN lowlevel-module for Eicon active cards.
  *        IDI interface 
@@ -26,6 +26,14 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 
  *
  * $Log: eicon_idi.c,v $
+ * Revision 1.33  2000/03/06 15:45:17  armin
+ * Fixed incomplete number handling with BRI PtP connection.
+ *
+ * Revision 1.32  2000/03/04 17:04:21  armin
+ * Fix of statemachine, B-connect before D-connect,
+ * thanks to Helmut Adams <adams@ipcon.de>
+ * Minor change in send-data packet handling.
+ *
  * Revision 1.31  2000/02/22 16:26:40  armin
  * Fixed membase error message.
  * Fixed missing log buffer struct.
@@ -156,7 +164,7 @@
 
 #undef EICON_FULL_SERVICE_OKTETT
 
-char *eicon_idi_revision = "$Revision: 1.31 $";
+char *eicon_idi_revision = "$Revision: 1.33 $";
 
 eicon_manifbuf *manbuf;
 
@@ -2515,15 +2523,7 @@
 						break;
 					case 3: /* incomplete number */
 						eicon_log(ccard, 8, "idi_req: Ch%d: Incomplete Number\n", chan->No);
-					        switch(ccard->type) {
-					                case EICON_CTYPE_MAESTRAP:
-					                case EICON_CTYPE_S2M:
-								/* TODO (other protocols) */
-								chan->fsm_state = EICON_STATE_ICALLW;
-								break;
-							default:
-								idi_do_req(ccard, chan, HANGUP, 0);
-						}
+						chan->fsm_state = EICON_STATE_ICALLW;
 						break;
 				}
 				break;
@@ -2560,8 +2560,10 @@
 							/* On most incoming calls we use automatic connect */
 							/* idi_do_req(ccard, chan, IDI_N_CONNECT, 1); */
 					}
-				} else
-					idi_hangup(ccard, chan);
+				} else {
+					if (chan->fsm_state != EICON_STATE_ACTIVE)
+						idi_hangup(ccard, chan);
+				}
 				break;
 			case CALL_CON:
 				eicon_log(ccard, 8, "idi_ind: Ch%d: Call_Con\n", chan->No);
@@ -3012,11 +3014,13 @@
 
 	        reqbuf = (eicon_REQ *)skb_put(xmit_skb, plen + sizeof(eicon_REQ));
 		if (((len - offset) > 270) &&
+			(chan->l2prot != ISDN_PROTO_L2_MODEM) &&
+			(chan->l2prot != ISDN_PROTO_L2_FAX) &&
 			(chan->l2prot != ISDN_PROTO_L2_TRANS)) {
 		        reqbuf->Req = IDI_N_MDATA;
 		} else {
 		        reqbuf->Req = IDI_N_DATA;
-			if (ack) reqbuf->Req |= N_D_BIT;
+			/* if (ack) reqbuf->Req |= N_D_BIT; */
 		}	
         	reqbuf->ReqCh = chan->e.IndCh;
 	        reqbuf->ReqId = 1;

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