28 #include <linux/kernel.h>
47 IRDA_DEBUG(4,
"%s(), sending expedited data\n", __func__);
119 "source LSAP=%d, dest LSAP=%d\n",
120 __func__, slsap_sel, dlsap_sel);
123 lsap = irlmp_find_lsap(
self, dlsap_sel, slsap_sel,
CONNECT_CMD,
124 irlmp->unconnected_lsaps);
128 IRDA_DEBUG(1,
"%s(), incoming connection for LSAP already connected\n", __func__);
129 lsap = irlmp_find_lsap(
self, dlsap_sel, slsap_sel, 0,
133 lsap = irlmp_find_lsap(
self, dlsap_sel, slsap_sel, 0,
137 IRDA_DEBUG(2,
"IrLMP, Sorry, no LSAP for received frame!\n");
138 IRDA_DEBUG(2,
"%s(), slsap_sel = %02x, dlsap_sel = %02x\n",
139 __func__, slsap_sel, dlsap_sel);
140 if (fp[0] & CONTROL_BIT) {
141 IRDA_DEBUG(2,
"%s(), received control frame %02x\n",
144 IRDA_DEBUG(2,
"%s(), received data frame\n", __func__);
152 if (fp[0] & CONTROL_BIT) {
162 IRDA_DEBUG(4,
"%s(), Disconnect indication!\n",
168 IRDA_DEBUG(0,
"Access mode cmd not implemented!\n");
171 IRDA_DEBUG(0,
"Access mode cnf not implemented!\n");
174 IRDA_DEBUG(0,
"%s(), Unknown control frame %02x\n",
178 }
else if (unreliable) {
199 #ifdef CONFIG_IRDA_ULTRA
200 void irlmp_link_unitdata_indication(
struct lap_cb *
self,
struct sk_buff *
skb)
226 IRDA_DEBUG(0,
"%s(), extension in PID not supp!\n",
233 IRDA_DEBUG(0,
"%s(), dropping frame!\n", __func__);
240 while (lsap !=
NULL) {
252 spin_unlock_irqrestore(&
irlmp->unconnected_lsaps->hb_spinlock, flags);
255 irlmp_connless_data_indication(lsap, skb);
257 IRDA_DEBUG(0,
"%s(), found no matching LSAP!\n", __func__);
403 #ifdef CONFIG_IRDA_CACHE_LAST_LSAP
404 static inline void irlmp_update_cache(
struct lap_cb *
lap,
408 lap->cache.valid =
FALSE;
412 lap->cache.lsap = lsap;
413 lap->cache.valid =
TRUE;
446 #ifdef CONFIG_IRDA_CACHE_LAST_LSAP
447 if ((self->cache.valid) &&
448 (self->cache.slsap_sel == slsap_sel) &&
449 (self->cache.dlsap_sel == dlsap_sel))
451 return self->cache.lsap;
458 while (lsap !=
NULL) {
482 #ifdef CONFIG_IRDA_CACHE_LAST_LSAP
484 irlmp_update_cache(
self, lsap);
486 spin_unlock_irqrestore(&queue->
hb_spinlock, flags);