From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: Marcelo Tosatti <marcelo@conectiva.com.br>,
Jeff Garzik <jgarzik@mandrakesoft.com>,
Linux kernel mailing list <linux-kernel@vger.kernel.org>,
irda-users@lists.sourceforge.net
Subject: [PATCH 2.4] : ir241_lsap_lap_close-2.diff
Date: Mon, 2 Dec 2002 15:39:03 -0800 [thread overview]
Message-ID: <20021202233903.GE16284@bougret.hpl.hp.com> (raw)
ir241_lsap_lap_close-2.diff :
---------------------------
<apply after ir241_flow_sched_lap_lmp-6.diff to avoid fuzz>
o [CORRECT] Cancel LSAP watchdog when putting socket back to listen
o [CORRECT] Try to close LAP when closing LSAP still active
<Following patch from Felix Tang>
o [CORRECT] Header fix for compile on Alpha architecture
diff -u -p linux/include/net/irda/irlmp.d7.h linux/include/net/irda/irlmp.h
--- linux/include/net/irda/irlmp.d7.h Wed Apr 10 18:32:46 2002
+++ linux/include/net/irda/irlmp.h Fri Apr 12 09:54:54 2002
@@ -278,6 +278,8 @@ static inline void irlmp_listen(struct l
self->dlsap_sel = LSAP_ANY;
self->lap = NULL;
self->lsap_state = LSAP_DISCONNECTED;
+ /* Started when we received the LM_CONNECT_INDICATION */
+ del_timer(&self->watchdog_timer);
}
#endif
diff -u -p linux/net/irda/irlmp.d7.c linux/net/irda/irlmp.c
--- linux/net/irda/irlmp.d7.c Wed Apr 10 18:20:24 2002
+++ linux/net/irda/irlmp.c Wed Apr 10 18:27:26 2002
@@ -236,6 +236,16 @@ void irlmp_close_lsap(struct lsap_cb *se
lap = self->lap;
if (lap) {
ASSERT(lap->magic == LMP_LAP_MAGIC, return;);
+ /* We might close a LSAP before it has completed the
+ * connection setup. In those case, higher layers won't
+ * send a proper disconnect request. Harmless, except
+ * that we will forget to close LAP... - Jean II */
+ if(self->lsap_state != LSAP_DISCONNECTED) {
+ self->lsap_state = LSAP_DISCONNECTED;
+ irlmp_do_lap_event(self->lap,
+ LM_LAP_DISCONNECT_REQUEST, NULL);
+ }
+ /* Now, remove from the link */
lsap = hashbin_remove(lap->lsaps, (int) self, NULL);
}
self->lap = NULL;
diff -u -p linux/net/irda/parameters.d7.c linux/net/irda/parameters.c
--- linux/net/irda/parameters.d7.c Fri Apr 12 14:45:08 2002
+++ linux/net/irda/parameters.c Fri Apr 12 14:45:29 2002
@@ -28,6 +28,7 @@
*
********************************************************************/
+#include <linux/types.h>
#include <asm/unaligned.h>
#include <asm/byteorder.h>
reply other threads:[~2002-12-02 23:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021202233903.GE16284@bougret.hpl.hp.com \
--to=jt@bougret.hpl.hp.com \
--cc=irda-users@lists.sourceforge.net \
--cc=jgarzik@mandrakesoft.com \
--cc=jt@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®