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

More IrDA __FUNCTION__ cleanups, merged from -ac

parent 94eda096
This diff is collapsed.
...@@ -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",
......
This diff is collapsed.
...@@ -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;);
......
This diff is collapsed.
...@@ -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;
} }
/* /*
......
This diff is collapsed.
This diff is collapsed.
...@@ -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();
......
This diff is collapsed.
...@@ -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,8 +515,8 @@ int irda_param_extract(void *self, __u8 *buf, int len, pi_param_info_t *info) ...@@ -512,8 +515,8 @@ 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 */
if (!pi_minor_info->func) { if (!pi_minor_info->func) {
......
...@@ -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