Commit 37f852df authored by Jean Tourrilhes's avatar Jean Tourrilhes Committed by Linus Torvalds

More IrDA __FUNCTION__ cleanups, merged from -ac

parent 94eda096
...@@ -85,7 +85,7 @@ static int irda_data_indication(void *instance, void *sap, struct sk_buff *skb) ...@@ -85,7 +85,7 @@ static int irda_data_indication(void *instance, void *sap, struct sk_buff *skb)
struct sock *sk; struct sock *sk;
int err; int err;
IRDA_DEBUG(3, __FUNCTION__ "()\n"); IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
self = (struct irda_sock *) instance; self = (struct irda_sock *) instance;
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -95,7 +95,7 @@ static int irda_data_indication(void *instance, void *sap, struct sk_buff *skb) ...@@ -95,7 +95,7 @@ static int irda_data_indication(void *instance, void *sap, struct sk_buff *skb)
err = sock_queue_rcv_skb(sk, skb); err = sock_queue_rcv_skb(sk, skb);
if (err) { if (err) {
IRDA_DEBUG(1, __FUNCTION__ "(), error: no more mem!\n"); IRDA_DEBUG(1, "%s(), error: no more mem!\n", __FUNCTION__);
self->rx_flow = FLOW_STOP; self->rx_flow = FLOW_STOP;
/* When we return error, TTP will need to requeue the skb */ /* When we return error, TTP will need to requeue the skb */
...@@ -119,7 +119,7 @@ static void irda_disconnect_indication(void *instance, void *sap, ...@@ -119,7 +119,7 @@ static void irda_disconnect_indication(void *instance, void *sap,
self = (struct irda_sock *) instance; self = (struct irda_sock *) instance;
IRDA_DEBUG(2, __FUNCTION__ "(%p)\n", self); IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
/* Don't care about it, but let's not leak it */ /* Don't care about it, but let's not leak it */
if(skb) if(skb)
...@@ -127,7 +127,8 @@ static void irda_disconnect_indication(void *instance, void *sap, ...@@ -127,7 +127,8 @@ static void irda_disconnect_indication(void *instance, void *sap,
sk = self->sk; sk = self->sk;
if (sk == NULL) { if (sk == NULL) {
IRDA_DEBUG(0, __FUNCTION__ "(%p) : BUG : sk is NULL\n", self); IRDA_DEBUG(0, "%s(%p) : BUG : sk is NULL\n",
__FUNCTION__, self);
return; return;
} }
...@@ -183,7 +184,7 @@ static void irda_connect_confirm(void *instance, void *sap, ...@@ -183,7 +184,7 @@ static void irda_connect_confirm(void *instance, void *sap,
self = (struct irda_sock *) instance; self = (struct irda_sock *) instance;
IRDA_DEBUG(2, __FUNCTION__ "(%p)\n", self); IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
sk = self->sk; sk = self->sk;
if (sk == NULL) if (sk == NULL)
...@@ -215,7 +216,7 @@ static void irda_connect_confirm(void *instance, void *sap, ...@@ -215,7 +216,7 @@ static void irda_connect_confirm(void *instance, void *sap,
self->max_data_size = irttp_get_max_seg_size(self->tsap); self->max_data_size = irttp_get_max_seg_size(self->tsap);
}; };
IRDA_DEBUG(2, __FUNCTION__ "(), max_data_size=%d\n", IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __FUNCTION__,
self->max_data_size); self->max_data_size);
memcpy(&self->qos_tx, qos, sizeof(struct qos_info)); memcpy(&self->qos_tx, qos, sizeof(struct qos_info));
...@@ -242,7 +243,7 @@ static void irda_connect_indication(void *instance, void *sap, ...@@ -242,7 +243,7 @@ static void irda_connect_indication(void *instance, void *sap,
self = (struct irda_sock *) instance; self = (struct irda_sock *) instance;
IRDA_DEBUG(2, __FUNCTION__ "(%p)\n", self); IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
sk = self->sk; sk = self->sk;
if (sk == NULL) if (sk == NULL)
...@@ -274,7 +275,7 @@ static void irda_connect_indication(void *instance, void *sap, ...@@ -274,7 +275,7 @@ static void irda_connect_indication(void *instance, void *sap,
self->max_data_size = irttp_get_max_seg_size(self->tsap); self->max_data_size = irttp_get_max_seg_size(self->tsap);
}; };
IRDA_DEBUG(2, __FUNCTION__ "(), max_data_size=%d\n", IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __FUNCTION__,
self->max_data_size); self->max_data_size);
memcpy(&self->qos_tx, qos, sizeof(struct qos_info)); memcpy(&self->qos_tx, qos, sizeof(struct qos_info));
...@@ -293,13 +294,14 @@ void irda_connect_response(struct irda_sock *self) ...@@ -293,13 +294,14 @@ void irda_connect_response(struct irda_sock *self)
{ {
struct sk_buff *skb; struct sk_buff *skb;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
skb = dev_alloc_skb(64); skb = dev_alloc_skb(64);
if (skb == NULL) { if (skb == NULL) {
IRDA_DEBUG(0, __FUNCTION__ "() Unable to allocate sk_buff!\n"); IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n",
__FUNCTION__);
return; return;
} }
...@@ -320,7 +322,7 @@ static void irda_flow_indication(void *instance, void *sap, LOCAL_FLOW flow) ...@@ -320,7 +322,7 @@ static void irda_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
struct irda_sock *self; struct irda_sock *self;
struct sock *sk; struct sock *sk;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
self = (struct irda_sock *) instance; self = (struct irda_sock *) instance;
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
...@@ -330,17 +332,18 @@ static void irda_flow_indication(void *instance, void *sap, LOCAL_FLOW flow) ...@@ -330,17 +332,18 @@ static void irda_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
switch (flow) { switch (flow) {
case FLOW_STOP: case FLOW_STOP:
IRDA_DEBUG(1, __FUNCTION__ "(), IrTTP wants us to slow down\n"); IRDA_DEBUG(1, "%s(), IrTTP wants us to slow down\n",
__FUNCTION__);
self->tx_flow = flow; self->tx_flow = flow;
break; break;
case FLOW_START: case FLOW_START:
self->tx_flow = flow; self->tx_flow = flow;
IRDA_DEBUG(1, __FUNCTION__ IRDA_DEBUG(1, "%s(), IrTTP wants us to start again\n",
"(), IrTTP wants us to start again\n"); __FUNCTION__);
wake_up_interruptible(sk->sleep); wake_up_interruptible(sk->sleep);
break; break;
default: default:
IRDA_DEBUG( 0, __FUNCTION__ "(), Unknown flow command!\n"); IRDA_DEBUG(0, "%s(), Unknown flow command!\n", __FUNCTION__);
/* Unknown flow command, better stop */ /* Unknown flow command, better stop */
self->tx_flow = flow; self->tx_flow = flow;
break; break;
...@@ -366,7 +369,7 @@ static void irda_getvalue_confirm(int result, __u16 obj_id, ...@@ -366,7 +369,7 @@ static void irda_getvalue_confirm(int result, __u16 obj_id,
return; return;
} }
IRDA_DEBUG(2, __FUNCTION__ "(%p)\n", self); IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
/* We probably don't need to make any more queries */ /* We probably don't need to make any more queries */
iriap_close(self->iriap); iriap_close(self->iriap);
...@@ -374,7 +377,7 @@ static void irda_getvalue_confirm(int result, __u16 obj_id, ...@@ -374,7 +377,7 @@ static void irda_getvalue_confirm(int result, __u16 obj_id,
/* Check if request succeeded */ /* Check if request succeeded */
if (result != IAS_SUCCESS) { if (result != IAS_SUCCESS) {
IRDA_DEBUG(1, __FUNCTION__ "(), IAS query failed! (%d)\n", IRDA_DEBUG(1, "%s(), IAS query failed! (%d)\n", __FUNCTION__,
result); result);
self->errno = result; /* We really need it later */ self->errno = result; /* We really need it later */
...@@ -408,7 +411,7 @@ static void irda_selective_discovery_indication(discovery_t *discovery, ...@@ -408,7 +411,7 @@ static void irda_selective_discovery_indication(discovery_t *discovery,
{ {
struct irda_sock *self; struct irda_sock *self;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
self = (struct irda_sock *) priv; self = (struct irda_sock *) priv;
if (!self) { if (!self) {
...@@ -445,7 +448,7 @@ static void irda_discovery_timeout(u_long priv) ...@@ -445,7 +448,7 @@ static void irda_discovery_timeout(u_long priv)
{ {
struct irda_sock *self; struct irda_sock *self;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
self = (struct irda_sock *) priv; self = (struct irda_sock *) priv;
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
...@@ -488,7 +491,8 @@ static int irda_open_tsap(struct irda_sock *self, __u8 tsap_sel, char *name) ...@@ -488,7 +491,8 @@ static int irda_open_tsap(struct irda_sock *self, __u8 tsap_sel, char *name)
self->tsap = irttp_open_tsap(tsap_sel, DEFAULT_INITIAL_CREDIT, self->tsap = irttp_open_tsap(tsap_sel, DEFAULT_INITIAL_CREDIT,
&notify); &notify);
if (self->tsap == NULL) { if (self->tsap == NULL) {
IRDA_DEBUG( 0, __FUNCTION__ "(), Unable to allocate TSAP!\n"); IRDA_DEBUG(0, "%s(), Unable to allocate TSAP!\n",
__FUNCTION__);
return -ENOMEM; return -ENOMEM;
} }
/* Remember which TSAP selector we actually got */ /* Remember which TSAP selector we actually got */
...@@ -1066,7 +1070,7 @@ static int irda_create(struct socket *sock, int protocol) ...@@ -1066,7 +1070,7 @@ static int irda_create(struct socket *sock, int protocol)
struct sock *sk; struct sock *sk;
struct irda_sock *self; struct irda_sock *self;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
/* Check for valid socket type */ /* Check for valid socket type */
switch (sock->type) { switch (sock->type) {
...@@ -1090,7 +1094,7 @@ static int irda_create(struct socket *sock, int protocol) ...@@ -1090,7 +1094,7 @@ static int irda_create(struct socket *sock, int protocol)
} }
memset(self, 0, sizeof(struct irda_sock)); memset(self, 0, sizeof(struct irda_sock));
IRDA_DEBUG(2, __FUNCTION__ "() : self is %p\n", self); IRDA_DEBUG(2, "%s() : self is %p\n", __FUNCTION__, self);
init_waitqueue_head(&self->query_wait); init_waitqueue_head(&self->query_wait);
...@@ -1152,7 +1156,7 @@ static int irda_create(struct socket *sock, int protocol) ...@@ -1152,7 +1156,7 @@ static int irda_create(struct socket *sock, int protocol)
*/ */
void irda_destroy_socket(struct irda_sock *self) void irda_destroy_socket(struct irda_sock *self)
{ {
IRDA_DEBUG(2, __FUNCTION__ "(%p)\n", self); IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
...@@ -1195,7 +1199,7 @@ static int irda_release(struct socket *sock) ...@@ -1195,7 +1199,7 @@ static int irda_release(struct socket *sock)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
if (sk == NULL) if (sk == NULL)
return 0; return 0;
...@@ -1264,7 +1268,7 @@ static int irda_sendmsg(struct socket *sock, struct msghdr *msg, int len, ...@@ -1264,7 +1268,7 @@ static int irda_sendmsg(struct socket *sock, struct msghdr *msg, int len,
unsigned char *asmptr; unsigned char *asmptr;
int err; int err;
IRDA_DEBUG(4, __FUNCTION__ "(), len=%d\n", len); IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__, len);
/* Note : socket.c set MSG_EOR on SEQPACKET sockets */ /* Note : socket.c set MSG_EOR on SEQPACKET sockets */
if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR)) if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR))
...@@ -1293,9 +1297,8 @@ static int irda_sendmsg(struct socket *sock, struct msghdr *msg, int len, ...@@ -1293,9 +1297,8 @@ static int irda_sendmsg(struct socket *sock, struct msghdr *msg, int len,
/* Check that we don't send out to big frames */ /* Check that we don't send out to big frames */
if (len > self->max_data_size) { if (len > self->max_data_size) {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s(), Chopping frame from %d to %d bytes!\n",
"(), Chopping frame from %d to %d bytes!\n", len, __FUNCTION__, len, self->max_data_size);
self->max_data_size);
len = self->max_data_size; len = self->max_data_size;
} }
...@@ -1315,7 +1318,7 @@ static int irda_sendmsg(struct socket *sock, struct msghdr *msg, int len, ...@@ -1315,7 +1318,7 @@ static int irda_sendmsg(struct socket *sock, struct msghdr *msg, int len,
*/ */
err = irttp_data_request(self->tsap, skb); err = irttp_data_request(self->tsap, skb);
if (err) { if (err) {
IRDA_DEBUG(0, __FUNCTION__ "(), err=%d\n", err); IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err);
return err; return err;
} }
/* Tell client how much data we actually sent */ /* Tell client how much data we actually sent */
...@@ -1336,7 +1339,7 @@ static int irda_recvmsg_dgram(struct socket *sock, struct msghdr *msg, ...@@ -1336,7 +1339,7 @@ static int irda_recvmsg_dgram(struct socket *sock, struct msghdr *msg,
struct sk_buff *skb; struct sk_buff *skb;
int copied, err; int copied, err;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -1349,9 +1352,8 @@ static int irda_recvmsg_dgram(struct socket *sock, struct msghdr *msg, ...@@ -1349,9 +1352,8 @@ static int irda_recvmsg_dgram(struct socket *sock, struct msghdr *msg,
copied = skb->len; copied = skb->len;
if (copied > size) { if (copied > size) {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s(), Received truncated frame (%d < %d)!\n",
"(), Received truncated frame (%d < %d)!\n", __FUNCTION__, copied, size);
copied, size);
copied = size; copied = size;
msg->msg_flags |= MSG_TRUNC; msg->msg_flags |= MSG_TRUNC;
} }
...@@ -1367,7 +1369,7 @@ static int irda_recvmsg_dgram(struct socket *sock, struct msghdr *msg, ...@@ -1367,7 +1369,7 @@ static int irda_recvmsg_dgram(struct socket *sock, struct msghdr *msg,
*/ */
if (self->rx_flow == FLOW_STOP) { if (self->rx_flow == FLOW_STOP) {
if ((atomic_read(&sk->rmem_alloc) << 2) <= sk->rcvbuf) { if ((atomic_read(&sk->rmem_alloc) << 2) <= sk->rcvbuf) {
IRDA_DEBUG(2, __FUNCTION__ "(), Starting IrTTP\n"); IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __FUNCTION__);
self->rx_flow = FLOW_START; self->rx_flow = FLOW_START;
irttp_flow_request(self->tsap, FLOW_START); irttp_flow_request(self->tsap, FLOW_START);
} }
...@@ -1389,7 +1391,7 @@ static int irda_recvmsg_stream(struct socket *sock, struct msghdr *msg, ...@@ -1389,7 +1391,7 @@ static int irda_recvmsg_stream(struct socket *sock, struct msghdr *msg,
int target = 1; int target = 1;
DECLARE_WAITQUEUE(waitq, current); DECLARE_WAITQUEUE(waitq, current);
IRDA_DEBUG(3, __FUNCTION__ "()\n"); IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
...@@ -1466,14 +1468,15 @@ static int irda_recvmsg_stream(struct socket *sock, struct msghdr *msg, ...@@ -1466,14 +1468,15 @@ static int irda_recvmsg_stream(struct socket *sock, struct msghdr *msg,
/* put the skb back if we didn't use it up.. */ /* put the skb back if we didn't use it up.. */
if (skb->len) { if (skb->len) {
IRDA_DEBUG(1, __FUNCTION__ "(), back on q!\n"); IRDA_DEBUG(1, "%s(), back on q!\n",
__FUNCTION__);
skb_queue_head(&sk->receive_queue, skb); skb_queue_head(&sk->receive_queue, skb);
break; break;
} }
kfree_skb(skb); kfree_skb(skb);
} else { } else {
IRDA_DEBUG(0, __FUNCTION__ "() questionable!?\n"); IRDA_DEBUG(0, "%s() questionable!?\n", __FUNCTION__);
/* put message back and return */ /* put message back and return */
skb_queue_head(&sk->receive_queue, skb); skb_queue_head(&sk->receive_queue, skb);
...@@ -1489,7 +1492,7 @@ static int irda_recvmsg_stream(struct socket *sock, struct msghdr *msg, ...@@ -1489,7 +1492,7 @@ static int irda_recvmsg_stream(struct socket *sock, struct msghdr *msg,
*/ */
if (self->rx_flow == FLOW_STOP) { if (self->rx_flow == FLOW_STOP) {
if ((atomic_read(&sk->rmem_alloc) << 2) <= sk->rcvbuf) { if ((atomic_read(&sk->rmem_alloc) << 2) <= sk->rcvbuf) {
IRDA_DEBUG(2, __FUNCTION__ "(), Starting IrTTP\n"); IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __FUNCTION__);
self->rx_flow = FLOW_START; self->rx_flow = FLOW_START;
irttp_flow_request(self->tsap, FLOW_START); irttp_flow_request(self->tsap, FLOW_START);
} }
...@@ -1514,7 +1517,7 @@ static int irda_sendmsg_dgram(struct socket *sock, struct msghdr *msg, ...@@ -1514,7 +1517,7 @@ static int irda_sendmsg_dgram(struct socket *sock, struct msghdr *msg,
unsigned char *asmptr; unsigned char *asmptr;
int err; int err;
IRDA_DEBUG(4, __FUNCTION__ "(), len=%d\n", len); IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__, len);
if (msg->msg_flags & ~MSG_DONTWAIT) if (msg->msg_flags & ~MSG_DONTWAIT)
return -EINVAL; return -EINVAL;
...@@ -1535,9 +1538,9 @@ static int irda_sendmsg_dgram(struct socket *sock, struct msghdr *msg, ...@@ -1535,9 +1538,9 @@ static int irda_sendmsg_dgram(struct socket *sock, struct msghdr *msg,
* service, so we have no fragmentation and no coalescence * service, so we have no fragmentation and no coalescence
*/ */
if (len > self->max_data_size) { if (len > self->max_data_size) {
IRDA_DEBUG(0, __FUNCTION__ "(), Warning to much data! " IRDA_DEBUG(0, "%s(), Warning to much data! "
"Chopping frame from %d to %d bytes!\n", len, "Chopping frame from %d to %d bytes!\n",
self->max_data_size); __FUNCTION__, len, self->max_data_size);
len = self->max_data_size; len = self->max_data_size;
} }
...@@ -1548,7 +1551,7 @@ static int irda_sendmsg_dgram(struct socket *sock, struct msghdr *msg, ...@@ -1548,7 +1551,7 @@ static int irda_sendmsg_dgram(struct socket *sock, struct msghdr *msg,
skb_reserve(skb, self->max_header_size); skb_reserve(skb, self->max_header_size);
IRDA_DEBUG(4, __FUNCTION__ "(), appending user data\n"); IRDA_DEBUG(4, "%s(), appending user data\n", __FUNCTION__);
asmptr = skb->h.raw = skb_put(skb, len); asmptr = skb->h.raw = skb_put(skb, len);
memcpy_fromiovec(asmptr, msg->msg_iov, len); memcpy_fromiovec(asmptr, msg->msg_iov, len);
...@@ -1558,7 +1561,7 @@ static int irda_sendmsg_dgram(struct socket *sock, struct msghdr *msg, ...@@ -1558,7 +1561,7 @@ static int irda_sendmsg_dgram(struct socket *sock, struct msghdr *msg,
*/ */
err = irttp_udata_request(self->tsap, skb); err = irttp_udata_request(self->tsap, skb);
if (err) { if (err) {
IRDA_DEBUG(0, __FUNCTION__ "(), err=%d\n", err); IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err);
return err; return err;
} }
return len; return len;
...@@ -1580,7 +1583,7 @@ static int irda_sendmsg_ultra(struct socket *sock, struct msghdr *msg, ...@@ -1580,7 +1583,7 @@ static int irda_sendmsg_ultra(struct socket *sock, struct msghdr *msg,
unsigned char *asmptr; unsigned char *asmptr;
int err; int err;
IRDA_DEBUG(4, __FUNCTION__ "(), len=%d\n", len); IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__, len);
if (msg->msg_flags & ~MSG_DONTWAIT) if (msg->msg_flags & ~MSG_DONTWAIT)
return -EINVAL; return -EINVAL;
...@@ -1598,9 +1601,9 @@ static int irda_sendmsg_ultra(struct socket *sock, struct msghdr *msg, ...@@ -1598,9 +1601,9 @@ static int irda_sendmsg_ultra(struct socket *sock, struct msghdr *msg,
* service, so we have no fragmentation and no coalescence * service, so we have no fragmentation and no coalescence
*/ */
if (len > self->max_data_size) { if (len > self->max_data_size) {
IRDA_DEBUG(0, __FUNCTION__ "(), Warning to much data! " IRDA_DEBUG(0, "%s(), Warning to much data! "
"Chopping frame from %d to %d bytes!\n", len, "Chopping frame from %d to %d bytes!\n",
self->max_data_size); __FUNCTION__, len, self->max_data_size);
len = self->max_data_size; len = self->max_data_size;
} }
...@@ -1611,13 +1614,13 @@ static int irda_sendmsg_ultra(struct socket *sock, struct msghdr *msg, ...@@ -1611,13 +1614,13 @@ static int irda_sendmsg_ultra(struct socket *sock, struct msghdr *msg,
skb_reserve(skb, self->max_header_size); skb_reserve(skb, self->max_header_size);
IRDA_DEBUG(4, __FUNCTION__ "(), appending user data\n"); IRDA_DEBUG(4, "%s(), appending user data\n", __FUNCTION__);
asmptr = skb->h.raw = skb_put(skb, len); asmptr = skb->h.raw = skb_put(skb, len);
memcpy_fromiovec(asmptr, msg->msg_iov, len); memcpy_fromiovec(asmptr, msg->msg_iov, len);
err = irlmp_connless_data_request(self->lsap, skb); err = irlmp_connless_data_request(self->lsap, skb);
if (err) { if (err) {
IRDA_DEBUG(0, __FUNCTION__ "(), err=%d\n", err); IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err);
return err; return err;
} }
return len; return len;
...@@ -1634,7 +1637,7 @@ static int irda_shutdown(struct socket *sock, int how) ...@@ -1634,7 +1637,7 @@ static int irda_shutdown(struct socket *sock, int how)
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
IRDA_DEBUG(1, __FUNCTION__ "(%p)\n", self); IRDA_DEBUG(1, "%s(%p)\n", __FUNCTION__, self);
sk->state = TCP_CLOSE; sk->state = TCP_CLOSE;
sk->shutdown |= SEND_SHUTDOWN; sk->shutdown |= SEND_SHUTDOWN;
...@@ -1669,7 +1672,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock, ...@@ -1669,7 +1672,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock,
struct irda_sock *self = irda_sk(sk); struct irda_sock *self = irda_sk(sk);
unsigned int mask; unsigned int mask;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
poll_wait(file, sk->sleep, wait); poll_wait(file, sk->sleep, wait);
mask = 0; mask = 0;
...@@ -1678,7 +1681,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock, ...@@ -1678,7 +1681,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock,
if (sk->err) if (sk->err)
mask |= POLLERR; mask |= POLLERR;
if (sk->shutdown & RCV_SHUTDOWN) { if (sk->shutdown & RCV_SHUTDOWN) {
IRDA_DEBUG(0, __FUNCTION__ "(), POLLHUP\n"); IRDA_DEBUG(0, "%s(), POLLHUP\n", __FUNCTION__);
mask |= POLLHUP; mask |= POLLHUP;
} }
...@@ -1692,7 +1695,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock, ...@@ -1692,7 +1695,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock,
switch (sk->type) { switch (sk->type) {
case SOCK_STREAM: case SOCK_STREAM:
if (sk->state == TCP_CLOSE) { if (sk->state == TCP_CLOSE) {
IRDA_DEBUG(0, __FUNCTION__ "(), POLLHUP\n"); IRDA_DEBUG(0, "%s(), POLLHUP\n", __FUNCTION__);
mask |= POLLHUP; mask |= POLLHUP;
} }
...@@ -1728,7 +1731,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -1728,7 +1731,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{ {
struct sock *sk = sock->sk; struct sock *sk = sock->sk;
IRDA_DEBUG(4, __FUNCTION__ "(), cmd=%#x\n", cmd); IRDA_DEBUG(4, "%s(), cmd=%#x\n", __FUNCTION__, cmd);
switch (cmd) { switch (cmd) {
case TIOCOUTQ: { case TIOCOUTQ: {
...@@ -1775,7 +1778,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) ...@@ -1775,7 +1778,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
case SIOCSIFMETRIC: case SIOCSIFMETRIC:
return -EINVAL; return -EINVAL;
default: default:
IRDA_DEBUG(1, __FUNCTION__ "(), doing device ioctl!\n"); IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __FUNCTION__);
return dev_ioctl(cmd, (void *) arg); return dev_ioctl(cmd, (void *) arg);
} }
...@@ -1801,7 +1804,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname, ...@@ -1801,7 +1804,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
IRDA_DEBUG(2, __FUNCTION__ "(%p)\n", self); IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
if (level != SOL_IRLMP) if (level != SOL_IRLMP)
return -ENOPROTOOPT; return -ENOPROTOOPT;
...@@ -1963,8 +1966,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname, ...@@ -1963,8 +1966,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
/* Check is the user space own the object */ /* Check is the user space own the object */
if(ias_attr->value->owner != IAS_USER_ATTR) { if(ias_attr->value->owner != IAS_USER_ATTR) {
IRDA_DEBUG(1, __FUNCTION__ IRDA_DEBUG(1, "%s(), attempting to delete a kernel attribute\n", __FUNCTION__);
"(), attempting to delete a kernel attribute\n");
kfree(ias_opt); kfree(ias_opt);
return -EPERM; return -EPERM;
} }
...@@ -1982,8 +1984,8 @@ static int irda_setsockopt(struct socket *sock, int level, int optname, ...@@ -1982,8 +1984,8 @@ static int irda_setsockopt(struct socket *sock, int level, int optname,
/* Only possible for a seqpacket service (TTP with SAR) */ /* Only possible for a seqpacket service (TTP with SAR) */
if (sk->type != SOCK_SEQPACKET) { if (sk->type != SOCK_SEQPACKET) {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s(), setting max_sdu_size = %d\n",
"(), setting max_sdu_size = %d\n", opt); __FUNCTION__, opt);
self->max_sdu_size_rx = opt; self->max_sdu_size_rx = opt;
} else { } else {
WARNING("%s: not allowed to set MAXSDUSIZE for this socket type!\n", WARNING("%s: not allowed to set MAXSDUSIZE for this socket type!\n",
...@@ -2099,7 +2101,7 @@ static int irda_getsockopt(struct socket *sock, int level, int optname, ...@@ -2099,7 +2101,7 @@ static int irda_getsockopt(struct socket *sock, int level, int optname,
int err; int err;
int offset, total; int offset, total;
IRDA_DEBUG(2, __FUNCTION__ "(%p)\n", self); IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self);
if (level != SOL_IRLMP) if (level != SOL_IRLMP)
return -ENOPROTOOPT; return -ENOPROTOOPT;
...@@ -2356,8 +2358,7 @@ static int irda_getsockopt(struct socket *sock, int level, int optname, ...@@ -2356,8 +2358,7 @@ static int irda_getsockopt(struct socket *sock, int level, int optname,
if (!self->cachediscovery) { if (!self->cachediscovery) {
int ret = 0; int ret = 0;
IRDA_DEBUG(1, __FUNCTION__ IRDA_DEBUG(1, "%s(), nothing discovered yet, going to sleep...\n", __FUNCTION__);
"(), nothing discovered yet, going to sleep...\n");
/* Set watchdog timer to expire in <val> ms. */ /* Set watchdog timer to expire in <val> ms. */
self->errno = 0; self->errno = 0;
...@@ -2375,15 +2376,14 @@ static int irda_getsockopt(struct socket *sock, int level, int optname, ...@@ -2375,15 +2376,14 @@ static int irda_getsockopt(struct socket *sock, int level, int optname,
if(timer_pending(&(self->watchdog))) if(timer_pending(&(self->watchdog)))
del_timer(&(self->watchdog)); del_timer(&(self->watchdog));
IRDA_DEBUG(1, __FUNCTION__ IRDA_DEBUG(1, "%s(), ...waking up !\n", __FUNCTION__);
"(), ...waking up !\n");
if (ret != 0) if (ret != 0)
return ret; return ret;
} }
else else
IRDA_DEBUG(1, __FUNCTION__ IRDA_DEBUG(1, "%s(), found immediately !\n",
"(), found immediately !\n"); __FUNCTION__);
/* Tell IrLMP that we have been notified */ /* Tell IrLMP that we have been notified */
irlmp_update_client(self->ckey, self->mask, NULL, NULL, NULL); irlmp_update_client(self->ckey, self->mask, NULL, NULL, NULL);
......
...@@ -108,7 +108,7 @@ void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log) ...@@ -108,7 +108,7 @@ void irlmp_add_discovery_log(hashbin_t *cachelog, hashbin_t *log)
{ {
discovery_t *discovery; discovery_t *discovery;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
/* /*
* If log is missing this means that IrLAP was unable to perform the * If log is missing this means that IrLAP was unable to perform the
...@@ -150,7 +150,7 @@ void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force) ...@@ -150,7 +150,7 @@ void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force)
discovery_t *discovery, *curr; discovery_t *discovery, *curr;
unsigned long flags; unsigned long flags;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
spin_lock_irqsave(&log->hb_spinlock, flags); spin_lock_irqsave(&log->hb_spinlock, flags);
......
...@@ -111,7 +111,7 @@ int __init irda_device_init( void) ...@@ -111,7 +111,7 @@ int __init irda_device_init( void)
void __exit irda_device_cleanup(void) void __exit irda_device_cleanup(void)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete); hashbin_delete(tasks, (FREE_FUNC) __irda_task_delete);
hashbin_delete(dongles, NULL); hashbin_delete(dongles, NULL);
...@@ -127,7 +127,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status) ...@@ -127,7 +127,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status)
{ {
struct irlap_cb *self; struct irlap_cb *self;
IRDA_DEBUG(4, __FUNCTION__ "(%s)\n", status ? "TRUE" : "FALSE"); IRDA_DEBUG(4, "%s(%s)\n", __FUNCTION__, status ? "TRUE" : "FALSE");
self = (struct irlap_cb *) dev->atalk_ptr; self = (struct irlap_cb *) dev->atalk_ptr;
...@@ -152,7 +152,7 @@ int irda_device_set_dtr_rts(struct net_device *dev, int dtr, int rts) ...@@ -152,7 +152,7 @@ int irda_device_set_dtr_rts(struct net_device *dev, int dtr, int rts)
struct if_irda_req req; struct if_irda_req req;
int ret; int ret;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
if (!dev->do_ioctl) { if (!dev->do_ioctl) {
ERROR("%s: do_ioctl not impl. by device driver\n", ERROR("%s: do_ioctl not impl. by device driver\n",
...@@ -173,7 +173,7 @@ int irda_device_change_speed(struct net_device *dev, __u32 speed) ...@@ -173,7 +173,7 @@ int irda_device_change_speed(struct net_device *dev, __u32 speed)
struct if_irda_req req; struct if_irda_req req;
int ret; int ret;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
if (!dev->do_ioctl) { if (!dev->do_ioctl) {
ERROR("%s: do_ioctl not impl. by device driver\n", ERROR("%s: do_ioctl not impl. by device driver\n",
...@@ -199,7 +199,7 @@ int irda_device_is_receiving(struct net_device *dev) ...@@ -199,7 +199,7 @@ int irda_device_is_receiving(struct net_device *dev)
struct if_irda_req req; struct if_irda_req req;
int ret; int ret;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
if (!dev->do_ioctl) { if (!dev->do_ioctl) {
ERROR("%s: do_ioctl not impl. by device driver\n", ERROR("%s: do_ioctl not impl. by device driver\n",
...@@ -216,7 +216,7 @@ int irda_device_is_receiving(struct net_device *dev) ...@@ -216,7 +216,7 @@ int irda_device_is_receiving(struct net_device *dev)
void irda_task_next_state(struct irda_task *task, IRDA_TASK_STATE state) void irda_task_next_state(struct irda_task *task, IRDA_TASK_STATE state)
{ {
IRDA_DEBUG(2, __FUNCTION__ "(), state = %s\n", task_state[state]); IRDA_DEBUG(2, "%s(), state = %s\n", __FUNCTION__, task_state[state]);
task->state = state; task->state = state;
} }
...@@ -250,7 +250,7 @@ int irda_task_kick(struct irda_task *task) ...@@ -250,7 +250,7 @@ int irda_task_kick(struct irda_task *task)
int count = 0; int count = 0;
int timeout; int timeout;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(task != NULL, return -1;); ASSERT(task != NULL, return -1;);
ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;); ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;);
...@@ -298,8 +298,8 @@ int irda_task_kick(struct irda_task *task) ...@@ -298,8 +298,8 @@ int irda_task_kick(struct irda_task *task)
irda_task_timer_expired); irda_task_timer_expired);
finished = FALSE; finished = FALSE;
} else { } else {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0, "%s(), not finished, and no timeout!\n",
"(), not finished, and no timeout!\n"); __FUNCTION__);
finished = FALSE; finished = FALSE;
} }
...@@ -328,7 +328,7 @@ struct irda_task *irda_task_execute(void *instance, ...@@ -328,7 +328,7 @@ struct irda_task *irda_task_execute(void *instance,
struct irda_task *task; struct irda_task *task;
int ret; int ret;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
task = kmalloc(sizeof(struct irda_task), GFP_ATOMIC); task = kmalloc(sizeof(struct irda_task), GFP_ATOMIC);
if (!task) if (!task)
...@@ -365,7 +365,7 @@ static void irda_task_timer_expired(void *data) ...@@ -365,7 +365,7 @@ static void irda_task_timer_expired(void *data)
{ {
struct irda_task *task; struct irda_task *task;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
task = (struct irda_task *) data; task = (struct irda_task *) data;
...@@ -517,7 +517,7 @@ int irda_device_set_mode(struct net_device* dev, int mode) ...@@ -517,7 +517,7 @@ int irda_device_set_mode(struct net_device* dev, int mode)
struct if_irda_req req; struct if_irda_req req;
int ret; int ret;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
if (!dev->do_ioctl) { if (!dev->do_ioctl) {
ERROR("%s: set_raw_mode not impl. by device driver\n", ERROR("%s: set_raw_mode not impl. by device driver\n",
......
...@@ -128,7 +128,7 @@ int __init iriap_init(void) ...@@ -128,7 +128,7 @@ int __init iriap_init(void)
*/ */
server = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); server = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL);
if (!server) { if (!server) {
IRDA_DEBUG(0, __FUNCTION__ "(), unable to open server\n"); IRDA_DEBUG(0, "%s(), unable to open server\n", __FUNCTION__);
return -1; return -1;
} }
iriap_register_lsap(server, LSAP_IAS, IAS_SERVER); iriap_register_lsap(server, LSAP_IAS, IAS_SERVER);
...@@ -160,7 +160,7 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv, ...@@ -160,7 +160,7 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv,
{ {
struct iriap_cb *self; struct iriap_cb *self;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
self = kmalloc(sizeof(struct iriap_cb), GFP_ATOMIC); self = kmalloc(sizeof(struct iriap_cb), GFP_ATOMIC);
if (!self) { if (!self) {
...@@ -202,7 +202,7 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv, ...@@ -202,7 +202,7 @@ struct iriap_cb *iriap_open(__u8 slsap_sel, int mode, void *priv,
*/ */
static void __iriap_close(struct iriap_cb *self) static void __iriap_close(struct iriap_cb *self)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IAS_MAGIC, return;); ASSERT(self->magic == IAS_MAGIC, return;);
...@@ -226,7 +226,7 @@ void iriap_close(struct iriap_cb *self) ...@@ -226,7 +226,7 @@ void iriap_close(struct iriap_cb *self)
{ {
struct iriap_cb *entry; struct iriap_cb *entry;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IAS_MAGIC, return;); ASSERT(self->magic == IAS_MAGIC, return;);
...@@ -246,7 +246,7 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode) ...@@ -246,7 +246,7 @@ static int iriap_register_lsap(struct iriap_cb *self, __u8 slsap_sel, int mode)
{ {
notify_t notify; notify_t notify;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
irda_notify_init(&notify); irda_notify_init(&notify);
notify.connect_confirm = iriap_connect_confirm; notify.connect_confirm = iriap_connect_confirm;
...@@ -281,7 +281,7 @@ static void iriap_disconnect_indication(void *instance, void *sap, ...@@ -281,7 +281,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
{ {
struct iriap_cb *self; struct iriap_cb *self;
IRDA_DEBUG(4, __FUNCTION__ "(), reason=%s\n", lmp_reasons[reason]); IRDA_DEBUG(4, "%s(), reason=%s\n", __FUNCTION__, lmp_reasons[reason]);
self = (struct iriap_cb *) instance; self = (struct iriap_cb *) instance;
...@@ -293,7 +293,7 @@ static void iriap_disconnect_indication(void *instance, void *sap, ...@@ -293,7 +293,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
del_timer(&self->watchdog_timer); del_timer(&self->watchdog_timer);
if (self->mode == IAS_CLIENT) { if (self->mode == IAS_CLIENT) {
IRDA_DEBUG(4, __FUNCTION__ "(), disconnect as client\n"); IRDA_DEBUG(4, "%s(), disconnect as client\n", __FUNCTION__);
iriap_do_client_event(self, IAP_LM_DISCONNECT_INDICATION, iriap_do_client_event(self, IAP_LM_DISCONNECT_INDICATION,
...@@ -306,7 +306,7 @@ static void iriap_disconnect_indication(void *instance, void *sap, ...@@ -306,7 +306,7 @@ static void iriap_disconnect_indication(void *instance, void *sap,
if (self->confirm) if (self->confirm)
self->confirm(IAS_DISCONNECT, 0, NULL, self->priv); self->confirm(IAS_DISCONNECT, 0, NULL, self->priv);
} else { } else {
IRDA_DEBUG(4, __FUNCTION__ "(), disconnect as server\n"); IRDA_DEBUG(4, "%s(), disconnect as server\n", __FUNCTION__);
iriap_do_server_event(self, IAP_LM_DISCONNECT_INDICATION, iriap_do_server_event(self, IAP_LM_DISCONNECT_INDICATION,
NULL); NULL);
iriap_close(self); iriap_close(self);
...@@ -323,15 +323,15 @@ void iriap_disconnect_request(struct iriap_cb *self) ...@@ -323,15 +323,15 @@ void iriap_disconnect_request(struct iriap_cb *self)
{ {
struct sk_buff *skb; struct sk_buff *skb;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IAS_MAGIC, return;); ASSERT(self->magic == IAS_MAGIC, return;);
skb = dev_alloc_skb(64); skb = dev_alloc_skb(64);
if (skb == NULL) { if (skb == NULL) {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0, "%s(), Could not allocate an sk_buff of length %d\n",
"(), Could not allocate an sk_buff of length %d\n", 64); __FUNCTION__, 64);
return; return;
} }
...@@ -345,27 +345,27 @@ void iriap_disconnect_request(struct iriap_cb *self) ...@@ -345,27 +345,27 @@ void iriap_disconnect_request(struct iriap_cb *self)
void iriap_getinfobasedetails_request(void) void iriap_getinfobasedetails_request(void)
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), Not implemented!\n"); IRDA_DEBUG(0, "%s(), Not implemented!\n", __FUNCTION__);
} }
void iriap_getinfobasedetails_confirm(void) void iriap_getinfobasedetails_confirm(void)
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), Not implemented!\n"); IRDA_DEBUG(0, "%s(), Not implemented!\n", __FUNCTION__);
} }
void iriap_getobjects_request(void) void iriap_getobjects_request(void)
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), Not implemented!\n"); IRDA_DEBUG(0, "%s(), Not implemented!\n", __FUNCTION__);
} }
void iriap_getobjects_confirm(void) void iriap_getobjects_confirm(void)
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), Not implemented!\n"); IRDA_DEBUG(0, "%s(), Not implemented!\n", __FUNCTION__);
} }
void iriap_getvalue(void) void iriap_getvalue(void)
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), Not implemented!\n"); IRDA_DEBUG(0, "%s(), Not implemented!\n", __FUNCTION__);
} }
/* /*
...@@ -455,13 +455,13 @@ void iriap_getvaluebyclass_confirm(struct iriap_cb *self, struct sk_buff *skb) ...@@ -455,13 +455,13 @@ void iriap_getvaluebyclass_confirm(struct iriap_cb *self, struct sk_buff *skb)
/* Get length, MSB first */ /* Get length, MSB first */
len = be16_to_cpu(get_unaligned((__u16 *)(fp+n))); n += 2; len = be16_to_cpu(get_unaligned((__u16 *)(fp+n))); n += 2;
IRDA_DEBUG(4, __FUNCTION__ "(), len=%d\n", len); IRDA_DEBUG(4, "%s(), len=%d\n", __FUNCTION__, len);
/* Get object ID, MSB first */ /* Get object ID, MSB first */
obj_id = be16_to_cpu(get_unaligned((__u16 *)(fp+n))); n += 2; obj_id = be16_to_cpu(get_unaligned((__u16 *)(fp+n))); n += 2;
type = fp[n++]; type = fp[n++];
IRDA_DEBUG(4, __FUNCTION__ "(), Value type = %d\n", type); IRDA_DEBUG(4, "%s(), Value type = %d\n", __FUNCTION__, type);
switch (type) { switch (type) {
case IAS_INTEGER: case IAS_INTEGER:
...@@ -470,7 +470,7 @@ void iriap_getvaluebyclass_confirm(struct iriap_cb *self, struct sk_buff *skb) ...@@ -470,7 +470,7 @@ void iriap_getvaluebyclass_confirm(struct iriap_cb *self, struct sk_buff *skb)
value = irias_new_integer_value(tmp_cpu32); value = irias_new_integer_value(tmp_cpu32);
/* Legal values restricted to 0x01-0x6f, page 15 irttp */ /* Legal values restricted to 0x01-0x6f, page 15 irttp */
IRDA_DEBUG(4, __FUNCTION__ "(), lsap=%d\n", value->t.integer); IRDA_DEBUG(4, "%s(), lsap=%d\n", __FUNCTION__, value->t.integer);
break; break;
case IAS_STRING: case IAS_STRING:
charset = fp[n++]; charset = fp[n++];
...@@ -489,9 +489,8 @@ void iriap_getvaluebyclass_confirm(struct iriap_cb *self, struct sk_buff *skb) ...@@ -489,9 +489,8 @@ void iriap_getvaluebyclass_confirm(struct iriap_cb *self, struct sk_buff *skb)
/* case CS_ISO_8859_9: */ /* case CS_ISO_8859_9: */
/* case CS_UNICODE: */ /* case CS_UNICODE: */
default: default:
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0, "%s(), charset %s, not supported\n",
"(), charset %s, not supported\n", __FUNCTION__, ias_charset_types[charset]);
ias_charset_types[charset]);
/* Aborting, close connection! */ /* Aborting, close connection! */
iriap_disconnect_request(self); iriap_disconnect_request(self);
...@@ -500,7 +499,7 @@ void iriap_getvaluebyclass_confirm(struct iriap_cb *self, struct sk_buff *skb) ...@@ -500,7 +499,7 @@ void iriap_getvaluebyclass_confirm(struct iriap_cb *self, struct sk_buff *skb)
/* break; */ /* break; */
} }
value_len = fp[n++]; value_len = fp[n++];
IRDA_DEBUG(4, __FUNCTION__ "(), strlen=%d\n", value_len); IRDA_DEBUG(4, "%s(), strlen=%d\n", __FUNCTION__, value_len);
/* Make sure the string is null-terminated */ /* Make sure the string is null-terminated */
fp[n+value_len] = 0x00; fp[n+value_len] = 0x00;
...@@ -530,7 +529,7 @@ void iriap_getvaluebyclass_confirm(struct iriap_cb *self, struct sk_buff *skb) ...@@ -530,7 +529,7 @@ void iriap_getvaluebyclass_confirm(struct iriap_cb *self, struct sk_buff *skb)
if (self->confirm) if (self->confirm)
self->confirm(IAS_SUCCESS, obj_id, value, self->priv); self->confirm(IAS_SUCCESS, obj_id, value, self->priv);
else { else {
IRDA_DEBUG(0, __FUNCTION__ "(), missing handler!\n"); IRDA_DEBUG(0, "%s(), missing handler!\n", __FUNCTION__);
irias_delete_value(value); irias_delete_value(value);
} }
dev_kfree_skb(skb); dev_kfree_skb(skb);
...@@ -550,7 +549,7 @@ void iriap_getvaluebyclass_response(struct iriap_cb *self, __u16 obj_id, ...@@ -550,7 +549,7 @@ void iriap_getvaluebyclass_response(struct iriap_cb *self, __u16 obj_id,
__u32 tmp_be32, tmp_be16; __u32 tmp_be32, tmp_be16;
__u8 *fp; __u8 *fp;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IAS_MAGIC, return;); ASSERT(self->magic == IAS_MAGIC, return;);
...@@ -611,12 +610,12 @@ void iriap_getvaluebyclass_response(struct iriap_cb *self, __u16 obj_id, ...@@ -611,12 +610,12 @@ void iriap_getvaluebyclass_response(struct iriap_cb *self, __u16 obj_id,
memcpy(fp+n, value->t.oct_seq, value->len); n+=value->len; memcpy(fp+n, value->t.oct_seq, value->len); n+=value->len;
break; break;
case IAS_MISSING: case IAS_MISSING:
IRDA_DEBUG( 3, __FUNCTION__ ": sending IAS_MISSING\n"); IRDA_DEBUG( 3, "%s: sending IAS_MISSING\n", __FUNCTION__);
skb_put(skb, 1); skb_put(skb, 1);
fp[n++] = value->type; fp[n++] = value->type;
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), type not implemented!\n"); IRDA_DEBUG(0, "%s(), type not implemented!\n", __FUNCTION__);
break; break;
} }
iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, skb); iriap_do_r_connect_event(self, IAP_CALL_RESPONSE, skb);
...@@ -640,7 +639,7 @@ void iriap_getvaluebyclass_indication(struct iriap_cb *self, ...@@ -640,7 +639,7 @@ void iriap_getvaluebyclass_indication(struct iriap_cb *self,
__u8 *fp; __u8 *fp;
int n; int n;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IAS_MAGIC, return;); ASSERT(self->magic == IAS_MAGIC, return;);
...@@ -697,7 +696,7 @@ void iriap_send_ack(struct iriap_cb *self) ...@@ -697,7 +696,7 @@ void iriap_send_ack(struct iriap_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IAS_MAGIC, return;); ASSERT(self->magic == IAS_MAGIC, return;);
...@@ -728,7 +727,7 @@ void iriap_connect_request(struct iriap_cb *self) ...@@ -728,7 +727,7 @@ void iriap_connect_request(struct iriap_cb *self)
self->saddr, self->daddr, self->saddr, self->daddr,
NULL, NULL); NULL, NULL);
if (ret < 0) { if (ret < 0) {
IRDA_DEBUG(0, __FUNCTION__ "(), connect failed!\n"); IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__);
self->confirm(IAS_DISCONNECT, 0, NULL, self->priv); self->confirm(IAS_DISCONNECT, 0, NULL, self->priv);
} }
} }
...@@ -773,7 +772,7 @@ static void iriap_connect_indication(void *instance, void *sap, ...@@ -773,7 +772,7 @@ static void iriap_connect_indication(void *instance, void *sap,
{ {
struct iriap_cb *self, *new; struct iriap_cb *self, *new;
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
self = (struct iriap_cb *) instance; self = (struct iriap_cb *) instance;
...@@ -783,7 +782,7 @@ static void iriap_connect_indication(void *instance, void *sap, ...@@ -783,7 +782,7 @@ static void iriap_connect_indication(void *instance, void *sap,
/* Start new server */ /* Start new server */
new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL); new = iriap_open(LSAP_IAS, IAS_SERVER, NULL, NULL);
if (!new) { if (!new) {
IRDA_DEBUG(0, __FUNCTION__ "(), open failed\n"); IRDA_DEBUG(0, "%s(), open failed\n", __FUNCTION__);
dev_kfree_skb(userdata); dev_kfree_skb(userdata);
return; return;
} }
...@@ -791,7 +790,7 @@ static void iriap_connect_indication(void *instance, void *sap, ...@@ -791,7 +790,7 @@ static void iriap_connect_indication(void *instance, void *sap,
/* Now attach up the new "socket" */ /* Now attach up the new "socket" */
new->lsap = irlmp_dup(self->lsap, new); new->lsap = irlmp_dup(self->lsap, new);
if (!new->lsap) { if (!new->lsap) {
IRDA_DEBUG(0, __FUNCTION__ "(), dup failed!\n"); IRDA_DEBUG(0, "%s(), dup failed!\n", __FUNCTION__);
return; return;
} }
...@@ -817,7 +816,7 @@ static int iriap_data_indication(void *instance, void *sap, ...@@ -817,7 +816,7 @@ static int iriap_data_indication(void *instance, void *sap,
__u8 *frame; __u8 *frame;
__u8 opcode; __u8 opcode;
IRDA_DEBUG(3, __FUNCTION__ "()\n"); IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
self = (struct iriap_cb *) instance; self = (struct iriap_cb *) instance;
...@@ -830,7 +829,7 @@ static int iriap_data_indication(void *instance, void *sap, ...@@ -830,7 +829,7 @@ static int iriap_data_indication(void *instance, void *sap,
if (self->mode == IAS_SERVER) { if (self->mode == IAS_SERVER) {
/* Call server */ /* Call server */
IRDA_DEBUG(4, __FUNCTION__ "(), Calling server!\n"); IRDA_DEBUG(4, "%s(), Calling server!\n", __FUNCTION__);
iriap_do_r_connect_event(self, IAP_RECV_F_LST, skb); iriap_do_r_connect_event(self, IAP_RECV_F_LST, skb);
return 0; return 0;
...@@ -845,7 +844,7 @@ static int iriap_data_indication(void *instance, void *sap, ...@@ -845,7 +844,7 @@ static int iriap_data_indication(void *instance, void *sap,
/* Check for ack frames since they don't contain any data */ /* Check for ack frames since they don't contain any data */
if (opcode & IAP_ACK) { if (opcode & IAP_ACK) {
IRDA_DEBUG(0, __FUNCTION__ "() Got ack frame!\n"); IRDA_DEBUG(0, "%s() Got ack frame!\n", __FUNCTION__);
dev_kfree_skb(skb); dev_kfree_skb(skb);
return 0; return 0;
} }
...@@ -865,7 +864,7 @@ static int iriap_data_indication(void *instance, void *sap, ...@@ -865,7 +864,7 @@ static int iriap_data_indication(void *instance, void *sap,
iriap_getvaluebyclass_confirm(self, skb); iriap_getvaluebyclass_confirm(self, skb);
break; break;
case IAS_CLASS_UNKNOWN: case IAS_CLASS_UNKNOWN:
IRDA_DEBUG(1, __FUNCTION__ "(), No such class!\n"); IRDA_DEBUG(1, "%s(), No such class!\n", __FUNCTION__);
/* Finished, close connection! */ /* Finished, close connection! */
iriap_disconnect_request(self); iriap_disconnect_request(self);
...@@ -879,7 +878,7 @@ static int iriap_data_indication(void *instance, void *sap, ...@@ -879,7 +878,7 @@ static int iriap_data_indication(void *instance, void *sap,
dev_kfree_skb(skb); dev_kfree_skb(skb);
break; break;
case IAS_ATTRIB_UNKNOWN: case IAS_ATTRIB_UNKNOWN:
IRDA_DEBUG(1, __FUNCTION__ "(), No such attribute!\n"); IRDA_DEBUG(1, "%s(), No such attribute!\n", __FUNCTION__);
/* Finished, close connection! */ /* Finished, close connection! */
iriap_disconnect_request(self); iriap_disconnect_request(self);
...@@ -895,7 +894,7 @@ static int iriap_data_indication(void *instance, void *sap, ...@@ -895,7 +894,7 @@ static int iriap_data_indication(void *instance, void *sap,
} }
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown op-code: %02x\n", IRDA_DEBUG(0, "%s(), Unknown op-code: %02x\n", __FUNCTION__,
opcode); opcode);
dev_kfree_skb(skb); dev_kfree_skb(skb);
break; break;
...@@ -914,7 +913,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb) ...@@ -914,7 +913,7 @@ void iriap_call_indication(struct iriap_cb *self, struct sk_buff *skb)
__u8 *fp; __u8 *fp;
__u8 opcode; __u8 opcode;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == IAS_MAGIC, return;); ASSERT(self->magic == IAS_MAGIC, return;);
...@@ -1021,8 +1020,8 @@ int irias_proc_read(char *buf, char **start, off_t offset, int len) ...@@ -1021,8 +1020,8 @@ int irias_proc_read(char *buf, char **start, off_t offset, int len)
len += sprintf(buf+len, "missing\n"); len += sprintf(buf+len, "missing\n");
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0, "%s(), Unknown value type!\n",
"(), Unknown value type!\n"); __FUNCTION__);
return -1; return -1;
} }
len += sprintf(buf+len, "\n"); len += sprintf(buf+len, "\n");
......
...@@ -181,7 +181,7 @@ static void state_s_disconnect(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -181,7 +181,7 @@ static void state_s_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
case IAP_LM_DISCONNECT_INDICATION: case IAP_LM_DISCONNECT_INDICATION:
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__"(), Unknown event %d\n", event); IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
break; break;
} }
} }
...@@ -213,7 +213,7 @@ static void state_s_connecting(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -213,7 +213,7 @@ static void state_s_connecting(struct iriap_cb *self, IRIAP_EVENT event,
iriap_next_client_state(self, S_DISCONNECT); iriap_next_client_state(self, S_DISCONNECT);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
break; break;
} }
} }
...@@ -262,7 +262,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -262,7 +262,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event,
iriap_next_call_state(self, S_OUTSTANDING); iriap_next_call_state(self, S_OUTSTANDING);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
break; break;
...@@ -278,7 +278,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -278,7 +278,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event,
static void state_s_calling(struct iriap_cb *self, IRIAP_EVENT event, static void state_s_calling(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), Not implemented\n"); IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
} }
/* /*
...@@ -300,7 +300,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -300,7 +300,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event,
iriap_next_call_state(self, S_WAIT_FOR_CALL); iriap_next_call_state(self, S_WAIT_FOR_CALL);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
break; break;
} }
} }
...@@ -313,7 +313,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -313,7 +313,7 @@ static void state_s_outstanding(struct iriap_cb *self, IRIAP_EVENT event,
static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event, static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), Not implemented\n"); IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
} }
/* /*
...@@ -325,7 +325,7 @@ static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -325,7 +325,7 @@ static void state_s_replying(struct iriap_cb *self, IRIAP_EVENT event,
static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event, static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), Not implemented\n"); IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
} }
...@@ -338,7 +338,7 @@ static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -338,7 +338,7 @@ static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event,
static void state_s_wait_active(struct iriap_cb *self, IRIAP_EVENT event, static void state_s_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), Not implemented\n"); IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
} }
/************************************************************************** /**************************************************************************
...@@ -385,7 +385,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -385,7 +385,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), unknown event %d\n", event); IRDA_DEBUG(0, "%s(), unknown event %d\n", __FUNCTION__, event);
break; break;
} }
} }
...@@ -396,7 +396,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -396,7 +396,7 @@ static void state_r_disconnect(struct iriap_cb *self, IRIAP_EVENT event,
static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event, static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
switch (event) { switch (event) {
case IAP_LM_DISCONNECT_INDICATION: case IAP_LM_DISCONNECT_INDICATION:
...@@ -405,7 +405,7 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -405,7 +405,7 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
iriap_next_r_connect_state(self, R_WAITING); iriap_next_r_connect_state(self, R_WAITING);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), unknown event!\n"); IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__);
break; break;
} }
} }
...@@ -420,13 +420,13 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -420,13 +420,13 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
static void state_r_waiting(struct iriap_cb *self, IRIAP_EVENT event, static void state_r_waiting(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), Not implemented\n"); IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
} }
static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event, static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), Not implemented\n"); IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
} }
/* /*
...@@ -438,7 +438,7 @@ static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -438,7 +438,7 @@ static void state_r_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event, static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
switch (event) { switch (event) {
case IAP_RECV_F_LST: case IAP_RECV_F_LST:
...@@ -447,7 +447,7 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -447,7 +447,7 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
iriap_call_indication(self, skb); iriap_call_indication(self, skb);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), unknown event!\n"); IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__);
break; break;
} }
...@@ -462,12 +462,12 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -462,12 +462,12 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event, static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(skb != NULL, return;); ASSERT(skb != NULL, return;);
if (!self || self->magic != IAS_MAGIC) { if (!self || self->magic != IAS_MAGIC) {
IRDA_DEBUG(0, __FUNCTION__ "(), bad pointer self\n"); IRDA_DEBUG(0, "%s(), bad pointer self\n", __FUNCTION__);
return; return;
} }
...@@ -482,7 +482,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -482,7 +482,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
irlmp_data_request(self->lsap, skb); irlmp_data_request(self->lsap, skb);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), unknown event!\n"); IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__);
break; break;
} }
} }
...@@ -490,7 +490,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event, ...@@ -490,7 +490,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
static void state_r_returning(struct iriap_cb *self, IRIAP_EVENT event, static void state_r_returning(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), event=%d\n", event); IRDA_DEBUG(0, "%s(), event=%d\n", __FUNCTION__, event);
switch (event) { switch (event) {
case IAP_RECV_F_LST: case IAP_RECV_F_LST:
......
...@@ -79,12 +79,13 @@ struct ias_object *irias_new_object( char *name, int id) ...@@ -79,12 +79,13 @@ struct ias_object *irias_new_object( char *name, int id)
{ {
struct ias_object *obj; struct ias_object *obj;
IRDA_DEBUG( 4, __FUNCTION__ "()\n"); IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
obj = (struct ias_object *) kmalloc(sizeof(struct ias_object), obj = (struct ias_object *) kmalloc(sizeof(struct ias_object),
GFP_ATOMIC); GFP_ATOMIC);
if (obj == NULL) { if (obj == NULL) {
IRDA_DEBUG(0, __FUNCTION__ "(), Unable to allocate object!\n"); IRDA_DEBUG(0, "%s(), Unable to allocate object!\n",
__FUNCTION__);
return NULL; return NULL;
} }
memset(obj, 0, sizeof( struct ias_object)); memset(obj, 0, sizeof( struct ias_object));
...@@ -295,8 +296,8 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name, ...@@ -295,8 +296,8 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
} }
if ( attrib->value->type != new_value->type) { if ( attrib->value->type != new_value->type) {
IRDA_DEBUG( 0, __FUNCTION__ IRDA_DEBUG( 0, "%s(), changing value type not allowed!\n",
"(), changing value type not allowed!\n"); __FUNCTION__);
spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags); spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
return -1; return -1;
} }
...@@ -521,7 +522,7 @@ struct ias_value *irias_new_missing_value(void) ...@@ -521,7 +522,7 @@ struct ias_value *irias_new_missing_value(void)
*/ */
void irias_delete_value(struct ias_value *value) void irias_delete_value(struct ias_value *value)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(value != NULL, return;); ASSERT(value != NULL, return;);
...@@ -541,7 +542,7 @@ void irias_delete_value(struct ias_value *value) ...@@ -541,7 +542,7 @@ void irias_delete_value(struct ias_value *value)
kfree(value->t.oct_seq); kfree(value->t.oct_seq);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown value type!\n"); IRDA_DEBUG(0, "%s(), Unknown value type!\n", __FUNCTION__);
break; break;
} }
kfree(value); kfree(value);
......
...@@ -107,7 +107,7 @@ struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos, ...@@ -107,7 +107,7 @@ struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
{ {
struct irlap_cb *self; struct irlap_cb *self;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
/* Initialize the irlap structure. */ /* Initialize the irlap structure. */
self = kmalloc(sizeof(struct irlap_cb), GFP_KERNEL); self = kmalloc(sizeof(struct irlap_cb), GFP_KERNEL);
...@@ -210,7 +210,7 @@ void irlap_close(struct irlap_cb *self) ...@@ -210,7 +210,7 @@ void irlap_close(struct irlap_cb *self)
{ {
struct irlap_cb *lap; struct irlap_cb *lap;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -223,7 +223,7 @@ void irlap_close(struct irlap_cb *self) ...@@ -223,7 +223,7 @@ void irlap_close(struct irlap_cb *self)
/* Be sure that we manage to remove ourself from the hash */ /* Be sure that we manage to remove ourself from the hash */
lap = hashbin_remove(irlap, self->saddr, NULL); lap = hashbin_remove(irlap, self->saddr, NULL);
if (!lap) { if (!lap) {
IRDA_DEBUG(1, __FUNCTION__ "(), Didn't find myself!\n"); IRDA_DEBUG(1, "%s(), Didn't find myself!\n", __FUNCTION__);
return; return;
} }
__irlap_close(lap); __irlap_close(lap);
...@@ -237,7 +237,7 @@ void irlap_close(struct irlap_cb *self) ...@@ -237,7 +237,7 @@ void irlap_close(struct irlap_cb *self)
*/ */
void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb) void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -257,7 +257,7 @@ void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb) ...@@ -257,7 +257,7 @@ void irlap_connect_indication(struct irlap_cb *self, struct sk_buff *skb)
*/ */
void irlap_connect_response(struct irlap_cb *self, struct sk_buff *skb) void irlap_connect_response(struct irlap_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
irlap_do_event(self, CONNECT_RESPONSE, skb, NULL); irlap_do_event(self, CONNECT_RESPONSE, skb, NULL);
kfree_skb(skb); kfree_skb(skb);
...@@ -273,7 +273,7 @@ void irlap_connect_response(struct irlap_cb *self, struct sk_buff *skb) ...@@ -273,7 +273,7 @@ void irlap_connect_response(struct irlap_cb *self, struct sk_buff *skb)
void irlap_connect_request(struct irlap_cb *self, __u32 daddr, void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
struct qos_info *qos_user, int sniff) struct qos_info *qos_user, int sniff)
{ {
IRDA_DEBUG(3, __FUNCTION__ "(), daddr=0x%08x\n", daddr); IRDA_DEBUG(3, "%s(), daddr=0x%08x\n", __FUNCTION__, daddr);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -300,7 +300,7 @@ void irlap_connect_request(struct irlap_cb *self, __u32 daddr, ...@@ -300,7 +300,7 @@ void irlap_connect_request(struct irlap_cb *self, __u32 daddr,
*/ */
void irlap_connect_confirm(struct irlap_cb *self, struct sk_buff *skb) void irlap_connect_confirm(struct irlap_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -339,7 +339,7 @@ void irlap_data_request(struct irlap_cb *self, struct sk_buff *skb, ...@@ -339,7 +339,7 @@ void irlap_data_request(struct irlap_cb *self, struct sk_buff *skb,
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
IRDA_DEBUG(3, __FUNCTION__ "()\n"); IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER),
return;); return;);
...@@ -383,7 +383,7 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb) ...@@ -383,7 +383,7 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb)
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
IRDA_DEBUG(3, __FUNCTION__ "()\n"); IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER), ASSERT(skb_headroom(skb) >= (LAP_ADDR_HEADER+LAP_CTRL_HEADER),
return;); return;);
...@@ -407,7 +407,7 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb) ...@@ -407,7 +407,7 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb)
#ifdef CONFIG_IRDA_ULTRA #ifdef CONFIG_IRDA_ULTRA
void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb) void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -428,7 +428,7 @@ void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb) ...@@ -428,7 +428,7 @@ void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb)
*/ */
void irlap_disconnect_request(struct irlap_cb *self) void irlap_disconnect_request(struct irlap_cb *self)
{ {
IRDA_DEBUG(3, __FUNCTION__ "()\n"); IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -450,7 +450,7 @@ void irlap_disconnect_request(struct irlap_cb *self) ...@@ -450,7 +450,7 @@ void irlap_disconnect_request(struct irlap_cb *self)
irlap_do_event(self, DISCONNECT_REQUEST, NULL, NULL); irlap_do_event(self, DISCONNECT_REQUEST, NULL, NULL);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), disconnect pending!\n"); IRDA_DEBUG(2, "%s(), disconnect pending!\n", __FUNCTION__);
self->disconnect_pending = TRUE; self->disconnect_pending = TRUE;
break; break;
} }
...@@ -464,7 +464,7 @@ void irlap_disconnect_request(struct irlap_cb *self) ...@@ -464,7 +464,7 @@ void irlap_disconnect_request(struct irlap_cb *self)
*/ */
void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason) void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
{ {
IRDA_DEBUG(1, __FUNCTION__ "(), reason=%s\n", lap_reasons[reason]); IRDA_DEBUG(1, "%s(), reason=%s\n", __FUNCTION__, lap_reasons[reason]);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -474,7 +474,7 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason) ...@@ -474,7 +474,7 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
switch (reason) { switch (reason) {
case LAP_RESET_INDICATION: case LAP_RESET_INDICATION:
IRDA_DEBUG(1, __FUNCTION__ "(), Sending reset request!\n"); IRDA_DEBUG(1, "%s(), Sending reset request!\n", __FUNCTION__);
irlap_do_event(self, RESET_REQUEST, NULL, NULL); irlap_do_event(self, RESET_REQUEST, NULL, NULL);
break; break;
case LAP_NO_RESPONSE: /* FALLTROUGH */ case LAP_NO_RESPONSE: /* FALLTROUGH */
...@@ -503,7 +503,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery) ...@@ -503,7 +503,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
ASSERT(discovery != NULL, return;); ASSERT(discovery != NULL, return;);
IRDA_DEBUG(4, __FUNCTION__ "(), nslots = %d\n", discovery->nslots); IRDA_DEBUG(4, "%s(), nslots = %d\n", __FUNCTION__, discovery->nslots);
ASSERT((discovery->nslots == 1) || (discovery->nslots == 6) || ASSERT((discovery->nslots == 1) || (discovery->nslots == 6) ||
(discovery->nslots == 8) || (discovery->nslots == 16), (discovery->nslots == 8) || (discovery->nslots == 16),
...@@ -511,8 +511,8 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery) ...@@ -511,8 +511,8 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
/* Discovery is only possible in NDM mode */ /* Discovery is only possible in NDM mode */
if (self->state != LAP_NDM) { if (self->state != LAP_NDM) {
IRDA_DEBUG(4, __FUNCTION__ IRDA_DEBUG(4, "%s(), discovery only possible in NDM mode\n",
"(), discovery only possible in NDM mode\n"); __FUNCTION__);
irlap_discovery_confirm(self, NULL); irlap_discovery_confirm(self, NULL);
/* Note : in theory, if we are not in NDM, we could postpone /* Note : in theory, if we are not in NDM, we could postpone
* the discovery like we do for connection request. * the discovery like we do for connection request.
...@@ -584,7 +584,7 @@ void irlap_discovery_confirm(struct irlap_cb *self, hashbin_t *discovery_log) ...@@ -584,7 +584,7 @@ void irlap_discovery_confirm(struct irlap_cb *self, hashbin_t *discovery_log)
*/ */
void irlap_discovery_indication(struct irlap_cb *self, discovery_t *discovery) void irlap_discovery_indication(struct irlap_cb *self, discovery_t *discovery)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -630,7 +630,7 @@ void irlap_status_indication(struct irlap_cb *self, int quality_of_link) ...@@ -630,7 +630,7 @@ void irlap_status_indication(struct irlap_cb *self, int quality_of_link)
*/ */
void irlap_reset_indication(struct irlap_cb *self) void irlap_reset_indication(struct irlap_cb *self)
{ {
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -646,7 +646,7 @@ void irlap_reset_indication(struct irlap_cb *self) ...@@ -646,7 +646,7 @@ void irlap_reset_indication(struct irlap_cb *self)
*/ */
void irlap_reset_confirm(void) void irlap_reset_confirm(void)
{ {
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
} }
/* /*
...@@ -746,7 +746,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr) ...@@ -746,7 +746,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr)
{ {
/* nr as expected? */ /* nr as expected? */
if (nr == self->vs) { if (nr == self->vs) {
IRDA_DEBUG(4, __FUNCTION__ "(), expected!\n"); IRDA_DEBUG(4, "%s(), expected!\n", __FUNCTION__);
return NR_EXPECTED; return NR_EXPECTED;
} }
...@@ -774,7 +774,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr) ...@@ -774,7 +774,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr)
*/ */
void irlap_initiate_connection_state(struct irlap_cb *self) void irlap_initiate_connection_state(struct irlap_cb *self)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -857,7 +857,7 @@ void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now) ...@@ -857,7 +857,7 @@ void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now)
{ {
struct sk_buff *skb; struct sk_buff *skb;
IRDA_DEBUG(0, __FUNCTION__ "(), setting speed to %d\n", speed); IRDA_DEBUG(0, "%s(), setting speed to %d\n", __FUNCTION__, speed);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -899,7 +899,7 @@ void irlap_init_qos_capabilities(struct irlap_cb *self, ...@@ -899,7 +899,7 @@ void irlap_init_qos_capabilities(struct irlap_cb *self,
* user may not have set all of them. * user may not have set all of them.
*/ */
if (qos_user) { if (qos_user) {
IRDA_DEBUG(1, __FUNCTION__ "(), Found user specified QoS!\n"); IRDA_DEBUG(1, "%s(), Found user specified QoS!\n", __FUNCTION__);
if (qos_user->baud_rate.bits) if (qos_user->baud_rate.bits)
self->qos_rx.baud_rate.bits &= qos_user->baud_rate.bits; self->qos_rx.baud_rate.bits &= qos_user->baud_rate.bits;
...@@ -929,7 +929,7 @@ void irlap_init_qos_capabilities(struct irlap_cb *self, ...@@ -929,7 +929,7 @@ void irlap_init_qos_capabilities(struct irlap_cb *self,
*/ */
void irlap_apply_default_connection_parameters(struct irlap_cb *self) void irlap_apply_default_connection_parameters(struct irlap_cb *self)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -992,7 +992,7 @@ void irlap_apply_default_connection_parameters(struct irlap_cb *self) ...@@ -992,7 +992,7 @@ void irlap_apply_default_connection_parameters(struct irlap_cb *self)
*/ */
void irlap_apply_connection_parameters(struct irlap_cb *self, int now) void irlap_apply_connection_parameters(struct irlap_cb *self, int now)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
......
...@@ -218,7 +218,7 @@ void irlap_start_poll_timer(struct irlap_cb *self, int timeout) ...@@ -218,7 +218,7 @@ void irlap_start_poll_timer(struct irlap_cb *self, int timeout)
} else } else
self->fast_RR = FALSE; self->fast_RR = FALSE;
IRDA_DEBUG(3, __FUNCTION__ "(), timeout=%d (%ld)\n", timeout, jiffies); IRDA_DEBUG(3, "%s(), timeout=%d (%ld)\n", __FUNCTION__, timeout, jiffies);
#endif /* CONFIG_IRDA_FAST_RR */ #endif /* CONFIG_IRDA_FAST_RR */
if (timeout == 0) if (timeout == 0)
...@@ -242,7 +242,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -242,7 +242,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event,
if (!self || self->magic != LAP_MAGIC) if (!self || self->magic != LAP_MAGIC)
return; return;
IRDA_DEBUG(3, __FUNCTION__ "(), event = %s, state = %s\n", IRDA_DEBUG(3, "%s(), event = %s, state = %s\n", __FUNCTION__,
irlap_event[event], irlap_state[self->state]); irlap_event[event], irlap_state[self->state]);
ret = (*state[self->state])(self, event, skb, info); ret = (*state[self->state])(self, event, skb, info);
...@@ -260,7 +260,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -260,7 +260,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event,
* try to disconnect link if we send any data frames, since * try to disconnect link if we send any data frames, since
* that will change the state away form XMIT * that will change the state away form XMIT
*/ */
IRDA_DEBUG(2, __FUNCTION__ "() : queue len = %d\n", IRDA_DEBUG(2, "%s() : queue len = %d\n", __FUNCTION__,
skb_queue_len(&self->txq)); skb_queue_len(&self->txq));
if (skb_queue_len(&self->txq)) { if (skb_queue_len(&self->txq)) {
...@@ -354,8 +354,8 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -354,8 +354,8 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
/* Note : this will never happen, because we test /* Note : this will never happen, because we test
* media busy in irlap_connect_request() and * media busy in irlap_connect_request() and
* postpone the event... - Jean II */ * postpone the event... - Jean II */
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0, "%s(), CONNECT_REQUEST: media busy!\n",
"(), CONNECT_REQUEST: media busy!\n"); __FUNCTION__);
/* Always switch state before calling upper layers */ /* Always switch state before calling upper layers */
irlap_next_state(self, LAP_NDM); irlap_next_state(self, LAP_NDM);
...@@ -381,15 +381,15 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -381,15 +381,15 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
irlap_connect_indication(self, skb); irlap_connect_indication(self, skb);
} else { } else {
IRDA_DEBUG(0, __FUNCTION__ "(), SNRM frame does not " IRDA_DEBUG(0, "%s(), SNRM frame does not "
"contain an I field!\n"); "contain an I field!\n", __FUNCTION__);
} }
break; break;
case DISCOVERY_REQUEST: case DISCOVERY_REQUEST:
ASSERT(info != NULL, return -1;); ASSERT(info != NULL, return -1;);
if (self->media_busy) { if (self->media_busy) {
IRDA_DEBUG(0, __FUNCTION__ "(), media busy!\n"); IRDA_DEBUG(0, "%s(), media busy!\n", __FUNCTION__);
/* irlap->log.condition = MEDIA_BUSY; */ /* irlap->log.condition = MEDIA_BUSY; */
/* This will make IrLMP try again */ /* This will make IrLMP try again */
...@@ -451,7 +451,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -451,7 +451,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
* log (and post an event). * log (and post an event).
* Jean II * Jean II
*/ */
IRDA_DEBUG(1, __FUNCTION__ "(), Receiving final discovery request, missed the discovery slots :-(\n"); IRDA_DEBUG(1, "%s(), Receiving final discovery request, missed the discovery slots :-(\n", __FUNCTION__);
/* Last discovery request -> in the log */ /* Last discovery request -> in the log */
irlap_discovery_indication(self, info->discovery); irlap_discovery_indication(self, info->discovery);
...@@ -527,8 +527,8 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -527,8 +527,8 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
case RECV_UI_FRAME: case RECV_UI_FRAME:
/* Only accept broadcast frames in NDM mode */ /* Only accept broadcast frames in NDM mode */
if (info->caddr != CBROADCAST) { if (info->caddr != CBROADCAST) {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0, "%s(), not a broadcast frame!\n",
"(), not a broadcast frame!\n"); __FUNCTION__);
} else } else
irlap_unitdata_indication(self, skb); irlap_unitdata_indication(self, skb);
break; break;
...@@ -544,10 +544,10 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -544,10 +544,10 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event,
irlap_send_test_frame(self, CBROADCAST, info->daddr, skb); irlap_send_test_frame(self, CBROADCAST, info->daddr, skb);
break; break;
case RECV_TEST_RSP: case RECV_TEST_RSP:
IRDA_DEBUG(0, __FUNCTION__ "() not implemented!\n"); IRDA_DEBUG(0, "%s() not implemented!\n", __FUNCTION__);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__,
irlap_event[event]); irlap_event[event]);
ret = -1; ret = -1;
...@@ -575,7 +575,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -575,7 +575,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
ASSERT(info != NULL, return -1;); ASSERT(info != NULL, return -1;);
ASSERT(info->discovery != NULL, return -1;); ASSERT(info->discovery != NULL, return -1;);
IRDA_DEBUG(4, __FUNCTION__ "(), daddr=%08x\n", IRDA_DEBUG(4, "%s(), daddr=%08x\n", __FUNCTION__,
info->discovery->daddr); info->discovery->daddr);
if (!self->discovery_log) { if (!self->discovery_log) {
...@@ -606,7 +606,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -606,7 +606,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
ASSERT(info != NULL, return -1;); ASSERT(info != NULL, return -1;);
IRDA_DEBUG(1, __FUNCTION__ "(), Receiving discovery request (s = %d) while performing discovery :-(\n", info->s); IRDA_DEBUG(1, "%s(), Receiving discovery request (s = %d) while performing discovery :-(\n", __FUNCTION__, info->s);
/* Last discovery request ? */ /* Last discovery request ? */
if (info->s == 0xff) if (info->s == 0xff)
...@@ -620,9 +620,8 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -620,9 +620,8 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
* timing requirements. * timing requirements.
*/ */
if (irda_device_is_receiving(self->netdev) && !self->add_wait) { if (irda_device_is_receiving(self->netdev) && !self->add_wait) {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s(), device is slow to answer, "
"(), device is slow to answer, " "waiting some more!\n", __FUNCTION__);
"waiting some more!\n");
irlap_start_slot_timer(self, MSECS_TO_JIFFIES(10)); irlap_start_slot_timer(self, MSECS_TO_JIFFIES(10));
self->add_wait = TRUE; self->add_wait = TRUE;
return ret; return ret;
...@@ -658,7 +657,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -658,7 +657,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event,
} }
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__,
irlap_event[event]); irlap_event[event]);
ret = -1; ret = -1;
...@@ -680,15 +679,15 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -680,15 +679,15 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event,
discovery_t *discovery_rsp; discovery_t *discovery_rsp;
int ret=0; int ret=0;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == LAP_MAGIC, return -1;); ASSERT(self->magic == LAP_MAGIC, return -1;);
switch (event) { switch (event) {
case QUERY_TIMER_EXPIRED: case QUERY_TIMER_EXPIRED:
IRDA_DEBUG(2, __FUNCTION__ "(), QUERY_TIMER_EXPIRED <%ld>\n", IRDA_DEBUG(2, "%s(), QUERY_TIMER_EXPIRED <%ld>\n",
jiffies); __FUNCTION__, jiffies);
irlap_next_state(self, LAP_NDM); irlap_next_state(self, LAP_NDM);
break; break;
case RECV_DISCOVERY_XID_CMD: case RECV_DISCOVERY_XID_CMD:
...@@ -716,8 +715,8 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -716,8 +715,8 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event,
} }
break; break;
default: default:
IRDA_DEBUG(1, __FUNCTION__ "(), Unknown event %d, %s\n", event, IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__,
irlap_event[event]); event, irlap_event[event]);
ret = -1; ret = -1;
break; break;
...@@ -737,7 +736,7 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -737,7 +736,7 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(4, __FUNCTION__ "(), event=%s\n", irlap_event[ event]); IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[ event]);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == LAP_MAGIC, return -1;); ASSERT(self->magic == LAP_MAGIC, return -1;);
...@@ -797,20 +796,20 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -797,20 +796,20 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event,
break; break;
case RECV_DISCOVERY_XID_CMD: case RECV_DISCOVERY_XID_CMD:
IRDA_DEBUG(3, __FUNCTION__ IRDA_DEBUG(3, "%s(), event RECV_DISCOVER_XID_CMD!\n",
"(), event RECV_DISCOVER_XID_CMD!\n"); __FUNCTION__);
irlap_next_state(self, LAP_NDM); irlap_next_state(self, LAP_NDM);
break; break;
case DISCONNECT_REQUEST: case DISCONNECT_REQUEST:
IRDA_DEBUG(0, __FUNCTION__ "(), Disconnect request!\n"); IRDA_DEBUG(0, "%s(), Disconnect request!\n", __FUNCTION__);
irlap_send_dm_frame(self); irlap_send_dm_frame(self);
irlap_next_state( self, LAP_NDM); irlap_next_state( self, LAP_NDM);
irlap_disconnect_indication(self, LAP_DISC_INDICATION); irlap_disconnect_indication(self, LAP_DISC_INDICATION);
break; break;
default: default:
IRDA_DEBUG(1, __FUNCTION__ "(), Unknown event %d, %s\n", event, IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__,
irlap_event[event]); event, irlap_event[event]);
ret = -1; ret = -1;
break; break;
...@@ -831,7 +830,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -831,7 +830,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == LAP_MAGIC, return -1;); ASSERT(self->magic == LAP_MAGIC, return -1;);
...@@ -860,7 +859,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -860,7 +859,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
self->retry_count++; self->retry_count++;
break; break;
case RECV_SNRM_CMD: case RECV_SNRM_CMD:
IRDA_DEBUG(4, __FUNCTION__ "(), SNRM battle!\n"); IRDA_DEBUG(4, "%s(), SNRM battle!\n", __FUNCTION__);
ASSERT(skb != NULL, return 0;); ASSERT(skb != NULL, return 0;);
ASSERT(info != NULL, return 0;); ASSERT(info != NULL, return 0;);
...@@ -941,8 +940,8 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -941,8 +940,8 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
irlap_disconnect_indication(self, LAP_DISC_INDICATION); irlap_disconnect_indication(self, LAP_DISC_INDICATION);
break; break;
default: default:
IRDA_DEBUG(1, __FUNCTION__ "(), Unknown event %d, %s\n", event, IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__,
irlap_event[event]); event, irlap_event[event]);
ret = -1; ret = -1;
break; break;
...@@ -959,7 +958,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -959,7 +958,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event,
static int irlap_state_offline(struct irlap_cb *self, IRLAP_EVENT event, static int irlap_state_offline(struct irlap_cb *self, IRLAP_EVENT event,
struct sk_buff *skb, struct irlap_info *info) struct sk_buff *skb, struct irlap_info *info)
{ {
IRDA_DEBUG( 0, __FUNCTION__ "(), Unknown event\n"); IRDA_DEBUG( 0, "%s(), Unknown event\n", __FUNCTION__);
return -1; return -1;
} }
...@@ -990,9 +989,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -990,9 +989,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
* speed and turn-around-time. * speed and turn-around-time.
*/ */
if (skb->len > self->bytes_left) { if (skb->len > self->bytes_left) {
IRDA_DEBUG(4, __FUNCTION__ IRDA_DEBUG(4, "%s(), Not allowed to transmit"
"(), Not allowed to transmit more " " more bytes!\n", __FUNCTION__);
"bytes!\n");
skb_queue_head(&self->txq, skb_get(skb)); skb_queue_head(&self->txq, skb_get(skb));
/* /*
* We should switch state to LAP_NRM_P, but * We should switch state to LAP_NRM_P, but
...@@ -1030,8 +1028,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1030,8 +1028,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
self->fast_RR = FALSE; self->fast_RR = FALSE;
#endif /* CONFIG_IRDA_FAST_RR */ #endif /* CONFIG_IRDA_FAST_RR */
} else { } else {
IRDA_DEBUG(4, __FUNCTION__ IRDA_DEBUG(4, "%s(), Unable to send! remote busy?\n",
"(), Unable to send! remote busy?\n"); __FUNCTION__);
skb_queue_head(&self->txq, skb_get(skb)); skb_queue_head(&self->txq, skb_get(skb));
/* /*
...@@ -1042,8 +1040,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1042,8 +1040,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
} }
break; break;
case POLL_TIMER_EXPIRED: case POLL_TIMER_EXPIRED:
IRDA_DEBUG(3, __FUNCTION__ "(), POLL_TIMER_EXPIRED (%ld)\n", IRDA_DEBUG(3, "%s(), POLL_TIMER_EXPIRED <%ld>\n",
jiffies); __FUNCTION__, jiffies);
irlap_send_rr_frame(self, CMD_FRAME); irlap_send_rr_frame(self, CMD_FRAME);
/* Return to NRM properly - Jean II */ /* Return to NRM properly - Jean II */
self->window = self->window_size; self->window = self->window_size;
...@@ -1068,8 +1066,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1068,8 +1066,8 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event,
* when we return... - Jean II */ * when we return... - Jean II */
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(0, "%s(), Unknown event %s\n",
irlap_event[event]); __FUNCTION__, irlap_event[event]);
ret = -EINVAL; ret = -EINVAL;
break; break;
...@@ -1087,7 +1085,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1087,7 +1085,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == LAP_MAGIC, return -1;); ASSERT(self->magic == LAP_MAGIC, return -1;);
...@@ -1122,7 +1120,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1122,7 +1120,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event,
} }
break; break;
default: default:
IRDA_DEBUG(1, __FUNCTION__ "(), Unknown event %d\n", event); IRDA_DEBUG(1, "%s(), Unknown event %d\n", __FUNCTION__, event);
ret = -1; ret = -1;
break; break;
...@@ -1235,8 +1233,9 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1235,8 +1233,9 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
/* Keep state */ /* Keep state */
irlap_next_state(self, LAP_NRM_P); irlap_next_state(self, LAP_NRM_P);
} else { } else {
IRDA_DEBUG(4, __FUNCTION__ IRDA_DEBUG(4,
"(), missing or duplicate frame!\n"); "%s(), missing or duplicate frame!\n",
__FUNCTION__);
/* Update Nr received */ /* Update Nr received */
irlap_update_nr_received(self, info->nr); irlap_update_nr_received(self, info->nr);
...@@ -1300,8 +1299,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1300,8 +1299,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
if ((ns_status == NS_UNEXPECTED) && if ((ns_status == NS_UNEXPECTED) &&
(nr_status == NR_UNEXPECTED)) (nr_status == NR_UNEXPECTED))
{ {
IRDA_DEBUG(4, __FUNCTION__ IRDA_DEBUG(4, "%s(), unexpected nr and ns!\n",
"(), unexpected nr and ns!\n"); __FUNCTION__);
if (info->pf) { if (info->pf) {
/* Resend rejected frames */ /* Resend rejected frames */
irlap_resend_rejected_frames(self, CMD_FRAME); irlap_resend_rejected_frames(self, CMD_FRAME);
...@@ -1340,10 +1339,9 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1340,10 +1339,9 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
} }
break; break;
} }
IRDA_DEBUG(1, __FUNCTION__ "(), Not implemented!\n"); IRDA_DEBUG(1, "%s(), Not implemented!\n", __FUNCTION__);
IRDA_DEBUG(1, __FUNCTION__ IRDA_DEBUG(1, "%s(), event=%s, ns_status=%d, nr_status=%d\n",
"(), event=%s, ns_status=%d, nr_status=%d\n", __FUNCTION__, irlap_event[event], ns_status, nr_status);
irlap_event[ event], ns_status, nr_status);
break; break;
case RECV_UI_FRAME: case RECV_UI_FRAME:
/* Poll bit cleared? */ /* Poll bit cleared? */
...@@ -1354,7 +1352,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1354,7 +1352,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
del_timer(&self->final_timer); del_timer(&self->final_timer);
irlap_data_indication(self, skb, TRUE); irlap_data_indication(self, skb, TRUE);
irlap_next_state(self, LAP_XMIT_P); irlap_next_state(self, LAP_XMIT_P);
printk("%s: RECV_UI_FRAME: next state %s\n", __FUNCTION__, irlap_state[self->state]); IRDA_DEBUG(1, "%s: RECV_UI_FRAME: next state %s\n", __FUNCTION__, irlap_state[self->state]);
irlap_start_poll_timer(self, self->poll_timeout); irlap_start_poll_timer(self, self->poll_timeout);
} }
break; break;
...@@ -1407,8 +1405,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1407,8 +1405,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
irlap_next_state(self, LAP_NRM_P); irlap_next_state(self, LAP_NRM_P);
} else if (ret == NR_INVALID) { } else if (ret == NR_INVALID) {
IRDA_DEBUG(1, __FUNCTION__ "(), Received RR with " IRDA_DEBUG(1, "%s(), Received RR with "
"invalid nr !\n"); "invalid nr !\n", __FUNCTION__);
del_timer(&self->final_timer); del_timer(&self->final_timer);
irlap_next_state(self, LAP_RESET_WAIT); irlap_next_state(self, LAP_RESET_WAIT);
...@@ -1508,7 +1506,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1508,7 +1506,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
irlap_start_final_timer(self, self->final_timeout); irlap_start_final_timer(self, self->final_timeout);
break; break;
case RECV_RD_RSP: case RECV_RD_RSP:
IRDA_DEBUG(1, __FUNCTION__ "(), RECV_RD_RSP\n"); IRDA_DEBUG(1, "%s(), RECV_RD_RSP\n", __FUNCTION__);
irlap_flush_all_queues(self); irlap_flush_all_queues(self);
irlap_next_state(self, LAP_XMIT_P); irlap_next_state(self, LAP_XMIT_P);
...@@ -1516,8 +1514,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1516,8 +1514,8 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event,
irlap_disconnect_request(self); irlap_disconnect_request(self);
break; break;
default: default:
IRDA_DEBUG(1, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(1, "%s(), Unknown event %s\n",
irlap_event[event]); __FUNCTION__, irlap_event[event]);
ret = -1; ret = -1;
break; break;
...@@ -1537,7 +1535,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1537,7 +1535,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(3, __FUNCTION__ "(), event = %s\n", irlap_event[event]); IRDA_DEBUG(3, "%s(), event = %s\n", __FUNCTION__, irlap_event[event]);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == LAP_MAGIC, return -1;); ASSERT(self->magic == LAP_MAGIC, return -1;);
...@@ -1563,7 +1561,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1563,7 +1561,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event,
irlap_next_state( self, LAP_PCLOSE); irlap_next_state( self, LAP_PCLOSE);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__,
irlap_event[event]); irlap_event[event]);
ret = -1; ret = -1;
...@@ -1584,7 +1582,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1584,7 +1582,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(3, __FUNCTION__ "(), event = %s\n", irlap_event[event]); IRDA_DEBUG(3, "%s(), event = %s\n", __FUNCTION__, irlap_event[event]);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == LAP_MAGIC, return -1;); ASSERT(self->magic == LAP_MAGIC, return -1;);
...@@ -1642,7 +1640,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1642,7 +1640,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event,
* state * state
*/ */
if (!info) { if (!info) {
IRDA_DEBUG(3, __FUNCTION__ "(), RECV_SNRM_CMD\n"); IRDA_DEBUG(3, "%s(), RECV_SNRM_CMD\n", __FUNCTION__);
irlap_initiate_connection_state(self); irlap_initiate_connection_state(self);
irlap_wait_min_turn_around(self, &self->qos_tx); irlap_wait_min_turn_around(self, &self->qos_tx);
irlap_send_ua_response_frame(self, &self->qos_rx); irlap_send_ua_response_frame(self, &self->qos_rx);
...@@ -1650,13 +1648,14 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1650,13 +1648,14 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event,
irlap_start_wd_timer(self, self->wd_timeout); irlap_start_wd_timer(self, self->wd_timeout);
irlap_next_state(self, LAP_NDM); irlap_next_state(self, LAP_NDM);
} else { } else {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0,
"(), SNRM frame contained an I field!\n"); "%s(), SNRM frame contained an I field!\n",
__FUNCTION__);
} }
break; break;
default: default:
IRDA_DEBUG(1, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(1, "%s(), Unknown event %s\n",
irlap_event[event]); __FUNCTION__, irlap_event[event]);
ret = -1; ret = -1;
break; break;
...@@ -1676,7 +1675,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1676,7 +1675,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(4, __FUNCTION__ "(), event=%s\n", irlap_event[event]); IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[event]);
ASSERT(self != NULL, return -ENODEV;); ASSERT(self != NULL, return -ENODEV;);
ASSERT(self->magic == LAP_MAGIC, return -EBADR;); ASSERT(self->magic == LAP_MAGIC, return -EBADR;);
...@@ -1732,7 +1731,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1732,7 +1731,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
ret = -EPROTO; ret = -EPROTO;
} }
} else { } else {
IRDA_DEBUG(2, __FUNCTION__ "(), Unable to send!\n"); IRDA_DEBUG(2, "%s(), Unable to send!\n", __FUNCTION__);
skb_queue_head(&self->txq, skb_get(skb)); skb_queue_head(&self->txq, skb_get(skb));
ret = -EPROTO; ret = -EPROTO;
} }
...@@ -1748,7 +1747,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1748,7 +1747,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event,
* when we return... - Jean II */ * when we return... - Jean II */
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__,
irlap_event[event]); irlap_event[event]);
ret = -EINVAL; ret = -EINVAL;
...@@ -1771,7 +1770,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1771,7 +1770,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
int nr_status; int nr_status;
int ret = 0; int ret = 0;
IRDA_DEBUG(4, __FUNCTION__ "(), event=%s\n", irlap_event[ event]); IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[ event]);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == LAP_MAGIC, return -1;); ASSERT(self->magic == LAP_MAGIC, return -1;);
...@@ -1779,8 +1778,9 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -1779,8 +1778,9 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
switch (event) { switch (event) {
case RECV_I_CMD: /* Optimize for the common case */ case RECV_I_CMD: /* Optimize for the common case */
/* FIXME: must check for remote_busy below */ /* FIXME: must check for remote_busy below */
IRDA_DEBUG(4, __FUNCTION__ "(), event=%s nr=%d, vs=%d, ns=%d, " IRDA_DEBUG(4, "%s(), event=%s nr=%d, vs=%d, ns=%d, "
"vr=%d, pf=%d\n", irlap_event[event], info->nr, "vr=%d, pf=%d\n", __FUNCTION__,
irlap_event[event], info->nr,
self->vs, info->ns, self->vr, info->pf); self->vs, info->ns, self->vr, info->pf);
self->retry_count = 0; self->retry_count = 0;
...@@ -2012,21 +2012,22 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -2012,21 +2012,22 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
/* Keep state */ /* Keep state */
irlap_next_state(self, LAP_NRM_S); irlap_next_state(self, LAP_NRM_S);
} else { } else {
IRDA_DEBUG(1, __FUNCTION__ IRDA_DEBUG(1, "%s(), invalid nr not implemented!\n",
"(), invalid nr not implemented!\n"); __FUNCTION__);
} }
break; break;
case RECV_SNRM_CMD: case RECV_SNRM_CMD:
/* SNRM frame is not allowed to contain an I-field */ /* SNRM frame is not allowed to contain an I-field */
if (!info) { if (!info) {
del_timer(&self->wd_timer); del_timer(&self->wd_timer);
IRDA_DEBUG(1, __FUNCTION__ "(), received SNRM cmd\n"); IRDA_DEBUG(1, "%s(), received SNRM cmd\n", __FUNCTION__);
irlap_next_state(self, LAP_RESET_CHECK); irlap_next_state(self, LAP_RESET_CHECK);
irlap_reset_indication(self); irlap_reset_indication(self);
} else { } else {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0,
"(), SNRM frame contained an I-field!\n"); "%s(), SNRM frame contained an I-field!\n",
__FUNCTION__);
} }
break; break;
...@@ -2058,7 +2059,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -2058,7 +2059,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
* which explain why we use (self->N2 / 2) here !!! * which explain why we use (self->N2 / 2) here !!!
* Jean II * Jean II
*/ */
IRDA_DEBUG(1, __FUNCTION__ "(), retry_count = %d\n", IRDA_DEBUG(1, "%s(), retry_count = %d\n", __FUNCTION__,
self->retry_count); self->retry_count);
if (self->retry_count < (self->N2 / 2)) { if (self->retry_count < (self->N2 / 2)) {
...@@ -2111,7 +2112,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -2111,7 +2112,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event,
irlap_send_test_frame(self, self->caddr, info->daddr, skb); irlap_send_test_frame(self, self->caddr, info->daddr, skb);
break; break;
default: default:
IRDA_DEBUG(1, __FUNCTION__ "(), Unknown event %d, (%s)\n", IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__,
event, irlap_event[event]); event, irlap_event[event]);
ret = -EINVAL; ret = -EINVAL;
...@@ -2128,7 +2129,7 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -2128,7 +2129,7 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -ENODEV;); ASSERT(self != NULL, return -ENODEV;);
ASSERT(self->magic == LAP_MAGIC, return -EBADR;); ASSERT(self->magic == LAP_MAGIC, return -EBADR;);
...@@ -2166,7 +2167,7 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event, ...@@ -2166,7 +2167,7 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event,
irlap_disconnect_indication(self, LAP_DISC_INDICATION); irlap_disconnect_indication(self, LAP_DISC_INDICATION);
break; break;
default: default:
IRDA_DEBUG(1, __FUNCTION__ "(), Unknown event %d, (%s)\n", IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__,
event, irlap_event[event]); event, irlap_event[event]);
ret = -EINVAL; ret = -EINVAL;
...@@ -2182,7 +2183,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event, ...@@ -2182,7 +2183,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(1, __FUNCTION__ "(), event=%s\n", irlap_event[event]); IRDA_DEBUG(1, "%s(), event=%s\n", __FUNCTION__, irlap_event[event]);
ASSERT(self != NULL, return -ENODEV;); ASSERT(self != NULL, return -ENODEV;);
ASSERT(self->magic == LAP_MAGIC, return -EBADR;); ASSERT(self->magic == LAP_MAGIC, return -EBADR;);
...@@ -2203,7 +2204,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event, ...@@ -2203,7 +2204,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event,
irlap_next_state(self, LAP_SCLOSE); irlap_next_state(self, LAP_SCLOSE);
break; break;
default: default:
IRDA_DEBUG(1, __FUNCTION__ "(), Unknown event %d, (%s)\n", IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__,
event, irlap_event[event]); event, irlap_event[event]);
ret = -EINVAL; ret = -EINVAL;
......
...@@ -167,8 +167,8 @@ static void irlap_recv_snrm_cmd(struct irlap_cb *self, struct sk_buff *skb, ...@@ -167,8 +167,8 @@ static void irlap_recv_snrm_cmd(struct irlap_cb *self, struct sk_buff *skb,
/* Check if the new connection address is valid */ /* Check if the new connection address is valid */
if ((info->caddr == 0x00) || (info->caddr == 0xfe)) { if ((info->caddr == 0x00) || (info->caddr == 0xfe)) {
IRDA_DEBUG(3, __FUNCTION__ IRDA_DEBUG(3, "%s(), invalid connection address!\n",
"(), invalid connection address!\n"); __FUNCTION__);
return; return;
} }
...@@ -178,7 +178,8 @@ static void irlap_recv_snrm_cmd(struct irlap_cb *self, struct sk_buff *skb, ...@@ -178,7 +178,8 @@ static void irlap_recv_snrm_cmd(struct irlap_cb *self, struct sk_buff *skb,
/* Only accept if addressed directly to us */ /* Only accept if addressed directly to us */
if (info->saddr != self->saddr) { if (info->saddr != self->saddr) {
IRDA_DEBUG(2, __FUNCTION__ "(), not addressed to us!\n"); IRDA_DEBUG(2, "%s(), not addressed to us!\n",
__FUNCTION__);
return; return;
} }
irlap_do_event(self, RECV_SNRM_CMD, skb, info); irlap_do_event(self, RECV_SNRM_CMD, skb, info);
...@@ -200,7 +201,7 @@ void irlap_send_ua_response_frame(struct irlap_cb *self, struct qos_info *qos) ...@@ -200,7 +201,7 @@ void irlap_send_ua_response_frame(struct irlap_cb *self, struct qos_info *qos)
struct ua_frame *frame; struct ua_frame *frame;
int ret; int ret;
IRDA_DEBUG(2, __FUNCTION__ "() <%ld>\n", jiffies); IRDA_DEBUG(2, "%s() <%ld>\n", __FUNCTION__, jiffies);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -275,7 +276,7 @@ void irlap_send_disc_frame(struct irlap_cb *self) ...@@ -275,7 +276,7 @@ void irlap_send_disc_frame(struct irlap_cb *self)
struct sk_buff *skb = NULL; struct sk_buff *skb = NULL;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(3, __FUNCTION__ "()\n"); IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -306,8 +307,8 @@ void irlap_send_discovery_xid_frame(struct irlap_cb *self, int S, __u8 s, ...@@ -306,8 +307,8 @@ void irlap_send_discovery_xid_frame(struct irlap_cb *self, int S, __u8 s,
__u32 bcast = BROADCAST; __u32 bcast = BROADCAST;
__u8 *info; __u8 *info;
IRDA_DEBUG(4, __FUNCTION__ "(), s=%d, S=%d, command=%d\n", s, S, IRDA_DEBUG(4, "%s(), s=%d, S=%d, command=%d\n", __FUNCTION__,
command); s, S, command);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -398,7 +399,7 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self, ...@@ -398,7 +399,7 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
__u8 *discovery_info; __u8 *discovery_info;
char *text; char *text;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -410,8 +411,8 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self, ...@@ -410,8 +411,8 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
/* Make sure frame is addressed to us */ /* Make sure frame is addressed to us */
if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) { if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0, "%s(), frame is not addressed to us!\n",
"(), frame is not addressed to us!\n"); __FUNCTION__);
return; return;
} }
...@@ -425,7 +426,7 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self, ...@@ -425,7 +426,7 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
discovery->saddr = self->saddr; discovery->saddr = self->saddr;
discovery->timestamp = jiffies; discovery->timestamp = jiffies;
IRDA_DEBUG(4, __FUNCTION__ "(), daddr=%08x\n", discovery->daddr); IRDA_DEBUG(4, "%s(), daddr=%08x\n", __FUNCTION__, discovery->daddr);
discovery_info = skb_pull(skb, sizeof(struct xid_frame)); discovery_info = skb_pull(skb, sizeof(struct xid_frame));
...@@ -476,8 +477,8 @@ static void irlap_recv_discovery_xid_cmd(struct irlap_cb *self, ...@@ -476,8 +477,8 @@ static void irlap_recv_discovery_xid_cmd(struct irlap_cb *self,
/* Make sure frame is addressed to us */ /* Make sure frame is addressed to us */
if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) { if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0, "%s(), frame is not addressed to us!\n",
"(), frame is not addressed to us!\n"); __FUNCTION__);
return; return;
} }
...@@ -642,7 +643,7 @@ void irlap_send_frmr_frame( struct irlap_cb *self, int command) ...@@ -642,7 +643,7 @@ void irlap_send_frmr_frame( struct irlap_cb *self, int command)
frame[2] = 0; frame[2] = 0;
IRDA_DEBUG(4, __FUNCTION__ "(), vr=%d, %ld\n",self->vr, jiffies); IRDA_DEBUG(4, "%s(), vr=%d, %ld\n", __FUNCTION__, self->vr, jiffies);
irlap_queue_xmit(self, skb); irlap_queue_xmit(self, skb);
} }
...@@ -658,7 +659,7 @@ static void irlap_recv_rnr_frame(struct irlap_cb *self, struct sk_buff *skb, ...@@ -658,7 +659,7 @@ static void irlap_recv_rnr_frame(struct irlap_cb *self, struct sk_buff *skb,
{ {
info->nr = skb->data[1] >> 5; info->nr = skb->data[1] >> 5;
IRDA_DEBUG(4, __FUNCTION__ "(), nr=%d, %ld\n", info->nr, jiffies); IRDA_DEBUG(4, "%s(), nr=%d, %ld\n", __FUNCTION__, info->nr, jiffies);
if (command) if (command)
irlap_do_event(self, RECV_RNR_CMD, skb, info); irlap_do_event(self, RECV_RNR_CMD, skb, info);
...@@ -669,7 +670,7 @@ static void irlap_recv_rnr_frame(struct irlap_cb *self, struct sk_buff *skb, ...@@ -669,7 +670,7 @@ static void irlap_recv_rnr_frame(struct irlap_cb *self, struct sk_buff *skb,
static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb, static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb,
struct irlap_info *info, int command) struct irlap_info *info, int command)
{ {
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
info->nr = skb->data[1] >> 5; info->nr = skb->data[1] >> 5;
...@@ -683,7 +684,7 @@ static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb, ...@@ -683,7 +684,7 @@ static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb,
static void irlap_recv_srej_frame(struct irlap_cb *self, struct sk_buff *skb, static void irlap_recv_srej_frame(struct irlap_cb *self, struct sk_buff *skb,
struct irlap_info *info, int command) struct irlap_info *info, int command)
{ {
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
info->nr = skb->data[1] >> 5; info->nr = skb->data[1] >> 5;
...@@ -697,7 +698,7 @@ static void irlap_recv_srej_frame(struct irlap_cb *self, struct sk_buff *skb, ...@@ -697,7 +698,7 @@ static void irlap_recv_srej_frame(struct irlap_cb *self, struct sk_buff *skb,
static void irlap_recv_disc_frame(struct irlap_cb *self, struct sk_buff *skb, static void irlap_recv_disc_frame(struct irlap_cb *self, struct sk_buff *skb,
struct irlap_info *info, int command) struct irlap_info *info, int command)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
/* Check if this is a command or a response frame */ /* Check if this is a command or a response frame */
if (command) if (command)
...@@ -754,7 +755,7 @@ void irlap_send_data_primary(struct irlap_cb *self, struct sk_buff *skb) ...@@ -754,7 +755,7 @@ void irlap_send_data_primary(struct irlap_cb *self, struct sk_buff *skb)
irlap_send_i_frame( self, tx_skb, CMD_FRAME); irlap_send_i_frame( self, tx_skb, CMD_FRAME);
} else { } else {
IRDA_DEBUG(4, __FUNCTION__ "(), sending unreliable frame\n"); IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __FUNCTION__);
irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME);
self->window -= 1; self->window -= 1;
} }
...@@ -803,7 +804,7 @@ void irlap_send_data_primary_poll(struct irlap_cb *self, struct sk_buff *skb) ...@@ -803,7 +804,7 @@ void irlap_send_data_primary_poll(struct irlap_cb *self, struct sk_buff *skb)
irlap_send_i_frame(self, tx_skb, CMD_FRAME); irlap_send_i_frame(self, tx_skb, CMD_FRAME);
} else { } else {
IRDA_DEBUG(4, __FUNCTION__ "(), sending unreliable frame\n"); IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __FUNCTION__);
if (self->ack_required) { if (self->ack_required) {
irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME); irlap_send_ui_frame(self, skb_get(skb), self->caddr, CMD_FRAME);
...@@ -952,7 +953,7 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command) ...@@ -952,7 +953,7 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command)
/* tx_skb = skb_clone( skb, GFP_ATOMIC); */ /* tx_skb = skb_clone( skb, GFP_ATOMIC); */
tx_skb = skb_copy(skb, GFP_ATOMIC); tx_skb = skb_copy(skb, GFP_ATOMIC);
if (!tx_skb) { if (!tx_skb) {
IRDA_DEBUG(0, __FUNCTION__ "(), unable to copy\n"); IRDA_DEBUG(0, "%s(), unable to copy\n", __FUNCTION__);
return; return;
} }
/* Unlink tx_skb from list */ /* Unlink tx_skb from list */
...@@ -987,7 +988,7 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command) ...@@ -987,7 +988,7 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command)
*/ */
while (skb_queue_len( &self->txq) > 0) { while (skb_queue_len( &self->txq) > 0) {
IRDA_DEBUG(0, __FUNCTION__ "(), sending additional frames!\n"); IRDA_DEBUG(0, "%s(), sending additional frames!\n", __FUNCTION__);
if ((skb_queue_len( &self->txq) > 0) && if ((skb_queue_len( &self->txq) > 0) &&
(self->window > 0)) { (self->window > 0)) {
skb = skb_dequeue( &self->txq); skb = skb_dequeue( &self->txq);
...@@ -1032,7 +1033,7 @@ void irlap_resend_rejected_frame(struct irlap_cb *self, int command) ...@@ -1032,7 +1033,7 @@ void irlap_resend_rejected_frame(struct irlap_cb *self, int command)
/* tx_skb = skb_clone( skb, GFP_ATOMIC); */ /* tx_skb = skb_clone( skb, GFP_ATOMIC); */
tx_skb = skb_copy(skb, GFP_ATOMIC); tx_skb = skb_copy(skb, GFP_ATOMIC);
if (!tx_skb) { if (!tx_skb) {
IRDA_DEBUG(0, __FUNCTION__ "(), unable to copy\n"); IRDA_DEBUG(0, "%s(), unable to copy\n", __FUNCTION__);
return; return;
} }
/* Unlink tx_skb from list */ /* Unlink tx_skb from list */
...@@ -1058,7 +1059,7 @@ void irlap_resend_rejected_frame(struct irlap_cb *self, int command) ...@@ -1058,7 +1059,7 @@ void irlap_resend_rejected_frame(struct irlap_cb *self, int command)
void irlap_send_ui_frame(struct irlap_cb *self, struct sk_buff *skb, void irlap_send_ui_frame(struct irlap_cb *self, struct sk_buff *skb,
__u8 caddr, int command) __u8 caddr, int command)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -1118,7 +1119,7 @@ static inline void irlap_recv_i_frame(struct irlap_cb *self, ...@@ -1118,7 +1119,7 @@ static inline void irlap_recv_i_frame(struct irlap_cb *self,
static void irlap_recv_ui_frame(struct irlap_cb *self, struct sk_buff *skb, static void irlap_recv_ui_frame(struct irlap_cb *self, struct sk_buff *skb,
struct irlap_info *info) struct irlap_info *info)
{ {
IRDA_DEBUG( 4, __FUNCTION__ "()\n"); IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
info->pf = skb->data[1] & PF_BIT; /* Final bit */ info->pf = skb->data[1] & PF_BIT; /* Final bit */
...@@ -1137,7 +1138,7 @@ static void irlap_recv_frmr_frame(struct irlap_cb *self, struct sk_buff *skb, ...@@ -1137,7 +1138,7 @@ static void irlap_recv_frmr_frame(struct irlap_cb *self, struct sk_buff *skb,
__u8 *frame; __u8 *frame;
int w, x, y, z; int w, x, y, z;
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;); ASSERT(self->magic == LAP_MAGIC, return;);
...@@ -1226,15 +1227,15 @@ static void irlap_recv_test_frame(struct irlap_cb *self, struct sk_buff *skb, ...@@ -1226,15 +1227,15 @@ static void irlap_recv_test_frame(struct irlap_cb *self, struct sk_buff *skb,
{ {
struct test_frame *frame; struct test_frame *frame;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
frame = (struct test_frame *) skb->data; frame = (struct test_frame *) skb->data;
/* Broadcast frames must carry saddr and daddr fields */ /* Broadcast frames must carry saddr and daddr fields */
if (info->caddr == CBROADCAST) { if (info->caddr == CBROADCAST) {
if (skb->len < sizeof(struct test_frame)) { if (skb->len < sizeof(struct test_frame)) {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0, "%s() test frame to short!\n",
"() test frame to short!\n"); __FUNCTION__);
return; return;
} }
...@@ -1296,7 +1297,8 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev, ...@@ -1296,7 +1297,8 @@ int irlap_driver_rcv(struct sk_buff *skb, struct net_device *dev,
/* First we check if this frame has a valid connection address */ /* First we check if this frame has a valid connection address */
if ((info.caddr != self->caddr) && (info.caddr != CBROADCAST)) { if ((info.caddr != self->caddr) && (info.caddr != CBROADCAST)) {
IRDA_DEBUG(0, __FUNCTION__ "(), wrong connection address!\n"); IRDA_DEBUG(0, "%s(), wrong connection address!\n",
__FUNCTION__);
goto out; goto out;
} }
/* /*
......
...@@ -75,7 +75,7 @@ int irlmp_proc_read(char *buf, char **start, off_t offst, int len); ...@@ -75,7 +75,7 @@ int irlmp_proc_read(char *buf, char **start, off_t offst, int len);
*/ */
int __init irlmp_init(void) int __init irlmp_init(void)
{ {
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
/* Initialize the irlmp structure. */ /* Initialize the irlmp structure. */
irlmp = kmalloc( sizeof(struct irlmp_cb), GFP_KERNEL); irlmp = kmalloc( sizeof(struct irlmp_cb), GFP_KERNEL);
if (irlmp == NULL) if (irlmp == NULL)
...@@ -190,7 +190,7 @@ struct lsap_cb *irlmp_open_lsap(__u8 slsap_sel, notify_t *notify, __u8 pid) ...@@ -190,7 +190,7 @@ struct lsap_cb *irlmp_open_lsap(__u8 slsap_sel, notify_t *notify, __u8 pid)
*/ */
static void __irlmp_close_lsap(struct lsap_cb *self) static void __irlmp_close_lsap(struct lsap_cb *self)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LMP_LSAP_MAGIC, return;); ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
...@@ -250,8 +250,9 @@ void irlmp_close_lsap(struct lsap_cb *self) ...@@ -250,8 +250,9 @@ void irlmp_close_lsap(struct lsap_cb *self)
NULL); NULL);
} }
if (!lsap) { if (!lsap) {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0,
"(), Looks like somebody has removed me already!\n"); "%s(), Looks like somebody has removed me already!\n",
__FUNCTION__);
return; return;
} }
__irlmp_close_lsap(self); __irlmp_close_lsap(self);
...@@ -318,7 +319,7 @@ void irlmp_unregister_link(__u32 saddr) ...@@ -318,7 +319,7 @@ void irlmp_unregister_link(__u32 saddr)
{ {
struct lap_cb *link; struct lap_cb *link;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
link = hashbin_remove(irlmp->links, saddr, NULL); link = hashbin_remove(irlmp->links, saddr, NULL);
if (link) { if (link) {
...@@ -351,9 +352,9 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel, ...@@ -351,9 +352,9 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
ASSERT(self != NULL, return -EBADR;); ASSERT(self != NULL, return -EBADR;);
ASSERT(self->magic == LMP_LSAP_MAGIC, return -EBADR;); ASSERT(self->magic == LMP_LSAP_MAGIC, return -EBADR;);
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2,
"(), slsap_sel=%02x, dlsap_sel=%02x, saddr=%08x, daddr=%08x\n", "%s(), slsap_sel=%02x, dlsap_sel=%02x, saddr=%08x, daddr=%08x\n",
self->slsap_sel, dlsap_sel, saddr, daddr); __FUNCTION__, self->slsap_sel, dlsap_sel, saddr, daddr);
if (test_bit(0, &self->connected)) if (test_bit(0, &self->connected))
return -EISCONN; return -EISCONN;
...@@ -394,7 +395,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel, ...@@ -394,7 +395,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
if (daddr != DEV_ADDR_ANY) if (daddr != DEV_ADDR_ANY)
discovery = hashbin_find(irlmp->cachelog, daddr, NULL); discovery = hashbin_find(irlmp->cachelog, daddr, NULL);
else { else {
IRDA_DEBUG(2, __FUNCTION__ "(), no daddr\n"); IRDA_DEBUG(2, "%s(), no daddr\n", __FUNCTION__);
discovery = (discovery_t *) discovery = (discovery_t *)
hashbin_get_first(irlmp->cachelog); hashbin_get_first(irlmp->cachelog);
} }
...@@ -407,7 +408,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel, ...@@ -407,7 +408,7 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
} }
lap = hashbin_lock_find(irlmp->links, saddr, NULL); lap = hashbin_lock_find(irlmp->links, saddr, NULL);
if (lap == NULL) { if (lap == NULL) {
IRDA_DEBUG(1, __FUNCTION__ "(), Unable to find a usable link!\n"); IRDA_DEBUG(1, "%s(), Unable to find a usable link!\n", __FUNCTION__);
return -EHOSTUNREACH; return -EHOSTUNREACH;
} }
...@@ -421,13 +422,13 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel, ...@@ -421,13 +422,13 @@ int irlmp_connect_request(struct lsap_cb *self, __u8 dlsap_sel,
* disconnected yet (waiting for timeout in LAP). * disconnected yet (waiting for timeout in LAP).
* Maybe we could give LAP a bit of help in this case. * Maybe we could give LAP a bit of help in this case.
*/ */
IRDA_DEBUG(0, __FUNCTION__ "(), sorry, but I'm waiting for LAP to timeout!\n"); IRDA_DEBUG(0, "%s(), sorry, but I'm waiting for LAP to timeout!\n", __FUNCTION__);
return -EAGAIN; return -EAGAIN;
} }
/* LAP is already connected to a different node, and LAP /* LAP is already connected to a different node, and LAP
* can only talk to one node at a time */ * can only talk to one node at a time */
IRDA_DEBUG(0, __FUNCTION__ "(), sorry, but link is busy!\n"); IRDA_DEBUG(0, "%s(), sorry, but link is busy!\n", __FUNCTION__);
return -EBUSY; return -EBUSY;
} }
...@@ -477,8 +478,8 @@ void irlmp_connect_indication(struct lsap_cb *self, struct sk_buff *skb) ...@@ -477,8 +478,8 @@ void irlmp_connect_indication(struct lsap_cb *self, struct sk_buff *skb)
ASSERT(skb != NULL, return;); ASSERT(skb != NULL, return;);
ASSERT(self->lap != NULL, return;); ASSERT(self->lap != NULL, return;);
IRDA_DEBUG(2, __FUNCTION__ "(), slsap_sel=%02x, dlsap_sel=%02x\n", IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
self->slsap_sel, self->dlsap_sel); __FUNCTION__, self->slsap_sel, self->dlsap_sel);
/* Note : self->lap is set in irlmp_link_data_indication(), /* Note : self->lap is set in irlmp_link_data_indication(),
* (case CONNECT_CMD:) because we have no way to set it here. * (case CONNECT_CMD:) because we have no way to set it here.
...@@ -516,8 +517,8 @@ int irlmp_connect_response(struct lsap_cb *self, struct sk_buff *userdata) ...@@ -516,8 +517,8 @@ int irlmp_connect_response(struct lsap_cb *self, struct sk_buff *userdata)
set_bit(0, &self->connected); /* TRUE */ set_bit(0, &self->connected); /* TRUE */
IRDA_DEBUG(2, __FUNCTION__ "(), slsap_sel=%02x, dlsap_sel=%02x\n", IRDA_DEBUG(2, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
self->slsap_sel, self->dlsap_sel); __FUNCTION__, self->slsap_sel, self->dlsap_sel);
/* Make room for MUX control header (3 bytes) */ /* Make room for MUX control header (3 bytes) */
ASSERT(skb_headroom(userdata) >= LMP_CONTROL_HEADER, return -1;); ASSERT(skb_headroom(userdata) >= LMP_CONTROL_HEADER, return -1;);
...@@ -539,7 +540,7 @@ void irlmp_connect_confirm(struct lsap_cb *self, struct sk_buff *skb) ...@@ -539,7 +540,7 @@ void irlmp_connect_confirm(struct lsap_cb *self, struct sk_buff *skb)
int lap_header_size; int lap_header_size;
int max_seg_size; int max_seg_size;
IRDA_DEBUG(3, __FUNCTION__ "()\n"); IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
ASSERT(skb != NULL, return;); ASSERT(skb != NULL, return;);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
...@@ -552,8 +553,8 @@ void irlmp_connect_confirm(struct lsap_cb *self, struct sk_buff *skb) ...@@ -552,8 +553,8 @@ void irlmp_connect_confirm(struct lsap_cb *self, struct sk_buff *skb)
lap_header_size = IRLAP_GET_HEADER_SIZE(self->lap->irlap); lap_header_size = IRLAP_GET_HEADER_SIZE(self->lap->irlap);
max_header_size = LMP_HEADER + lap_header_size; max_header_size = LMP_HEADER + lap_header_size;
IRDA_DEBUG(2, __FUNCTION__ "(), max_header_size=%d\n", IRDA_DEBUG(2, "%s(), max_header_size=%d\n",
max_header_size); __FUNCTION__, max_header_size);
/* Hide LMP_CONTROL_HEADER header from layer above */ /* Hide LMP_CONTROL_HEADER header from layer above */
skb_pull(skb, LMP_CONTROL_HEADER); skb_pull(skb, LMP_CONTROL_HEADER);
...@@ -578,13 +579,13 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance) ...@@ -578,13 +579,13 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance)
struct lsap_cb *new; struct lsap_cb *new;
unsigned long flags; unsigned long flags;
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
spin_lock_irqsave(&irlmp->unconnected_lsaps->hb_spinlock, flags); spin_lock_irqsave(&irlmp->unconnected_lsaps->hb_spinlock, flags);
/* Only allowed to duplicate unconnected LSAP's */ /* Only allowed to duplicate unconnected LSAP's */
if (!hashbin_find(irlmp->unconnected_lsaps, (long) orig, NULL)) { if (!hashbin_find(irlmp->unconnected_lsaps, (long) orig, NULL)) {
IRDA_DEBUG(0, __FUNCTION__ "(), unable to find LSAP\n"); IRDA_DEBUG(0, "%s(), unable to find LSAP\n", __FUNCTION__);
spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock, spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock,
flags); flags);
return NULL; return NULL;
...@@ -592,7 +593,7 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance) ...@@ -592,7 +593,7 @@ struct lsap_cb *irlmp_dup(struct lsap_cb *orig, void *instance)
/* Allocate a new instance */ /* Allocate a new instance */
new = kmalloc(sizeof(struct lsap_cb), GFP_ATOMIC); new = kmalloc(sizeof(struct lsap_cb), GFP_ATOMIC);
if (!new) { if (!new) {
IRDA_DEBUG(0, __FUNCTION__ "(), unable to kmalloc\n"); IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __FUNCTION__);
spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock, spin_unlock_irqrestore(&irlmp->unconnected_lsaps->hb_spinlock,
flags); flags);
return NULL; return NULL;
...@@ -639,7 +640,7 @@ int irlmp_disconnect_request(struct lsap_cb *self, struct sk_buff *userdata) ...@@ -639,7 +640,7 @@ int irlmp_disconnect_request(struct lsap_cb *self, struct sk_buff *userdata)
* and us that might mess up the hashbins below. This fixes it. * and us that might mess up the hashbins below. This fixes it.
* Jean II */ * Jean II */
if (! test_and_clear_bit(0, &self->connected)) { if (! test_and_clear_bit(0, &self->connected)) {
IRDA_DEBUG(0, __FUNCTION__ "(), already disconnected!\n"); IRDA_DEBUG(0, "%s(), already disconnected!\n", __FUNCTION__);
dev_kfree_skb(userdata); dev_kfree_skb(userdata);
return -1; return -1;
} }
...@@ -689,19 +690,19 @@ void irlmp_disconnect_indication(struct lsap_cb *self, LM_REASON reason, ...@@ -689,19 +690,19 @@ void irlmp_disconnect_indication(struct lsap_cb *self, LM_REASON reason,
{ {
struct lsap_cb *lsap; struct lsap_cb *lsap;
IRDA_DEBUG(1, __FUNCTION__ "(), reason=%s\n", lmp_reasons[reason]); IRDA_DEBUG(1, "%s(), reason=%s\n", __FUNCTION__, lmp_reasons[reason]);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LMP_LSAP_MAGIC, return;); ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
IRDA_DEBUG(3, __FUNCTION__ "(), slsap_sel=%02x, dlsap_sel=%02x\n", IRDA_DEBUG(3, "%s(), slsap_sel=%02x, dlsap_sel=%02x\n",
self->slsap_sel, self->dlsap_sel); __FUNCTION__, self->slsap_sel, self->dlsap_sel);
/* Already disconnected ? /* Already disconnected ?
* There is a race condition between irlmp_disconnect_request() * There is a race condition between irlmp_disconnect_request()
* and us that might mess up the hashbins below. This fixes it. * and us that might mess up the hashbins below. This fixes it.
* Jean II */ * Jean II */
if (! test_and_clear_bit(0, &self->connected)) { if (! test_and_clear_bit(0, &self->connected)) {
IRDA_DEBUG(0, __FUNCTION__ "(), already disconnected!\n"); IRDA_DEBUG(0, "%s(), already disconnected!\n", __FUNCTION__);
if (userdata) if (userdata)
dev_kfree_skb(userdata); dev_kfree_skb(userdata);
return; return;
...@@ -733,7 +734,7 @@ void irlmp_disconnect_indication(struct lsap_cb *self, LM_REASON reason, ...@@ -733,7 +734,7 @@ void irlmp_disconnect_indication(struct lsap_cb *self, LM_REASON reason,
self->notify.disconnect_indication(self->notify.instance, self->notify.disconnect_indication(self->notify.instance,
self, reason, userdata); self, reason, userdata);
else { else {
IRDA_DEBUG(0, __FUNCTION__ "(), no handler\n"); IRDA_DEBUG(0, "%s(), no handler\n", __FUNCTION__);
if (userdata) if (userdata)
dev_kfree_skb(userdata); dev_kfree_skb(userdata);
} }
...@@ -936,7 +937,7 @@ irlmp_notify_client(irlmp_client_t *client, ...@@ -936,7 +937,7 @@ irlmp_notify_client(irlmp_client_t *client,
{ {
discovery_t *discovery; discovery_t *discovery;
IRDA_DEBUG(3, __FUNCTION__ "()\n"); IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
/* Check if client wants or not partial/selective log (optimisation) */ /* Check if client wants or not partial/selective log (optimisation) */
if (!client->disco_callback) if (!client->disco_callback)
...@@ -979,7 +980,7 @@ void irlmp_discovery_confirm(hashbin_t *log, DISCOVERY_MODE mode) ...@@ -979,7 +980,7 @@ void irlmp_discovery_confirm(hashbin_t *log, DISCOVERY_MODE mode)
irlmp_client_t *client; irlmp_client_t *client;
irlmp_client_t *client_next; irlmp_client_t *client_next;
IRDA_DEBUG(3, __FUNCTION__ "()\n"); IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
ASSERT(log != NULL, return;); ASSERT(log != NULL, return;);
...@@ -1012,7 +1013,7 @@ void irlmp_discovery_expiry(discovery_t *expiry) ...@@ -1012,7 +1013,7 @@ void irlmp_discovery_expiry(discovery_t *expiry)
irlmp_client_t *client; irlmp_client_t *client;
irlmp_client_t *client_next; irlmp_client_t *client_next;
IRDA_DEBUG(3, __FUNCTION__ "()\n"); IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
ASSERT(expiry != NULL, return;); ASSERT(expiry != NULL, return;);
...@@ -1038,7 +1039,7 @@ void irlmp_discovery_expiry(discovery_t *expiry) ...@@ -1038,7 +1039,7 @@ void irlmp_discovery_expiry(discovery_t *expiry)
*/ */
discovery_t *irlmp_get_discovery_response() discovery_t *irlmp_get_discovery_response()
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(irlmp != NULL, return NULL;); ASSERT(irlmp != NULL, return NULL;);
...@@ -1098,7 +1099,7 @@ void irlmp_data_indication(struct lsap_cb *self, struct sk_buff *skb) ...@@ -1098,7 +1099,7 @@ void irlmp_data_indication(struct lsap_cb *self, struct sk_buff *skb)
*/ */
int irlmp_udata_request(struct lsap_cb *self, struct sk_buff *skb) int irlmp_udata_request(struct lsap_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(skb != NULL, return -1;); ASSERT(skb != NULL, return -1;);
...@@ -1117,7 +1118,7 @@ int irlmp_udata_request(struct lsap_cb *self, struct sk_buff *skb) ...@@ -1117,7 +1118,7 @@ int irlmp_udata_request(struct lsap_cb *self, struct sk_buff *skb)
*/ */
void irlmp_udata_indication(struct lsap_cb *self, struct sk_buff *skb) void irlmp_udata_indication(struct lsap_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LMP_LSAP_MAGIC, return;); ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
...@@ -1142,7 +1143,7 @@ int irlmp_connless_data_request(struct lsap_cb *self, struct sk_buff *skb) ...@@ -1142,7 +1143,7 @@ int irlmp_connless_data_request(struct lsap_cb *self, struct sk_buff *skb)
struct sk_buff *clone_skb; struct sk_buff *clone_skb;
struct lap_cb *lap; struct lap_cb *lap;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(skb != NULL, return -1;); ASSERT(skb != NULL, return -1;);
...@@ -1185,7 +1186,7 @@ int irlmp_connless_data_request(struct lsap_cb *self, struct sk_buff *skb) ...@@ -1185,7 +1186,7 @@ int irlmp_connless_data_request(struct lsap_cb *self, struct sk_buff *skb)
#ifdef CONFIG_IRDA_ULTRA #ifdef CONFIG_IRDA_ULTRA
void irlmp_connless_data_indication(struct lsap_cb *self, struct sk_buff *skb) void irlmp_connless_data_indication(struct lsap_cb *self, struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LMP_LSAP_MAGIC, return;); ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
...@@ -1204,7 +1205,7 @@ void irlmp_connless_data_indication(struct lsap_cb *self, struct sk_buff *skb) ...@@ -1204,7 +1205,7 @@ void irlmp_connless_data_indication(struct lsap_cb *self, struct sk_buff *skb)
void irlmp_status_request(void) void irlmp_status_request(void)
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), Not implemented\n"); IRDA_DEBUG(0, "%s(), Not implemented\n", __FUNCTION__);
} }
/* /*
...@@ -1232,7 +1233,7 @@ void irlmp_status_indication(struct lap_cb *self, ...@@ -1232,7 +1233,7 @@ void irlmp_status_indication(struct lap_cb *self,
curr->notify.status_indication(curr->notify.instance, curr->notify.status_indication(curr->notify.instance,
link, lock); link, lock);
else else
IRDA_DEBUG(2, __FUNCTION__ "(), no handler\n"); IRDA_DEBUG(2, "%s(), no handler\n", __FUNCTION__);
curr = next; curr = next;
} }
...@@ -1260,7 +1261,7 @@ void irlmp_flow_indication(struct lap_cb *self, LOCAL_FLOW flow) ...@@ -1260,7 +1261,7 @@ void irlmp_flow_indication(struct lap_cb *self, LOCAL_FLOW flow)
/* Get the number of lsap. That's the only safe way to know /* Get the number of lsap. That's the only safe way to know
* that we have looped around... - Jean II */ * that we have looped around... - Jean II */
lsap_todo = HASHBIN_GET_SIZE(self->lsaps); lsap_todo = HASHBIN_GET_SIZE(self->lsaps);
IRDA_DEBUG(4, __FUNCTION__ "() : %d lsaps to scan\n", lsap_todo); IRDA_DEBUG(4, "%s() : %d lsaps to scan\n", __FUNCTION__, lsap_todo);
/* Poll lsap in order until the queue is full or until we /* Poll lsap in order until the queue is full or until we
* tried them all. * tried them all.
...@@ -1279,14 +1280,14 @@ void irlmp_flow_indication(struct lap_cb *self, LOCAL_FLOW flow) ...@@ -1279,14 +1280,14 @@ void irlmp_flow_indication(struct lap_cb *self, LOCAL_FLOW flow)
/* Uh-oh... Paranoia */ /* Uh-oh... Paranoia */
if(curr == NULL) if(curr == NULL)
break; break;
IRDA_DEBUG(4, __FUNCTION__ "() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", curr, next, self->flow_next, lsap_todo, IRLAP_GET_TX_QUEUE_LEN(self->irlap)); IRDA_DEBUG(4, "%s() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", __FUNCTION__, curr, next, self->flow_next, lsap_todo, IRLAP_GET_TX_QUEUE_LEN(self->irlap));
/* Inform lsap user that it can send one more packet. */ /* Inform lsap user that it can send one more packet. */
if (curr->notify.flow_indication != NULL) if (curr->notify.flow_indication != NULL)
curr->notify.flow_indication(curr->notify.instance, curr->notify.flow_indication(curr->notify.instance,
curr, flow); curr, flow);
else else
IRDA_DEBUG(1, __FUNCTION__ "(), no handler\n"); IRDA_DEBUG(1, "%s(), no handler\n", __FUNCTION__);
} }
} }
...@@ -1307,7 +1308,7 @@ __u8 *irlmp_hint_to_service(__u8 *hint) ...@@ -1307,7 +1308,7 @@ __u8 *irlmp_hint_to_service(__u8 *hint)
*/ */
service = kmalloc(16, GFP_ATOMIC); service = kmalloc(16, GFP_ATOMIC);
if (!service) { if (!service) {
IRDA_DEBUG(1, __FUNCTION__ "(), Unable to kmalloc!\n"); IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __FUNCTION__);
return NULL; return NULL;
} }
...@@ -1413,7 +1414,7 @@ __u16 irlmp_service_to_hint(int service) ...@@ -1413,7 +1414,7 @@ __u16 irlmp_service_to_hint(int service)
hint.word = 0xffff; hint.word = 0xffff;
break; break;
default: default:
IRDA_DEBUG( 1, __FUNCTION__ "(), Unknown service!\n"); IRDA_DEBUG( 1, "%s(), Unknown service!\n", __FUNCTION__);
break; break;
} }
return hint.word; return hint.word;
...@@ -1429,12 +1430,12 @@ void *irlmp_register_service(__u16 hints) ...@@ -1429,12 +1430,12 @@ void *irlmp_register_service(__u16 hints)
{ {
irlmp_service_t *service; irlmp_service_t *service;
IRDA_DEBUG(4, __FUNCTION__ "(), hints = %04x\n", hints); IRDA_DEBUG(4, "%s(), hints = %04x\n", __FUNCTION__, hints);
/* Make a new registration */ /* Make a new registration */
service = kmalloc(sizeof(irlmp_service_t), GFP_ATOMIC); service = kmalloc(sizeof(irlmp_service_t), GFP_ATOMIC);
if (!service) { if (!service) {
IRDA_DEBUG(1, __FUNCTION__ "(), Unable to kmalloc!\n"); IRDA_DEBUG(1, "%s(), Unable to kmalloc!\n", __FUNCTION__);
return 0; return 0;
} }
service->hints = hints; service->hints = hints;
...@@ -1458,7 +1459,7 @@ int irlmp_unregister_service(void *handle) ...@@ -1458,7 +1459,7 @@ int irlmp_unregister_service(void *handle)
irlmp_service_t *service; irlmp_service_t *service;
unsigned long flags; unsigned long flags;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
if (!handle) if (!handle)
return -1; return -1;
...@@ -1466,7 +1467,7 @@ int irlmp_unregister_service(void *handle) ...@@ -1466,7 +1467,7 @@ int irlmp_unregister_service(void *handle)
/* Caller may call with invalid handle (it's legal) - Jean II */ /* Caller may call with invalid handle (it's legal) - Jean II */
service = hashbin_lock_find(irlmp->services, (long) handle, NULL); service = hashbin_lock_find(irlmp->services, (long) handle, NULL);
if (!service) { if (!service) {
IRDA_DEBUG(1, __FUNCTION__ "(), Unknown service!\n"); IRDA_DEBUG(1, "%s(), Unknown service!\n", __FUNCTION__);
return -1; return -1;
} }
...@@ -1502,13 +1503,13 @@ void *irlmp_register_client(__u16 hint_mask, DISCOVERY_CALLBACK1 disco_clb, ...@@ -1502,13 +1503,13 @@ void *irlmp_register_client(__u16 hint_mask, DISCOVERY_CALLBACK1 disco_clb,
{ {
irlmp_client_t *client; irlmp_client_t *client;
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
ASSERT(irlmp != NULL, return 0;); ASSERT(irlmp != NULL, return 0;);
/* Make a new registration */ /* Make a new registration */
client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC); client = kmalloc(sizeof(irlmp_client_t), GFP_ATOMIC);
if (!client) { if (!client) {
IRDA_DEBUG( 1, __FUNCTION__ "(), Unable to kmalloc!\n"); IRDA_DEBUG( 1, "%s(), Unable to kmalloc!\n", __FUNCTION__);
return 0; return 0;
} }
...@@ -1543,7 +1544,7 @@ int irlmp_update_client(void *handle, __u16 hint_mask, ...@@ -1543,7 +1544,7 @@ int irlmp_update_client(void *handle, __u16 hint_mask,
client = hashbin_lock_find(irlmp->clients, (long) handle, NULL); client = hashbin_lock_find(irlmp->clients, (long) handle, NULL);
if (!client) { if (!client) {
IRDA_DEBUG(1, __FUNCTION__ "(), Unknown client!\n"); IRDA_DEBUG(1, "%s(), Unknown client!\n", __FUNCTION__);
return -1; return -1;
} }
...@@ -1565,7 +1566,7 @@ int irlmp_unregister_client(void *handle) ...@@ -1565,7 +1566,7 @@ int irlmp_unregister_client(void *handle)
{ {
struct irlmp_client *client; struct irlmp_client *client;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
if (!handle) if (!handle)
return -1; return -1;
...@@ -1573,11 +1574,11 @@ int irlmp_unregister_client(void *handle) ...@@ -1573,11 +1574,11 @@ int irlmp_unregister_client(void *handle)
/* Caller may call with invalid handle (it's legal) - Jean II */ /* Caller may call with invalid handle (it's legal) - Jean II */
client = hashbin_lock_find(irlmp->clients, (long) handle, NULL); client = hashbin_lock_find(irlmp->clients, (long) handle, NULL);
if (!client) { if (!client) {
IRDA_DEBUG(1, __FUNCTION__ "(), Unknown client!\n"); IRDA_DEBUG(1, "%s(), Unknown client!\n", __FUNCTION__);
return -1; return -1;
} }
IRDA_DEBUG( 4, __FUNCTION__ "(), removing client!\n"); IRDA_DEBUG(4, "%s(), removing client!\n", __FUNCTION__);
hashbin_remove_this(irlmp->clients, (irda_queue_t *) client); hashbin_remove_this(irlmp->clients, (irda_queue_t *) client);
kfree(client); kfree(client);
...@@ -1599,7 +1600,7 @@ int irlmp_slsap_inuse(__u8 slsap_sel) ...@@ -1599,7 +1600,7 @@ int irlmp_slsap_inuse(__u8 slsap_sel)
ASSERT(irlmp->magic == LMP_MAGIC, return TRUE;); ASSERT(irlmp->magic == LMP_MAGIC, return TRUE;);
ASSERT(slsap_sel != LSAP_ANY, return TRUE;); ASSERT(slsap_sel != LSAP_ANY, return TRUE;);
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
#ifdef CONFIG_IRDA_ULTRA #ifdef CONFIG_IRDA_ULTRA
/* Accept all bindings to the connectionless LSAP */ /* Accept all bindings to the connectionless LSAP */
...@@ -1674,7 +1675,8 @@ __u8 irlmp_find_free_slsap(void) ...@@ -1674,7 +1675,8 @@ __u8 irlmp_find_free_slsap(void)
return 0; return 0;
} }
} }
IRDA_DEBUG(4, __FUNCTION__ "(), next free lsap_sel=%02x\n", lsap_sel); IRDA_DEBUG(4, "%s(), next free lsap_sel=%02x\n",
__FUNCTION__, lsap_sel);
return lsap_sel; return lsap_sel;
} }
...@@ -1692,26 +1694,26 @@ LM_REASON irlmp_convert_lap_reason( LAP_REASON lap_reason) ...@@ -1692,26 +1694,26 @@ LM_REASON irlmp_convert_lap_reason( LAP_REASON lap_reason)
switch (lap_reason) { switch (lap_reason) {
case LAP_DISC_INDICATION: /* Received a disconnect request from peer */ case LAP_DISC_INDICATION: /* Received a disconnect request from peer */
IRDA_DEBUG( 1, __FUNCTION__ "(), LAP_DISC_INDICATION\n"); IRDA_DEBUG( 1, "%s(), LAP_DISC_INDICATION\n", __FUNCTION__);
reason = LM_USER_REQUEST; reason = LM_USER_REQUEST;
break; break;
case LAP_NO_RESPONSE: /* To many retransmits without response */ case LAP_NO_RESPONSE: /* To many retransmits without response */
IRDA_DEBUG( 1, __FUNCTION__ "(), LAP_NO_RESPONSE\n"); IRDA_DEBUG( 1, "%s(), LAP_NO_RESPONSE\n", __FUNCTION__);
reason = LM_LAP_DISCONNECT; reason = LM_LAP_DISCONNECT;
break; break;
case LAP_RESET_INDICATION: case LAP_RESET_INDICATION:
IRDA_DEBUG( 1, __FUNCTION__ "(), LAP_RESET_INDICATION\n"); IRDA_DEBUG( 1, "%s(), LAP_RESET_INDICATION\n", __FUNCTION__);
reason = LM_LAP_RESET; reason = LM_LAP_RESET;
break; break;
case LAP_FOUND_NONE: case LAP_FOUND_NONE:
case LAP_MEDIA_BUSY: case LAP_MEDIA_BUSY:
case LAP_PRIMARY_CONFLICT: case LAP_PRIMARY_CONFLICT:
IRDA_DEBUG(1, __FUNCTION__ "(), LAP_FOUND_NONE, LAP_MEDIA_BUSY or LAP_PRIMARY_CONFLICT\n"); IRDA_DEBUG(1, "%s(), LAP_FOUND_NONE, LAP_MEDIA_BUSY or LAP_PRIMARY_CONFLICT\n", __FUNCTION__);
reason = LM_CONNECT_FAILURE; reason = LM_CONNECT_FAILURE;
break; break;
default: default:
IRDA_DEBUG(1, __FUNCTION__ IRDA_DEBUG(1, "%s(), Unknow IrLAP disconnect reason %d!\n",
"(), Unknow IrLAP disconnect reason %d!\n", lap_reason); __FUNCTION__, lap_reason);
reason = LM_LAP_DISCONNECT; reason = LM_LAP_DISCONNECT;
break; break;
} }
......
...@@ -121,7 +121,7 @@ static inline void irlmp_next_lap_state(struct lap_cb *self, ...@@ -121,7 +121,7 @@ static inline void irlmp_next_lap_state(struct lap_cb *self,
IRLMP_STATE state) IRLMP_STATE state)
{ {
/* /*
IRDA_DEBUG(4, __FUNCTION__ "(), LMP LAP = %s\n", irlmp_state[state]); IRDA_DEBUG(4, "%s(), LMP LAP = %s\n", __FUNCTION__, irlmp_state[state]);
*/ */
self->lap_state = state; self->lap_state = state;
} }
...@@ -131,7 +131,7 @@ static inline void irlmp_next_lsap_state(struct lsap_cb *self, ...@@ -131,7 +131,7 @@ static inline void irlmp_next_lsap_state(struct lsap_cb *self,
{ {
/* /*
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
IRDA_DEBUG(4, __FUNCTION__ "(), LMP LSAP = %s\n", irlsap_state[state]); IRDA_DEBUG(4, "%s(), LMP LSAP = %s\n", __FUNCTION__, irlsap_state[state]);
*/ */
self->lsap_state = state; self->lsap_state = state;
} }
...@@ -143,8 +143,8 @@ int irlmp_do_lsap_event(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -143,8 +143,8 @@ int irlmp_do_lsap_event(struct lsap_cb *self, IRLMP_EVENT event,
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
IRDA_DEBUG(4, __FUNCTION__ "(), EVENT = %s, STATE = %s\n", IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n",
irlmp_event[event], irlsap_state[ self->lsap_state]); __FUNCTION__, irlmp_event[event], irlsap_state[ self->lsap_state]);
return (*lsap_state[self->lsap_state]) (self, event, skb); return (*lsap_state[self->lsap_state]) (self, event, skb);
} }
...@@ -161,7 +161,7 @@ void irlmp_do_lap_event(struct lap_cb *self, IRLMP_EVENT event, ...@@ -161,7 +161,7 @@ void irlmp_do_lap_event(struct lap_cb *self, IRLMP_EVENT event,
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LMP_LAP_MAGIC, return;); ASSERT(self->magic == LMP_LAP_MAGIC, return;);
IRDA_DEBUG(4, __FUNCTION__ "(), EVENT = %s, STATE = %s\n", IRDA_DEBUG(4, "%s(), EVENT = %s, STATE = %s\n", __FUNCTION__,
irlmp_event[event], irlmp_event[event],
irlmp_state[self->lap_state]); irlmp_state[self->lap_state]);
...@@ -170,7 +170,7 @@ void irlmp_do_lap_event(struct lap_cb *self, IRLMP_EVENT event, ...@@ -170,7 +170,7 @@ void irlmp_do_lap_event(struct lap_cb *self, IRLMP_EVENT event,
void irlmp_discovery_timer_expired(void *data) void irlmp_discovery_timer_expired(void *data)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
/* We always cleanup the log (active & passive discovery) */ /* We always cleanup the log (active & passive discovery) */
irlmp_do_expiry(); irlmp_do_expiry();
...@@ -187,7 +187,7 @@ void irlmp_watchdog_timer_expired(void *data) ...@@ -187,7 +187,7 @@ void irlmp_watchdog_timer_expired(void *data)
{ {
struct lsap_cb *self = (struct lsap_cb *) data; struct lsap_cb *self = (struct lsap_cb *) data;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LMP_LSAP_MAGIC, return;); ASSERT(self->magic == LMP_LSAP_MAGIC, return;);
...@@ -199,7 +199,7 @@ void irlmp_idle_timer_expired(void *data) ...@@ -199,7 +199,7 @@ void irlmp_idle_timer_expired(void *data)
{ {
struct lap_cb *self = (struct lap_cb *) data; struct lap_cb *self = (struct lap_cb *) data;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LMP_LAP_MAGIC, return;); ASSERT(self->magic == LMP_LAP_MAGIC, return;);
...@@ -259,7 +259,7 @@ irlmp_do_all_lsap_event(hashbin_t * lsap_hashbin, ...@@ -259,7 +259,7 @@ irlmp_do_all_lsap_event(hashbin_t * lsap_hashbin,
static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event, static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self->irlap != NULL, return;); ASSERT(self->irlap != NULL, return;);
switch (event) { switch (event) {
...@@ -279,7 +279,7 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event, ...@@ -279,7 +279,7 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event,
irlap_connect_response(self->irlap, skb); irlap_connect_response(self->irlap, skb);
break; break;
case LM_LAP_CONNECT_REQUEST: case LM_LAP_CONNECT_REQUEST:
IRDA_DEBUG(4, __FUNCTION__ "() LS_CONNECT_REQUEST\n"); IRDA_DEBUG(4, "%s() LS_CONNECT_REQUEST\n", __FUNCTION__);
irlmp_next_lap_state(self, LAP_U_CONNECT); irlmp_next_lap_state(self, LAP_U_CONNECT);
...@@ -287,14 +287,14 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event, ...@@ -287,14 +287,14 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event,
irlap_connect_request(self->irlap, self->daddr, NULL, 0); irlap_connect_request(self->irlap, self->daddr, NULL, 0);
break; break;
case LM_LAP_DISCONNECT_INDICATION: case LM_LAP_DISCONNECT_INDICATION:
IRDA_DEBUG(4, __FUNCTION__ IRDA_DEBUG(4, "%s(), Error LM_LAP_DISCONNECT_INDICATION\n",
"(), Error LM_LAP_DISCONNECT_INDICATION\n"); __FUNCTION__);
irlmp_next_lap_state(self, LAP_STANDBY); irlmp_next_lap_state(self, LAP_STANDBY);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(0, "%s(), Unknown event %s\n",
irlmp_event[event]); __FUNCTION__, irlmp_event[event]);
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
break; break;
...@@ -311,7 +311,7 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event, ...@@ -311,7 +311,7 @@ static void irlmp_state_standby(struct lap_cb *self, IRLMP_EVENT event,
static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(2, __FUNCTION__ "(), event=%s\n", irlmp_event[event]); IRDA_DEBUG(2, "%s(), event=%s\n", __FUNCTION__, irlmp_event[event]);
switch (event) { switch (event) {
case LM_LAP_CONNECT_INDICATION: case LM_LAP_CONNECT_INDICATION:
...@@ -331,7 +331,7 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, ...@@ -331,7 +331,7 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
* the lsaps may already have gone. This avoid getting stuck * the lsaps may already have gone. This avoid getting stuck
* forever in LAP_ACTIVE state - Jean II */ * forever in LAP_ACTIVE state - Jean II */
if (HASHBIN_GET_SIZE(self->lsaps) == 0) { if (HASHBIN_GET_SIZE(self->lsaps) == 0) {
IRDA_DEBUG(0, __FUNCTION__ "() NO LSAPs !\n"); IRDA_DEBUG(0, "%s() NO LSAPs !\n", __FUNCTION__);
irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT); irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT);
} }
break; break;
...@@ -349,12 +349,12 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, ...@@ -349,12 +349,12 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
* the lsaps may already have gone. This avoid getting stuck * the lsaps may already have gone. This avoid getting stuck
* forever in LAP_ACTIVE state - Jean II */ * forever in LAP_ACTIVE state - Jean II */
if (HASHBIN_GET_SIZE(self->lsaps) == 0) { if (HASHBIN_GET_SIZE(self->lsaps) == 0) {
IRDA_DEBUG(0, __FUNCTION__ "() NO LSAPs !\n"); IRDA_DEBUG(0, "%s() NO LSAPs !\n", __FUNCTION__);
irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT); irlmp_start_idle_timer(self, LM_IDLE_TIMEOUT);
} }
break; break;
case LM_LAP_DISCONNECT_INDICATION: case LM_LAP_DISCONNECT_INDICATION:
IRDA_DEBUG(4, __FUNCTION__ "(), LM_LAP_DISCONNECT_INDICATION\n"); IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_INDICATION\n", __FUNCTION__);
irlmp_next_lap_state(self, LAP_STANDBY); irlmp_next_lap_state(self, LAP_STANDBY);
/* Send disconnect event to all LSAPs using this link */ /* Send disconnect event to all LSAPs using this link */
...@@ -362,7 +362,7 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, ...@@ -362,7 +362,7 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
LM_LAP_DISCONNECT_INDICATION); LM_LAP_DISCONNECT_INDICATION);
break; break;
case LM_LAP_DISCONNECT_REQUEST: case LM_LAP_DISCONNECT_REQUEST:
IRDA_DEBUG(4, __FUNCTION__ "(), LM_LAP_DISCONNECT_REQUEST\n"); IRDA_DEBUG(4, "%s(), LM_LAP_DISCONNECT_REQUEST\n", __FUNCTION__);
/* One of the LSAP did timeout or was closed, if it was /* One of the LSAP did timeout or was closed, if it was
* the last one, try to get out of here - Jean II */ * the last one, try to get out of here - Jean II */
...@@ -371,8 +371,8 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, ...@@ -371,8 +371,8 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
} }
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(0, "%s(), Unknown event %s\n",
irlmp_event[event]); __FUNCTION__, irlmp_event[event]);
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
break; break;
...@@ -388,11 +388,11 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event, ...@@ -388,11 +388,11 @@ static void irlmp_state_u_connect(struct lap_cb *self, IRLMP_EVENT event,
static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event, static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
switch (event) { switch (event) {
case LM_LAP_CONNECT_REQUEST: case LM_LAP_CONNECT_REQUEST:
IRDA_DEBUG(4, __FUNCTION__ "(), LS_CONNECT_REQUEST\n"); IRDA_DEBUG(4, "%s(), LS_CONNECT_REQUEST\n", __FUNCTION__);
/* /*
* LAP connection allready active, just bounce back! Since we * LAP connection allready active, just bounce back! Since we
...@@ -466,8 +466,8 @@ static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event, ...@@ -466,8 +466,8 @@ static void irlmp_state_active(struct lap_cb *self, IRLMP_EVENT event,
irlmp_do_expiry(); irlmp_do_expiry();
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(0, "%s(), Unknown event %s\n",
irlmp_event[event]); __FUNCTION__, irlmp_event[event]);
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
break; break;
...@@ -491,7 +491,7 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -491,7 +491,7 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
...@@ -503,7 +503,7 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -503,7 +503,7 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
break; break;
#endif /* CONFIG_IRDA_ULTRA */ #endif /* CONFIG_IRDA_ULTRA */
case LM_CONNECT_REQUEST: case LM_CONNECT_REQUEST:
IRDA_DEBUG(4, __FUNCTION__ "(), LM_CONNECT_REQUEST\n"); IRDA_DEBUG(4, "%s(), LM_CONNECT_REQUEST\n", __FUNCTION__);
if (self->conn_skb) { if (self->conn_skb) {
WARNING("%s: busy with another request!\n", WARNING("%s: busy with another request!\n",
...@@ -545,8 +545,8 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -545,8 +545,8 @@ static int irlmp_state_disconnected(struct lsap_cb *self, IRLMP_EVENT event,
irlmp_start_watchdog_timer(self, 1*HZ); irlmp_start_watchdog_timer(self, 1*HZ);
break; break;
default: default:
IRDA_DEBUG(2, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(2, "%s(), Unknown event %s\n",
irlmp_event[event]); __FUNCTION__, irlmp_event[event]);
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
break; break;
...@@ -566,7 +566,7 @@ static int irlmp_state_connect(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -566,7 +566,7 @@ static int irlmp_state_connect(struct lsap_cb *self, IRLMP_EVENT event,
struct lsap_cb *lsap; struct lsap_cb *lsap;
int ret = 0; int ret = 0;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
...@@ -597,15 +597,15 @@ static int irlmp_state_connect(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -597,15 +597,15 @@ static int irlmp_state_connect(struct lsap_cb *self, IRLMP_EVENT event,
case LM_WATCHDOG_TIMEOUT: case LM_WATCHDOG_TIMEOUT:
/* May happen, who knows... /* May happen, who knows...
* Jean II */ * Jean II */
IRDA_DEBUG(0, __FUNCTION__ "() WATCHDOG_TIMEOUT!\n"); IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __FUNCTION__);
/* Disconnect, get out... - Jean II */ /* Disconnect, get out... - Jean II */
self->dlsap_sel = LSAP_ANY; self->dlsap_sel = LSAP_ANY;
irlmp_next_lsap_state(self, LSAP_DISCONNECTED); irlmp_next_lsap_state(self, LSAP_DISCONNECTED);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(0, "%s(), Unknown event %s\n",
irlmp_event[event]); __FUNCTION__, irlmp_event[event]);
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
break; break;
...@@ -624,7 +624,7 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -624,7 +624,7 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event,
{ {
int ret = 0; int ret = 0;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
...@@ -634,17 +634,17 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -634,17 +634,17 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event,
/* Keep state */ /* Keep state */
break; break;
case LM_CONNECT_RESPONSE: case LM_CONNECT_RESPONSE:
IRDA_DEBUG(0, __FUNCTION__ "(), LM_CONNECT_RESPONSE, " IRDA_DEBUG(0, "%s(), LM_CONNECT_RESPONSE, "
"no indication issued yet\n"); "no indication issued yet\n", __FUNCTION__);
/* Keep state */ /* Keep state */
break; break;
case LM_DISCONNECT_REQUEST: case LM_DISCONNECT_REQUEST:
IRDA_DEBUG(0, __FUNCTION__ "(), LM_DISCONNECT_REQUEST, " IRDA_DEBUG(0, "%s(), LM_DISCONNECT_REQUEST, "
"not yet bound to IrLAP connection\n"); "not yet bound to IrLAP connection\n", __FUNCTION__);
/* Keep state */ /* Keep state */
break; break;
case LM_LAP_CONNECT_CONFIRM: case LM_LAP_CONNECT_CONFIRM:
IRDA_DEBUG(4, __FUNCTION__ "(), LS_CONNECT_CONFIRM\n"); IRDA_DEBUG(4, "%s(), LS_CONNECT_CONFIRM\n", __FUNCTION__);
irlmp_next_lsap_state(self, LSAP_CONNECT); irlmp_next_lsap_state(self, LSAP_CONNECT);
skb = self->conn_skb; skb = self->conn_skb;
...@@ -656,7 +656,7 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -656,7 +656,7 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event,
/* Will happen in some rare cases because of a race condition. /* Will happen in some rare cases because of a race condition.
* Just make sure we don't stay there forever... * Just make sure we don't stay there forever...
* Jean II */ * Jean II */
IRDA_DEBUG(0, __FUNCTION__ "() WATCHDOG_TIMEOUT!\n"); IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __FUNCTION__);
/* Go back to disconnected mode, keep the socket waiting */ /* Go back to disconnected mode, keep the socket waiting */
self->dlsap_sel = LSAP_ANY; self->dlsap_sel = LSAP_ANY;
...@@ -666,8 +666,8 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -666,8 +666,8 @@ static int irlmp_state_connect_pend(struct lsap_cb *self, IRLMP_EVENT event,
irlmp_next_lsap_state(self, LSAP_DISCONNECTED); irlmp_next_lsap_state(self, LSAP_DISCONNECTED);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "Unknown event %s\n", IRDA_DEBUG(0, "%s(), Unknown event %s\n",
irlmp_event[event]); __FUNCTION__, irlmp_event[event]);
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
break; break;
...@@ -687,7 +687,7 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -687,7 +687,7 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event,
LM_REASON reason; LM_REASON reason;
int ret = 0; int ret = 0;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
...@@ -710,13 +710,13 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -710,13 +710,13 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event,
irlmp_udata_indication(self, skb); irlmp_udata_indication(self, skb);
break; break;
case LM_CONNECT_REQUEST: case LM_CONNECT_REQUEST:
IRDA_DEBUG(0, __FUNCTION__ "(), LM_CONNECT_REQUEST, " IRDA_DEBUG(0, "%s(), LM_CONNECT_REQUEST, "
"error, LSAP already connected\n"); "error, LSAP already connected\n", __FUNCTION__);
/* Keep state */ /* Keep state */
break; break;
case LM_CONNECT_RESPONSE: case LM_CONNECT_RESPONSE:
IRDA_DEBUG(0, __FUNCTION__ "(), LM_CONNECT_RESPONSE, " IRDA_DEBUG(0, "%s(), LM_CONNECT_RESPONSE, "
"error, LSAP allready connected\n"); "error, LSAP allready connected\n", __FUNCTION__);
/* Keep state */ /* Keep state */
break; break;
case LM_DISCONNECT_REQUEST: case LM_DISCONNECT_REQUEST:
...@@ -726,7 +726,8 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -726,7 +726,8 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event,
/* Try to close the LAP connection if its still there */ /* Try to close the LAP connection if its still there */
if (self->lap) { if (self->lap) {
IRDA_DEBUG(4, __FUNCTION__ "(), trying to close IrLAP\n"); IRDA_DEBUG(4, "%s(), trying to close IrLAP\n",
__FUNCTION__);
irlmp_do_lap_event(self->lap, irlmp_do_lap_event(self->lap,
LM_LAP_DISCONNECT_REQUEST, LM_LAP_DISCONNECT_REQUEST,
NULL); NULL);
...@@ -750,14 +751,14 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -750,14 +751,14 @@ static int irlmp_state_dtr(struct lsap_cb *self, IRLMP_EVENT event,
reason = skb->data[3]; reason = skb->data[3];
/* Try to close the LAP connection */ /* Try to close the LAP connection */
IRDA_DEBUG(4, __FUNCTION__ "(), trying to close IrLAP\n"); IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __FUNCTION__);
irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
irlmp_disconnect_indication(self, reason, skb); irlmp_disconnect_indication(self, reason, skb);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(0, "%s(), Unknown event %s\n",
irlmp_event[event]); __FUNCTION__, irlmp_event[event]);
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
break; break;
...@@ -781,7 +782,7 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -781,7 +782,7 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event,
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;); ASSERT(self->magic == LMP_LSAP_MAGIC, return -1;);
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
switch (event) { switch (event) {
case LM_CONNECT_CONFIRM: case LM_CONNECT_CONFIRM:
...@@ -802,7 +803,7 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -802,7 +803,7 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event,
reason = skb->data[3]; reason = skb->data[3];
/* Try to close the LAP connection */ /* Try to close the LAP connection */
IRDA_DEBUG(4, __FUNCTION__ "(), trying to close IrLAP\n"); IRDA_DEBUG(4, "%s(), trying to close IrLAP\n", __FUNCTION__);
irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
irlmp_disconnect_indication(self, reason, skb); irlmp_disconnect_indication(self, reason, skb);
...@@ -820,7 +821,7 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -820,7 +821,7 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event,
irlmp_disconnect_indication(self, reason, skb); irlmp_disconnect_indication(self, reason, skb);
break; break;
case LM_WATCHDOG_TIMEOUT: case LM_WATCHDOG_TIMEOUT:
IRDA_DEBUG(0, __FUNCTION__ "() WATCHDOG_TIMEOUT!\n"); IRDA_DEBUG(0, "%s() WATCHDOG_TIMEOUT!\n", __FUNCTION__);
ASSERT(self->lap != NULL, return -1;); ASSERT(self->lap != NULL, return -1;);
irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
...@@ -829,8 +830,8 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -829,8 +830,8 @@ static int irlmp_state_setup(struct lsap_cb *self, IRLMP_EVENT event,
irlmp_disconnect_indication(self, LM_CONNECT_FAILURE, NULL); irlmp_disconnect_indication(self, LM_CONNECT_FAILURE, NULL);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(0, "%s(), Unknown event %s\n",
irlmp_event[event]); __FUNCTION__, irlmp_event[event]);
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
break; break;
...@@ -852,7 +853,7 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -852,7 +853,7 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event,
LM_REASON reason; LM_REASON reason;
int ret = 0; int ret = 0;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(irlmp != NULL, return -1;); ASSERT(irlmp != NULL, return -1;);
...@@ -870,7 +871,7 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -870,7 +871,7 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event,
irlmp_next_lsap_state(self, LSAP_SETUP); irlmp_next_lsap_state(self, LSAP_SETUP);
break; break;
case LM_WATCHDOG_TIMEOUT: case LM_WATCHDOG_TIMEOUT:
IRDA_DEBUG(0, __FUNCTION__ "() : WATCHDOG_TIMEOUT !\n"); IRDA_DEBUG(0, "%s() : WATCHDOG_TIMEOUT !\n", __FUNCTION__);
ASSERT(self->lap != NULL, return -1;); ASSERT(self->lap != NULL, return -1;);
irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL); irlmp_do_lap_event(self->lap, LM_LAP_DISCONNECT_REQUEST, NULL);
...@@ -888,8 +889,8 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event, ...@@ -888,8 +889,8 @@ static int irlmp_state_setup_pend(struct lsap_cb *self, IRLMP_EVENT event,
irlmp_disconnect_indication(self, reason, NULL); irlmp_disconnect_indication(self, reason, NULL);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %s\n", IRDA_DEBUG(0, "%s(), Unknown event %s\n",
irlmp_event[event]); __FUNCTION__, irlmp_event[event]);
if (skb) if (skb)
dev_kfree_skb(skb); dev_kfree_skb(skb);
break; break;
......
...@@ -45,7 +45,7 @@ inline void irlmp_send_data_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap, ...@@ -45,7 +45,7 @@ inline void irlmp_send_data_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap,
skb->data[1] = slsap; skb->data[1] = slsap;
if (expedited) { if (expedited) {
IRDA_DEBUG(4, __FUNCTION__ "(), sending expedited data\n"); IRDA_DEBUG(4, "%s(), sending expedited data\n", __FUNCTION__);
irlap_data_request(self->irlap, skb, TRUE); irlap_data_request(self->irlap, skb, TRUE);
} else } else
irlap_data_request(self->irlap, skb, FALSE); irlap_data_request(self->irlap, skb, FALSE);
...@@ -61,7 +61,7 @@ void irlmp_send_lcf_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap, ...@@ -61,7 +61,7 @@ void irlmp_send_lcf_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap,
{ {
__u8 *frame; __u8 *frame;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LMP_LAP_MAGIC, return;); ASSERT(self->magic == LMP_LAP_MAGIC, return;);
...@@ -96,7 +96,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, ...@@ -96,7 +96,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
__u8 dlsap_sel; /* Destination LSAP address */ __u8 dlsap_sel; /* Destination LSAP address */
__u8 *fp; __u8 *fp;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LMP_LAP_MAGIC, return;); ASSERT(self->magic == LMP_LAP_MAGIC, return;);
...@@ -116,9 +116,9 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, ...@@ -116,9 +116,9 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
* it in a different way than other established connections. * it in a different way than other established connections.
*/ */
if ((fp[0] & CONTROL_BIT) && (fp[2] == CONNECT_CMD)) { if ((fp[0] & CONTROL_BIT) && (fp[2] == CONNECT_CMD)) {
IRDA_DEBUG(3, __FUNCTION__ "(), incoming connection, " IRDA_DEBUG(3, "%s(), incoming connection, "
"source LSAP=%d, dest LSAP=%d\n", "source LSAP=%d, dest LSAP=%d\n",
slsap_sel, dlsap_sel); __FUNCTION__, slsap_sel, dlsap_sel);
/* Try to find LSAP among the unconnected LSAPs */ /* Try to find LSAP among the unconnected LSAPs */
lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, CONNECT_CMD, lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, CONNECT_CMD,
...@@ -126,7 +126,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, ...@@ -126,7 +126,7 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
/* Maybe LSAP was already connected, so try one more time */ /* Maybe LSAP was already connected, so try one more time */
if (!lsap) { if (!lsap) {
IRDA_DEBUG(1, __FUNCTION__ "(), incoming connection for LSAP already connected\n"); IRDA_DEBUG(1, "%s(), incoming connection for LSAP already connected\n", __FUNCTION__);
lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, 0, lsap = irlmp_find_lsap(self, dlsap_sel, slsap_sel, 0,
self->lsaps); self->lsaps);
} }
...@@ -136,14 +136,13 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, ...@@ -136,14 +136,13 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
if (lsap == NULL) { if (lsap == NULL) {
IRDA_DEBUG(2, "IrLMP, Sorry, no LSAP for received frame!\n"); IRDA_DEBUG(2, "IrLMP, Sorry, no LSAP for received frame!\n");
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s(), slsap_sel = %02x, dlsap_sel = %02x\n",
"(), slsap_sel = %02x, dlsap_sel = %02x\n", slsap_sel, __FUNCTION__, slsap_sel, dlsap_sel);
dlsap_sel);
if (fp[0] & CONTROL_BIT) { if (fp[0] & CONTROL_BIT) {
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s(), received control frame %02x\n",
"(), received control frame %02x\n", fp[2]); __FUNCTION__, fp[2]);
} else { } else {
IRDA_DEBUG(2, __FUNCTION__ "(), received data frame\n"); IRDA_DEBUG(2, "%s(), received data frame\n", __FUNCTION__);
} }
dev_kfree_skb(skb); dev_kfree_skb(skb);
return; return;
...@@ -162,8 +161,8 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, ...@@ -162,8 +161,8 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
irlmp_do_lsap_event(lsap, LM_CONNECT_CONFIRM, skb); irlmp_do_lsap_event(lsap, LM_CONNECT_CONFIRM, skb);
break; break;
case DISCONNECT: case DISCONNECT:
IRDA_DEBUG(4, __FUNCTION__ IRDA_DEBUG(4, "%s(), Disconnect indication!\n",
"(), Disconnect indication!\n"); __FUNCTION__);
irlmp_do_lsap_event(lsap, LM_DISCONNECT_INDICATION, irlmp_do_lsap_event(lsap, LM_DISCONNECT_INDICATION,
skb); skb);
break; break;
...@@ -176,8 +175,8 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb, ...@@ -176,8 +175,8 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
dev_kfree_skb(skb); dev_kfree_skb(skb);
break; break;
default: default:
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0, "%s(), Unknown control frame %02x\n",
"(), Unknown control frame %02x\n", fp[2]); __FUNCTION__, fp[2]);
dev_kfree_skb(skb); dev_kfree_skb(skb);
break; break;
} }
...@@ -212,7 +211,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb) ...@@ -212,7 +211,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
__u8 *fp; __u8 *fp;
unsigned long flags; unsigned long flags;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LMP_LAP_MAGIC, return;); ASSERT(self->magic == LMP_LAP_MAGIC, return;);
...@@ -229,7 +228,8 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb) ...@@ -229,7 +228,8 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
pid = fp[2]; pid = fp[2];
if (pid & 0x80) { if (pid & 0x80) {
IRDA_DEBUG(0, __FUNCTION__ "(), extension in PID not supp!\n"); IRDA_DEBUG(0, "%s(), extension in PID not supp!\n",
__FUNCTION__);
dev_kfree_skb(skb); dev_kfree_skb(skb);
return; return;
...@@ -237,7 +237,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb) ...@@ -237,7 +237,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
/* Check if frame is addressed to the connectionless LSAP */ /* Check if frame is addressed to the connectionless LSAP */
if ((slsap_sel != LSAP_CONNLESS) || (dlsap_sel != LSAP_CONNLESS)) { if ((slsap_sel != LSAP_CONNLESS) || (dlsap_sel != LSAP_CONNLESS)) {
IRDA_DEBUG(0, __FUNCTION__ "(), dropping frame!\n"); IRDA_DEBUG(0, "%s(), dropping frame!\n", __FUNCTION__);
dev_kfree_skb(skb); dev_kfree_skb(skb);
return; return;
...@@ -263,7 +263,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb) ...@@ -263,7 +263,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
if (lsap) if (lsap)
irlmp_connless_data_indication(lsap, skb); irlmp_connless_data_indication(lsap, skb);
else { else {
IRDA_DEBUG(0, __FUNCTION__ "(), found no matching LSAP!\n"); IRDA_DEBUG(0, "%s(), found no matching LSAP!\n", __FUNCTION__);
dev_kfree_skb(skb); dev_kfree_skb(skb);
} }
} }
...@@ -280,7 +280,7 @@ void irlmp_link_disconnect_indication(struct lap_cb *lap, ...@@ -280,7 +280,7 @@ void irlmp_link_disconnect_indication(struct lap_cb *lap,
LAP_REASON reason, LAP_REASON reason,
struct sk_buff *userdata) struct sk_buff *userdata)
{ {
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(lap != NULL, return;); ASSERT(lap != NULL, return;);
ASSERT(lap->magic == LMP_LAP_MAGIC, return;); ASSERT(lap->magic == LMP_LAP_MAGIC, return;);
...@@ -308,7 +308,7 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr, ...@@ -308,7 +308,7 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr,
__u32 daddr, struct qos_info *qos, __u32 daddr, struct qos_info *qos,
struct sk_buff *skb) struct sk_buff *skb)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
/* Copy QoS settings for this session */ /* Copy QoS settings for this session */
self->qos = qos; self->qos = qos;
...@@ -329,7 +329,7 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr, ...@@ -329,7 +329,7 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr,
void irlmp_link_connect_confirm(struct lap_cb *self, struct qos_info *qos, void irlmp_link_connect_confirm(struct lap_cb *self, struct qos_info *qos,
struct sk_buff *userdata) struct sk_buff *userdata)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LMP_LAP_MAGIC, return;); ASSERT(self->magic == LMP_LAP_MAGIC, return;);
...@@ -397,7 +397,7 @@ void irlmp_link_discovery_indication(struct lap_cb *self, ...@@ -397,7 +397,7 @@ void irlmp_link_discovery_indication(struct lap_cb *self,
*/ */
void irlmp_link_discovery_confirm(struct lap_cb *self, hashbin_t *log) void irlmp_link_discovery_confirm(struct lap_cb *self, hashbin_t *log)
{ {
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == LMP_LAP_MAGIC, return;); ASSERT(self->magic == LMP_LAP_MAGIC, return;);
......
...@@ -231,7 +231,7 @@ static __u32 hash( char* name) ...@@ -231,7 +231,7 @@ static __u32 hash( char* name)
static void enqueue_first(irda_queue_t **queue, irda_queue_t* element) static void enqueue_first(irda_queue_t **queue, irda_queue_t* element)
{ {
IRDA_DEBUG( 4, __FUNCTION__ "()\n"); IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
/* /*
* Check if queue is empty. * Check if queue is empty.
...@@ -263,7 +263,7 @@ static void enqueue_first(irda_queue_t **queue, irda_queue_t* element) ...@@ -263,7 +263,7 @@ static void enqueue_first(irda_queue_t **queue, irda_queue_t* element)
*/ */
static void __enqueue_last( irda_queue_t **queue, irda_queue_t* element) static void __enqueue_last( irda_queue_t **queue, irda_queue_t* element)
{ {
IRDA_DEBUG( 4, __FUNCTION__ "()\n"); IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
/* /*
* Check if queue is empty. * Check if queue is empty.
...@@ -572,7 +572,7 @@ void hashbin_insert(hashbin_t* hashbin, irda_queue_t* entry, long hashv, char* n ...@@ -572,7 +572,7 @@ void hashbin_insert(hashbin_t* hashbin, irda_queue_t* entry, long hashv, char* n
unsigned long flags = 0; unsigned long flags = 0;
int bin; int bin;
IRDA_DEBUG( 4, __FUNCTION__"()\n"); IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
ASSERT( hashbin != NULL, return;); ASSERT( hashbin != NULL, return;);
ASSERT( hashbin->magic == HB_MAGIC, return;); ASSERT( hashbin->magic == HB_MAGIC, return;);
...@@ -689,7 +689,7 @@ void* hashbin_remove( hashbin_t* hashbin, long hashv, char* name) ...@@ -689,7 +689,7 @@ void* hashbin_remove( hashbin_t* hashbin, long hashv, char* name)
unsigned long flags = 0; unsigned long flags = 0;
irda_queue_t* entry; irda_queue_t* entry;
IRDA_DEBUG( 4, __FUNCTION__ "()\n"); IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
ASSERT( hashbin != NULL, return NULL;); ASSERT( hashbin != NULL, return NULL;);
ASSERT( hashbin->magic == HB_MAGIC, return NULL;); ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
...@@ -781,7 +781,7 @@ void* hashbin_remove_this( hashbin_t* hashbin, irda_queue_t* entry) ...@@ -781,7 +781,7 @@ void* hashbin_remove_this( hashbin_t* hashbin, irda_queue_t* entry)
int bin; int bin;
long hashv; long hashv;
IRDA_DEBUG( 4, __FUNCTION__ "()\n"); IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
ASSERT( hashbin != NULL, return NULL;); ASSERT( hashbin != NULL, return NULL;);
ASSERT( hashbin->magic == HB_MAGIC, return NULL;); ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
......
...@@ -204,11 +204,11 @@ static int irda_device_event(struct notifier_block *this, unsigned long event, ...@@ -204,11 +204,11 @@ static int irda_device_event(struct notifier_block *this, unsigned long event,
switch (event) { switch (event) {
case NETDEV_UP: case NETDEV_UP:
IRDA_DEBUG(3, __FUNCTION__ "(), NETDEV_UP\n"); IRDA_DEBUG(3, "%s(), NETDEV_UP\n", __FUNCTION__);
/* irda_dev_device_up(dev); */ /* irda_dev_device_up(dev); */
break; break;
case NETDEV_DOWN: case NETDEV_DOWN:
IRDA_DEBUG(3, __FUNCTION__ "(), NETDEV_DOWN\n"); IRDA_DEBUG(3, "%s(), NETDEV_DOWN\n", __FUNCTION__);
/* irda_kill_by_device(dev); */ /* irda_kill_by_device(dev); */
/* irda_rt_device_down(dev); */ /* irda_rt_device_down(dev); */
/* irda_dev_device_down(dev); */ /* irda_dev_device_down(dev); */
...@@ -253,7 +253,7 @@ void irda_notify_init(notify_t *notify) ...@@ -253,7 +253,7 @@ void irda_notify_init(notify_t *notify)
*/ */
int __init irda_init(void) int __init irda_init(void)
{ {
IRDA_DEBUG(0, __FUNCTION__ "()\n"); IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
/* Lower layer of the stack */ /* Lower layer of the stack */
irlmp_init(); irlmp_init();
......
...@@ -162,7 +162,7 @@ static void irttp_todo_expired(unsigned long data) ...@@ -162,7 +162,7 @@ static void irttp_todo_expired(unsigned long data)
if (!self || self->magic != TTP_TSAP_MAGIC) if (!self || self->magic != TTP_TSAP_MAGIC)
return; return;
IRDA_DEBUG(4, __FUNCTION__ "(instance=%p)\n", self); IRDA_DEBUG(4, "%s(instance=%p)\n", __FUNCTION__, self);
/* Try to make some progress, especially on Tx side - Jean II */ /* Try to make some progress, especially on Tx side - Jean II */
irttp_run_rx_queue(self); irttp_run_rx_queue(self);
...@@ -203,7 +203,7 @@ void irttp_flush_queues(struct tsap_cb *self) ...@@ -203,7 +203,7 @@ void irttp_flush_queues(struct tsap_cb *self)
{ {
struct sk_buff* skb; struct sk_buff* skb;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == TTP_TSAP_MAGIC, return;); ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
...@@ -236,7 +236,7 @@ static struct sk_buff *irttp_reassemble_skb(struct tsap_cb *self) ...@@ -236,7 +236,7 @@ static struct sk_buff *irttp_reassemble_skb(struct tsap_cb *self)
ASSERT(self != NULL, return NULL;); ASSERT(self != NULL, return NULL;);
ASSERT(self->magic == TTP_TSAP_MAGIC, return NULL;); ASSERT(self->magic == TTP_TSAP_MAGIC, return NULL;);
IRDA_DEBUG(2, __FUNCTION__ "(), self->rx_sdu_size=%d\n", IRDA_DEBUG(2, "%s(), self->rx_sdu_size=%d\n", __FUNCTION__,
self->rx_sdu_size); self->rx_sdu_size);
skb = dev_alloc_skb(TTP_HEADER + self->rx_sdu_size); skb = dev_alloc_skb(TTP_HEADER + self->rx_sdu_size);
...@@ -259,9 +259,10 @@ static struct sk_buff *irttp_reassemble_skb(struct tsap_cb *self) ...@@ -259,9 +259,10 @@ static struct sk_buff *irttp_reassemble_skb(struct tsap_cb *self)
dev_kfree_skb(frag); dev_kfree_skb(frag);
} }
IRDA_DEBUG(2, __FUNCTION__ "(), frame len=%d\n", n); IRDA_DEBUG(2, "%s(), frame len=%d\n", __FUNCTION__, n);
IRDA_DEBUG(2, __FUNCTION__ "(), rx_sdu_size=%d\n", self->rx_sdu_size); IRDA_DEBUG(2, "%s(), rx_sdu_size=%d\n", __FUNCTION__,
self->rx_sdu_size);
ASSERT(n <= self->rx_sdu_size, return NULL;); ASSERT(n <= self->rx_sdu_size, return NULL;);
/* Set the new length */ /* Set the new length */
...@@ -284,7 +285,7 @@ static inline void irttp_fragment_skb(struct tsap_cb *self, ...@@ -284,7 +285,7 @@ static inline void irttp_fragment_skb(struct tsap_cb *self,
struct sk_buff *frag; struct sk_buff *frag;
__u8 *frame; __u8 *frame;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == TTP_TSAP_MAGIC, return;); ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
...@@ -294,7 +295,7 @@ static inline void irttp_fragment_skb(struct tsap_cb *self, ...@@ -294,7 +295,7 @@ static inline void irttp_fragment_skb(struct tsap_cb *self,
* Split frame into a number of segments * Split frame into a number of segments
*/ */
while (skb->len > self->max_seg_size) { while (skb->len > self->max_seg_size) {
IRDA_DEBUG(2, __FUNCTION__ "(), fragmenting ...\n"); IRDA_DEBUG(2, "%s(), fragmenting ...\n", __FUNCTION__);
/* Make new segment */ /* Make new segment */
frag = dev_alloc_skb(self->max_seg_size+self->max_header_size); frag = dev_alloc_skb(self->max_seg_size+self->max_header_size);
...@@ -318,7 +319,7 @@ static inline void irttp_fragment_skb(struct tsap_cb *self, ...@@ -318,7 +319,7 @@ static inline void irttp_fragment_skb(struct tsap_cb *self,
skb_queue_tail(&self->tx_queue, frag); skb_queue_tail(&self->tx_queue, frag);
} }
/* Queue what is left of the original skb */ /* Queue what is left of the original skb */
IRDA_DEBUG(2, __FUNCTION__ "(), queuing last segment\n"); IRDA_DEBUG(2, "%s(), queuing last segment\n", __FUNCTION__);
frame = skb_push(skb, TTP_HEADER); frame = skb_push(skb, TTP_HEADER);
frame[0] = 0x00; /* Clear more bit */ frame[0] = 0x00; /* Clear more bit */
...@@ -349,7 +350,7 @@ static int irttp_param_max_sdu_size(void *instance, irda_param_t *param, ...@@ -349,7 +350,7 @@ static int irttp_param_max_sdu_size(void *instance, irda_param_t *param,
else else
self->tx_max_sdu_size = param->pv.i; self->tx_max_sdu_size = param->pv.i;
IRDA_DEBUG(1, __FUNCTION__ "(), MaxSduSize=%d\n", param->pv.i); IRDA_DEBUG(1, "%s(), MaxSduSize=%d\n", __FUNCTION__, param->pv.i);
return 0; return 0;
} }
...@@ -377,13 +378,13 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify) ...@@ -377,13 +378,13 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify)
* JeanII */ * JeanII */
if((stsap_sel != LSAP_ANY) && if((stsap_sel != LSAP_ANY) &&
((stsap_sel < 0x01) || (stsap_sel >= 0x70))) { ((stsap_sel < 0x01) || (stsap_sel >= 0x70))) {
IRDA_DEBUG(0, __FUNCTION__ "(), invalid tsap!\n"); IRDA_DEBUG(0, "%s(), invalid tsap!\n", __FUNCTION__);
return NULL; return NULL;
} }
self = kmalloc(sizeof(struct tsap_cb), GFP_ATOMIC); self = kmalloc(sizeof(struct tsap_cb), GFP_ATOMIC);
if (self == NULL) { if (self == NULL) {
IRDA_DEBUG(0, __FUNCTION__ "(), unable to kmalloc!\n"); IRDA_DEBUG(0, "%s(), unable to kmalloc!\n", __FUNCTION__);
return NULL; return NULL;
} }
memset(self, 0, sizeof(struct tsap_cb)); memset(self, 0, sizeof(struct tsap_cb));
...@@ -428,7 +429,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify) ...@@ -428,7 +429,7 @@ struct tsap_cb *irttp_open_tsap(__u8 stsap_sel, int credit, notify_t *notify)
* the stsap_sel we have might not be valid anymore * the stsap_sel we have might not be valid anymore
*/ */
self->stsap_sel = lsap->slsap_sel; self->stsap_sel = lsap->slsap_sel;
IRDA_DEBUG(4, __FUNCTION__ "(), stsap_sel=%02x\n", self->stsap_sel); IRDA_DEBUG(4, "%s(), stsap_sel=%02x\n", __FUNCTION__, self->stsap_sel);
self->notify = *notify; self->notify = *notify;
self->lsap = lsap; self->lsap = lsap;
...@@ -485,7 +486,7 @@ int irttp_close_tsap(struct tsap_cb *self) ...@@ -485,7 +486,7 @@ int irttp_close_tsap(struct tsap_cb *self)
{ {
struct tsap_cb *tsap; struct tsap_cb *tsap;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
...@@ -530,16 +531,18 @@ int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb) ...@@ -530,16 +531,18 @@ int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb)
ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
ASSERT(skb != NULL, return -1;); ASSERT(skb != NULL, return -1;);
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
/* Check that nothing bad happens */ /* Check that nothing bad happens */
if ((skb->len == 0) || (!self->connected)) { if ((skb->len == 0) || (!self->connected)) {
IRDA_DEBUG(1, __FUNCTION__ "(), No data, or not connected\n"); IRDA_DEBUG(1, "%s(), No data, or not connected\n",
__FUNCTION__);
return -1; return -1;
} }
if (skb->len > self->max_seg_size) { if (skb->len > self->max_seg_size) {
IRDA_DEBUG(1, __FUNCTION__ "(), UData is to large for IrLAP!\n"); IRDA_DEBUG(1, "%s(), UData is to large for IrLAP!\n",
__FUNCTION__);
return -1; return -1;
} }
...@@ -563,7 +566,7 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb) ...@@ -563,7 +566,7 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb)
ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
ASSERT(skb != NULL, return -1;); ASSERT(skb != NULL, return -1;);
IRDA_DEBUG(2, __FUNCTION__ " : queue len = %d\n", IRDA_DEBUG(2, "%s() : queue len = %d\n", __FUNCTION__,
skb_queue_len(&self->tx_queue)); skb_queue_len(&self->tx_queue));
/* Check that nothing bad happens */ /* Check that nothing bad happens */
...@@ -662,7 +665,8 @@ static void irttp_run_tx_queue(struct tsap_cb *self) ...@@ -662,7 +665,8 @@ static void irttp_run_tx_queue(struct tsap_cb *self)
unsigned long flags; unsigned long flags;
int n; int n;
IRDA_DEBUG(2, __FUNCTION__ "() : send_credit = %d, queue_len = %d\n", IRDA_DEBUG(2, "%s() : send_credit = %d, queue_len = %d\n",
__FUNCTION__,
self->send_credit, skb_queue_len(&self->tx_queue)); self->send_credit, skb_queue_len(&self->tx_queue));
/* Get exclusive access to the tx queue, otherwise don't touch it */ /* Get exclusive access to the tx queue, otherwise don't touch it */
...@@ -770,7 +774,8 @@ static inline void irttp_give_credit(struct tsap_cb *self) ...@@ -770,7 +774,8 @@ static inline void irttp_give_credit(struct tsap_cb *self)
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == TTP_TSAP_MAGIC, return;); ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
IRDA_DEBUG(4, __FUNCTION__ "() send=%d,avail=%d,remote=%d\n", IRDA_DEBUG(4, "%s() send=%d,avail=%d,remote=%d\n",
__FUNCTION__,
self->send_credit, self->avail_credit, self->remote_credit); self->send_credit, self->avail_credit, self->remote_credit);
/* Give credit to peer */ /* Give credit to peer */
...@@ -818,7 +823,7 @@ static int irttp_udata_indication(void *instance, void *sap, ...@@ -818,7 +823,7 @@ static int irttp_udata_indication(void *instance, void *sap,
{ {
struct tsap_cb *self; struct tsap_cb *self;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
self = (struct tsap_cb *) instance; self = (struct tsap_cb *) instance;
...@@ -930,7 +935,7 @@ void irttp_status_indication(void *instance, ...@@ -930,7 +935,7 @@ void irttp_status_indication(void *instance,
{ {
struct tsap_cb *self; struct tsap_cb *self;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
self = (struct tsap_cb *) instance; self = (struct tsap_cb *) instance;
...@@ -944,7 +949,7 @@ void irttp_status_indication(void *instance, ...@@ -944,7 +949,7 @@ void irttp_status_indication(void *instance,
self->notify.status_indication(self->notify.instance, self->notify.status_indication(self->notify.instance,
link, lock); link, lock);
else else
IRDA_DEBUG(2, __FUNCTION__ "(), no handler\n"); IRDA_DEBUG(2, "%s(), no handler\n", __FUNCTION__);
} }
/* /*
...@@ -962,7 +967,7 @@ void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow) ...@@ -962,7 +967,7 @@ void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == TTP_TSAP_MAGIC, return;); ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
IRDA_DEBUG(4, __FUNCTION__ "(instance=%p)\n", self); IRDA_DEBUG(4, "%s(instance=%p)\n", __FUNCTION__, self);
/* We are "polled" directly from LAP, and the LAP want to fill /* We are "polled" directly from LAP, and the LAP want to fill
* its Tx window. We want to do our best to send it data, so that * its Tx window. We want to do our best to send it data, so that
...@@ -1000,18 +1005,18 @@ void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow) ...@@ -1000,18 +1005,18 @@ void irttp_flow_indication(void *instance, void *sap, LOCAL_FLOW flow)
*/ */
void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow) void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow)
{ {
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;); ASSERT(self != NULL, return;);
ASSERT(self->magic == TTP_TSAP_MAGIC, return;); ASSERT(self->magic == TTP_TSAP_MAGIC, return;);
switch (flow) { switch (flow) {
case FLOW_STOP: case FLOW_STOP:
IRDA_DEBUG(1, __FUNCTION__ "(), flow stop\n"); IRDA_DEBUG(1, "%s(), flow stop\n", __FUNCTION__);
self->rx_sdu_busy = TRUE; self->rx_sdu_busy = TRUE;
break; break;
case FLOW_START: case FLOW_START:
IRDA_DEBUG(1, __FUNCTION__ "(), flow start\n"); IRDA_DEBUG(1, "%s(), flow start\n", __FUNCTION__);
self->rx_sdu_busy = FALSE; self->rx_sdu_busy = FALSE;
/* Client say he can accept more data, try to free our /* Client say he can accept more data, try to free our
...@@ -1020,7 +1025,7 @@ void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow) ...@@ -1020,7 +1025,7 @@ void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow)
break; break;
default: default:
IRDA_DEBUG(1, __FUNCTION__ "(), Unknown flow command!\n"); IRDA_DEBUG(1, "%s(), Unknown flow command!\n", __FUNCTION__);
} }
} }
...@@ -1039,7 +1044,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel, ...@@ -1039,7 +1044,7 @@ int irttp_connect_request(struct tsap_cb *self, __u8 dtsap_sel,
__u8 *frame; __u8 *frame;
__u8 n; __u8 n;
IRDA_DEBUG(4, __FUNCTION__ "(), max_sdu_size=%d\n", max_sdu_size); IRDA_DEBUG(4, "%s(), max_sdu_size=%d\n", __FUNCTION__, max_sdu_size);
ASSERT(self != NULL, return -EBADR;); ASSERT(self != NULL, return -EBADR;);
ASSERT(self->magic == TTP_TSAP_MAGIC, return -EBADR;); ASSERT(self->magic == TTP_TSAP_MAGIC, return -EBADR;);
...@@ -1131,7 +1136,7 @@ static void irttp_connect_confirm(void *instance, void *sap, ...@@ -1131,7 +1136,7 @@ static void irttp_connect_confirm(void *instance, void *sap,
__u8 plen; __u8 plen;
__u8 n; __u8 n;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
self = (struct tsap_cb *) instance; self = (struct tsap_cb *) instance;
...@@ -1155,7 +1160,7 @@ static void irttp_connect_confirm(void *instance, void *sap, ...@@ -1155,7 +1160,7 @@ static void irttp_connect_confirm(void *instance, void *sap,
n = skb->data[0] & 0x7f; n = skb->data[0] & 0x7f;
IRDA_DEBUG(4, __FUNCTION__ "(), Initial send_credit=%d\n", n); IRDA_DEBUG(4, "%s(), Initial send_credit=%d\n", __FUNCTION__, n);
self->send_credit = n; self->send_credit = n;
self->tx_max_sdu_size = 0; self->tx_max_sdu_size = 0;
...@@ -1186,10 +1191,11 @@ static void irttp_connect_confirm(void *instance, void *sap, ...@@ -1186,10 +1191,11 @@ static void irttp_connect_confirm(void *instance, void *sap,
skb_pull(skb, IRDA_MIN(skb->len, plen+1)); skb_pull(skb, IRDA_MIN(skb->len, plen+1));
} }
IRDA_DEBUG(4, __FUNCTION__ "() send=%d,avail=%d,remote=%d\n", IRDA_DEBUG(4, "%s() send=%d,avail=%d,remote=%d\n", __FUNCTION__,
self->send_credit, self->avail_credit, self->remote_credit); self->send_credit, self->avail_credit, self->remote_credit);
IRDA_DEBUG(2, __FUNCTION__ "(), MaxSduSize=%d\n", self->tx_max_sdu_size); IRDA_DEBUG(2, "%s(), MaxSduSize=%d\n", __FUNCTION__,
self->tx_max_sdu_size);
if (self->notify.connect_confirm) { if (self->notify.connect_confirm) {
self->notify.connect_confirm(self->notify.instance, self, qos, self->notify.connect_confirm(self->notify.instance, self, qos,
...@@ -1226,7 +1232,7 @@ void irttp_connect_indication(void *instance, void *sap, struct qos_info *qos, ...@@ -1226,7 +1232,7 @@ void irttp_connect_indication(void *instance, void *sap, struct qos_info *qos,
self->max_seg_size = max_seg_size - TTP_HEADER;; self->max_seg_size = max_seg_size - TTP_HEADER;;
self->max_header_size = max_header_size+TTP_HEADER; self->max_header_size = max_header_size+TTP_HEADER;
IRDA_DEBUG(4, __FUNCTION__ "(), TSAP sel=%02x\n", self->stsap_sel); IRDA_DEBUG(4, "%s(), TSAP sel=%02x\n", __FUNCTION__, self->stsap_sel);
/* Need to update dtsap_sel if its equal to LSAP_ANY */ /* Need to update dtsap_sel if its equal to LSAP_ANY */
self->dtsap_sel = lsap->dlsap_sel; self->dtsap_sel = lsap->dlsap_sel;
...@@ -1288,7 +1294,7 @@ int irttp_connect_response(struct tsap_cb *self, __u32 max_sdu_size, ...@@ -1288,7 +1294,7 @@ int irttp_connect_response(struct tsap_cb *self, __u32 max_sdu_size,
ASSERT(self != NULL, return -1;); ASSERT(self != NULL, return -1;);
ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;); ASSERT(self->magic == TTP_TSAP_MAGIC, return -1;);
IRDA_DEBUG(4, __FUNCTION__ "(), Source TSAP selector=%02x\n", IRDA_DEBUG(4, "%s(), Source TSAP selector=%02x\n", __FUNCTION__,
self->stsap_sel); self->stsap_sel);
/* Any userdata supplied? */ /* Any userdata supplied? */
...@@ -1367,14 +1373,14 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance) ...@@ -1367,14 +1373,14 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance)
struct tsap_cb *new; struct tsap_cb *new;
unsigned long flags; unsigned long flags;
IRDA_DEBUG(1, __FUNCTION__ "()\n"); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
/* Protect our access to the old tsap instance */ /* Protect our access to the old tsap instance */
spin_lock_irqsave(&irttp->tsaps->hb_spinlock, flags); spin_lock_irqsave(&irttp->tsaps->hb_spinlock, flags);
/* Find the old instance */ /* Find the old instance */
if (!hashbin_find(irttp->tsaps, (int) orig, NULL)) { if (!hashbin_find(irttp->tsaps, (int) orig, NULL)) {
IRDA_DEBUG(0, __FUNCTION__ "(), unable to find TSAP\n"); IRDA_DEBUG(0, "%s(), unable to find TSAP\n", __FUNCTION__);
spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags);
return NULL; return NULL;
} }
...@@ -1382,7 +1388,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance) ...@@ -1382,7 +1388,7 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, void *instance)
/* Allocate a new instance */ /* Allocate a new instance */
new = kmalloc(sizeof(struct tsap_cb), GFP_ATOMIC); new = kmalloc(sizeof(struct tsap_cb), GFP_ATOMIC);
if (!new) { if (!new) {
IRDA_DEBUG(0, __FUNCTION__ "(), unable to kmalloc\n"); IRDA_DEBUG(0, "%s(), unable to kmalloc\n", __FUNCTION__);
spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags); spin_unlock_irqrestore(&irttp->tsaps->hb_spinlock, flags);
return NULL; return NULL;
} }
...@@ -1425,7 +1431,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata, ...@@ -1425,7 +1431,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata,
/* Already disconnected? */ /* Already disconnected? */
if (!self->connected) { if (!self->connected) {
IRDA_DEBUG(4, __FUNCTION__ "(), already disconnected!\n"); IRDA_DEBUG(4, "%s(), already disconnected!\n", __FUNCTION__);
if (userdata) if (userdata)
dev_kfree_skb(userdata); dev_kfree_skb(userdata);
return -1; return -1;
...@@ -1437,7 +1443,8 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata, ...@@ -1437,7 +1443,8 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata,
* for following a disconnect_indication() (i.e. net_bh). * for following a disconnect_indication() (i.e. net_bh).
* Jean II */ * Jean II */
if(test_and_set_bit(0, &self->disconnect_pend)) { if(test_and_set_bit(0, &self->disconnect_pend)) {
IRDA_DEBUG(0, __FUNCTION__ "(), disconnect already pending\n"); IRDA_DEBUG(0, "%s(), disconnect already pending\n",
__FUNCTION__);
if (userdata) if (userdata)
dev_kfree_skb(userdata); dev_kfree_skb(userdata);
...@@ -1456,7 +1463,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata, ...@@ -1456,7 +1463,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata,
* disconnecting right now since the data will * disconnecting right now since the data will
* not have any usable connection to be sent on * not have any usable connection to be sent on
*/ */
IRDA_DEBUG(1, __FUNCTION__ "High priority!!()\n" ); IRDA_DEBUG(1, "%s(): High priority!!()\n", __FUNCTION__);
irttp_flush_queues(self); irttp_flush_queues(self);
} else if (priority == P_NORMAL) { } else if (priority == P_NORMAL) {
/* /*
...@@ -1477,7 +1484,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata, ...@@ -1477,7 +1484,7 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *userdata,
* be sent at the LMP level (so even if the peer has its Tx queue * be sent at the LMP level (so even if the peer has its Tx queue
* full of data). - Jean II */ * full of data). - Jean II */
IRDA_DEBUG(1, __FUNCTION__ "(), Disconnecting ...\n"); IRDA_DEBUG(1, "%s(), Disconnecting ...\n", __FUNCTION__);
self->connected = FALSE; self->connected = FALSE;
if (!userdata) { if (!userdata) {
...@@ -1511,7 +1518,7 @@ void irttp_disconnect_indication(void *instance, void *sap, LM_REASON reason, ...@@ -1511,7 +1518,7 @@ void irttp_disconnect_indication(void *instance, void *sap, LM_REASON reason,
{ {
struct tsap_cb *self; struct tsap_cb *self;
IRDA_DEBUG(4, __FUNCTION__ "()\n"); IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
self = (struct tsap_cb *) instance; self = (struct tsap_cb *) instance;
...@@ -1571,7 +1578,7 @@ void irttp_do_data_indication(struct tsap_cb *self, struct sk_buff *skb) ...@@ -1571,7 +1578,7 @@ void irttp_do_data_indication(struct tsap_cb *self, struct sk_buff *skb)
* give an error back * give an error back
*/ */
if (err == -ENOMEM) { if (err == -ENOMEM) {
IRDA_DEBUG(0, __FUNCTION__ "() requeueing skb!\n"); IRDA_DEBUG(0, "%s() requeueing skb!\n", __FUNCTION__);
/* Make sure we take a break */ /* Make sure we take a break */
self->rx_sdu_busy = TRUE; self->rx_sdu_busy = TRUE;
...@@ -1596,7 +1603,7 @@ void irttp_run_rx_queue(struct tsap_cb *self) ...@@ -1596,7 +1603,7 @@ void irttp_run_rx_queue(struct tsap_cb *self)
struct sk_buff *skb; struct sk_buff *skb;
int more = 0; int more = 0;
IRDA_DEBUG(2, __FUNCTION__ "() send=%d,avail=%d,remote=%d\n", IRDA_DEBUG(2, "%s() send=%d,avail=%d,remote=%d\n", __FUNCTION__,
self->send_credit, self->avail_credit, self->remote_credit); self->send_credit, self->avail_credit, self->remote_credit);
/* Get exclusive access to the rx queue, otherwise don't touch it */ /* Get exclusive access to the rx queue, otherwise don't touch it */
...@@ -1636,7 +1643,8 @@ void irttp_run_rx_queue(struct tsap_cb *self) ...@@ -1636,7 +1643,8 @@ void irttp_run_rx_queue(struct tsap_cb *self)
* limits of the maximum size of the rx_sdu * limits of the maximum size of the rx_sdu
*/ */
if (self->rx_sdu_size <= self->rx_max_sdu_size) { if (self->rx_sdu_size <= self->rx_max_sdu_size) {
IRDA_DEBUG(4, __FUNCTION__ "(), queueing frag\n"); IRDA_DEBUG(4, "%s(), queueing frag\n",
__FUNCTION__);
skb_queue_tail(&self->rx_fragments, skb); skb_queue_tail(&self->rx_fragments, skb);
} else { } else {
/* Free the part of the SDU that is too big */ /* Free the part of the SDU that is too big */
...@@ -1666,7 +1674,7 @@ void irttp_run_rx_queue(struct tsap_cb *self) ...@@ -1666,7 +1674,7 @@ void irttp_run_rx_queue(struct tsap_cb *self)
/* Now we can deliver the reassembled skb */ /* Now we can deliver the reassembled skb */
irttp_do_data_indication(self, skb); irttp_do_data_indication(self, skb);
} else { } else {
IRDA_DEBUG(1, __FUNCTION__ "(), Truncated frame\n"); IRDA_DEBUG(1, "%s(), Truncated frame\n", __FUNCTION__);
/* Free the part of the SDU that is too big */ /* Free the part of the SDU that is too big */
dev_kfree_skb(skb); dev_kfree_skb(skb);
......
...@@ -144,13 +144,13 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi, ...@@ -144,13 +144,13 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
*/ */
if (p.pl == 0) { if (p.pl == 0) {
if (p.pv.i < 0xff) { if (p.pv.i < 0xff) {
IRDA_DEBUG(2, __FUNCTION__ "(), using 1 byte\n"); IRDA_DEBUG(2, "%s(), using 1 byte\n", __FUNCTION__);
p.pl = 1; p.pl = 1;
} else if (p.pv.i < 0xffff) { } else if (p.pv.i < 0xffff) {
IRDA_DEBUG(2, __FUNCTION__ "(), using 2 bytes\n"); IRDA_DEBUG(2, "%s(), using 2 bytes\n", __FUNCTION__);
p.pl = 2; p.pl = 2;
} else { } else {
IRDA_DEBUG(2, __FUNCTION__ "(), using 4 bytes\n"); IRDA_DEBUG(2, "%s(), using 4 bytes\n", __FUNCTION__);
p.pl = 4; /* Default length */ p.pl = 4; /* Default length */
} }
} }
...@@ -159,7 +159,8 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi, ...@@ -159,7 +159,8 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
WARNING("%s: buffer to short for insertion!\n", __FUNCTION__); WARNING("%s: buffer to short for insertion!\n", __FUNCTION__);
return -1; return -1;
} }
IRDA_DEBUG(2, __FUNCTION__ "(), pi=%#x, pl=%d, pi=%d\n", p.pi, p.pl, p.pv.i); IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __FUNCTION__,
p.pi, p.pl, p.pv.i);
switch (p.pl) { switch (p.pl) {
case 1: case 1:
n += irda_param_pack(buf, "bbb", p.pi, p.pl, (__u8) p.pv.i); n += irda_param_pack(buf, "bbb", p.pi, p.pl, (__u8) p.pv.i);
...@@ -252,7 +253,8 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi, ...@@ -252,7 +253,8 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
return p.pl+2; return p.pl+2;
} }
IRDA_DEBUG(2, __FUNCTION__ "(), pi=%#x, pl=%d, pi=%d\n", p.pi, p.pl, p.pv.i); IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d, pi=%d\n", __FUNCTION__,
p.pi, p.pl, p.pv.i);
/* Call handler for this parameter */ /* Call handler for this parameter */
err = (*func)(self, &p, PV_PUT); err = (*func)(self, &p, PV_PUT);
if (err < 0) if (err < 0)
...@@ -271,12 +273,13 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi, ...@@ -271,12 +273,13 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
irda_param_t p; irda_param_t p;
int err; int err;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
p.pi = pi; /* In case handler needs to know */ p.pi = pi; /* In case handler needs to know */
p.pl = buf[1]; /* Extract lenght of value */ p.pl = buf[1]; /* Extract lenght of value */
IRDA_DEBUG(2, __FUNCTION__ "(), pi=%#x, pl=%d\n", p.pi, p.pl); IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d\n", __FUNCTION__,
p.pi, p.pl);
/* Check if buffer is long enough for parsing */ /* Check if buffer is long enough for parsing */
if (len < (2+p.pl)) { if (len < (2+p.pl)) {
...@@ -290,8 +293,8 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi, ...@@ -290,8 +293,8 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
* checked that the buffer is long enough */ * checked that the buffer is long enough */
strncpy(str, buf+2, p.pl); strncpy(str, buf+2, p.pl);
IRDA_DEBUG(2, __FUNCTION__ "(), str=0x%02x 0x%02x\n", (__u8) str[0], IRDA_DEBUG(2, "%s(), str=0x%02x 0x%02x\n", __FUNCTION__,
(__u8) str[1]); (__u8) str[0], (__u8) str[1]);
/* Null terminate string */ /* Null terminate string */
str[p.pl+1] = '\0'; str[p.pl+1] = '\0';
...@@ -325,7 +328,7 @@ static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi, ...@@ -325,7 +328,7 @@ static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi,
return -1; return -1;
} }
IRDA_DEBUG(0, __FUNCTION__ "(), not impl\n"); IRDA_DEBUG(0, "%s(), not impl\n", __FUNCTION__);
return p.pl+2; /* Extracted pl+2 bytes */ return p.pl+2; /* Extracted pl+2 bytes */
} }
...@@ -447,8 +450,8 @@ int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len, ...@@ -447,8 +450,8 @@ int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len,
if ((pi_major > info->len-1) || if ((pi_major > info->len-1) ||
(pi_minor > info->tables[pi_major].len-1)) (pi_minor > info->tables[pi_major].len-1))
{ {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n",
"(), no handler for parameter=0x%02x\n", pi); __FUNCTION__, pi);
/* Skip this parameter */ /* Skip this parameter */
return -1; return -1;
...@@ -499,8 +502,8 @@ int irda_param_extract(void *self, __u8 *buf, int len, pi_param_info_t *info) ...@@ -499,8 +502,8 @@ int irda_param_extract(void *self, __u8 *buf, int len, pi_param_info_t *info)
if ((pi_major > info->len-1) || if ((pi_major > info->len-1) ||
(pi_minor > info->tables[pi_major].len-1)) (pi_minor > info->tables[pi_major].len-1))
{ {
IRDA_DEBUG(0, __FUNCTION__ "(), no handler for parameter=0x%02x\n", IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n",
buf[0]); __FUNCTION__, buf[0]);
/* Skip this parameter */ /* Skip this parameter */
return 2 + buf[n + 1]; /* Continue */ return 2 + buf[n + 1]; /* Continue */
...@@ -512,7 +515,7 @@ int irda_param_extract(void *self, __u8 *buf, int len, pi_param_info_t *info) ...@@ -512,7 +515,7 @@ int irda_param_extract(void *self, __u8 *buf, int len, pi_param_info_t *info)
/* Find expected data type for this parameter identifier (pi)*/ /* Find expected data type for this parameter identifier (pi)*/
type = pi_minor_info->type; type = pi_minor_info->type;
IRDA_DEBUG(3, __FUNCTION__ "(), pi=[%d,%d], type=%d\n", IRDA_DEBUG(3, "%s(), pi=[%d,%d], type=%d\n", __FUNCTION__,
pi_major, pi_minor, type); pi_major, pi_minor, type);
/* Check if handler has been implemented */ /* Check if handler has been implemented */
......
...@@ -331,7 +331,7 @@ void irlap_adjust_qos_settings(struct qos_info *qos) ...@@ -331,7 +331,7 @@ void irlap_adjust_qos_settings(struct qos_info *qos)
__u32 line_capacity; __u32 line_capacity;
int index; int index;
IRDA_DEBUG(2, __FUNCTION__ "()\n"); IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
/* /*
* Make sure the mintt is sensible. * Make sure the mintt is sensible.
...@@ -353,9 +353,9 @@ void irlap_adjust_qos_settings(struct qos_info *qos) ...@@ -353,9 +353,9 @@ void irlap_adjust_qos_settings(struct qos_info *qos)
if ((qos->baud_rate.value < 115200) && if ((qos->baud_rate.value < 115200) &&
(qos->max_turn_time.value < 500)) (qos->max_turn_time.value < 500))
{ {
IRDA_DEBUG(0, __FUNCTION__ IRDA_DEBUG(0,
"(), adjusting max turn time from %d to 500 ms\n", "%s(), adjusting max turn time from %d to 500 ms\n",
qos->max_turn_time.value); __FUNCTION__, qos->max_turn_time.value);
qos->max_turn_time.value = 500; qos->max_turn_time.value = 500;
} }
...@@ -370,9 +370,8 @@ void irlap_adjust_qos_settings(struct qos_info *qos) ...@@ -370,9 +370,8 @@ void irlap_adjust_qos_settings(struct qos_info *qos)
#ifdef CONFIG_IRDA_DYNAMIC_WINDOW #ifdef CONFIG_IRDA_DYNAMIC_WINDOW
while ((qos->data_size.value > line_capacity) && (index > 0)) { while ((qos->data_size.value > line_capacity) && (index > 0)) {
qos->data_size.value = data_sizes[index--]; qos->data_size.value = data_sizes[index--];
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s(), reducing data size to %d\n",
"(), reducing data size to %d\n", __FUNCTION__, qos->data_size.value);
qos->data_size.value);
} }
#else /* Use method described in section 6.6.11 of IrLAP */ #else /* Use method described in section 6.6.11 of IrLAP */
while (irlap_requested_line_capacity(qos) > line_capacity) { while (irlap_requested_line_capacity(qos) > line_capacity) {
...@@ -381,16 +380,15 @@ void irlap_adjust_qos_settings(struct qos_info *qos) ...@@ -381,16 +380,15 @@ void irlap_adjust_qos_settings(struct qos_info *qos)
/* Must be able to send at least one frame */ /* Must be able to send at least one frame */
if (qos->window_size.value > 1) { if (qos->window_size.value > 1) {
qos->window_size.value--; qos->window_size.value--;
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s(), reducing window size to %d\n",
"(), reducing window size to %d\n", __FUNCTION__, qos->window_size.value);
qos->window_size.value);
} else if (index > 1) { } else if (index > 1) {
qos->data_size.value = data_sizes[index--]; qos->data_size.value = data_sizes[index--];
IRDA_DEBUG(2, __FUNCTION__ IRDA_DEBUG(2, "%s(), reducing data size to %d\n",
"(), reducing data size to %d\n", __FUNCTION__, qos->data_size.value);
qos->data_size.value);
} else { } else {
WARNING(__FUNCTION__ "(), nothing more we can do!\n"); WARNING("%s(), nothing more we can do!\n",
__FUNCTION__);
} }
} }
#endif /* CONFIG_IRDA_DYNAMIC_WINDOW */ #endif /* CONFIG_IRDA_DYNAMIC_WINDOW */
...@@ -519,8 +517,8 @@ static int irlap_param_baud_rate(void *instance, irda_param_t *param, int get) ...@@ -519,8 +517,8 @@ static int irlap_param_baud_rate(void *instance, irda_param_t *param, int get)
if (get) { if (get) {
param->pv.i = self->qos_rx.baud_rate.bits; param->pv.i = self->qos_rx.baud_rate.bits;
IRDA_DEBUG(2, __FUNCTION__ "(), baud rate = 0x%02x\n", IRDA_DEBUG(2, "%s(), baud rate = 0x%02x\n",
param->pv.i); __FUNCTION__, param->pv.i);
} else { } else {
/* /*
* Stations must agree on baud rate, so calculate * Stations must agree on baud rate, so calculate
...@@ -692,8 +690,8 @@ __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time) ...@@ -692,8 +690,8 @@ __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time)
__u32 line_capacity; __u32 line_capacity;
int i,j; int i,j;
IRDA_DEBUG(2, __FUNCTION__ "(), speed=%d, max_turn_time=%d\n", IRDA_DEBUG(2, "%s(), speed=%d, max_turn_time=%d\n",
speed, max_turn_time); __FUNCTION__, speed, max_turn_time);
i = value_index(speed, baud_rates, 10); i = value_index(speed, baud_rates, 10);
j = value_index(max_turn_time, max_turn_times, 4); j = value_index(max_turn_time, max_turn_times, 4);
...@@ -703,8 +701,8 @@ __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time) ...@@ -703,8 +701,8 @@ __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time)
line_capacity = max_line_capacities[i][j]; line_capacity = max_line_capacities[i][j];
IRDA_DEBUG(2, __FUNCTION__ "(), line capacity=%d bytes\n", IRDA_DEBUG(2, "%s(), line capacity=%d bytes\n",
line_capacity); __FUNCTION__, line_capacity);
return line_capacity; return line_capacity;
} }
...@@ -717,8 +715,8 @@ __u32 irlap_requested_line_capacity(struct qos_info *qos) ...@@ -717,8 +715,8 @@ __u32 irlap_requested_line_capacity(struct qos_info *qos)
irlap_min_turn_time_in_bytes(qos->baud_rate.value, irlap_min_turn_time_in_bytes(qos->baud_rate.value,
qos->min_turn_time.value); qos->min_turn_time.value);
IRDA_DEBUG(2, __FUNCTION__ "(), requested line capacity=%d\n", IRDA_DEBUG(2, "%s(), requested line capacity=%d\n",
line_capacity); __FUNCTION__, line_capacity);
return line_capacity; return line_capacity;
} }
......
...@@ -93,16 +93,17 @@ int async_wrap_skb(struct sk_buff *skb, __u8 *tx_buff, int buffsize) ...@@ -93,16 +93,17 @@ int async_wrap_skb(struct sk_buff *skb, __u8 *tx_buff, int buffsize)
* Nothing to worry about, but we set the default number of * Nothing to worry about, but we set the default number of
* BOF's * BOF's
*/ */
IRDA_DEBUG(1, __FUNCTION__ "(), wrong magic in skb!\n"); IRDA_DEBUG(1, "%s(), wrong magic in skb!\n", __FUNCTION__);
xbofs = 10; xbofs = 10;
} else } else
xbofs = cb->xbofs + cb->xbofs_delay; xbofs = cb->xbofs + cb->xbofs_delay;
IRDA_DEBUG(4, __FUNCTION__ "(), xbofs=%d\n", xbofs); IRDA_DEBUG(4, "%s(), xbofs=%d\n", __FUNCTION__, xbofs);
/* Check that we never use more than 115 + 48 xbofs */ /* Check that we never use more than 115 + 48 xbofs */
if (xbofs > 163) { if (xbofs > 163) {
IRDA_DEBUG(0, __FUNCTION__ "(), too many xbofs (%d)\n", xbofs); IRDA_DEBUG(0, "%s(), too many xbofs (%d)\n", __FUNCTION__,
xbofs);
xbofs = 163; xbofs = 163;
} }
...@@ -265,7 +266,7 @@ static void state_begin_frame(struct net_device *dev, ...@@ -265,7 +266,7 @@ static void state_begin_frame(struct net_device *dev,
case EOF: case EOF:
/* Abort frame */ /* Abort frame */
rx_buff->state = OUTSIDE_FRAME; rx_buff->state = OUTSIDE_FRAME;
IRDA_DEBUG(1, __FUNCTION__ "(), abort frame\n"); IRDA_DEBUG(1, "%s(), abort frame\n", __FUNCTION__);
stats->rx_errors++; stats->rx_errors++;
stats->rx_frame_errors++; stats->rx_frame_errors++;
break; break;
...@@ -289,8 +290,8 @@ static void state_link_escape(struct net_device *dev, ...@@ -289,8 +290,8 @@ static void state_link_escape(struct net_device *dev,
{ {
switch (byte) { switch (byte) {
case BOF: /* New frame? */ case BOF: /* New frame? */
IRDA_DEBUG(1, __FUNCTION__ IRDA_DEBUG(1, "%s(), Discarding incomplete frame\n",
"(), Discarding incomplete frame\n"); __FUNCTION__);
rx_buff->state = BEGIN_FRAME; rx_buff->state = BEGIN_FRAME;
irda_device_set_media_busy(dev, TRUE); irda_device_set_media_busy(dev, TRUE);
break; break;
...@@ -311,7 +312,8 @@ static void state_link_escape(struct net_device *dev, ...@@ -311,7 +312,8 @@ static void state_link_escape(struct net_device *dev,
rx_buff->fcs = irda_fcs(rx_buff->fcs, byte); rx_buff->fcs = irda_fcs(rx_buff->fcs, byte);
rx_buff->state = INSIDE_FRAME; rx_buff->state = INSIDE_FRAME;
} else { } else {
IRDA_DEBUG(1, __FUNCTION__ "(), rx buffer overflow\n"); IRDA_DEBUG(1, "%s(), rx buffer overflow\n",
__FUNCTION__);
rx_buff->state = OUTSIDE_FRAME; rx_buff->state = OUTSIDE_FRAME;
} }
break; break;
...@@ -332,8 +334,8 @@ static void state_inside_frame(struct net_device *dev, ...@@ -332,8 +334,8 @@ static void state_inside_frame(struct net_device *dev,
switch (byte) { switch (byte) {
case BOF: /* New frame? */ case BOF: /* New frame? */
IRDA_DEBUG(1, __FUNCTION__ IRDA_DEBUG(1, "%s(), Discarding incomplete frame\n",
"(), Discarding incomplete frame\n"); __FUNCTION__);
rx_buff->state = BEGIN_FRAME; rx_buff->state = BEGIN_FRAME;
irda_device_set_media_busy(dev, TRUE); irda_device_set_media_busy(dev, TRUE);
break; break;
...@@ -354,7 +356,7 @@ static void state_inside_frame(struct net_device *dev, ...@@ -354,7 +356,7 @@ static void state_inside_frame(struct net_device *dev,
/* Wrong CRC, discard frame! */ /* Wrong CRC, discard frame! */
irda_device_set_media_busy(dev, TRUE); irda_device_set_media_busy(dev, TRUE);
IRDA_DEBUG(1, __FUNCTION__ "(), crc error\n"); IRDA_DEBUG(1, "%s(), crc error\n", __FUNCTION__);
stats->rx_errors++; stats->rx_errors++;
stats->rx_crc_errors++; stats->rx_crc_errors++;
} }
...@@ -364,8 +366,8 @@ static void state_inside_frame(struct net_device *dev, ...@@ -364,8 +366,8 @@ static void state_inside_frame(struct net_device *dev,
rx_buff->data[rx_buff->len++] = byte; rx_buff->data[rx_buff->len++] = byte;
rx_buff->fcs = irda_fcs(rx_buff->fcs, byte); rx_buff->fcs = irda_fcs(rx_buff->fcs, byte);
} else { } else {
IRDA_DEBUG(1, __FUNCTION__ IRDA_DEBUG(1, "%s(), Rx buffer overflow, aborting\n",
"(), Rx buffer overflow, aborting\n"); __FUNCTION__);
rx_buff->state = OUTSIDE_FRAME; rx_buff->state = OUTSIDE_FRAME;
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment