Lines Matching defs:lap
230 struct lap_cb *lap;
240 lap = self->lap;
241 if (lap) {
242 IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;);
249 irlmp_do_lap_event(self->lap,
253 lsap = hashbin_remove(lap->lsaps, (long) self, NULL);
255 lap->cache.valid = FALSE;
258 self->lap = NULL;
283 struct lap_cb *lap;
292 lap = kzalloc(sizeof(struct lap_cb), GFP_KERNEL);
293 if (lap == NULL) {
298 lap->irlap = irlap;
299 lap->magic = LMP_LAP_MAGIC;
300 lap->saddr = saddr;
301 lap->daddr = DEV_ADDR_ANY;
303 lap->cache.valid = FALSE;
305 lap->lsaps = hashbin_new(HB_LOCK);
306 if (lap->lsaps == NULL) {
308 kfree(lap);
312 lap->lap_state = LAP_STANDBY;
314 init_timer(&lap->idle_timer);
319 hashbin_insert(irlmp->links, (irda_queue_t *) lap, lap->saddr, NULL);
326 notify->instance = lap;
375 struct lap_cb *lap;
439 lap = hashbin_lock_find(irlmp->links, saddr, NULL);
440 if (lap == NULL) {
447 if (lap->daddr == DEV_ADDR_ANY)
448 lap->daddr = daddr;
449 else if (lap->daddr != daddr) {
451 if (HASHBIN_GET_SIZE(lap->lsaps) == 0) {
468 self->lap = lap;
478 IRDA_ASSERT(lsap->lap != NULL, return -1;);
479 IRDA_ASSERT(lsap->lap->magic == LMP_LAP_MAGIC, return -1;);
481 hashbin_insert(self->lap->lsaps, (irda_queue_t *) self, (long) self,
522 IRDA_ASSERT(self->lap != NULL, return;);
527 /* Note : self->lap is set in irlmp_link_data_indication(),
532 self->qos = *self->lap->qos;
534 max_seg_size = self->lap->qos->data_size.value-LMP_HEADER;
535 lap_header_size = IRLAP_GET_HEADER_SIZE(self->lap->irlap);
597 IRDA_ASSERT(self->lap != NULL, return;);
599 self->qos = *self->lap->qos;
601 max_seg_size = self->lap->qos->data_size.value-LMP_HEADER;
602 lap_header_size = IRLAP_GET_HEADER_SIZE(self->lap->irlap);
639 (orig->lap == NULL)) {
655 /* new->lap = orig->lap; => done in the memcpy() */
671 new->lap->cache.valid = FALSE;
705 * which lap layer that the frame should be transmitted on
716 IRDA_ASSERT(self->lap != NULL, return -1;);
717 IRDA_ASSERT(self->lap->magic == LMP_LAP_MAGIC, return -1;);
718 IRDA_ASSERT(self->lap->lsaps != NULL, return -1;);
720 lsap = hashbin_remove(self->lap->lsaps, (long) self, NULL);
722 self->lap->cache.valid = FALSE;
734 self->lap = NULL;
769 IRDA_ASSERT(self->lap != NULL, return;);
770 IRDA_ASSERT(self->lap->lsaps != NULL, return;);
772 lsap = hashbin_remove(self->lap->lsaps, (long) self, NULL);
774 self->lap->cache.valid = FALSE;
783 self->lap = NULL;
809 struct lap_cb *lap;
820 lap = (struct lap_cb *) hashbin_get_first(irlmp->links);
821 while (lap != NULL) {
822 IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;);
824 if (lap->lap_state == LAP_STANDBY) {
826 irlmp_expire_discoveries(irlmp->cachelog, lap->saddr,
829 lap = (struct lap_cb *) hashbin_get_next(irlmp->links);
842 struct lap_cb *lap;
870 lap = (struct lap_cb *) hashbin_get_first(irlmp->links);
871 while (lap != NULL) {
872 IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return;);
874 if (lap->lap_state == LAP_STANDBY) {
876 irlmp_do_lap_event(lap, LM_LAP_DISCOVERY_REQUEST,
879 lap = (struct lap_cb *) hashbin_get_next(irlmp->links);
1213 struct lap_cb *lap;
1235 lap = (struct lap_cb *) hashbin_get_first(irlmp->links);
1236 while (lap != NULL) {
1237 IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, return -1;);
1245 irlap_unitdata_request(lap->irlap, clone_skb);
1249 lap = (struct lap_cb *) hashbin_get_next(irlmp->links);
1584 struct lap_cb *lap;
1610 lap = (struct lap_cb *) hashbin_get_first(irlmp->links);
1611 while (lap != NULL) {
1612 IRDA_ASSERT(lap->magic == LMP_LAP_MAGIC, goto errlap;);
1617 spin_lock(&lap->lsaps->hb_spinlock);
1620 self = (struct lsap_cb *) hashbin_get_first(lap->lsaps);
1630 self = (struct lsap_cb*) hashbin_get_next(lap->lsaps);
1632 spin_unlock(&lap->lsaps->hb_spinlock);
1635 lap = (struct lap_cb *) hashbin_get_next(irlmp->links);
1665 spin_unlock(&lap->lsaps->hb_spinlock);
1886 struct lap_cb *lap = v;
1888 seq_printf(seq, "lap state: %s, ",
1889 irlmp_state[lap->lap_state]);
1892 lap->saddr, lap->daddr);
1894 HASHBIN_GET_SIZE(lap->lsaps));
1900 spin_lock(&lap->lsaps->hb_spinlock);
1903 for (self = (struct lsap_cb *) hashbin_get_first(lap->lsaps);
1905 self = (struct lsap_cb *)hashbin_get_next(lap->lsaps)) {
1918 spin_unlock(&lap->lsaps->hb_spinlock);