Skip to contentSkip to conversation

ir248_irnet_nodelay.diff

PATCH New Jean Tourrilhes 1 participant 1 message Sep 13, 2001 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ir248_irnet_nodelay.diff

ir248_irnet_nodelay.diff :
------------------------
o [FEATURE] Use DEV_ADDR_ANY instead of 0
o [FEATURE] Remove the 3 second delay from connection setup

net/irda/irnet/irnet.h renamed from net/irda/irnet/irnet.l2.h +7 -0
diff -u -p linux/net/irda/irnet/irnet.l2.h linux/net/irda/irnet/irnet.h
@@ -185,6 +185,13 @@
  *	  is transparently controlled from pppd lcp-max-configure.
  *	o Add ttp_connect flag to prevent rentry on the connect procedure
  *	o Test and fixups to eliminate side effects of retries
+ *
+ * v7 - 22/08/01 - Jean II
+ *	o Cleanup : Change "saddr = 0x0" to "saddr = DEV_ADDR_ANY"
+ *	o Fix bug in BLOCK_WHEN_CONNECT introduced in v6 : due to the
+ *	  asynchronous IAS query, self->tsap is NULL when PPP send the
+ *	  first packet.  This was preventing "connect-delay 0" to work.
+ *	  Change the test in ppp_irnet_send() to self->ttp_connect.
  */
 
 /***************************** INCLUDES *****************************/
net/irda/irnet/irnet_irda.c renamed from net/irda/irnet/irnet_irda.l2.c +2 -2
diff -u -p linux/net/irda/irnet/irnet_irda.l2.c linux/net/irda/irnet/irnet_irda.c
@@ -478,9 +478,9 @@ irda_irnet_create(irnet_socket *	self)
   self->ttp_connect = 0;	/* Not connecting yet */
   self->rname[0] = '\0';	/* May be set via control channel */
   self->rdaddr = DEV_ADDR_ANY;	/* May be set via control channel */
-  self->rsaddr = 0x0;		/* May be set via control channel */
+  self->rsaddr = DEV_ADDR_ANY;	/* May be set via control channel */
   self->daddr = DEV_ADDR_ANY;	/* Until we get connected */
-  self->saddr = 0x0;		/* Until we get connected */
+  self->saddr = DEV_ADDR_ANY;	/* Until we get connected */
   self->max_sdu_size_rx = TTP_SAR_UNBOUND;
 
   /* Register as a client with IrLMP */
net/irda/irnet/irnet_ppp.c renamed from net/irda/irnet/irnet_ppp.l2.c +3 -3
diff -u -p linux/net/irda/irnet/irnet_ppp.l2.c linux/net/irda/irnet/irnet_ppp.c
@@ -858,8 +858,8 @@ ppp_irnet_send(struct ppp_channel *	chan
       irda_irnet_connect(self);
 #endif /* CONNECT_IN_SEND */
 
-      DEBUG(PPP_INFO, "IrTTP not ready ! (%d-0x%X)\n",
-	    self->ttp_open, (unsigned int) self->tsap);
+      DEBUG(PPP_INFO, "IrTTP not ready ! (%d-%d)\n",
+	    self->ttp_open, self->ttp_connect);
 
       /* Note : we can either drop the packet or block the packet.
        *
@@ -882,7 +882,7 @@ ppp_irnet_send(struct ppp_channel *	chan
        */
 #ifdef BLOCK_WHEN_CONNECT
       /* If we are attempting to connect */
-      if(self->tsap)
+      if(self->ttp_connect)
 	{
 	  /* Blocking packet, ppp_generic will retry later */
 	  return 0;