Commit e0554fd4 authored by Jean Tourrilhes's avatar Jean Tourrilhes Committed by Linus Torvalds

irda update 6/7:

        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
parent 752d3f60
...@@ -278,6 +278,8 @@ static inline void irlmp_listen(struct lsap_cb *self) ...@@ -278,6 +278,8 @@ static inline void irlmp_listen(struct lsap_cb *self)
self->dlsap_sel = LSAP_ANY; self->dlsap_sel = LSAP_ANY;
self->lap = NULL; self->lap = NULL;
self->lsap_state = LSAP_DISCONNECTED; self->lsap_state = LSAP_DISCONNECTED;
/* Started when we received the LM_CONNECT_INDICATION */
del_timer(&self->watchdog_timer);
} }
#endif #endif
...@@ -236,6 +236,16 @@ void irlmp_close_lsap(struct lsap_cb *self) ...@@ -236,6 +236,16 @@ void irlmp_close_lsap(struct lsap_cb *self)
lap = self->lap; lap = self->lap;
if (lap) { if (lap) {
ASSERT(lap->magic == LMP_LAP_MAGIC, return;); 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); lsap = hashbin_remove(lap->lsaps, (int) self, NULL);
} }
self->lap = NULL; self->lap = NULL;
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
* *
********************************************************************/ ********************************************************************/
#include <linux/types.h>
#include <asm/unaligned.h> #include <asm/unaligned.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment