diff options
Diffstat (limited to 'net/irda/irlan/irlan_common.c')
-rw-r--r-- | net/irda/irlan/irlan_common.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c index 1eb4bbcb1c9e..75bb6a9dcaaa 100644 --- a/net/irda/irlan/irlan_common.c +++ b/net/irda/irlan/irlan_common.c | |||
@@ -124,7 +124,7 @@ static int __init irlan_init(void) | |||
124 | struct irlan_cb *new; | 124 | struct irlan_cb *new; |
125 | __u16 hints; | 125 | __u16 hints; |
126 | 126 | ||
127 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 127 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
128 | 128 | ||
129 | #ifdef CONFIG_PROC_FS | 129 | #ifdef CONFIG_PROC_FS |
130 | { struct proc_dir_entry *proc; | 130 | { struct proc_dir_entry *proc; |
@@ -136,7 +136,7 @@ static int __init irlan_init(void) | |||
136 | } | 136 | } |
137 | #endif /* CONFIG_PROC_FS */ | 137 | #endif /* CONFIG_PROC_FS */ |
138 | 138 | ||
139 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 139 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
140 | hints = irlmp_service_to_hint(S_LAN); | 140 | hints = irlmp_service_to_hint(S_LAN); |
141 | 141 | ||
142 | /* Register with IrLMP as a client */ | 142 | /* Register with IrLMP as a client */ |
@@ -179,7 +179,7 @@ static void __exit irlan_cleanup(void) | |||
179 | { | 179 | { |
180 | struct irlan_cb *self, *next; | 180 | struct irlan_cb *self, *next; |
181 | 181 | ||
182 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 182 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
183 | 183 | ||
184 | irlmp_unregister_client(ckey); | 184 | irlmp_unregister_client(ckey); |
185 | irlmp_unregister_service(skey); | 185 | irlmp_unregister_service(skey); |
@@ -207,7 +207,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr) | |||
207 | struct net_device *dev; | 207 | struct net_device *dev; |
208 | struct irlan_cb *self; | 208 | struct irlan_cb *self; |
209 | 209 | ||
210 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 210 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
211 | 211 | ||
212 | /* Create network device with irlan */ | 212 | /* Create network device with irlan */ |
213 | dev = alloc_irlandev(eth ? "eth%d" : "irlan%d"); | 213 | dev = alloc_irlandev(eth ? "eth%d" : "irlan%d"); |
@@ -252,7 +252,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr) | |||
252 | 252 | ||
253 | if (register_netdev(dev)) { | 253 | if (register_netdev(dev)) { |
254 | IRDA_DEBUG(2, "%s(), register_netdev() failed!\n", | 254 | IRDA_DEBUG(2, "%s(), register_netdev() failed!\n", |
255 | __FUNCTION__ ); | 255 | __func__ ); |
256 | self = NULL; | 256 | self = NULL; |
257 | free_netdev(dev); | 257 | free_netdev(dev); |
258 | } else { | 258 | } else { |
@@ -272,7 +272,7 @@ static struct irlan_cb *irlan_open(__u32 saddr, __u32 daddr) | |||
272 | */ | 272 | */ |
273 | static void __irlan_close(struct irlan_cb *self) | 273 | static void __irlan_close(struct irlan_cb *self) |
274 | { | 274 | { |
275 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 275 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
276 | 276 | ||
277 | ASSERT_RTNL(); | 277 | ASSERT_RTNL(); |
278 | IRDA_ASSERT(self != NULL, return;); | 278 | IRDA_ASSERT(self != NULL, return;); |
@@ -320,7 +320,7 @@ static void irlan_connect_indication(void *instance, void *sap, | |||
320 | struct irlan_cb *self; | 320 | struct irlan_cb *self; |
321 | struct tsap_cb *tsap; | 321 | struct tsap_cb *tsap; |
322 | 322 | ||
323 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 323 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
324 | 324 | ||
325 | self = (struct irlan_cb *) instance; | 325 | self = (struct irlan_cb *) instance; |
326 | tsap = (struct tsap_cb *) sap; | 326 | tsap = (struct tsap_cb *) sap; |
@@ -332,7 +332,7 @@ static void irlan_connect_indication(void *instance, void *sap, | |||
332 | self->max_sdu_size = max_sdu_size; | 332 | self->max_sdu_size = max_sdu_size; |
333 | self->max_header_size = max_header_size; | 333 | self->max_header_size = max_header_size; |
334 | 334 | ||
335 | IRDA_DEBUG(0, "%s: We are now connected!\n", __FUNCTION__); | 335 | IRDA_DEBUG(0, "%s: We are now connected!\n", __func__); |
336 | 336 | ||
337 | del_timer(&self->watchdog_timer); | 337 | del_timer(&self->watchdog_timer); |
338 | 338 | ||
@@ -376,7 +376,7 @@ static void irlan_connect_confirm(void *instance, void *sap, | |||
376 | 376 | ||
377 | /* TODO: we could set the MTU depending on the max_sdu_size */ | 377 | /* TODO: we could set the MTU depending on the max_sdu_size */ |
378 | 378 | ||
379 | IRDA_DEBUG(0, "%s: We are now connected!\n", __FUNCTION__); | 379 | IRDA_DEBUG(0, "%s: We are now connected!\n", __func__); |
380 | del_timer(&self->watchdog_timer); | 380 | del_timer(&self->watchdog_timer); |
381 | 381 | ||
382 | /* | 382 | /* |
@@ -412,7 +412,7 @@ static void irlan_disconnect_indication(void *instance, | |||
412 | struct irlan_cb *self; | 412 | struct irlan_cb *self; |
413 | struct tsap_cb *tsap; | 413 | struct tsap_cb *tsap; |
414 | 414 | ||
415 | IRDA_DEBUG(0, "%s(), reason=%d\n", __FUNCTION__ , reason); | 415 | IRDA_DEBUG(0, "%s(), reason=%d\n", __func__ , reason); |
416 | 416 | ||
417 | self = (struct irlan_cb *) instance; | 417 | self = (struct irlan_cb *) instance; |
418 | tsap = (struct tsap_cb *) sap; | 418 | tsap = (struct tsap_cb *) sap; |
@@ -431,22 +431,22 @@ static void irlan_disconnect_indication(void *instance, | |||
431 | 431 | ||
432 | switch (reason) { | 432 | switch (reason) { |
433 | case LM_USER_REQUEST: /* User request */ | 433 | case LM_USER_REQUEST: /* User request */ |
434 | IRDA_DEBUG(2, "%s(), User requested\n", __FUNCTION__ ); | 434 | IRDA_DEBUG(2, "%s(), User requested\n", __func__ ); |
435 | break; | 435 | break; |
436 | case LM_LAP_DISCONNECT: /* Unexpected IrLAP disconnect */ | 436 | case LM_LAP_DISCONNECT: /* Unexpected IrLAP disconnect */ |
437 | IRDA_DEBUG(2, "%s(), Unexpected IrLAP disconnect\n", __FUNCTION__ ); | 437 | IRDA_DEBUG(2, "%s(), Unexpected IrLAP disconnect\n", __func__ ); |
438 | break; | 438 | break; |
439 | case LM_CONNECT_FAILURE: /* Failed to establish IrLAP connection */ | 439 | case LM_CONNECT_FAILURE: /* Failed to establish IrLAP connection */ |
440 | IRDA_DEBUG(2, "%s(), IrLAP connect failed\n", __FUNCTION__ ); | 440 | IRDA_DEBUG(2, "%s(), IrLAP connect failed\n", __func__ ); |
441 | break; | 441 | break; |
442 | case LM_LAP_RESET: /* IrLAP reset */ | 442 | case LM_LAP_RESET: /* IrLAP reset */ |
443 | IRDA_DEBUG(2, "%s(), IrLAP reset\n", __FUNCTION__ ); | 443 | IRDA_DEBUG(2, "%s(), IrLAP reset\n", __func__ ); |
444 | break; | 444 | break; |
445 | case LM_INIT_DISCONNECT: | 445 | case LM_INIT_DISCONNECT: |
446 | IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __FUNCTION__ ); | 446 | IRDA_DEBUG(2, "%s(), IrLMP connect failed\n", __func__ ); |
447 | break; | 447 | break; |
448 | default: | 448 | default: |
449 | IRDA_ERROR("%s(), Unknown disconnect reason\n", __FUNCTION__); | 449 | IRDA_ERROR("%s(), Unknown disconnect reason\n", __func__); |
450 | break; | 450 | break; |
451 | } | 451 | } |
452 | 452 | ||
@@ -468,7 +468,7 @@ void irlan_open_data_tsap(struct irlan_cb *self) | |||
468 | struct tsap_cb *tsap; | 468 | struct tsap_cb *tsap; |
469 | notify_t notify; | 469 | notify_t notify; |
470 | 470 | ||
471 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 471 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
472 | 472 | ||
473 | IRDA_ASSERT(self != NULL, return;); | 473 | IRDA_ASSERT(self != NULL, return;); |
474 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 474 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
@@ -490,7 +490,7 @@ void irlan_open_data_tsap(struct irlan_cb *self) | |||
490 | 490 | ||
491 | tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, ¬ify); | 491 | tsap = irttp_open_tsap(LSAP_ANY, DEFAULT_INITIAL_CREDIT, ¬ify); |
492 | if (!tsap) { | 492 | if (!tsap) { |
493 | IRDA_DEBUG(2, "%s(), Got no tsap!\n", __FUNCTION__ ); | 493 | IRDA_DEBUG(2, "%s(), Got no tsap!\n", __func__ ); |
494 | return; | 494 | return; |
495 | } | 495 | } |
496 | self->tsap_data = tsap; | 496 | self->tsap_data = tsap; |
@@ -504,7 +504,7 @@ void irlan_open_data_tsap(struct irlan_cb *self) | |||
504 | 504 | ||
505 | void irlan_close_tsaps(struct irlan_cb *self) | 505 | void irlan_close_tsaps(struct irlan_cb *self) |
506 | { | 506 | { |
507 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 507 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
508 | 508 | ||
509 | IRDA_ASSERT(self != NULL, return;); | 509 | IRDA_ASSERT(self != NULL, return;); |
510 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 510 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
@@ -594,7 +594,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self) | |||
594 | { | 594 | { |
595 | struct sk_buff *skb; | 595 | struct sk_buff *skb; |
596 | 596 | ||
597 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 597 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
598 | 598 | ||
599 | if (irda_lock(&self->client.tx_busy) == FALSE) | 599 | if (irda_lock(&self->client.tx_busy) == FALSE) |
600 | return -EBUSY; | 600 | return -EBUSY; |
@@ -613,7 +613,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self) | |||
613 | dev_kfree_skb(skb); | 613 | dev_kfree_skb(skb); |
614 | return -1; | 614 | return -1; |
615 | } | 615 | } |
616 | IRDA_DEBUG(2, "%s(), sending ...\n", __FUNCTION__ ); | 616 | IRDA_DEBUG(2, "%s(), sending ...\n", __func__ ); |
617 | 617 | ||
618 | return irttp_data_request(self->client.tsap_ctrl, skb); | 618 | return irttp_data_request(self->client.tsap_ctrl, skb); |
619 | } | 619 | } |
@@ -626,7 +626,7 @@ int irlan_run_ctrl_tx_queue(struct irlan_cb *self) | |||
626 | */ | 626 | */ |
627 | static void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb) | 627 | static void irlan_ctrl_data_request(struct irlan_cb *self, struct sk_buff *skb) |
628 | { | 628 | { |
629 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 629 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
630 | 630 | ||
631 | /* Queue command */ | 631 | /* Queue command */ |
632 | skb_queue_tail(&self->client.txq, skb); | 632 | skb_queue_tail(&self->client.txq, skb); |
@@ -646,7 +646,7 @@ void irlan_get_provider_info(struct irlan_cb *self) | |||
646 | struct sk_buff *skb; | 646 | struct sk_buff *skb; |
647 | __u8 *frame; | 647 | __u8 *frame; |
648 | 648 | ||
649 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 649 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
650 | 650 | ||
651 | IRDA_ASSERT(self != NULL, return;); | 651 | IRDA_ASSERT(self != NULL, return;); |
652 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 652 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
@@ -679,7 +679,7 @@ void irlan_open_data_channel(struct irlan_cb *self) | |||
679 | struct sk_buff *skb; | 679 | struct sk_buff *skb; |
680 | __u8 *frame; | 680 | __u8 *frame; |
681 | 681 | ||
682 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 682 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
683 | 683 | ||
684 | IRDA_ASSERT(self != NULL, return;); | 684 | IRDA_ASSERT(self != NULL, return;); |
685 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 685 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
@@ -714,7 +714,7 @@ void irlan_close_data_channel(struct irlan_cb *self) | |||
714 | struct sk_buff *skb; | 714 | struct sk_buff *skb; |
715 | __u8 *frame; | 715 | __u8 *frame; |
716 | 716 | ||
717 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 717 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
718 | 718 | ||
719 | IRDA_ASSERT(self != NULL, return;); | 719 | IRDA_ASSERT(self != NULL, return;); |
720 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 720 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
@@ -755,7 +755,7 @@ static void irlan_open_unicast_addr(struct irlan_cb *self) | |||
755 | struct sk_buff *skb; | 755 | struct sk_buff *skb; |
756 | __u8 *frame; | 756 | __u8 *frame; |
757 | 757 | ||
758 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 758 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
759 | 759 | ||
760 | IRDA_ASSERT(self != NULL, return;); | 760 | IRDA_ASSERT(self != NULL, return;); |
761 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 761 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
@@ -797,7 +797,7 @@ void irlan_set_broadcast_filter(struct irlan_cb *self, int status) | |||
797 | struct sk_buff *skb; | 797 | struct sk_buff *skb; |
798 | __u8 *frame; | 798 | __u8 *frame; |
799 | 799 | ||
800 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 800 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
801 | 801 | ||
802 | IRDA_ASSERT(self != NULL, return;); | 802 | IRDA_ASSERT(self != NULL, return;); |
803 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 803 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
@@ -841,7 +841,7 @@ void irlan_set_multicast_filter(struct irlan_cb *self, int status) | |||
841 | struct sk_buff *skb; | 841 | struct sk_buff *skb; |
842 | __u8 *frame; | 842 | __u8 *frame; |
843 | 843 | ||
844 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 844 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
845 | 845 | ||
846 | IRDA_ASSERT(self != NULL, return;); | 846 | IRDA_ASSERT(self != NULL, return;); |
847 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 847 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
@@ -886,7 +886,7 @@ static void irlan_get_unicast_addr(struct irlan_cb *self) | |||
886 | struct sk_buff *skb; | 886 | struct sk_buff *skb; |
887 | __u8 *frame; | 887 | __u8 *frame; |
888 | 888 | ||
889 | IRDA_DEBUG(2, "%s()\n", __FUNCTION__ ); | 889 | IRDA_DEBUG(2, "%s()\n", __func__ ); |
890 | 890 | ||
891 | IRDA_ASSERT(self != NULL, return;); | 891 | IRDA_ASSERT(self != NULL, return;); |
892 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 892 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
@@ -926,7 +926,7 @@ void irlan_get_media_char(struct irlan_cb *self) | |||
926 | struct sk_buff *skb; | 926 | struct sk_buff *skb; |
927 | __u8 *frame; | 927 | __u8 *frame; |
928 | 928 | ||
929 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 929 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
930 | 930 | ||
931 | IRDA_ASSERT(self != NULL, return;); | 931 | IRDA_ASSERT(self != NULL, return;); |
932 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); | 932 | IRDA_ASSERT(self->magic == IRLAN_MAGIC, return;); |
@@ -1014,7 +1014,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type, | |||
1014 | int n=0; | 1014 | int n=0; |
1015 | 1015 | ||
1016 | if (skb == NULL) { | 1016 | if (skb == NULL) { |
1017 | IRDA_DEBUG(2, "%s(), Got NULL skb\n", __FUNCTION__ ); | 1017 | IRDA_DEBUG(2, "%s(), Got NULL skb\n", __func__ ); |
1018 | return 0; | 1018 | return 0; |
1019 | } | 1019 | } |
1020 | 1020 | ||
@@ -1031,7 +1031,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type, | |||
1031 | IRDA_ASSERT(value_len > 0, return 0;); | 1031 | IRDA_ASSERT(value_len > 0, return 0;); |
1032 | break; | 1032 | break; |
1033 | default: | 1033 | default: |
1034 | IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __FUNCTION__ ); | 1034 | IRDA_DEBUG(2, "%s(), Unknown parameter type!\n", __func__ ); |
1035 | return 0; | 1035 | return 0; |
1036 | break; | 1036 | break; |
1037 | } | 1037 | } |
@@ -1041,7 +1041,7 @@ static int __irlan_insert_param(struct sk_buff *skb, char *param, int type, | |||
1041 | 1041 | ||
1042 | /* Make space for data */ | 1042 | /* Make space for data */ |
1043 | if (skb_tailroom(skb) < (param_len+value_len+3)) { | 1043 | if (skb_tailroom(skb) < (param_len+value_len+3)) { |
1044 | IRDA_DEBUG(2, "%s(), No more space at end of skb\n", __FUNCTION__ ); | 1044 | IRDA_DEBUG(2, "%s(), No more space at end of skb\n", __func__ ); |
1045 | return 0; | 1045 | return 0; |
1046 | } | 1046 | } |
1047 | skb_put(skb, param_len+value_len+3); | 1047 | skb_put(skb, param_len+value_len+3); |
@@ -1088,13 +1088,13 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len) | |||
1088 | __u16 val_len; | 1088 | __u16 val_len; |
1089 | int n=0; | 1089 | int n=0; |
1090 | 1090 | ||
1091 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__ ); | 1091 | IRDA_DEBUG(4, "%s()\n", __func__ ); |
1092 | 1092 | ||
1093 | /* get length of parameter name (1 byte) */ | 1093 | /* get length of parameter name (1 byte) */ |
1094 | name_len = buf[n++]; | 1094 | name_len = buf[n++]; |
1095 | 1095 | ||
1096 | if (name_len > 254) { | 1096 | if (name_len > 254) { |
1097 | IRDA_DEBUG(2, "%s(), name_len > 254\n", __FUNCTION__ ); | 1097 | IRDA_DEBUG(2, "%s(), name_len > 254\n", __func__ ); |
1098 | return -RSP_INVALID_COMMAND_FORMAT; | 1098 | return -RSP_INVALID_COMMAND_FORMAT; |
1099 | } | 1099 | } |
1100 | 1100 | ||
@@ -1111,7 +1111,7 @@ int irlan_extract_param(__u8 *buf, char *name, char *value, __u16 *len) | |||
1111 | le16_to_cpus(&val_len); n+=2; | 1111 | le16_to_cpus(&val_len); n+=2; |
1112 | 1112 | ||
1113 | if (val_len > 1016) { | 1113 | if (val_len > 1016) { |
1114 | IRDA_DEBUG(2, "%s(), parameter length to long\n", __FUNCTION__ ); | 1114 | IRDA_DEBUG(2, "%s(), parameter length to long\n", __func__ ); |
1115 | return -RSP_INVALID_COMMAND_FORMAT; | 1115 | return -RSP_INVALID_COMMAND_FORMAT; |
1116 | } | 1116 | } |
1117 | *len = val_len; | 1117 | *len = val_len; |