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)
{
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
......@@ -150,7 +150,7 @@ void irlmp_expire_discoveries(hashbin_t *log, __u32 saddr, int force)
discovery_t *discovery, *curr;
unsigned long flags;
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
spin_lock_irqsave(&log->hb_spinlock, flags);
......
......@@ -111,7 +111,7 @@ int __init irda_device_init( 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(dongles, NULL);
......@@ -127,7 +127,7 @@ void irda_device_set_media_busy(struct net_device *dev, int status)
{
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;
......@@ -152,7 +152,7 @@ int irda_device_set_dtr_rts(struct net_device *dev, int dtr, int rts)
struct if_irda_req req;
int ret;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
if (!dev->do_ioctl) {
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)
struct if_irda_req req;
int ret;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
if (!dev->do_ioctl) {
ERROR("%s: do_ioctl not impl. by device driver\n",
......@@ -199,7 +199,7 @@ int irda_device_is_receiving(struct net_device *dev)
struct if_irda_req req;
int ret;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
if (!dev->do_ioctl) {
ERROR("%s: do_ioctl not impl. by device driver\n",
......@@ -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)
{
IRDA_DEBUG(2, __FUNCTION__ "(), state = %s\n", task_state[state]);
IRDA_DEBUG(2, "%s(), state = %s\n", __FUNCTION__, task_state[state]);
task->state = state;
}
......@@ -250,7 +250,7 @@ int irda_task_kick(struct irda_task *task)
int count = 0;
int timeout;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(task != NULL, return -1;);
ASSERT(task->magic == IRDA_TASK_MAGIC, return -1;);
......@@ -298,8 +298,8 @@ int irda_task_kick(struct irda_task *task)
irda_task_timer_expired);
finished = FALSE;
} else {
IRDA_DEBUG(0, __FUNCTION__
"(), not finished, and no timeout!\n");
IRDA_DEBUG(0, "%s(), not finished, and no timeout!\n",
__FUNCTION__);
finished = FALSE;
}
......@@ -328,7 +328,7 @@ struct irda_task *irda_task_execute(void *instance,
struct irda_task *task;
int ret;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
task = kmalloc(sizeof(struct irda_task), GFP_ATOMIC);
if (!task)
......@@ -365,7 +365,7 @@ static void irda_task_timer_expired(void *data)
{
struct irda_task *task;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
task = (struct irda_task *) data;
......@@ -517,7 +517,7 @@ int irda_device_set_mode(struct net_device* dev, int mode)
struct if_irda_req req;
int ret;
IRDA_DEBUG(0, __FUNCTION__ "()\n");
IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
if (!dev->do_ioctl) {
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,
case IAP_LM_DISCONNECT_INDICATION:
break;
default:
IRDA_DEBUG(0, __FUNCTION__"(), Unknown event %d\n", event);
IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
break;
}
}
......@@ -213,7 +213,7 @@ static void state_s_connecting(struct iriap_cb *self, IRIAP_EVENT event,
iriap_next_client_state(self, S_DISCONNECT);
break;
default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %d\n", event);
IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
break;
}
}
......@@ -262,7 +262,7 @@ static void state_s_make_call(struct iriap_cb *self, IRIAP_EVENT event,
iriap_next_call_state(self, S_OUTSTANDING);
break;
default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %d\n", event);
IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
if (skb)
dev_kfree_skb(skb);
break;
......@@ -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,
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,
iriap_next_call_state(self, S_WAIT_FOR_CALL);
break;
default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown event %d\n", event);
IRDA_DEBUG(0, "%s(), Unknown event %d\n", __FUNCTION__, event);
break;
}
}
......@@ -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,
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,
static void state_s_wait_for_call(struct iriap_cb *self, IRIAP_EVENT event,
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,
static void state_s_wait_active(struct iriap_cb *self, IRIAP_EVENT event,
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,
break;
default:
IRDA_DEBUG(0, __FUNCTION__ "(), unknown event %d\n", event);
IRDA_DEBUG(0, "%s(), unknown event %d\n", __FUNCTION__, event);
break;
}
}
......@@ -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,
struct sk_buff *skb)
{
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
switch (event) {
case IAP_LM_DISCONNECT_INDICATION:
......@@ -405,7 +405,7 @@ static void state_r_call(struct iriap_cb *self, IRIAP_EVENT event,
iriap_next_r_connect_state(self, R_WAITING);
break;
default:
IRDA_DEBUG(0, __FUNCTION__ "(), unknown event!\n");
IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__);
break;
}
}
......@@ -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,
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,
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,
static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
struct sk_buff *skb)
{
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
switch (event) {
case IAP_RECV_F_LST:
......@@ -447,7 +447,7 @@ static void state_r_receiving(struct iriap_cb *self, IRIAP_EVENT event,
iriap_call_indication(self, skb);
break;
default:
IRDA_DEBUG(0, __FUNCTION__ "(), unknown event!\n");
IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__);
break;
}
......@@ -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,
struct sk_buff *skb)
{
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(skb != NULL, return;);
if (!self || self->magic != IAS_MAGIC) {
IRDA_DEBUG(0, __FUNCTION__ "(), bad pointer self\n");
IRDA_DEBUG(0, "%s(), bad pointer self\n", __FUNCTION__);
return;
}
......@@ -482,7 +482,7 @@ static void state_r_execute(struct iriap_cb *self, IRIAP_EVENT event,
irlmp_data_request(self->lsap, skb);
break;
default:
IRDA_DEBUG(0, __FUNCTION__ "(), unknown event!\n");
IRDA_DEBUG(0, "%s(), unknown event!\n", __FUNCTION__);
break;
}
}
......@@ -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,
struct sk_buff *skb)
{
IRDA_DEBUG(0, __FUNCTION__ "(), event=%d\n", event);
IRDA_DEBUG(0, "%s(), event=%d\n", __FUNCTION__, event);
switch (event) {
case IAP_RECV_F_LST:
......
......@@ -79,12 +79,13 @@ struct ias_object *irias_new_object( char *name, int id)
{
struct ias_object *obj;
IRDA_DEBUG( 4, __FUNCTION__ "()\n");
IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
obj = (struct ias_object *) kmalloc(sizeof(struct ias_object),
GFP_ATOMIC);
if (obj == NULL) {
IRDA_DEBUG(0, __FUNCTION__ "(), Unable to allocate object!\n");
IRDA_DEBUG(0, "%s(), Unable to allocate object!\n",
__FUNCTION__);
return NULL;
}
memset(obj, 0, sizeof( struct ias_object));
......@@ -295,8 +296,8 @@ int irias_object_change_attribute(char *obj_name, char *attrib_name,
}
if ( attrib->value->type != new_value->type) {
IRDA_DEBUG( 0, __FUNCTION__
"(), changing value type not allowed!\n");
IRDA_DEBUG( 0, "%s(), changing value type not allowed!\n",
__FUNCTION__);
spin_unlock_irqrestore(&obj->attribs->hb_spinlock, flags);
return -1;
}
......@@ -521,7 +522,7 @@ struct ias_value *irias_new_missing_value(void)
*/
void irias_delete_value(struct ias_value *value)
{
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(value != NULL, return;);
......@@ -541,7 +542,7 @@ void irias_delete_value(struct ias_value *value)
kfree(value->t.oct_seq);
break;
default:
IRDA_DEBUG(0, __FUNCTION__ "(), Unknown value type!\n");
IRDA_DEBUG(0, "%s(), Unknown value type!\n", __FUNCTION__);
break;
}
kfree(value);
......
......@@ -107,7 +107,7 @@ struct irlap_cb *irlap_open(struct net_device *dev, struct qos_info *qos,
{
struct irlap_cb *self;
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
/* Initialize the irlap structure. */
self = kmalloc(sizeof(struct irlap_cb), GFP_KERNEL);
......@@ -210,7 +210,7 @@ void irlap_close(struct irlap_cb *self)
{
struct irlap_cb *lap;
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;);
......@@ -223,7 +223,7 @@ void irlap_close(struct irlap_cb *self)
/* Be sure that we manage to remove ourself from the hash */
lap = hashbin_remove(irlap, self->saddr, NULL);
if (!lap) {
IRDA_DEBUG(1, __FUNCTION__ "(), Didn't find myself!\n");
IRDA_DEBUG(1, "%s(), Didn't find myself!\n", __FUNCTION__);
return;
}
__irlap_close(lap);
......@@ -237,7 +237,7 @@ void irlap_close(struct irlap_cb *self)
*/
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->magic == LAP_MAGIC, return;);
......@@ -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)
{
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
irlap_do_event(self, CONNECT_RESPONSE, skb, NULL);
kfree_skb(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,
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->magic == LAP_MAGIC, return;);
......@@ -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)
{
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;);
......@@ -339,7 +339,7 @@ void irlap_data_request(struct irlap_cb *self, struct sk_buff *skb,
ASSERT(self != NULL, 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),
return;);
......@@ -383,7 +383,7 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb)
ASSERT(self != NULL, 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),
return;);
......@@ -407,7 +407,7 @@ void irlap_unitdata_request(struct irlap_cb *self, struct sk_buff *skb)
#ifdef CONFIG_IRDA_ULTRA
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->magic == LAP_MAGIC, return;);
......@@ -428,7 +428,7 @@ void irlap_unitdata_indication(struct irlap_cb *self, struct sk_buff *skb)
*/
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->magic == LAP_MAGIC, return;);
......@@ -450,7 +450,7 @@ void irlap_disconnect_request(struct irlap_cb *self)
irlap_do_event(self, DISCONNECT_REQUEST, NULL, NULL);
break;
default:
IRDA_DEBUG(2, __FUNCTION__ "(), disconnect pending!\n");
IRDA_DEBUG(2, "%s(), disconnect pending!\n", __FUNCTION__);
self->disconnect_pending = TRUE;
break;
}
......@@ -464,7 +464,7 @@ void irlap_disconnect_request(struct irlap_cb *self)
*/
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->magic == LAP_MAGIC, return;);
......@@ -474,7 +474,7 @@ void irlap_disconnect_indication(struct irlap_cb *self, LAP_REASON reason)
switch (reason) {
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);
break;
case LAP_NO_RESPONSE: /* FALLTROUGH */
......@@ -503,7 +503,7 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
ASSERT(self->magic == LAP_MAGIC, 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) ||
(discovery->nslots == 8) || (discovery->nslots == 16),
......@@ -511,8 +511,8 @@ void irlap_discovery_request(struct irlap_cb *self, discovery_t *discovery)
/* Discovery is only possible in NDM mode */
if (self->state != LAP_NDM) {
IRDA_DEBUG(4, __FUNCTION__
"(), discovery only possible in NDM mode\n");
IRDA_DEBUG(4, "%s(), discovery only possible in NDM mode\n",
__FUNCTION__);
irlap_discovery_confirm(self, NULL);
/* Note : in theory, if we are not in NDM, we could postpone
* the discovery like we do for connection request.
......@@ -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)
{
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;);
......@@ -630,7 +630,7 @@ void irlap_status_indication(struct irlap_cb *self, int quality_of_link)
*/
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->magic == LAP_MAGIC, return;);
......@@ -646,7 +646,7 @@ void irlap_reset_indication(struct irlap_cb *self)
*/
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)
{
/* nr as expected? */
if (nr == self->vs) {
IRDA_DEBUG(4, __FUNCTION__ "(), expected!\n");
IRDA_DEBUG(4, "%s(), expected!\n", __FUNCTION__);
return NR_EXPECTED;
}
......@@ -774,7 +774,7 @@ int irlap_validate_nr_received(struct irlap_cb *self, int nr)
*/
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->magic == LAP_MAGIC, return;);
......@@ -857,7 +857,7 @@ void irlap_change_speed(struct irlap_cb *self, __u32 speed, int now)
{
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->magic == LAP_MAGIC, return;);
......@@ -899,7 +899,7 @@ void irlap_init_qos_capabilities(struct irlap_cb *self,
* user may not have set all of them.
*/
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)
self->qos_rx.baud_rate.bits &= qos_user->baud_rate.bits;
......@@ -929,7 +929,7 @@ void irlap_init_qos_capabilities(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->magic == LAP_MAGIC, return;);
......@@ -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)
{
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, 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,
/* Check if the new connection address is valid */
if ((info->caddr == 0x00) || (info->caddr == 0xfe)) {
IRDA_DEBUG(3, __FUNCTION__
"(), invalid connection address!\n");
IRDA_DEBUG(3, "%s(), invalid connection address!\n",
__FUNCTION__);
return;
}
......@@ -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 */
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;
}
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)
struct ua_frame *frame;
int ret;
IRDA_DEBUG(2, __FUNCTION__ "() <%ld>\n", jiffies);
IRDA_DEBUG(2, "%s() <%ld>\n", __FUNCTION__, jiffies);
ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;);
......@@ -275,7 +276,7 @@ void irlap_send_disc_frame(struct irlap_cb *self)
struct sk_buff *skb = NULL;
__u8 *frame;
IRDA_DEBUG(3, __FUNCTION__ "()\n");
IRDA_DEBUG(3, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, 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,
__u32 bcast = BROADCAST;
__u8 *info;
IRDA_DEBUG(4, __FUNCTION__ "(), s=%d, S=%d, command=%d\n", s, S,
command);
IRDA_DEBUG(4, "%s(), s=%d, S=%d, command=%d\n", __FUNCTION__,
s, S, command);
ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;);
......@@ -398,7 +399,7 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
__u8 *discovery_info;
char *text;
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;);
......@@ -410,8 +411,8 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
/* Make sure frame is addressed to us */
if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) {
IRDA_DEBUG(0, __FUNCTION__
"(), frame is not addressed to us!\n");
IRDA_DEBUG(0, "%s(), frame is not addressed to us!\n",
__FUNCTION__);
return;
}
......@@ -425,7 +426,7 @@ static void irlap_recv_discovery_xid_rsp(struct irlap_cb *self,
discovery->saddr = self->saddr;
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));
......@@ -476,8 +477,8 @@ static void irlap_recv_discovery_xid_cmd(struct irlap_cb *self,
/* Make sure frame is addressed to us */
if ((info->saddr != self->saddr) && (info->saddr != BROADCAST)) {
IRDA_DEBUG(0, __FUNCTION__
"(), frame is not addressed to us!\n");
IRDA_DEBUG(0, "%s(), frame is not addressed to us!\n",
__FUNCTION__);
return;
}
......@@ -642,7 +643,7 @@ void irlap_send_frmr_frame( struct irlap_cb *self, int command)
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);
}
......@@ -658,7 +659,7 @@ static void irlap_recv_rnr_frame(struct irlap_cb *self, struct sk_buff *skb,
{
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)
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,
static void irlap_recv_rej_frame(struct irlap_cb *self, struct sk_buff *skb,
struct irlap_info *info, int command)
{
IRDA_DEBUG(0, __FUNCTION__ "()\n");
IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
info->nr = skb->data[1] >> 5;
......@@ -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,
struct irlap_info *info, int command)
{
IRDA_DEBUG(0, __FUNCTION__ "()\n");
IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
info->nr = skb->data[1] >> 5;
......@@ -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,
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 */
if (command)
......@@ -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);
} 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);
self->window -= 1;
}
......@@ -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);
} else {
IRDA_DEBUG(4, __FUNCTION__ "(), sending unreliable frame\n");
IRDA_DEBUG(4, "%s(), sending unreliable frame\n", __FUNCTION__);
if (self->ack_required) {
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)
/* tx_skb = skb_clone( skb, GFP_ATOMIC); */
tx_skb = skb_copy(skb, GFP_ATOMIC);
if (!tx_skb) {
IRDA_DEBUG(0, __FUNCTION__ "(), unable to copy\n");
IRDA_DEBUG(0, "%s(), unable to copy\n", __FUNCTION__);
return;
}
/* Unlink tx_skb from list */
......@@ -987,7 +988,7 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command)
*/
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) &&
(self->window > 0)) {
skb = skb_dequeue( &self->txq);
......@@ -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_copy(skb, GFP_ATOMIC);
if (!tx_skb) {
IRDA_DEBUG(0, __FUNCTION__ "(), unable to copy\n");
IRDA_DEBUG(0, "%s(), unable to copy\n", __FUNCTION__);
return;
}
/* Unlink tx_skb from list */
......@@ -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,
__u8 caddr, int command)
{
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == LAP_MAGIC, return;);
......@@ -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,
struct irlap_info *info)
{
IRDA_DEBUG( 4, __FUNCTION__ "()\n");
IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
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,
__u8 *frame;
int w, x, y, z;
IRDA_DEBUG(0, __FUNCTION__ "()\n");
IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, 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,
{
struct test_frame *frame;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
frame = (struct test_frame *) skb->data;
/* Broadcast frames must carry saddr and daddr fields */
if (info->caddr == CBROADCAST) {
if (skb->len < sizeof(struct test_frame)) {
IRDA_DEBUG(0, __FUNCTION__
"() test frame to short!\n");
IRDA_DEBUG(0, "%s() test frame to short!\n",
__FUNCTION__);
return;
}
......@@ -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 */
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;
}
/*
......
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,
skb->data[1] = slsap;
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);
} else
irlap_data_request(self->irlap, skb, FALSE);
......@@ -61,7 +61,7 @@ void irlmp_send_lcf_pdu(struct lap_cb *self, __u8 dlsap, __u8 slsap,
{
__u8 *frame;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, 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,
__u8 dlsap_sel; /* Destination LSAP address */
__u8 *fp;
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, 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,
* it in a different way than other established connections.
*/
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",
slsap_sel, dlsap_sel);
__FUNCTION__, slsap_sel, dlsap_sel);
/* Try to find LSAP among the unconnected LSAPs */
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,
/* Maybe LSAP was already connected, so try one more time */
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,
self->lsaps);
}
......@@ -136,14 +136,13 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
if (lsap == NULL) {
IRDA_DEBUG(2, "IrLMP, Sorry, no LSAP for received frame!\n");
IRDA_DEBUG(2, __FUNCTION__
"(), slsap_sel = %02x, dlsap_sel = %02x\n", slsap_sel,
dlsap_sel);
IRDA_DEBUG(2, "%s(), slsap_sel = %02x, dlsap_sel = %02x\n",
__FUNCTION__, slsap_sel, dlsap_sel);
if (fp[0] & CONTROL_BIT) {
IRDA_DEBUG(2, __FUNCTION__
"(), received control frame %02x\n", fp[2]);
IRDA_DEBUG(2, "%s(), received control frame %02x\n",
__FUNCTION__, fp[2]);
} else {
IRDA_DEBUG(2, __FUNCTION__ "(), received data frame\n");
IRDA_DEBUG(2, "%s(), received data frame\n", __FUNCTION__);
}
dev_kfree_skb(skb);
return;
......@@ -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);
break;
case DISCONNECT:
IRDA_DEBUG(4, __FUNCTION__
"(), Disconnect indication!\n");
IRDA_DEBUG(4, "%s(), Disconnect indication!\n",
__FUNCTION__);
irlmp_do_lsap_event(lsap, LM_DISCONNECT_INDICATION,
skb);
break;
......@@ -176,8 +175,8 @@ void irlmp_link_data_indication(struct lap_cb *self, struct sk_buff *skb,
dev_kfree_skb(skb);
break;
default:
IRDA_DEBUG(0, __FUNCTION__
"(), Unknown control frame %02x\n", fp[2]);
IRDA_DEBUG(0, "%s(), Unknown control frame %02x\n",
__FUNCTION__, fp[2]);
dev_kfree_skb(skb);
break;
}
......@@ -212,7 +211,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
__u8 *fp;
unsigned long flags;
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, 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)
pid = fp[2];
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);
return;
......@@ -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 */
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);
return;
......@@ -263,7 +263,7 @@ void irlmp_link_unitdata_indication(struct lap_cb *self, struct sk_buff *skb)
if (lsap)
irlmp_connless_data_indication(lsap, skb);
else {
IRDA_DEBUG(0, __FUNCTION__ "(), found no matching LSAP!\n");
IRDA_DEBUG(0, "%s(), found no matching LSAP!\n", __FUNCTION__);
dev_kfree_skb(skb);
}
}
......@@ -280,7 +280,7 @@ void irlmp_link_disconnect_indication(struct lap_cb *lap,
LAP_REASON reason,
struct sk_buff *userdata)
{
IRDA_DEBUG(2, __FUNCTION__ "()\n");
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
ASSERT(lap != NULL, return;);
ASSERT(lap->magic == LMP_LAP_MAGIC, return;);
......@@ -308,7 +308,7 @@ void irlmp_link_connect_indication(struct lap_cb *self, __u32 saddr,
__u32 daddr, struct qos_info *qos,
struct sk_buff *skb)
{
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
/* Copy QoS settings for this session */
self->qos = qos;
......@@ -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,
struct sk_buff *userdata)
{
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == LMP_LAP_MAGIC, return;);
......@@ -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)
{
IRDA_DEBUG(4, __FUNCTION__ "()\n");
IRDA_DEBUG(4, "%s()\n", __FUNCTION__);
ASSERT(self != NULL, return;);
ASSERT(self->magic == LMP_LAP_MAGIC, return;);
......
......@@ -231,7 +231,7 @@ static __u32 hash( char* name)
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.
......@@ -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)
{
IRDA_DEBUG( 4, __FUNCTION__ "()\n");
IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
/*
* Check if queue is empty.
......@@ -572,7 +572,7 @@ void hashbin_insert(hashbin_t* hashbin, irda_queue_t* entry, long hashv, char* n
unsigned long flags = 0;
int bin;
IRDA_DEBUG( 4, __FUNCTION__"()\n");
IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
ASSERT( hashbin != NULL, return;);
ASSERT( hashbin->magic == HB_MAGIC, return;);
......@@ -689,7 +689,7 @@ void* hashbin_remove( hashbin_t* hashbin, long hashv, char* name)
unsigned long flags = 0;
irda_queue_t* entry;
IRDA_DEBUG( 4, __FUNCTION__ "()\n");
IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
ASSERT( hashbin != NULL, return NULL;);
ASSERT( hashbin->magic == HB_MAGIC, return NULL;);
......@@ -781,7 +781,7 @@ void* hashbin_remove_this( hashbin_t* hashbin, irda_queue_t* entry)
int bin;
long hashv;
IRDA_DEBUG( 4, __FUNCTION__ "()\n");
IRDA_DEBUG( 4, "%s()\n", __FUNCTION__);
ASSERT( hashbin != NULL, 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,
switch (event) {
case NETDEV_UP:
IRDA_DEBUG(3, __FUNCTION__ "(), NETDEV_UP\n");
IRDA_DEBUG(3, "%s(), NETDEV_UP\n", __FUNCTION__);
/* irda_dev_device_up(dev); */
break;
case NETDEV_DOWN:
IRDA_DEBUG(3, __FUNCTION__ "(), NETDEV_DOWN\n");
IRDA_DEBUG(3, "%s(), NETDEV_DOWN\n", __FUNCTION__);
/* irda_kill_by_device(dev); */
/* irda_rt_device_down(dev); */
/* irda_dev_device_down(dev); */
......@@ -253,7 +253,7 @@ void irda_notify_init(notify_t *notify)
*/
int __init irda_init(void)
{
IRDA_DEBUG(0, __FUNCTION__ "()\n");
IRDA_DEBUG(0, "%s()\n", __FUNCTION__);
/* Lower layer of the stack */
irlmp_init();
......
This diff is collapsed.
......@@ -144,13 +144,13 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
*/
if (p.pl == 0) {
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;
} 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;
} else {
IRDA_DEBUG(2, __FUNCTION__ "(), using 4 bytes\n");
IRDA_DEBUG(2, "%s(), using 4 bytes\n", __FUNCTION__);
p.pl = 4; /* Default length */
}
}
......@@ -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__);
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) {
case 1:
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,
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 */
err = (*func)(self, &p, PV_PUT);
if (err < 0)
......@@ -271,12 +273,13 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
irda_param_t p;
int err;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
p.pi = pi; /* In case handler needs to know */
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 */
if (len < (2+p.pl)) {
......@@ -290,8 +293,8 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
* checked that the buffer is long enough */
strncpy(str, buf+2, p.pl);
IRDA_DEBUG(2, __FUNCTION__ "(), str=0x%02x 0x%02x\n", (__u8) str[0],
(__u8) str[1]);
IRDA_DEBUG(2, "%s(), str=0x%02x 0x%02x\n", __FUNCTION__,
(__u8) str[0], (__u8) str[1]);
/* Null terminate string */
str[p.pl+1] = '\0';
......@@ -325,7 +328,7 @@ static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi,
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 */
}
......@@ -447,8 +450,8 @@ int irda_param_insert(void *self, __u8 pi, __u8 *buf, int len,
if ((pi_major > info->len-1) ||
(pi_minor > info->tables[pi_major].len-1))
{
IRDA_DEBUG(0, __FUNCTION__
"(), no handler for parameter=0x%02x\n", pi);
IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n",
__FUNCTION__, pi);
/* Skip this parameter */
return -1;
......@@ -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) ||
(pi_minor > info->tables[pi_major].len-1))
{
IRDA_DEBUG(0, __FUNCTION__ "(), no handler for parameter=0x%02x\n",
buf[0]);
IRDA_DEBUG(0, "%s(), no handler for parameter=0x%02x\n",
__FUNCTION__, buf[0]);
/* Skip this parameter */
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)
/* Find expected data type for this parameter identifier (pi)*/
type = pi_minor_info->type;
IRDA_DEBUG(3, __FUNCTION__ "(), pi=[%d,%d], type=%d\n",
pi_major, pi_minor, type);
IRDA_DEBUG(3, "%s(), pi=[%d,%d], type=%d\n", __FUNCTION__,
pi_major, pi_minor, type);
/* Check if handler has been implemented */
if (!pi_minor_info->func) {
......
......@@ -331,7 +331,7 @@ void irlap_adjust_qos_settings(struct qos_info *qos)
__u32 line_capacity;
int index;
IRDA_DEBUG(2, __FUNCTION__ "()\n");
IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
/*
* Make sure the mintt is sensible.
......@@ -353,9 +353,9 @@ void irlap_adjust_qos_settings(struct qos_info *qos)
if ((qos->baud_rate.value < 115200) &&
(qos->max_turn_time.value < 500))
{
IRDA_DEBUG(0, __FUNCTION__
"(), adjusting max turn time from %d to 500 ms\n",
qos->max_turn_time.value);
IRDA_DEBUG(0,
"%s(), adjusting max turn time from %d to 500 ms\n",
__FUNCTION__, qos->max_turn_time.value);
qos->max_turn_time.value = 500;
}
......@@ -370,9 +370,8 @@ void irlap_adjust_qos_settings(struct qos_info *qos)
#ifdef CONFIG_IRDA_DYNAMIC_WINDOW
while ((qos->data_size.value > line_capacity) && (index > 0)) {
qos->data_size.value = data_sizes[index--];
IRDA_DEBUG(2, __FUNCTION__
"(), reducing data size to %d\n",
qos->data_size.value);
IRDA_DEBUG(2, "%s(), reducing data size to %d\n",
__FUNCTION__, qos->data_size.value);
}
#else /* Use method described in section 6.6.11 of IrLAP */
while (irlap_requested_line_capacity(qos) > line_capacity) {
......@@ -381,16 +380,15 @@ void irlap_adjust_qos_settings(struct qos_info *qos)
/* Must be able to send at least one frame */
if (qos->window_size.value > 1) {
qos->window_size.value--;
IRDA_DEBUG(2, __FUNCTION__
"(), reducing window size to %d\n",
qos->window_size.value);
IRDA_DEBUG(2, "%s(), reducing window size to %d\n",
__FUNCTION__, qos->window_size.value);
} else if (index > 1) {
qos->data_size.value = data_sizes[index--];
IRDA_DEBUG(2, __FUNCTION__
"(), reducing data size to %d\n",
qos->data_size.value);
IRDA_DEBUG(2, "%s(), reducing data size to %d\n",
__FUNCTION__, qos->data_size.value);
} else {
WARNING(__FUNCTION__ "(), nothing more we can do!\n");
WARNING("%s(), nothing more we can do!\n",
__FUNCTION__);
}
}
#endif /* CONFIG_IRDA_DYNAMIC_WINDOW */
......@@ -519,8 +517,8 @@ static int irlap_param_baud_rate(void *instance, irda_param_t *param, int get)
if (get) {
param->pv.i = self->qos_rx.baud_rate.bits;
IRDA_DEBUG(2, __FUNCTION__ "(), baud rate = 0x%02x\n",
param->pv.i);
IRDA_DEBUG(2, "%s(), baud rate = 0x%02x\n",
__FUNCTION__, param->pv.i);
} else {
/*
* Stations must agree on baud rate, so calculate
......@@ -692,8 +690,8 @@ __u32 irlap_max_line_capacity(__u32 speed, __u32 max_turn_time)
__u32 line_capacity;
int i,j;
IRDA_DEBUG(2, __FUNCTION__ "(), speed=%d, max_turn_time=%d\n",
speed, max_turn_time);
IRDA_DEBUG(2, "%s(), speed=%d, max_turn_time=%d\n",
__FUNCTION__, speed, max_turn_time);
i = value_index(speed, baud_rates, 10);
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)
line_capacity = max_line_capacities[i][j];
IRDA_DEBUG(2, __FUNCTION__ "(), line capacity=%d bytes\n",
line_capacity);
IRDA_DEBUG(2, "%s(), line capacity=%d bytes\n",
__FUNCTION__, line_capacity);
return line_capacity;
}
......@@ -717,8 +715,8 @@ __u32 irlap_requested_line_capacity(struct qos_info *qos)
irlap_min_turn_time_in_bytes(qos->baud_rate.value,
qos->min_turn_time.value);
IRDA_DEBUG(2, __FUNCTION__ "(), requested line capacity=%d\n",
line_capacity);
IRDA_DEBUG(2, "%s(), requested line capacity=%d\n",
__FUNCTION__, line_capacity);
return line_capacity;
}
......
......@@ -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
* BOF's
*/
IRDA_DEBUG(1, __FUNCTION__ "(), wrong magic in skb!\n");
IRDA_DEBUG(1, "%s(), wrong magic in skb!\n", __FUNCTION__);
xbofs = 10;
} else
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 */
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;
}
......@@ -265,7 +266,7 @@ static void state_begin_frame(struct net_device *dev,
case EOF:
/* Abort 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_frame_errors++;
break;
......@@ -289,8 +290,8 @@ static void state_link_escape(struct net_device *dev,
{
switch (byte) {
case BOF: /* New frame? */
IRDA_DEBUG(1, __FUNCTION__
"(), Discarding incomplete frame\n");
IRDA_DEBUG(1, "%s(), Discarding incomplete frame\n",
__FUNCTION__);
rx_buff->state = BEGIN_FRAME;
irda_device_set_media_busy(dev, TRUE);
break;
......@@ -311,7 +312,8 @@ static void state_link_escape(struct net_device *dev,
rx_buff->fcs = irda_fcs(rx_buff->fcs, byte);
rx_buff->state = INSIDE_FRAME;
} else {
IRDA_DEBUG(1, __FUNCTION__ "(), rx buffer overflow\n");
IRDA_DEBUG(1, "%s(), rx buffer overflow\n",
__FUNCTION__);
rx_buff->state = OUTSIDE_FRAME;
}
break;
......@@ -332,8 +334,8 @@ static void state_inside_frame(struct net_device *dev,
switch (byte) {
case BOF: /* New frame? */
IRDA_DEBUG(1, __FUNCTION__
"(), Discarding incomplete frame\n");
IRDA_DEBUG(1, "%s(), Discarding incomplete frame\n",
__FUNCTION__);
rx_buff->state = BEGIN_FRAME;
irda_device_set_media_busy(dev, TRUE);
break;
......@@ -354,7 +356,7 @@ static void state_inside_frame(struct net_device *dev,
/* Wrong CRC, discard frame! */
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_crc_errors++;
}
......@@ -364,8 +366,8 @@ static void state_inside_frame(struct net_device *dev,
rx_buff->data[rx_buff->len++] = byte;
rx_buff->fcs = irda_fcs(rx_buff->fcs, byte);
} else {
IRDA_DEBUG(1, __FUNCTION__
"(), Rx buffer overflow, aborting\n");
IRDA_DEBUG(1, "%s(), Rx buffer overflow, aborting\n",
__FUNCTION__);
rx_buff->state = OUTSIDE_FRAME;
}
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