[IrDA]: Netlink layer.
[cascardo/linux.git] / include / net / irda / irlap.h
index f0248fb..9d0c78e 100644 (file)
@@ -208,6 +208,8 @@ struct irlap_cb {
        int    xbofs_delay;   /* Nr of XBOF's used to MTT */
        int    bofs_count;    /* Negotiated extra BOFs */
        int    next_bofs;     /* Negotiated extra BOFs after next frame */
+
+       int    mode;     /* IrLAP mode (primary, secondary or monitor) */
 };
 
 /* 
@@ -289,4 +291,21 @@ static inline void irlap_clear_disconnect(struct irlap_cb *self)
        self->disconnect_pending = FALSE;
 }
 
+/*
+ * Function irlap_next_state (self, state)
+ *
+ *    Switches state and provides debug information
+ *
+ */
+static inline void irlap_next_state(struct irlap_cb *self, IRLAP_STATE state)
+{
+       /*
+       if (!self || self->magic != LAP_MAGIC)
+               return;
+
+       IRDA_DEBUG(4, "next LAP state = %s\n", irlap_state[state]);
+       */
+       self->state = state;
+}
+
 #endif