• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/net/irda/ircomm/

Lines Matching refs:self

51 static int __ircomm_close(struct ircomm_cb *self);
52 static void ircomm_control_indication(struct ircomm_cb *self,
112 struct ircomm_cb *self = NULL;
120 self = kzalloc(sizeof(struct ircomm_cb), GFP_ATOMIC);
121 if (self == NULL)
124 self->notify = *notify;
125 self->magic = IRCOMM_MAGIC;
129 self->flow_status = FLOW_START;
130 ret = ircomm_open_lsap(self);
132 ret = ircomm_open_tsap(self);
135 kfree(self);
139 self->service_type = service_type;
140 self->line = line;
142 hashbin_insert(ircomm, (irda_queue_t *) self, line, NULL);
144 ircomm_next_state(self, IRCOMM_IDLE);
146 return self;
152 * Function ircomm_close_instance (self)
157 static int __ircomm_close(struct ircomm_cb *self)
162 ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, NULL, NULL);
165 if (self->tsap) {
166 irttp_close_tsap(self->tsap);
167 self->tsap = NULL;
171 if (self->lsap) {
172 irlmp_close_lsap(self->lsap);
173 self->lsap = NULL;
175 self->magic = 0;
177 kfree(self);
183 * Function ircomm_close (self)
188 int ircomm_close(struct ircomm_cb *self)
192 IRDA_ASSERT(self != NULL, return -EIO;);
193 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EIO;);
197 entry = hashbin_remove(ircomm, self->line, NULL);
199 IRDA_ASSERT(entry == self, return -1;);
201 return __ircomm_close(self);
207 * Function ircomm_connect_request (self, service_type)
213 int ircomm_connect_request(struct ircomm_cb *self, __u8 dlsap_sel,
222 IRDA_ASSERT(self != NULL, return -1;);
223 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
225 self->service_type= service_type;
231 ret = ircomm_do_event(self, IRCOMM_CONNECT_REQUEST, skb, &info);
239 * Function ircomm_connect_indication (self, qos, skb)
244 void ircomm_connect_indication(struct ircomm_cb *self, struct sk_buff *skb,
260 if (self->notify.connect_indication)
261 self->notify.connect_indication(self->notify.instance, self,
270 * Function ircomm_connect_response (self, userdata, max_sdu_size)
275 int ircomm_connect_response(struct ircomm_cb *self, struct sk_buff *userdata)
279 IRDA_ASSERT(self != NULL, return -1;);
280 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
284 ret = ircomm_do_event(self, IRCOMM_CONNECT_RESPONSE, userdata, NULL);
292 * Function connect_confirm (self, skb)
297 void ircomm_connect_confirm(struct ircomm_cb *self, struct sk_buff *skb,
302 if (self->notify.connect_confirm )
303 self->notify.connect_confirm(self->notify.instance,
304 self, info->qos,
313 * Function ircomm_data_request (self, userdata)
318 int ircomm_data_request(struct ircomm_cb *self, struct sk_buff *skb)
324 IRDA_ASSERT(self != NULL, return -EFAULT;);
325 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
328 ret = ircomm_do_event(self, IRCOMM_DATA_REQUEST, skb, NULL);
336 * Function ircomm_data_indication (self, skb)
341 void ircomm_data_indication(struct ircomm_cb *self, struct sk_buff *skb)
347 if (self->notify.data_indication)
348 self->notify.data_indication(self->notify.instance, self, skb);
355 * Function ircomm_process_data (self, skb)
360 void ircomm_process_data(struct ircomm_cb *self, struct sk_buff *skb)
386 ircomm_control_indication(self, skb, clen);
392 ircomm_data_indication(self, skb);
400 * Function ircomm_control_request (self, params)
405 int ircomm_control_request(struct ircomm_cb *self, struct sk_buff *skb)
411 IRDA_ASSERT(self != NULL, return -EFAULT;);
412 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EFAULT;);
415 ret = ircomm_do_event(self, IRCOMM_CONTROL_REQUEST, skb, NULL);
423 * Function ircomm_control_indication (self, skb)
428 static void ircomm_control_indication(struct ircomm_cb *self,
434 if (self->notify.udata_indication) {
445 self->notify.udata_indication(self->notify.instance, self,
457 * Function ircomm_disconnect_request (self, userdata, priority)
462 int ircomm_disconnect_request(struct ircomm_cb *self, struct sk_buff *userdata)
469 IRDA_ASSERT(self != NULL, return -1;);
470 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -1;);
472 ret = ircomm_do_event(self, IRCOMM_DISCONNECT_REQUEST, userdata,
480 * Function disconnect_indication (self, skb)
485 void ircomm_disconnect_indication(struct ircomm_cb *self, struct sk_buff *skb,
492 if (self->notify.disconnect_indication) {
493 self->notify.disconnect_indication(self->notify.instance, self,
501 * Function ircomm_flow_request (self, flow)
506 void ircomm_flow_request(struct ircomm_cb *self, LOCAL_FLOW flow)
510 IRDA_ASSERT(self != NULL, return;);
511 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return;);
513 if (self->service_type == IRCOMM_3_WIRE_RAW)
516 irttp_flow_request(self->tsap, flow);
524 struct ircomm_cb *self;
529 for (self = (struct ircomm_cb *) hashbin_get_first(ircomm);
530 self != NULL;
531 self = (struct ircomm_cb *) hashbin_get_next(ircomm)) {
536 return self;
553 const struct ircomm_cb *self = v;
555 IRDA_ASSERT(self->magic == IRCOMM_MAGIC, return -EINVAL; );
557 if(self->line < 0x10)
558 seq_printf(seq, "ircomm%d", self->line);
560 seq_printf(seq, "irlpt%d", self->line - 0x10);
564 ircomm_state[ self->state],
565 self->slsap_sel, self->dlsap_sel);
567 if(self->service_type & IRCOMM_3_WIRE_RAW)
569 if(self->service_type & IRCOMM_3_WIRE)
571 if(self->service_type & IRCOMM_9_WIRE)
573 if(self->service_type & IRCOMM_CENTRONICS)