diff options
Diffstat (limited to 'net/irda/af_irda.c')
-rw-r--r-- | net/irda/af_irda.c | 178 |
1 files changed, 89 insertions, 89 deletions
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c index 240b0cbfb532..6f21a53cb3e7 100644 --- a/net/irda/af_irda.c +++ b/net/irda/af_irda.c | |||
@@ -85,14 +85,14 @@ static int irda_data_indication(void *instance, void *sap, struct sk_buff *skb) | |||
85 | struct sock *sk; | 85 | struct sock *sk; |
86 | int err; | 86 | int err; |
87 | 87 | ||
88 | IRDA_DEBUG(3, "%s()\n", __FUNCTION__); | 88 | IRDA_DEBUG(3, "%s()\n", __func__); |
89 | 89 | ||
90 | self = instance; | 90 | self = instance; |
91 | sk = instance; | 91 | sk = instance; |
92 | 92 | ||
93 | err = sock_queue_rcv_skb(sk, skb); | 93 | err = sock_queue_rcv_skb(sk, skb); |
94 | if (err) { | 94 | if (err) { |
95 | IRDA_DEBUG(1, "%s(), error: no more mem!\n", __FUNCTION__); | 95 | IRDA_DEBUG(1, "%s(), error: no more mem!\n", __func__); |
96 | self->rx_flow = FLOW_STOP; | 96 | self->rx_flow = FLOW_STOP; |
97 | 97 | ||
98 | /* When we return error, TTP will need to requeue the skb */ | 98 | /* When we return error, TTP will need to requeue the skb */ |
@@ -116,7 +116,7 @@ static void irda_disconnect_indication(void *instance, void *sap, | |||
116 | 116 | ||
117 | self = instance; | 117 | self = instance; |
118 | 118 | ||
119 | IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); | 119 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); |
120 | 120 | ||
121 | /* Don't care about it, but let's not leak it */ | 121 | /* Don't care about it, but let's not leak it */ |
122 | if(skb) | 122 | if(skb) |
@@ -125,7 +125,7 @@ static void irda_disconnect_indication(void *instance, void *sap, | |||
125 | sk = instance; | 125 | sk = instance; |
126 | if (sk == NULL) { | 126 | if (sk == NULL) { |
127 | IRDA_DEBUG(0, "%s(%p) : BUG : sk is NULL\n", | 127 | IRDA_DEBUG(0, "%s(%p) : BUG : sk is NULL\n", |
128 | __FUNCTION__, self); | 128 | __func__, self); |
129 | return; | 129 | return; |
130 | } | 130 | } |
131 | 131 | ||
@@ -181,7 +181,7 @@ static void irda_connect_confirm(void *instance, void *sap, | |||
181 | 181 | ||
182 | self = instance; | 182 | self = instance; |
183 | 183 | ||
184 | IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); | 184 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); |
185 | 185 | ||
186 | sk = instance; | 186 | sk = instance; |
187 | if (sk == NULL) { | 187 | if (sk == NULL) { |
@@ -203,7 +203,7 @@ static void irda_connect_confirm(void *instance, void *sap, | |||
203 | case SOCK_STREAM: | 203 | case SOCK_STREAM: |
204 | if (max_sdu_size != 0) { | 204 | if (max_sdu_size != 0) { |
205 | IRDA_ERROR("%s: max_sdu_size must be 0\n", | 205 | IRDA_ERROR("%s: max_sdu_size must be 0\n", |
206 | __FUNCTION__); | 206 | __func__); |
207 | return; | 207 | return; |
208 | } | 208 | } |
209 | self->max_data_size = irttp_get_max_seg_size(self->tsap); | 209 | self->max_data_size = irttp_get_max_seg_size(self->tsap); |
@@ -211,7 +211,7 @@ static void irda_connect_confirm(void *instance, void *sap, | |||
211 | case SOCK_SEQPACKET: | 211 | case SOCK_SEQPACKET: |
212 | if (max_sdu_size == 0) { | 212 | if (max_sdu_size == 0) { |
213 | IRDA_ERROR("%s: max_sdu_size cannot be 0\n", | 213 | IRDA_ERROR("%s: max_sdu_size cannot be 0\n", |
214 | __FUNCTION__); | 214 | __func__); |
215 | return; | 215 | return; |
216 | } | 216 | } |
217 | self->max_data_size = max_sdu_size; | 217 | self->max_data_size = max_sdu_size; |
@@ -220,7 +220,7 @@ static void irda_connect_confirm(void *instance, void *sap, | |||
220 | self->max_data_size = irttp_get_max_seg_size(self->tsap); | 220 | self->max_data_size = irttp_get_max_seg_size(self->tsap); |
221 | } | 221 | } |
222 | 222 | ||
223 | IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __FUNCTION__, | 223 | IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __func__, |
224 | self->max_data_size); | 224 | self->max_data_size); |
225 | 225 | ||
226 | memcpy(&self->qos_tx, qos, sizeof(struct qos_info)); | 226 | memcpy(&self->qos_tx, qos, sizeof(struct qos_info)); |
@@ -245,7 +245,7 @@ static void irda_connect_indication(void *instance, void *sap, | |||
245 | 245 | ||
246 | self = instance; | 246 | self = instance; |
247 | 247 | ||
248 | IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); | 248 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); |
249 | 249 | ||
250 | sk = instance; | 250 | sk = instance; |
251 | if (sk == NULL) { | 251 | if (sk == NULL) { |
@@ -264,7 +264,7 @@ static void irda_connect_indication(void *instance, void *sap, | |||
264 | case SOCK_STREAM: | 264 | case SOCK_STREAM: |
265 | if (max_sdu_size != 0) { | 265 | if (max_sdu_size != 0) { |
266 | IRDA_ERROR("%s: max_sdu_size must be 0\n", | 266 | IRDA_ERROR("%s: max_sdu_size must be 0\n", |
267 | __FUNCTION__); | 267 | __func__); |
268 | kfree_skb(skb); | 268 | kfree_skb(skb); |
269 | return; | 269 | return; |
270 | } | 270 | } |
@@ -273,7 +273,7 @@ static void irda_connect_indication(void *instance, void *sap, | |||
273 | case SOCK_SEQPACKET: | 273 | case SOCK_SEQPACKET: |
274 | if (max_sdu_size == 0) { | 274 | if (max_sdu_size == 0) { |
275 | IRDA_ERROR("%s: max_sdu_size cannot be 0\n", | 275 | IRDA_ERROR("%s: max_sdu_size cannot be 0\n", |
276 | __FUNCTION__); | 276 | __func__); |
277 | kfree_skb(skb); | 277 | kfree_skb(skb); |
278 | return; | 278 | return; |
279 | } | 279 | } |
@@ -283,7 +283,7 @@ static void irda_connect_indication(void *instance, void *sap, | |||
283 | self->max_data_size = irttp_get_max_seg_size(self->tsap); | 283 | self->max_data_size = irttp_get_max_seg_size(self->tsap); |
284 | } | 284 | } |
285 | 285 | ||
286 | IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __FUNCTION__, | 286 | IRDA_DEBUG(2, "%s(), max_data_size=%d\n", __func__, |
287 | self->max_data_size); | 287 | self->max_data_size); |
288 | 288 | ||
289 | memcpy(&self->qos_tx, qos, sizeof(struct qos_info)); | 289 | memcpy(&self->qos_tx, qos, sizeof(struct qos_info)); |
@@ -302,13 +302,13 @@ static void irda_connect_response(struct irda_sock *self) | |||
302 | { | 302 | { |
303 | struct sk_buff *skb; | 303 | struct sk_buff *skb; |
304 | 304 | ||
305 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__); | 305 | IRDA_DEBUG(2, "%s()\n", __func__); |
306 | 306 | ||
307 | skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER, | 307 | skb = alloc_skb(TTP_MAX_HEADER + TTP_SAR_HEADER, |
308 | GFP_ATOMIC); | 308 | GFP_ATOMIC); |
309 | if (skb == NULL) { | 309 | if (skb == NULL) { |
310 | IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n", | 310 | IRDA_DEBUG(0, "%s() Unable to allocate sk_buff!\n", |
311 | __FUNCTION__); | 311 | __func__); |
312 | return; | 312 | return; |
313 | } | 313 | } |
314 | 314 | ||
@@ -329,7 +329,7 @@ static void irda_flow_indication(void *instance, void *sap, LOCAL_FLOW flow) | |||
329 | struct irda_sock *self; | 329 | struct irda_sock *self; |
330 | struct sock *sk; | 330 | struct sock *sk; |
331 | 331 | ||
332 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__); | 332 | IRDA_DEBUG(2, "%s()\n", __func__); |
333 | 333 | ||
334 | self = instance; | 334 | self = instance; |
335 | sk = instance; | 335 | sk = instance; |
@@ -338,17 +338,17 @@ static void irda_flow_indication(void *instance, void *sap, LOCAL_FLOW flow) | |||
338 | switch (flow) { | 338 | switch (flow) { |
339 | case FLOW_STOP: | 339 | case FLOW_STOP: |
340 | IRDA_DEBUG(1, "%s(), IrTTP wants us to slow down\n", | 340 | IRDA_DEBUG(1, "%s(), IrTTP wants us to slow down\n", |
341 | __FUNCTION__); | 341 | __func__); |
342 | self->tx_flow = flow; | 342 | self->tx_flow = flow; |
343 | break; | 343 | break; |
344 | case FLOW_START: | 344 | case FLOW_START: |
345 | self->tx_flow = flow; | 345 | self->tx_flow = flow; |
346 | IRDA_DEBUG(1, "%s(), IrTTP wants us to start again\n", | 346 | IRDA_DEBUG(1, "%s(), IrTTP wants us to start again\n", |
347 | __FUNCTION__); | 347 | __func__); |
348 | wake_up_interruptible(sk->sk_sleep); | 348 | wake_up_interruptible(sk->sk_sleep); |
349 | break; | 349 | break; |
350 | default: | 350 | default: |
351 | IRDA_DEBUG(0, "%s(), Unknown flow command!\n", __FUNCTION__); | 351 | IRDA_DEBUG(0, "%s(), Unknown flow command!\n", __func__); |
352 | /* Unknown flow command, better stop */ | 352 | /* Unknown flow command, better stop */ |
353 | self->tx_flow = flow; | 353 | self->tx_flow = flow; |
354 | break; | 354 | break; |
@@ -370,11 +370,11 @@ static void irda_getvalue_confirm(int result, __u16 obj_id, | |||
370 | 370 | ||
371 | self = (struct irda_sock *) priv; | 371 | self = (struct irda_sock *) priv; |
372 | if (!self) { | 372 | if (!self) { |
373 | IRDA_WARNING("%s: lost myself!\n", __FUNCTION__); | 373 | IRDA_WARNING("%s: lost myself!\n", __func__); |
374 | return; | 374 | return; |
375 | } | 375 | } |
376 | 376 | ||
377 | IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); | 377 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); |
378 | 378 | ||
379 | /* We probably don't need to make any more queries */ | 379 | /* We probably don't need to make any more queries */ |
380 | iriap_close(self->iriap); | 380 | iriap_close(self->iriap); |
@@ -382,7 +382,7 @@ static void irda_getvalue_confirm(int result, __u16 obj_id, | |||
382 | 382 | ||
383 | /* Check if request succeeded */ | 383 | /* Check if request succeeded */ |
384 | if (result != IAS_SUCCESS) { | 384 | if (result != IAS_SUCCESS) { |
385 | IRDA_DEBUG(1, "%s(), IAS query failed! (%d)\n", __FUNCTION__, | 385 | IRDA_DEBUG(1, "%s(), IAS query failed! (%d)\n", __func__, |
386 | result); | 386 | result); |
387 | 387 | ||
388 | self->errno = result; /* We really need it later */ | 388 | self->errno = result; /* We really need it later */ |
@@ -415,11 +415,11 @@ static void irda_selective_discovery_indication(discinfo_t *discovery, | |||
415 | { | 415 | { |
416 | struct irda_sock *self; | 416 | struct irda_sock *self; |
417 | 417 | ||
418 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__); | 418 | IRDA_DEBUG(2, "%s()\n", __func__); |
419 | 419 | ||
420 | self = (struct irda_sock *) priv; | 420 | self = (struct irda_sock *) priv; |
421 | if (!self) { | 421 | if (!self) { |
422 | IRDA_WARNING("%s: lost myself!\n", __FUNCTION__); | 422 | IRDA_WARNING("%s: lost myself!\n", __func__); |
423 | return; | 423 | return; |
424 | } | 424 | } |
425 | 425 | ||
@@ -442,7 +442,7 @@ static void irda_discovery_timeout(u_long priv) | |||
442 | { | 442 | { |
443 | struct irda_sock *self; | 443 | struct irda_sock *self; |
444 | 444 | ||
445 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__); | 445 | IRDA_DEBUG(2, "%s()\n", __func__); |
446 | 446 | ||
447 | self = (struct irda_sock *) priv; | 447 | self = (struct irda_sock *) priv; |
448 | BUG_ON(self == NULL); | 448 | BUG_ON(self == NULL); |
@@ -467,7 +467,7 @@ static int irda_open_tsap(struct irda_sock *self, __u8 tsap_sel, char *name) | |||
467 | notify_t notify; | 467 | notify_t notify; |
468 | 468 | ||
469 | if (self->tsap) { | 469 | if (self->tsap) { |
470 | IRDA_WARNING("%s: busy!\n", __FUNCTION__); | 470 | IRDA_WARNING("%s: busy!\n", __func__); |
471 | return -EBUSY; | 471 | return -EBUSY; |
472 | } | 472 | } |
473 | 473 | ||
@@ -486,7 +486,7 @@ static int irda_open_tsap(struct irda_sock *self, __u8 tsap_sel, char *name) | |||
486 | ¬ify); | 486 | ¬ify); |
487 | if (self->tsap == NULL) { | 487 | if (self->tsap == NULL) { |
488 | IRDA_DEBUG(0, "%s(), Unable to allocate TSAP!\n", | 488 | IRDA_DEBUG(0, "%s(), Unable to allocate TSAP!\n", |
489 | __FUNCTION__); | 489 | __func__); |
490 | return -ENOMEM; | 490 | return -ENOMEM; |
491 | } | 491 | } |
492 | /* Remember which TSAP selector we actually got */ | 492 | /* Remember which TSAP selector we actually got */ |
@@ -507,7 +507,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid) | |||
507 | notify_t notify; | 507 | notify_t notify; |
508 | 508 | ||
509 | if (self->lsap) { | 509 | if (self->lsap) { |
510 | IRDA_WARNING("%s(), busy!\n", __FUNCTION__); | 510 | IRDA_WARNING("%s(), busy!\n", __func__); |
511 | return -EBUSY; | 511 | return -EBUSY; |
512 | } | 512 | } |
513 | 513 | ||
@@ -519,7 +519,7 @@ static int irda_open_lsap(struct irda_sock *self, int pid) | |||
519 | 519 | ||
520 | self->lsap = irlmp_open_lsap(LSAP_CONNLESS, ¬ify, pid); | 520 | self->lsap = irlmp_open_lsap(LSAP_CONNLESS, ¬ify, pid); |
521 | if (self->lsap == NULL) { | 521 | if (self->lsap == NULL) { |
522 | IRDA_DEBUG( 0, "%s(), Unable to allocate LSAP!\n", __FUNCTION__); | 522 | IRDA_DEBUG( 0, "%s(), Unable to allocate LSAP!\n", __func__); |
523 | return -ENOMEM; | 523 | return -ENOMEM; |
524 | } | 524 | } |
525 | 525 | ||
@@ -540,11 +540,11 @@ static int irda_open_lsap(struct irda_sock *self, int pid) | |||
540 | */ | 540 | */ |
541 | static int irda_find_lsap_sel(struct irda_sock *self, char *name) | 541 | static int irda_find_lsap_sel(struct irda_sock *self, char *name) |
542 | { | 542 | { |
543 | IRDA_DEBUG(2, "%s(%p, %s)\n", __FUNCTION__, self, name); | 543 | IRDA_DEBUG(2, "%s(%p, %s)\n", __func__, self, name); |
544 | 544 | ||
545 | if (self->iriap) { | 545 | if (self->iriap) { |
546 | IRDA_WARNING("%s(): busy with a previous query\n", | 546 | IRDA_WARNING("%s(): busy with a previous query\n", |
547 | __FUNCTION__); | 547 | __func__); |
548 | return -EBUSY; | 548 | return -EBUSY; |
549 | } | 549 | } |
550 | 550 | ||
@@ -580,7 +580,7 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name) | |||
580 | switch (self->ias_result->type) { | 580 | switch (self->ias_result->type) { |
581 | case IAS_INTEGER: | 581 | case IAS_INTEGER: |
582 | IRDA_DEBUG(4, "%s() int=%d\n", | 582 | IRDA_DEBUG(4, "%s() int=%d\n", |
583 | __FUNCTION__, self->ias_result->t.integer); | 583 | __func__, self->ias_result->t.integer); |
584 | 584 | ||
585 | if (self->ias_result->t.integer != -1) | 585 | if (self->ias_result->t.integer != -1) |
586 | self->dtsap_sel = self->ias_result->t.integer; | 586 | self->dtsap_sel = self->ias_result->t.integer; |
@@ -589,7 +589,7 @@ static int irda_find_lsap_sel(struct irda_sock *self, char *name) | |||
589 | break; | 589 | break; |
590 | default: | 590 | default: |
591 | self->dtsap_sel = 0; | 591 | self->dtsap_sel = 0; |
592 | IRDA_DEBUG(0, "%s(), bad type!\n", __FUNCTION__); | 592 | IRDA_DEBUG(0, "%s(), bad type!\n", __func__); |
593 | break; | 593 | break; |
594 | } | 594 | } |
595 | if (self->ias_result) | 595 | if (self->ias_result) |
@@ -627,7 +627,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
627 | __u32 daddr = DEV_ADDR_ANY; /* Address we found the service on */ | 627 | __u32 daddr = DEV_ADDR_ANY; /* Address we found the service on */ |
628 | __u8 dtsap_sel = 0x0; /* TSAP associated with it */ | 628 | __u8 dtsap_sel = 0x0; /* TSAP associated with it */ |
629 | 629 | ||
630 | IRDA_DEBUG(2, "%s(), name=%s\n", __FUNCTION__, name); | 630 | IRDA_DEBUG(2, "%s(), name=%s\n", __func__, name); |
631 | 631 | ||
632 | /* Ask lmp for the current discovery log | 632 | /* Ask lmp for the current discovery log |
633 | * Note : we have to use irlmp_get_discoveries(), as opposed | 633 | * Note : we have to use irlmp_get_discoveries(), as opposed |
@@ -649,7 +649,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
649 | self->daddr = discoveries[i].daddr; | 649 | self->daddr = discoveries[i].daddr; |
650 | self->saddr = 0x0; | 650 | self->saddr = 0x0; |
651 | IRDA_DEBUG(1, "%s(), trying daddr = %08x\n", | 651 | IRDA_DEBUG(1, "%s(), trying daddr = %08x\n", |
652 | __FUNCTION__, self->daddr); | 652 | __func__, self->daddr); |
653 | 653 | ||
654 | /* Query remote LM-IAS for this service */ | 654 | /* Query remote LM-IAS for this service */ |
655 | err = irda_find_lsap_sel(self, name); | 655 | err = irda_find_lsap_sel(self, name); |
@@ -658,7 +658,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
658 | /* We found the requested service */ | 658 | /* We found the requested service */ |
659 | if(daddr != DEV_ADDR_ANY) { | 659 | if(daddr != DEV_ADDR_ANY) { |
660 | IRDA_DEBUG(1, "%s(), discovered service ''%s'' in two different devices !!!\n", | 660 | IRDA_DEBUG(1, "%s(), discovered service ''%s'' in two different devices !!!\n", |
661 | __FUNCTION__, name); | 661 | __func__, name); |
662 | self->daddr = DEV_ADDR_ANY; | 662 | self->daddr = DEV_ADDR_ANY; |
663 | kfree(discoveries); | 663 | kfree(discoveries); |
664 | return(-ENOTUNIQ); | 664 | return(-ENOTUNIQ); |
@@ -672,7 +672,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
672 | break; | 672 | break; |
673 | default: | 673 | default: |
674 | /* Something bad did happen :-( */ | 674 | /* Something bad did happen :-( */ |
675 | IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __FUNCTION__); | 675 | IRDA_DEBUG(0, "%s(), unexpected IAS query failure\n", __func__); |
676 | self->daddr = DEV_ADDR_ANY; | 676 | self->daddr = DEV_ADDR_ANY; |
677 | kfree(discoveries); | 677 | kfree(discoveries); |
678 | return(-EHOSTUNREACH); | 678 | return(-EHOSTUNREACH); |
@@ -685,7 +685,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
685 | /* Check out what we found */ | 685 | /* Check out what we found */ |
686 | if(daddr == DEV_ADDR_ANY) { | 686 | if(daddr == DEV_ADDR_ANY) { |
687 | IRDA_DEBUG(1, "%s(), cannot discover service ''%s'' in any device !!!\n", | 687 | IRDA_DEBUG(1, "%s(), cannot discover service ''%s'' in any device !!!\n", |
688 | __FUNCTION__, name); | 688 | __func__, name); |
689 | self->daddr = DEV_ADDR_ANY; | 689 | self->daddr = DEV_ADDR_ANY; |
690 | return(-EADDRNOTAVAIL); | 690 | return(-EADDRNOTAVAIL); |
691 | } | 691 | } |
@@ -696,7 +696,7 @@ static int irda_discover_daddr_and_lsap_sel(struct irda_sock *self, char *name) | |||
696 | self->dtsap_sel = dtsap_sel; | 696 | self->dtsap_sel = dtsap_sel; |
697 | 697 | ||
698 | IRDA_DEBUG(1, "%s(), discovered requested service ''%s'' at address %08x\n", | 698 | IRDA_DEBUG(1, "%s(), discovered requested service ''%s'' at address %08x\n", |
699 | __FUNCTION__, name, self->daddr); | 699 | __func__, name, self->daddr); |
700 | 700 | ||
701 | return 0; | 701 | return 0; |
702 | } | 702 | } |
@@ -727,8 +727,8 @@ static int irda_getname(struct socket *sock, struct sockaddr *uaddr, | |||
727 | saddr.sir_addr = self->saddr; | 727 | saddr.sir_addr = self->saddr; |
728 | } | 728 | } |
729 | 729 | ||
730 | IRDA_DEBUG(1, "%s(), tsap_sel = %#x\n", __FUNCTION__, saddr.sir_lsap_sel); | 730 | IRDA_DEBUG(1, "%s(), tsap_sel = %#x\n", __func__, saddr.sir_lsap_sel); |
731 | IRDA_DEBUG(1, "%s(), addr = %08x\n", __FUNCTION__, saddr.sir_addr); | 731 | IRDA_DEBUG(1, "%s(), addr = %08x\n", __func__, saddr.sir_addr); |
732 | 732 | ||
733 | /* uaddr_len come to us uninitialised */ | 733 | /* uaddr_len come to us uninitialised */ |
734 | *uaddr_len = sizeof (struct sockaddr_irda); | 734 | *uaddr_len = sizeof (struct sockaddr_irda); |
@@ -747,7 +747,7 @@ static int irda_listen(struct socket *sock, int backlog) | |||
747 | { | 747 | { |
748 | struct sock *sk = sock->sk; | 748 | struct sock *sk = sock->sk; |
749 | 749 | ||
750 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__); | 750 | IRDA_DEBUG(2, "%s()\n", __func__); |
751 | 751 | ||
752 | if ((sk->sk_type != SOCK_STREAM) && (sk->sk_type != SOCK_SEQPACKET) && | 752 | if ((sk->sk_type != SOCK_STREAM) && (sk->sk_type != SOCK_SEQPACKET) && |
753 | (sk->sk_type != SOCK_DGRAM)) | 753 | (sk->sk_type != SOCK_DGRAM)) |
@@ -776,7 +776,7 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
776 | struct irda_sock *self = irda_sk(sk); | 776 | struct irda_sock *self = irda_sk(sk); |
777 | int err; | 777 | int err; |
778 | 778 | ||
779 | IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); | 779 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); |
780 | 780 | ||
781 | if (addr_len != sizeof(struct sockaddr_irda)) | 781 | if (addr_len != sizeof(struct sockaddr_irda)) |
782 | return -EINVAL; | 782 | return -EINVAL; |
@@ -787,7 +787,7 @@ static int irda_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len) | |||
787 | (sk->sk_protocol == IRDAPROTO_ULTRA)) { | 787 | (sk->sk_protocol == IRDAPROTO_ULTRA)) { |
788 | self->pid = addr->sir_lsap_sel; | 788 | self->pid = addr->sir_lsap_sel; |
789 | if (self->pid & 0x80) { | 789 | if (self->pid & 0x80) { |
790 | IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __FUNCTION__); | 790 | IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __func__); |
791 | return -EOPNOTSUPP; | 791 | return -EOPNOTSUPP; |
792 | } | 792 | } |
793 | err = irda_open_lsap(self, self->pid); | 793 | err = irda_open_lsap(self, self->pid); |
@@ -835,7 +835,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags) | |||
835 | struct sk_buff *skb; | 835 | struct sk_buff *skb; |
836 | int err; | 836 | int err; |
837 | 837 | ||
838 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__); | 838 | IRDA_DEBUG(2, "%s()\n", __func__); |
839 | 839 | ||
840 | err = irda_create(sk->sk_net, newsock, sk->sk_protocol); | 840 | err = irda_create(sk->sk_net, newsock, sk->sk_protocol); |
841 | if (err) | 841 | if (err) |
@@ -893,7 +893,7 @@ static int irda_accept(struct socket *sock, struct socket *newsock, int flags) | |||
893 | /* Now attach up the new socket */ | 893 | /* Now attach up the new socket */ |
894 | new->tsap = irttp_dup(self->tsap, new); | 894 | new->tsap = irttp_dup(self->tsap, new); |
895 | if (!new->tsap) { | 895 | if (!new->tsap) { |
896 | IRDA_DEBUG(0, "%s(), dup failed!\n", __FUNCTION__); | 896 | IRDA_DEBUG(0, "%s(), dup failed!\n", __func__); |
897 | kfree_skb(skb); | 897 | kfree_skb(skb); |
898 | return -1; | 898 | return -1; |
899 | } | 899 | } |
@@ -954,7 +954,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr, | |||
954 | struct irda_sock *self = irda_sk(sk); | 954 | struct irda_sock *self = irda_sk(sk); |
955 | int err; | 955 | int err; |
956 | 956 | ||
957 | IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); | 957 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); |
958 | 958 | ||
959 | /* Don't allow connect for Ultra sockets */ | 959 | /* Don't allow connect for Ultra sockets */ |
960 | if ((sk->sk_type == SOCK_DGRAM) && (sk->sk_protocol == IRDAPROTO_ULTRA)) | 960 | if ((sk->sk_type == SOCK_DGRAM) && (sk->sk_protocol == IRDAPROTO_ULTRA)) |
@@ -984,13 +984,13 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr, | |||
984 | /* Try to find one suitable */ | 984 | /* Try to find one suitable */ |
985 | err = irda_discover_daddr_and_lsap_sel(self, addr->sir_name); | 985 | err = irda_discover_daddr_and_lsap_sel(self, addr->sir_name); |
986 | if (err) { | 986 | if (err) { |
987 | IRDA_DEBUG(0, "%s(), auto-connect failed!\n", __FUNCTION__); | 987 | IRDA_DEBUG(0, "%s(), auto-connect failed!\n", __func__); |
988 | return err; | 988 | return err; |
989 | } | 989 | } |
990 | } else { | 990 | } else { |
991 | /* Use the one provided by the user */ | 991 | /* Use the one provided by the user */ |
992 | self->daddr = addr->sir_addr; | 992 | self->daddr = addr->sir_addr; |
993 | IRDA_DEBUG(1, "%s(), daddr = %08x\n", __FUNCTION__, self->daddr); | 993 | IRDA_DEBUG(1, "%s(), daddr = %08x\n", __func__, self->daddr); |
994 | 994 | ||
995 | /* If we don't have a valid service name, we assume the | 995 | /* If we don't have a valid service name, we assume the |
996 | * user want to connect on a specific LSAP. Prevent | 996 | * user want to connect on a specific LSAP. Prevent |
@@ -1000,7 +1000,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr, | |||
1000 | /* Query remote LM-IAS using service name */ | 1000 | /* Query remote LM-IAS using service name */ |
1001 | err = irda_find_lsap_sel(self, addr->sir_name); | 1001 | err = irda_find_lsap_sel(self, addr->sir_name); |
1002 | if (err) { | 1002 | if (err) { |
1003 | IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__); | 1003 | IRDA_DEBUG(0, "%s(), connect failed!\n", __func__); |
1004 | return err; | 1004 | return err; |
1005 | } | 1005 | } |
1006 | } else { | 1006 | } else { |
@@ -1025,7 +1025,7 @@ static int irda_connect(struct socket *sock, struct sockaddr *uaddr, | |||
1025 | self->saddr, self->daddr, NULL, | 1025 | self->saddr, self->daddr, NULL, |
1026 | self->max_sdu_size_rx, NULL); | 1026 | self->max_sdu_size_rx, NULL); |
1027 | if (err) { | 1027 | if (err) { |
1028 | IRDA_DEBUG(0, "%s(), connect failed!\n", __FUNCTION__); | 1028 | IRDA_DEBUG(0, "%s(), connect failed!\n", __func__); |
1029 | return err; | 1029 | return err; |
1030 | } | 1030 | } |
1031 | 1031 | ||
@@ -1068,7 +1068,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol) | |||
1068 | struct sock *sk; | 1068 | struct sock *sk; |
1069 | struct irda_sock *self; | 1069 | struct irda_sock *self; |
1070 | 1070 | ||
1071 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__); | 1071 | IRDA_DEBUG(2, "%s()\n", __func__); |
1072 | 1072 | ||
1073 | if (net != &init_net) | 1073 | if (net != &init_net) |
1074 | return -EAFNOSUPPORT; | 1074 | return -EAFNOSUPPORT; |
@@ -1089,7 +1089,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol) | |||
1089 | return -ENOMEM; | 1089 | return -ENOMEM; |
1090 | 1090 | ||
1091 | self = irda_sk(sk); | 1091 | self = irda_sk(sk); |
1092 | IRDA_DEBUG(2, "%s() : self is %p\n", __FUNCTION__, self); | 1092 | IRDA_DEBUG(2, "%s() : self is %p\n", __func__, self); |
1093 | 1093 | ||
1094 | init_waitqueue_head(&self->query_wait); | 1094 | init_waitqueue_head(&self->query_wait); |
1095 | 1095 | ||
@@ -1149,7 +1149,7 @@ static int irda_create(struct net *net, struct socket *sock, int protocol) | |||
1149 | */ | 1149 | */ |
1150 | static void irda_destroy_socket(struct irda_sock *self) | 1150 | static void irda_destroy_socket(struct irda_sock *self) |
1151 | { | 1151 | { |
1152 | IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); | 1152 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); |
1153 | 1153 | ||
1154 | /* Unregister with IrLMP */ | 1154 | /* Unregister with IrLMP */ |
1155 | irlmp_unregister_client(self->ckey); | 1155 | irlmp_unregister_client(self->ckey); |
@@ -1186,7 +1186,7 @@ static int irda_release(struct socket *sock) | |||
1186 | { | 1186 | { |
1187 | struct sock *sk = sock->sk; | 1187 | struct sock *sk = sock->sk; |
1188 | 1188 | ||
1189 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__); | 1189 | IRDA_DEBUG(2, "%s()\n", __func__); |
1190 | 1190 | ||
1191 | if (sk == NULL) | 1191 | if (sk == NULL) |
1192 | return 0; | 1192 | return 0; |
@@ -1254,7 +1254,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1254 | struct sk_buff *skb; | 1254 | struct sk_buff *skb; |
1255 | int err = -EPIPE; | 1255 | int err = -EPIPE; |
1256 | 1256 | ||
1257 | IRDA_DEBUG(4, "%s(), len=%zd\n", __FUNCTION__, len); | 1257 | IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len); |
1258 | 1258 | ||
1259 | /* Note : socket.c set MSG_EOR on SEQPACKET sockets */ | 1259 | /* Note : socket.c set MSG_EOR on SEQPACKET sockets */ |
1260 | if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR | MSG_CMSG_COMPAT | | 1260 | if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_EOR | MSG_CMSG_COMPAT | |
@@ -1282,7 +1282,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1282 | /* Check that we don't send out too big frames */ | 1282 | /* Check that we don't send out too big frames */ |
1283 | if (len > self->max_data_size) { | 1283 | if (len > self->max_data_size) { |
1284 | IRDA_DEBUG(2, "%s(), Chopping frame from %zd to %d bytes!\n", | 1284 | IRDA_DEBUG(2, "%s(), Chopping frame from %zd to %d bytes!\n", |
1285 | __FUNCTION__, len, self->max_data_size); | 1285 | __func__, len, self->max_data_size); |
1286 | len = self->max_data_size; | 1286 | len = self->max_data_size; |
1287 | } | 1287 | } |
1288 | 1288 | ||
@@ -1306,7 +1306,7 @@ static int irda_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1306 | */ | 1306 | */ |
1307 | err = irttp_data_request(self->tsap, skb); | 1307 | err = irttp_data_request(self->tsap, skb); |
1308 | if (err) { | 1308 | if (err) { |
1309 | IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err); | 1309 | IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err); |
1310 | goto out_err; | 1310 | goto out_err; |
1311 | } | 1311 | } |
1312 | /* Tell client how much data we actually sent */ | 1312 | /* Tell client how much data we actually sent */ |
@@ -1332,7 +1332,7 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1332 | size_t copied; | 1332 | size_t copied; |
1333 | int err; | 1333 | int err; |
1334 | 1334 | ||
1335 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__); | 1335 | IRDA_DEBUG(4, "%s()\n", __func__); |
1336 | 1336 | ||
1337 | if ((err = sock_error(sk)) < 0) | 1337 | if ((err = sock_error(sk)) < 0) |
1338 | return err; | 1338 | return err; |
@@ -1347,7 +1347,7 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1347 | 1347 | ||
1348 | if (copied > size) { | 1348 | if (copied > size) { |
1349 | IRDA_DEBUG(2, "%s(), Received truncated frame (%zd < %zd)!\n", | 1349 | IRDA_DEBUG(2, "%s(), Received truncated frame (%zd < %zd)!\n", |
1350 | __FUNCTION__, copied, size); | 1350 | __func__, copied, size); |
1351 | copied = size; | 1351 | copied = size; |
1352 | msg->msg_flags |= MSG_TRUNC; | 1352 | msg->msg_flags |= MSG_TRUNC; |
1353 | } | 1353 | } |
@@ -1363,7 +1363,7 @@ static int irda_recvmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1363 | */ | 1363 | */ |
1364 | if (self->rx_flow == FLOW_STOP) { | 1364 | if (self->rx_flow == FLOW_STOP) { |
1365 | if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) { | 1365 | if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) { |
1366 | IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __FUNCTION__); | 1366 | IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __func__); |
1367 | self->rx_flow = FLOW_START; | 1367 | self->rx_flow = FLOW_START; |
1368 | irttp_flow_request(self->tsap, FLOW_START); | 1368 | irttp_flow_request(self->tsap, FLOW_START); |
1369 | } | 1369 | } |
@@ -1385,7 +1385,7 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock, | |||
1385 | int target, err; | 1385 | int target, err; |
1386 | long timeo; | 1386 | long timeo; |
1387 | 1387 | ||
1388 | IRDA_DEBUG(3, "%s()\n", __FUNCTION__); | 1388 | IRDA_DEBUG(3, "%s()\n", __func__); |
1389 | 1389 | ||
1390 | if ((err = sock_error(sk)) < 0) | 1390 | if ((err = sock_error(sk)) < 0) |
1391 | return err; | 1391 | return err; |
@@ -1459,14 +1459,14 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock, | |||
1459 | /* put the skb back if we didn't use it up.. */ | 1459 | /* put the skb back if we didn't use it up.. */ |
1460 | if (skb->len) { | 1460 | if (skb->len) { |
1461 | IRDA_DEBUG(1, "%s(), back on q!\n", | 1461 | IRDA_DEBUG(1, "%s(), back on q!\n", |
1462 | __FUNCTION__); | 1462 | __func__); |
1463 | skb_queue_head(&sk->sk_receive_queue, skb); | 1463 | skb_queue_head(&sk->sk_receive_queue, skb); |
1464 | break; | 1464 | break; |
1465 | } | 1465 | } |
1466 | 1466 | ||
1467 | kfree_skb(skb); | 1467 | kfree_skb(skb); |
1468 | } else { | 1468 | } else { |
1469 | IRDA_DEBUG(0, "%s() questionable!?\n", __FUNCTION__); | 1469 | IRDA_DEBUG(0, "%s() questionable!?\n", __func__); |
1470 | 1470 | ||
1471 | /* put message back and return */ | 1471 | /* put message back and return */ |
1472 | skb_queue_head(&sk->sk_receive_queue, skb); | 1472 | skb_queue_head(&sk->sk_receive_queue, skb); |
@@ -1482,7 +1482,7 @@ static int irda_recvmsg_stream(struct kiocb *iocb, struct socket *sock, | |||
1482 | */ | 1482 | */ |
1483 | if (self->rx_flow == FLOW_STOP) { | 1483 | if (self->rx_flow == FLOW_STOP) { |
1484 | if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) { | 1484 | if ((atomic_read(&sk->sk_rmem_alloc) << 2) <= sk->sk_rcvbuf) { |
1485 | IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __FUNCTION__); | 1485 | IRDA_DEBUG(2, "%s(), Starting IrTTP\n", __func__); |
1486 | self->rx_flow = FLOW_START; | 1486 | self->rx_flow = FLOW_START; |
1487 | irttp_flow_request(self->tsap, FLOW_START); | 1487 | irttp_flow_request(self->tsap, FLOW_START); |
1488 | } | 1488 | } |
@@ -1506,7 +1506,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1506 | struct sk_buff *skb; | 1506 | struct sk_buff *skb; |
1507 | int err; | 1507 | int err; |
1508 | 1508 | ||
1509 | IRDA_DEBUG(4, "%s(), len=%zd\n", __FUNCTION__, len); | 1509 | IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len); |
1510 | 1510 | ||
1511 | if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT)) | 1511 | if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT)) |
1512 | return -EINVAL; | 1512 | return -EINVAL; |
@@ -1528,7 +1528,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1528 | if (len > self->max_data_size) { | 1528 | if (len > self->max_data_size) { |
1529 | IRDA_DEBUG(0, "%s(), Warning to much data! " | 1529 | IRDA_DEBUG(0, "%s(), Warning to much data! " |
1530 | "Chopping frame from %zd to %d bytes!\n", | 1530 | "Chopping frame from %zd to %d bytes!\n", |
1531 | __FUNCTION__, len, self->max_data_size); | 1531 | __func__, len, self->max_data_size); |
1532 | len = self->max_data_size; | 1532 | len = self->max_data_size; |
1533 | } | 1533 | } |
1534 | 1534 | ||
@@ -1540,7 +1540,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1540 | skb_reserve(skb, self->max_header_size); | 1540 | skb_reserve(skb, self->max_header_size); |
1541 | skb_reset_transport_header(skb); | 1541 | skb_reset_transport_header(skb); |
1542 | 1542 | ||
1543 | IRDA_DEBUG(4, "%s(), appending user data\n", __FUNCTION__); | 1543 | IRDA_DEBUG(4, "%s(), appending user data\n", __func__); |
1544 | skb_put(skb, len); | 1544 | skb_put(skb, len); |
1545 | err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len); | 1545 | err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len); |
1546 | if (err) { | 1546 | if (err) { |
@@ -1554,7 +1554,7 @@ static int irda_sendmsg_dgram(struct kiocb *iocb, struct socket *sock, | |||
1554 | */ | 1554 | */ |
1555 | err = irttp_udata_request(self->tsap, skb); | 1555 | err = irttp_udata_request(self->tsap, skb); |
1556 | if (err) { | 1556 | if (err) { |
1557 | IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err); | 1557 | IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err); |
1558 | return err; | 1558 | return err; |
1559 | } | 1559 | } |
1560 | return len; | 1560 | return len; |
@@ -1577,7 +1577,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock, | |||
1577 | struct sk_buff *skb; | 1577 | struct sk_buff *skb; |
1578 | int err; | 1578 | int err; |
1579 | 1579 | ||
1580 | IRDA_DEBUG(4, "%s(), len=%zd\n", __FUNCTION__, len); | 1580 | IRDA_DEBUG(4, "%s(), len=%zd\n", __func__, len); |
1581 | 1581 | ||
1582 | if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT)) | 1582 | if (msg->msg_flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT)) |
1583 | return -EINVAL; | 1583 | return -EINVAL; |
@@ -1600,7 +1600,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock, | |||
1600 | 1600 | ||
1601 | pid = addr->sir_lsap_sel; | 1601 | pid = addr->sir_lsap_sel; |
1602 | if (pid & 0x80) { | 1602 | if (pid & 0x80) { |
1603 | IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __FUNCTION__); | 1603 | IRDA_DEBUG(0, "%s(), extension in PID not supp!\n", __func__); |
1604 | return -EOPNOTSUPP; | 1604 | return -EOPNOTSUPP; |
1605 | } | 1605 | } |
1606 | } else { | 1606 | } else { |
@@ -1609,7 +1609,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock, | |||
1609 | if ((self->lsap == NULL) || | 1609 | if ((self->lsap == NULL) || |
1610 | (sk->sk_state != TCP_ESTABLISHED)) { | 1610 | (sk->sk_state != TCP_ESTABLISHED)) { |
1611 | IRDA_DEBUG(0, "%s(), socket not bound to Ultra PID.\n", | 1611 | IRDA_DEBUG(0, "%s(), socket not bound to Ultra PID.\n", |
1612 | __FUNCTION__); | 1612 | __func__); |
1613 | return -ENOTCONN; | 1613 | return -ENOTCONN; |
1614 | } | 1614 | } |
1615 | /* Use PID from socket */ | 1615 | /* Use PID from socket */ |
@@ -1623,7 +1623,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock, | |||
1623 | if (len > self->max_data_size) { | 1623 | if (len > self->max_data_size) { |
1624 | IRDA_DEBUG(0, "%s(), Warning to much data! " | 1624 | IRDA_DEBUG(0, "%s(), Warning to much data! " |
1625 | "Chopping frame from %zd to %d bytes!\n", | 1625 | "Chopping frame from %zd to %d bytes!\n", |
1626 | __FUNCTION__, len, self->max_data_size); | 1626 | __func__, len, self->max_data_size); |
1627 | len = self->max_data_size; | 1627 | len = self->max_data_size; |
1628 | } | 1628 | } |
1629 | 1629 | ||
@@ -1635,7 +1635,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock, | |||
1635 | skb_reserve(skb, self->max_header_size); | 1635 | skb_reserve(skb, self->max_header_size); |
1636 | skb_reset_transport_header(skb); | 1636 | skb_reset_transport_header(skb); |
1637 | 1637 | ||
1638 | IRDA_DEBUG(4, "%s(), appending user data\n", __FUNCTION__); | 1638 | IRDA_DEBUG(4, "%s(), appending user data\n", __func__); |
1639 | skb_put(skb, len); | 1639 | skb_put(skb, len); |
1640 | err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len); | 1640 | err = memcpy_fromiovec(skb_transport_header(skb), msg->msg_iov, len); |
1641 | if (err) { | 1641 | if (err) { |
@@ -1646,7 +1646,7 @@ static int irda_sendmsg_ultra(struct kiocb *iocb, struct socket *sock, | |||
1646 | err = irlmp_connless_data_request((bound ? self->lsap : NULL), | 1646 | err = irlmp_connless_data_request((bound ? self->lsap : NULL), |
1647 | skb, pid); | 1647 | skb, pid); |
1648 | if (err) { | 1648 | if (err) { |
1649 | IRDA_DEBUG(0, "%s(), err=%d\n", __FUNCTION__, err); | 1649 | IRDA_DEBUG(0, "%s(), err=%d\n", __func__, err); |
1650 | return err; | 1650 | return err; |
1651 | } | 1651 | } |
1652 | return len; | 1652 | return len; |
@@ -1661,7 +1661,7 @@ static int irda_shutdown(struct socket *sock, int how) | |||
1661 | struct sock *sk = sock->sk; | 1661 | struct sock *sk = sock->sk; |
1662 | struct irda_sock *self = irda_sk(sk); | 1662 | struct irda_sock *self = irda_sk(sk); |
1663 | 1663 | ||
1664 | IRDA_DEBUG(1, "%s(%p)\n", __FUNCTION__, self); | 1664 | IRDA_DEBUG(1, "%s(%p)\n", __func__, self); |
1665 | 1665 | ||
1666 | sk->sk_state = TCP_CLOSE; | 1666 | sk->sk_state = TCP_CLOSE; |
1667 | sk->sk_shutdown |= SEND_SHUTDOWN; | 1667 | sk->sk_shutdown |= SEND_SHUTDOWN; |
@@ -1696,7 +1696,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock, | |||
1696 | struct irda_sock *self = irda_sk(sk); | 1696 | struct irda_sock *self = irda_sk(sk); |
1697 | unsigned int mask; | 1697 | unsigned int mask; |
1698 | 1698 | ||
1699 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__); | 1699 | IRDA_DEBUG(4, "%s()\n", __func__); |
1700 | 1700 | ||
1701 | poll_wait(file, sk->sk_sleep, wait); | 1701 | poll_wait(file, sk->sk_sleep, wait); |
1702 | mask = 0; | 1702 | mask = 0; |
@@ -1705,7 +1705,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock, | |||
1705 | if (sk->sk_err) | 1705 | if (sk->sk_err) |
1706 | mask |= POLLERR; | 1706 | mask |= POLLERR; |
1707 | if (sk->sk_shutdown & RCV_SHUTDOWN) { | 1707 | if (sk->sk_shutdown & RCV_SHUTDOWN) { |
1708 | IRDA_DEBUG(0, "%s(), POLLHUP\n", __FUNCTION__); | 1708 | IRDA_DEBUG(0, "%s(), POLLHUP\n", __func__); |
1709 | mask |= POLLHUP; | 1709 | mask |= POLLHUP; |
1710 | } | 1710 | } |
1711 | 1711 | ||
@@ -1719,7 +1719,7 @@ static unsigned int irda_poll(struct file * file, struct socket *sock, | |||
1719 | switch (sk->sk_type) { | 1719 | switch (sk->sk_type) { |
1720 | case SOCK_STREAM: | 1720 | case SOCK_STREAM: |
1721 | if (sk->sk_state == TCP_CLOSE) { | 1721 | if (sk->sk_state == TCP_CLOSE) { |
1722 | IRDA_DEBUG(0, "%s(), POLLHUP\n", __FUNCTION__); | 1722 | IRDA_DEBUG(0, "%s(), POLLHUP\n", __func__); |
1723 | mask |= POLLHUP; | 1723 | mask |= POLLHUP; |
1724 | } | 1724 | } |
1725 | 1725 | ||
@@ -1755,7 +1755,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
1755 | { | 1755 | { |
1756 | struct sock *sk = sock->sk; | 1756 | struct sock *sk = sock->sk; |
1757 | 1757 | ||
1758 | IRDA_DEBUG(4, "%s(), cmd=%#x\n", __FUNCTION__, cmd); | 1758 | IRDA_DEBUG(4, "%s(), cmd=%#x\n", __func__, cmd); |
1759 | 1759 | ||
1760 | switch (cmd) { | 1760 | switch (cmd) { |
1761 | case TIOCOUTQ: { | 1761 | case TIOCOUTQ: { |
@@ -1796,7 +1796,7 @@ static int irda_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) | |||
1796 | case SIOCSIFMETRIC: | 1796 | case SIOCSIFMETRIC: |
1797 | return -EINVAL; | 1797 | return -EINVAL; |
1798 | default: | 1798 | default: |
1799 | IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __FUNCTION__); | 1799 | IRDA_DEBUG(1, "%s(), doing device ioctl!\n", __func__); |
1800 | return -ENOIOCTLCMD; | 1800 | return -ENOIOCTLCMD; |
1801 | } | 1801 | } |
1802 | 1802 | ||
@@ -1833,7 +1833,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname, | |||
1833 | struct ias_attrib * ias_attr; /* Attribute in IAS object */ | 1833 | struct ias_attrib * ias_attr; /* Attribute in IAS object */ |
1834 | int opt, free_ias = 0; | 1834 | int opt, free_ias = 0; |
1835 | 1835 | ||
1836 | IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); | 1836 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); |
1837 | 1837 | ||
1838 | if (level != SOL_IRLMP) | 1838 | if (level != SOL_IRLMP) |
1839 | return -ENOPROTOOPT; | 1839 | return -ENOPROTOOPT; |
@@ -2012,7 +2012,7 @@ static int irda_setsockopt(struct socket *sock, int level, int optname, | |||
2012 | 2012 | ||
2013 | /* Check is the user space own the object */ | 2013 | /* Check is the user space own the object */ |
2014 | if(ias_attr->value->owner != IAS_USER_ATTR) { | 2014 | if(ias_attr->value->owner != IAS_USER_ATTR) { |
2015 | IRDA_DEBUG(1, "%s(), attempting to delete a kernel attribute\n", __FUNCTION__); | 2015 | IRDA_DEBUG(1, "%s(), attempting to delete a kernel attribute\n", __func__); |
2016 | kfree(ias_opt); | 2016 | kfree(ias_opt); |
2017 | return -EPERM; | 2017 | return -EPERM; |
2018 | } | 2018 | } |
@@ -2031,11 +2031,11 @@ static int irda_setsockopt(struct socket *sock, int level, int optname, | |||
2031 | /* Only possible for a seqpacket service (TTP with SAR) */ | 2031 | /* Only possible for a seqpacket service (TTP with SAR) */ |
2032 | if (sk->sk_type != SOCK_SEQPACKET) { | 2032 | if (sk->sk_type != SOCK_SEQPACKET) { |
2033 | IRDA_DEBUG(2, "%s(), setting max_sdu_size = %d\n", | 2033 | IRDA_DEBUG(2, "%s(), setting max_sdu_size = %d\n", |
2034 | __FUNCTION__, opt); | 2034 | __func__, opt); |
2035 | self->max_sdu_size_rx = opt; | 2035 | self->max_sdu_size_rx = opt; |
2036 | } else { | 2036 | } else { |
2037 | IRDA_WARNING("%s: not allowed to set MAXSDUSIZE for this socket type!\n", | 2037 | IRDA_WARNING("%s: not allowed to set MAXSDUSIZE for this socket type!\n", |
2038 | __FUNCTION__); | 2038 | __func__); |
2039 | return -ENOPROTOOPT; | 2039 | return -ENOPROTOOPT; |
2040 | } | 2040 | } |
2041 | break; | 2041 | break; |
@@ -2149,7 +2149,7 @@ static int irda_getsockopt(struct socket *sock, int level, int optname, | |||
2149 | int err; | 2149 | int err; |
2150 | int offset, total; | 2150 | int offset, total; |
2151 | 2151 | ||
2152 | IRDA_DEBUG(2, "%s(%p)\n", __FUNCTION__, self); | 2152 | IRDA_DEBUG(2, "%s(%p)\n", __func__, self); |
2153 | 2153 | ||
2154 | if (level != SOL_IRLMP) | 2154 | if (level != SOL_IRLMP) |
2155 | return -ENOPROTOOPT; | 2155 | return -ENOPROTOOPT; |
@@ -2310,7 +2310,7 @@ bed: | |||
2310 | /* Check that we can proceed with IAP */ | 2310 | /* Check that we can proceed with IAP */ |
2311 | if (self->iriap) { | 2311 | if (self->iriap) { |
2312 | IRDA_WARNING("%s: busy with a previous query\n", | 2312 | IRDA_WARNING("%s: busy with a previous query\n", |
2313 | __FUNCTION__); | 2313 | __func__); |
2314 | kfree(ias_opt); | 2314 | kfree(ias_opt); |
2315 | return -EBUSY; | 2315 | return -EBUSY; |
2316 | } | 2316 | } |
@@ -2406,7 +2406,7 @@ bed: | |||
2406 | if (!self->cachedaddr) { | 2406 | if (!self->cachedaddr) { |
2407 | int ret = 0; | 2407 | int ret = 0; |
2408 | 2408 | ||
2409 | IRDA_DEBUG(1, "%s(), nothing discovered yet, going to sleep...\n", __FUNCTION__); | 2409 | IRDA_DEBUG(1, "%s(), nothing discovered yet, going to sleep...\n", __func__); |
2410 | 2410 | ||
2411 | /* Set watchdog timer to expire in <val> ms. */ | 2411 | /* Set watchdog timer to expire in <val> ms. */ |
2412 | self->errno = 0; | 2412 | self->errno = 0; |
@@ -2424,14 +2424,14 @@ bed: | |||
2424 | if(timer_pending(&(self->watchdog))) | 2424 | if(timer_pending(&(self->watchdog))) |
2425 | del_timer(&(self->watchdog)); | 2425 | del_timer(&(self->watchdog)); |
2426 | 2426 | ||
2427 | IRDA_DEBUG(1, "%s(), ...waking up !\n", __FUNCTION__); | 2427 | IRDA_DEBUG(1, "%s(), ...waking up !\n", __func__); |
2428 | 2428 | ||
2429 | if (ret != 0) | 2429 | if (ret != 0) |
2430 | return ret; | 2430 | return ret; |
2431 | } | 2431 | } |
2432 | else | 2432 | else |
2433 | IRDA_DEBUG(1, "%s(), found immediately !\n", | 2433 | IRDA_DEBUG(1, "%s(), found immediately !\n", |
2434 | __FUNCTION__); | 2434 | __func__); |
2435 | 2435 | ||
2436 | /* Tell IrLMP that we have been notified */ | 2436 | /* Tell IrLMP that we have been notified */ |
2437 | irlmp_update_client(self->ckey, self->mask.word, | 2437 | irlmp_update_client(self->ckey, self->mask.word, |