summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJean Tourrilhes <jt@hpl.hp.com>2002-05-10 20:49:24 -0400
committerJeff Garzik <jgarzik@mandrakesoft.com>2002-05-10 20:49:24 -0400
commitcc21ca791474ca73990aee15d107091cdf450b08 (patch)
treeaee24d962e7419ed03f3060f72ac69b816d3f737 /include
parent4bab61d66972225bf6481b01189f25edd10362f1 (diff)
IrDA update 3/3:
<Following patch from Christoph Bartelmus, mangled by me> o [CORRECT] replace the global LSAP cache with LSAP caches private to each LAP. Fix a bug where two simultaneous connections from two devices using the same LSAPs would get mixed up. Should also improve performance in similar cases.
Diffstat (limited to 'include')
-rw-r--r--include/net/irda/irlmp.h36
1 files changed, 22 insertions, 14 deletions
diff --git a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h
index 61360f498cc2..fdbf5f75ae85 100644
--- a/include/net/irda/irlmp.h
+++ b/include/net/irda/irlmp.h
@@ -120,6 +120,21 @@ struct lsap_cb {
};
/*
+ * Used for caching the last slsap->dlsap->handle mapping
+ *
+ * We don't need to keep/match the remote address in the cache because
+ * we are associated with a specific LAP (which implies it).
+ * Jean II
+ */
+typedef struct {
+ int valid;
+
+ __u8 slsap_sel;
+ __u8 dlsap_sel;
+ struct lsap_cb *lsap;
+} CACHE_ENTRY;
+
+/*
* Information about each registred IrLAP layer
*/
struct lap_cb {
@@ -140,20 +155,16 @@ struct lap_cb {
struct qos_info *qos; /* LAP QoS for this session */
struct timer_list idle_timer;
+
+#ifdef CONFIG_IRDA_CACHE_LAST_LSAP
+ /* The lsap cache was moved from struct irlmp_cb to here because
+ * it must be associated with the specific LAP. Also, this
+ * improves performance. - Jean II */
+ CACHE_ENTRY cache; /* Caching last slsap->dlsap->handle mapping */
+#endif
};
/*
- * Used for caching the last slsap->dlsap->handle mapping
- */
-typedef struct {
- int valid;
-
- __u8 slsap_sel;
- __u8 dlsap_sel;
- struct lsap_cb *lsap;
-} CACHE_ENTRY;
-
-/*
* Main structure for IrLMP
*/
struct irlmp_cb {
@@ -166,9 +177,6 @@ struct irlmp_cb {
int free_lsap_sel;
-#ifdef CONFIG_IRDA_CACHE_LAST_LSAP
- CACHE_ENTRY cache; /* Caching last slsap->dlsap->handle mapping */
-#endif
struct timer_list discovery_timer;
hashbin_t *links; /* IrLAP connection table */