29 #include <linux/kernel.h>
30 #include <linux/string.h>
31 #include <linux/errno.h>
32 #include <linux/netdevice.h>
35 #include <linux/random.h>
36 #include <linux/bitops.h>
37 #include <linux/slab.h>
39 #include <asm/byteorder.h>
55 static void irlan_provider_connect_indication(
void *instance,
void *sap,
67 static int irlan_provider_data_indication(
void *instance,
void *sap,
85 IRDA_DEBUG(4,
"Got GET_PROVIDER_INFO command!\n");
90 IRDA_DEBUG(4,
"Got GET_MEDIA_CHAR command!\n");
94 IRDA_DEBUG(4,
"Got OPEN_DATA_CHANNEL command!\n");
98 IRDA_DEBUG(4,
"Got FILTER_OPERATION command!\n");
102 IRDA_DEBUG(2,
"%s(), Got RECONNECT_DATA_CHAN command\n", __func__ );
103 IRDA_DEBUG(2,
"%s(), NOT IMPLEMENTED\n", __func__ );
106 IRDA_DEBUG(2,
"Got CLOSE_DATA_CHAN command!\n");
107 IRDA_DEBUG(2,
"%s(), NOT IMPLEMENTED\n", __func__ );
110 IRDA_DEBUG(2,
"%s(), Unknown command!\n", __func__ );
122 static void irlan_provider_connect_indication(
void *instance,
void *sap,
139 IRDA_ASSERT(tsap == self->provider.tsap_ctrl,
return;);
142 self->provider.max_sdu_size = max_sdu_size;
175 static void irlan_provider_disconnect_indication(
void *instance,
void *sap,
182 IRDA_DEBUG(4,
"%s(), reason=%d\n", __func__ , reason);
192 IRDA_ASSERT(tsap == self->provider.tsap_ctrl,
return;);
236 IRDA_DEBUG(4,
"%s(), skb->len=%d\n", __func__ , (
int)skb->
len);
263 for (i=0; i<
count;i++) {
266 IRDA_DEBUG(2,
"%s(), IrLAN, Error!\n", __func__ );
308 skb_reserve(skb, self->provider.max_header_size);
315 switch (self->media) {
323 IRDA_DEBUG(2,
"%s(), unknown media type!\n", __func__ );
336 switch (self->provider.access_type) {
347 IRDA_DEBUG(2,
"%s(), Unknown access type\n", __func__ );
354 if (self->provider.send_arb_val) {
357 self->provider.send_arb_val);
367 IRDA_DEBUG(2,
"%s(), Unknown command!\n", __func__ );
391 if (self->provider.tsap_ctrl)
406 IRDA_DEBUG(2,
"%s(), Got no tsap!\n", __func__ );
409 self->provider.tsap_ctrl = tsap;