diff options
Diffstat (limited to 'net/irda/irlap_event.c')
-rw-r--r-- | net/irda/irlap_event.c | 122 |
1 files changed, 61 insertions, 61 deletions
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c index 6af86eba7463..16c4ef0f5c1a 100644 --- a/net/irda/irlap_event.c +++ b/net/irda/irlap_event.c | |||
@@ -217,7 +217,7 @@ static void irlap_start_poll_timer(struct irlap_cb *self, int timeout) | |||
217 | } else | 217 | } else |
218 | self->fast_RR = FALSE; | 218 | self->fast_RR = FALSE; |
219 | 219 | ||
220 | IRDA_DEBUG(3, "%s(), timeout=%d (%ld)\n", __FUNCTION__, timeout, jiffies); | 220 | IRDA_DEBUG(3, "%s(), timeout=%d (%ld)\n", __func__, timeout, jiffies); |
221 | #endif /* CONFIG_IRDA_FAST_RR */ | 221 | #endif /* CONFIG_IRDA_FAST_RR */ |
222 | 222 | ||
223 | if (timeout == 0) | 223 | if (timeout == 0) |
@@ -241,7 +241,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, | |||
241 | if (!self || self->magic != LAP_MAGIC) | 241 | if (!self || self->magic != LAP_MAGIC) |
242 | return; | 242 | return; |
243 | 243 | ||
244 | IRDA_DEBUG(3, "%s(), event = %s, state = %s\n", __FUNCTION__, | 244 | IRDA_DEBUG(3, "%s(), event = %s, state = %s\n", __func__, |
245 | irlap_event[event], irlap_state[self->state]); | 245 | irlap_event[event], irlap_state[self->state]); |
246 | 246 | ||
247 | ret = (*state[self->state])(self, event, skb, info); | 247 | ret = (*state[self->state])(self, event, skb, info); |
@@ -259,7 +259,7 @@ void irlap_do_event(struct irlap_cb *self, IRLAP_EVENT event, | |||
259 | * try to disconnect link if we send any data frames, since | 259 | * try to disconnect link if we send any data frames, since |
260 | * that will change the state away form XMIT | 260 | * that will change the state away form XMIT |
261 | */ | 261 | */ |
262 | IRDA_DEBUG(2, "%s() : queue len = %d\n", __FUNCTION__, | 262 | IRDA_DEBUG(2, "%s() : queue len = %d\n", __func__, |
263 | skb_queue_len(&self->txq)); | 263 | skb_queue_len(&self->txq)); |
264 | 264 | ||
265 | if (!skb_queue_empty(&self->txq)) { | 265 | if (!skb_queue_empty(&self->txq)) { |
@@ -340,7 +340,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, | |||
340 | * media busy in irlap_connect_request() and | 340 | * media busy in irlap_connect_request() and |
341 | * postpone the event... - Jean II */ | 341 | * postpone the event... - Jean II */ |
342 | IRDA_DEBUG(0, "%s(), CONNECT_REQUEST: media busy!\n", | 342 | IRDA_DEBUG(0, "%s(), CONNECT_REQUEST: media busy!\n", |
343 | __FUNCTION__); | 343 | __func__); |
344 | 344 | ||
345 | /* Always switch state before calling upper layers */ | 345 | /* Always switch state before calling upper layers */ |
346 | irlap_next_state(self, LAP_NDM); | 346 | irlap_next_state(self, LAP_NDM); |
@@ -367,7 +367,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, | |||
367 | irlap_connect_indication(self, skb); | 367 | irlap_connect_indication(self, skb); |
368 | } else { | 368 | } else { |
369 | IRDA_DEBUG(0, "%s(), SNRM frame does not " | 369 | IRDA_DEBUG(0, "%s(), SNRM frame does not " |
370 | "contain an I field!\n", __FUNCTION__); | 370 | "contain an I field!\n", __func__); |
371 | } | 371 | } |
372 | break; | 372 | break; |
373 | case DISCOVERY_REQUEST: | 373 | case DISCOVERY_REQUEST: |
@@ -375,7 +375,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, | |||
375 | 375 | ||
376 | if (self->media_busy) { | 376 | if (self->media_busy) { |
377 | IRDA_DEBUG(1, "%s(), DISCOVERY_REQUEST: media busy!\n", | 377 | IRDA_DEBUG(1, "%s(), DISCOVERY_REQUEST: media busy!\n", |
378 | __FUNCTION__); | 378 | __func__); |
379 | /* irlap->log.condition = MEDIA_BUSY; */ | 379 | /* irlap->log.condition = MEDIA_BUSY; */ |
380 | 380 | ||
381 | /* This will make IrLMP try again */ | 381 | /* This will make IrLMP try again */ |
@@ -441,7 +441,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, | |||
441 | * those cases... | 441 | * those cases... |
442 | * Jean II | 442 | * Jean II |
443 | */ | 443 | */ |
444 | IRDA_DEBUG(1, "%s(), Receiving final discovery request, missed the discovery slots :-(\n", __FUNCTION__); | 444 | IRDA_DEBUG(1, "%s(), Receiving final discovery request, missed the discovery slots :-(\n", __func__); |
445 | 445 | ||
446 | /* Last discovery request -> in the log */ | 446 | /* Last discovery request -> in the log */ |
447 | irlap_discovery_indication(self, info->discovery); | 447 | irlap_discovery_indication(self, info->discovery); |
@@ -520,7 +520,7 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, | |||
520 | /* Only accept broadcast frames in NDM mode */ | 520 | /* Only accept broadcast frames in NDM mode */ |
521 | if (info->caddr != CBROADCAST) { | 521 | if (info->caddr != CBROADCAST) { |
522 | IRDA_DEBUG(0, "%s(), not a broadcast frame!\n", | 522 | IRDA_DEBUG(0, "%s(), not a broadcast frame!\n", |
523 | __FUNCTION__); | 523 | __func__); |
524 | } else | 524 | } else |
525 | irlap_unitdata_indication(self, skb); | 525 | irlap_unitdata_indication(self, skb); |
526 | break; | 526 | break; |
@@ -536,10 +536,10 @@ static int irlap_state_ndm(struct irlap_cb *self, IRLAP_EVENT event, | |||
536 | irlap_send_test_frame(self, CBROADCAST, info->daddr, skb); | 536 | irlap_send_test_frame(self, CBROADCAST, info->daddr, skb); |
537 | break; | 537 | break; |
538 | case RECV_TEST_RSP: | 538 | case RECV_TEST_RSP: |
539 | IRDA_DEBUG(0, "%s() not implemented!\n", __FUNCTION__); | 539 | IRDA_DEBUG(0, "%s() not implemented!\n", __func__); |
540 | break; | 540 | break; |
541 | default: | 541 | default: |
542 | IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__, | 542 | IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__, |
543 | irlap_event[event]); | 543 | irlap_event[event]); |
544 | 544 | ||
545 | ret = -1; | 545 | ret = -1; |
@@ -567,13 +567,13 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, | |||
567 | IRDA_ASSERT(info != NULL, return -1;); | 567 | IRDA_ASSERT(info != NULL, return -1;); |
568 | IRDA_ASSERT(info->discovery != NULL, return -1;); | 568 | IRDA_ASSERT(info->discovery != NULL, return -1;); |
569 | 569 | ||
570 | IRDA_DEBUG(4, "%s(), daddr=%08x\n", __FUNCTION__, | 570 | IRDA_DEBUG(4, "%s(), daddr=%08x\n", __func__, |
571 | info->discovery->data.daddr); | 571 | info->discovery->data.daddr); |
572 | 572 | ||
573 | if (!self->discovery_log) { | 573 | if (!self->discovery_log) { |
574 | IRDA_WARNING("%s: discovery log is gone! " | 574 | IRDA_WARNING("%s: discovery log is gone! " |
575 | "maybe the discovery timeout has been set" | 575 | "maybe the discovery timeout has been set" |
576 | " too short?\n", __FUNCTION__); | 576 | " too short?\n", __func__); |
577 | break; | 577 | break; |
578 | } | 578 | } |
579 | hashbin_insert(self->discovery_log, | 579 | hashbin_insert(self->discovery_log, |
@@ -598,7 +598,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, | |||
598 | 598 | ||
599 | IRDA_ASSERT(info != NULL, return -1;); | 599 | IRDA_ASSERT(info != NULL, return -1;); |
600 | 600 | ||
601 | IRDA_DEBUG(1, "%s(), Receiving discovery request (s = %d) while performing discovery :-(\n", __FUNCTION__, info->s); | 601 | IRDA_DEBUG(1, "%s(), Receiving discovery request (s = %d) while performing discovery :-(\n", __func__, info->s); |
602 | 602 | ||
603 | /* Last discovery request ? */ | 603 | /* Last discovery request ? */ |
604 | if (info->s == 0xff) | 604 | if (info->s == 0xff) |
@@ -613,7 +613,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, | |||
613 | */ | 613 | */ |
614 | if (irda_device_is_receiving(self->netdev) && !self->add_wait) { | 614 | if (irda_device_is_receiving(self->netdev) && !self->add_wait) { |
615 | IRDA_DEBUG(2, "%s(), device is slow to answer, " | 615 | IRDA_DEBUG(2, "%s(), device is slow to answer, " |
616 | "waiting some more!\n", __FUNCTION__); | 616 | "waiting some more!\n", __func__); |
617 | irlap_start_slot_timer(self, msecs_to_jiffies(10)); | 617 | irlap_start_slot_timer(self, msecs_to_jiffies(10)); |
618 | self->add_wait = TRUE; | 618 | self->add_wait = TRUE; |
619 | return ret; | 619 | return ret; |
@@ -649,7 +649,7 @@ static int irlap_state_query(struct irlap_cb *self, IRLAP_EVENT event, | |||
649 | } | 649 | } |
650 | break; | 650 | break; |
651 | default: | 651 | default: |
652 | IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__, | 652 | IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__, |
653 | irlap_event[event]); | 653 | irlap_event[event]); |
654 | 654 | ||
655 | ret = -1; | 655 | ret = -1; |
@@ -671,7 +671,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event, | |||
671 | discovery_t *discovery_rsp; | 671 | discovery_t *discovery_rsp; |
672 | int ret=0; | 672 | int ret=0; |
673 | 673 | ||
674 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__); | 674 | IRDA_DEBUG(4, "%s()\n", __func__); |
675 | 675 | ||
676 | IRDA_ASSERT(self != NULL, return -1;); | 676 | IRDA_ASSERT(self != NULL, return -1;); |
677 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 677 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
@@ -679,7 +679,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event, | |||
679 | switch (event) { | 679 | switch (event) { |
680 | case QUERY_TIMER_EXPIRED: | 680 | case QUERY_TIMER_EXPIRED: |
681 | IRDA_DEBUG(0, "%s(), QUERY_TIMER_EXPIRED <%ld>\n", | 681 | IRDA_DEBUG(0, "%s(), QUERY_TIMER_EXPIRED <%ld>\n", |
682 | __FUNCTION__, jiffies); | 682 | __func__, jiffies); |
683 | irlap_next_state(self, LAP_NDM); | 683 | irlap_next_state(self, LAP_NDM); |
684 | break; | 684 | break; |
685 | case RECV_DISCOVERY_XID_CMD: | 685 | case RECV_DISCOVERY_XID_CMD: |
@@ -717,7 +717,7 @@ static int irlap_state_reply(struct irlap_cb *self, IRLAP_EVENT event, | |||
717 | } | 717 | } |
718 | break; | 718 | break; |
719 | default: | 719 | default: |
720 | IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__, | 720 | IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__, |
721 | event, irlap_event[event]); | 721 | event, irlap_event[event]); |
722 | 722 | ||
723 | ret = -1; | 723 | ret = -1; |
@@ -738,7 +738,7 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event, | |||
738 | { | 738 | { |
739 | int ret = 0; | 739 | int ret = 0; |
740 | 740 | ||
741 | IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[ event]); | 741 | IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[ event]); |
742 | 742 | ||
743 | IRDA_ASSERT(self != NULL, return -1;); | 743 | IRDA_ASSERT(self != NULL, return -1;); |
744 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 744 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
@@ -799,18 +799,18 @@ static int irlap_state_conn(struct irlap_cb *self, IRLAP_EVENT event, | |||
799 | break; | 799 | break; |
800 | case RECV_DISCOVERY_XID_CMD: | 800 | case RECV_DISCOVERY_XID_CMD: |
801 | IRDA_DEBUG(3, "%s(), event RECV_DISCOVER_XID_CMD!\n", | 801 | IRDA_DEBUG(3, "%s(), event RECV_DISCOVER_XID_CMD!\n", |
802 | __FUNCTION__); | 802 | __func__); |
803 | irlap_next_state(self, LAP_NDM); | 803 | irlap_next_state(self, LAP_NDM); |
804 | 804 | ||
805 | break; | 805 | break; |
806 | case DISCONNECT_REQUEST: | 806 | case DISCONNECT_REQUEST: |
807 | IRDA_DEBUG(0, "%s(), Disconnect request!\n", __FUNCTION__); | 807 | IRDA_DEBUG(0, "%s(), Disconnect request!\n", __func__); |
808 | irlap_send_dm_frame(self); | 808 | irlap_send_dm_frame(self); |
809 | irlap_next_state( self, LAP_NDM); | 809 | irlap_next_state( self, LAP_NDM); |
810 | irlap_disconnect_indication(self, LAP_DISC_INDICATION); | 810 | irlap_disconnect_indication(self, LAP_DISC_INDICATION); |
811 | break; | 811 | break; |
812 | default: | 812 | default: |
813 | IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__, | 813 | IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__, |
814 | event, irlap_event[event]); | 814 | event, irlap_event[event]); |
815 | 815 | ||
816 | ret = -1; | 816 | ret = -1; |
@@ -832,7 +832,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, | |||
832 | { | 832 | { |
833 | int ret = 0; | 833 | int ret = 0; |
834 | 834 | ||
835 | IRDA_DEBUG(4, "%s()\n", __FUNCTION__); | 835 | IRDA_DEBUG(4, "%s()\n", __func__); |
836 | 836 | ||
837 | IRDA_ASSERT(self != NULL, return -1;); | 837 | IRDA_ASSERT(self != NULL, return -1;); |
838 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 838 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
@@ -861,7 +861,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, | |||
861 | self->retry_count++; | 861 | self->retry_count++; |
862 | break; | 862 | break; |
863 | case RECV_SNRM_CMD: | 863 | case RECV_SNRM_CMD: |
864 | IRDA_DEBUG(4, "%s(), SNRM battle!\n", __FUNCTION__); | 864 | IRDA_DEBUG(4, "%s(), SNRM battle!\n", __func__); |
865 | 865 | ||
866 | IRDA_ASSERT(skb != NULL, return 0;); | 866 | IRDA_ASSERT(skb != NULL, return 0;); |
867 | IRDA_ASSERT(info != NULL, return 0;); | 867 | IRDA_ASSERT(info != NULL, return 0;); |
@@ -948,7 +948,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, | |||
948 | irlap_disconnect_indication(self, LAP_DISC_INDICATION); | 948 | irlap_disconnect_indication(self, LAP_DISC_INDICATION); |
949 | break; | 949 | break; |
950 | default: | 950 | default: |
951 | IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __FUNCTION__, | 951 | IRDA_DEBUG(1, "%s(), Unknown event %d, %s\n", __func__, |
952 | event, irlap_event[event]); | 952 | event, irlap_event[event]); |
953 | 953 | ||
954 | ret = -1; | 954 | ret = -1; |
@@ -966,7 +966,7 @@ static int irlap_state_setup(struct irlap_cb *self, IRLAP_EVENT event, | |||
966 | static int irlap_state_offline(struct irlap_cb *self, IRLAP_EVENT event, | 966 | static int irlap_state_offline(struct irlap_cb *self, IRLAP_EVENT event, |
967 | struct sk_buff *skb, struct irlap_info *info) | 967 | struct sk_buff *skb, struct irlap_info *info) |
968 | { | 968 | { |
969 | IRDA_DEBUG( 0, "%s(), Unknown event\n", __FUNCTION__); | 969 | IRDA_DEBUG( 0, "%s(), Unknown event\n", __func__); |
970 | 970 | ||
971 | return -1; | 971 | return -1; |
972 | } | 972 | } |
@@ -1030,7 +1030,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1030 | */ | 1030 | */ |
1031 | if((!nextfit) && (skb->len > self->bytes_left)) { | 1031 | if((!nextfit) && (skb->len > self->bytes_left)) { |
1032 | IRDA_DEBUG(0, "%s(), Not allowed to transmit" | 1032 | IRDA_DEBUG(0, "%s(), Not allowed to transmit" |
1033 | " more bytes!\n", __FUNCTION__); | 1033 | " more bytes!\n", __func__); |
1034 | /* Requeue the skb */ | 1034 | /* Requeue the skb */ |
1035 | skb_queue_head(&self->txq, skb_get(skb)); | 1035 | skb_queue_head(&self->txq, skb_get(skb)); |
1036 | /* | 1036 | /* |
@@ -1082,7 +1082,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1082 | #endif /* CONFIG_IRDA_FAST_RR */ | 1082 | #endif /* CONFIG_IRDA_FAST_RR */ |
1083 | } else { | 1083 | } else { |
1084 | IRDA_DEBUG(4, "%s(), Unable to send! remote busy?\n", | 1084 | IRDA_DEBUG(4, "%s(), Unable to send! remote busy?\n", |
1085 | __FUNCTION__); | 1085 | __func__); |
1086 | skb_queue_head(&self->txq, skb_get(skb)); | 1086 | skb_queue_head(&self->txq, skb_get(skb)); |
1087 | 1087 | ||
1088 | /* | 1088 | /* |
@@ -1094,7 +1094,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1094 | break; | 1094 | break; |
1095 | case POLL_TIMER_EXPIRED: | 1095 | case POLL_TIMER_EXPIRED: |
1096 | IRDA_DEBUG(3, "%s(), POLL_TIMER_EXPIRED <%ld>\n", | 1096 | IRDA_DEBUG(3, "%s(), POLL_TIMER_EXPIRED <%ld>\n", |
1097 | __FUNCTION__, jiffies); | 1097 | __func__, jiffies); |
1098 | irlap_send_rr_frame(self, CMD_FRAME); | 1098 | irlap_send_rr_frame(self, CMD_FRAME); |
1099 | /* Return to NRM properly - Jean II */ | 1099 | /* Return to NRM properly - Jean II */ |
1100 | self->window = self->window_size; | 1100 | self->window = self->window_size; |
@@ -1120,7 +1120,7 @@ static int irlap_state_xmit_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1120 | break; | 1120 | break; |
1121 | default: | 1121 | default: |
1122 | IRDA_DEBUG(0, "%s(), Unknown event %s\n", | 1122 | IRDA_DEBUG(0, "%s(), Unknown event %s\n", |
1123 | __FUNCTION__, irlap_event[event]); | 1123 | __func__, irlap_event[event]); |
1124 | 1124 | ||
1125 | ret = -EINVAL; | 1125 | ret = -EINVAL; |
1126 | break; | 1126 | break; |
@@ -1138,7 +1138,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event, | |||
1138 | { | 1138 | { |
1139 | int ret = 0; | 1139 | int ret = 0; |
1140 | 1140 | ||
1141 | IRDA_DEBUG(1, "%s()\n", __FUNCTION__); | 1141 | IRDA_DEBUG(1, "%s()\n", __func__); |
1142 | 1142 | ||
1143 | IRDA_ASSERT(self != NULL, return -1;); | 1143 | IRDA_ASSERT(self != NULL, return -1;); |
1144 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 1144 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
@@ -1173,7 +1173,7 @@ static int irlap_state_pclose(struct irlap_cb *self, IRLAP_EVENT event, | |||
1173 | } | 1173 | } |
1174 | break; | 1174 | break; |
1175 | default: | 1175 | default: |
1176 | IRDA_DEBUG(1, "%s(), Unknown event %d\n", __FUNCTION__, event); | 1176 | IRDA_DEBUG(1, "%s(), Unknown event %d\n", __func__, event); |
1177 | 1177 | ||
1178 | ret = -1; | 1178 | ret = -1; |
1179 | break; | 1179 | break; |
@@ -1297,7 +1297,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1297 | } else { | 1297 | } else { |
1298 | IRDA_DEBUG(4, | 1298 | IRDA_DEBUG(4, |
1299 | "%s(), missing or duplicate frame!\n", | 1299 | "%s(), missing or duplicate frame!\n", |
1300 | __FUNCTION__); | 1300 | __func__); |
1301 | 1301 | ||
1302 | /* Update Nr received */ | 1302 | /* Update Nr received */ |
1303 | irlap_update_nr_received(self, info->nr); | 1303 | irlap_update_nr_received(self, info->nr); |
@@ -1367,7 +1367,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1367 | (nr_status == NR_UNEXPECTED)) | 1367 | (nr_status == NR_UNEXPECTED)) |
1368 | { | 1368 | { |
1369 | IRDA_DEBUG(4, "%s(), unexpected nr and ns!\n", | 1369 | IRDA_DEBUG(4, "%s(), unexpected nr and ns!\n", |
1370 | __FUNCTION__); | 1370 | __func__); |
1371 | if (info->pf) { | 1371 | if (info->pf) { |
1372 | /* Resend rejected frames */ | 1372 | /* Resend rejected frames */ |
1373 | irlap_resend_rejected_frames(self, CMD_FRAME); | 1373 | irlap_resend_rejected_frames(self, CMD_FRAME); |
@@ -1407,9 +1407,9 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1407 | } | 1407 | } |
1408 | break; | 1408 | break; |
1409 | } | 1409 | } |
1410 | IRDA_DEBUG(1, "%s(), Not implemented!\n", __FUNCTION__); | 1410 | IRDA_DEBUG(1, "%s(), Not implemented!\n", __func__); |
1411 | IRDA_DEBUG(1, "%s(), event=%s, ns_status=%d, nr_status=%d\n", | 1411 | IRDA_DEBUG(1, "%s(), event=%s, ns_status=%d, nr_status=%d\n", |
1412 | __FUNCTION__, irlap_event[event], ns_status, nr_status); | 1412 | __func__, irlap_event[event], ns_status, nr_status); |
1413 | break; | 1413 | break; |
1414 | case RECV_UI_FRAME: | 1414 | case RECV_UI_FRAME: |
1415 | /* Poll bit cleared? */ | 1415 | /* Poll bit cleared? */ |
@@ -1420,7 +1420,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1420 | del_timer(&self->final_timer); | 1420 | del_timer(&self->final_timer); |
1421 | irlap_data_indication(self, skb, TRUE); | 1421 | irlap_data_indication(self, skb, TRUE); |
1422 | irlap_next_state(self, LAP_XMIT_P); | 1422 | irlap_next_state(self, LAP_XMIT_P); |
1423 | IRDA_DEBUG(1, "%s: RECV_UI_FRAME: next state %s\n", __FUNCTION__, irlap_state[self->state]); | 1423 | IRDA_DEBUG(1, "%s: RECV_UI_FRAME: next state %s\n", __func__, irlap_state[self->state]); |
1424 | irlap_start_poll_timer(self, self->poll_timeout); | 1424 | irlap_start_poll_timer(self, self->poll_timeout); |
1425 | } | 1425 | } |
1426 | break; | 1426 | break; |
@@ -1475,7 +1475,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1475 | irlap_next_state(self, LAP_NRM_P); | 1475 | irlap_next_state(self, LAP_NRM_P); |
1476 | } else if (ret == NR_INVALID) { | 1476 | } else if (ret == NR_INVALID) { |
1477 | IRDA_DEBUG(1, "%s(), Received RR with " | 1477 | IRDA_DEBUG(1, "%s(), Received RR with " |
1478 | "invalid nr !\n", __FUNCTION__); | 1478 | "invalid nr !\n", __func__); |
1479 | 1479 | ||
1480 | irlap_next_state(self, LAP_RESET_WAIT); | 1480 | irlap_next_state(self, LAP_RESET_WAIT); |
1481 | 1481 | ||
@@ -1580,7 +1580,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1580 | irlap_start_final_timer(self, 2 * self->final_timeout); | 1580 | irlap_start_final_timer(self, 2 * self->final_timeout); |
1581 | break; | 1581 | break; |
1582 | case RECV_RD_RSP: | 1582 | case RECV_RD_RSP: |
1583 | IRDA_DEBUG(1, "%s(), RECV_RD_RSP\n", __FUNCTION__); | 1583 | IRDA_DEBUG(1, "%s(), RECV_RD_RSP\n", __func__); |
1584 | 1584 | ||
1585 | irlap_flush_all_queues(self); | 1585 | irlap_flush_all_queues(self); |
1586 | irlap_next_state(self, LAP_XMIT_P); | 1586 | irlap_next_state(self, LAP_XMIT_P); |
@@ -1589,7 +1589,7 @@ static int irlap_state_nrm_p(struct irlap_cb *self, IRLAP_EVENT event, | |||
1589 | break; | 1589 | break; |
1590 | default: | 1590 | default: |
1591 | IRDA_DEBUG(1, "%s(), Unknown event %s\n", | 1591 | IRDA_DEBUG(1, "%s(), Unknown event %s\n", |
1592 | __FUNCTION__, irlap_event[event]); | 1592 | __func__, irlap_event[event]); |
1593 | 1593 | ||
1594 | ret = -1; | 1594 | ret = -1; |
1595 | break; | 1595 | break; |
@@ -1609,7 +1609,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event, | |||
1609 | { | 1609 | { |
1610 | int ret = 0; | 1610 | int ret = 0; |
1611 | 1611 | ||
1612 | IRDA_DEBUG(3, "%s(), event = %s\n", __FUNCTION__, irlap_event[event]); | 1612 | IRDA_DEBUG(3, "%s(), event = %s\n", __func__, irlap_event[event]); |
1613 | 1613 | ||
1614 | IRDA_ASSERT(self != NULL, return -1;); | 1614 | IRDA_ASSERT(self != NULL, return -1;); |
1615 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 1615 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
@@ -1635,7 +1635,7 @@ static int irlap_state_reset_wait(struct irlap_cb *self, IRLAP_EVENT event, | |||
1635 | irlap_next_state( self, LAP_PCLOSE); | 1635 | irlap_next_state( self, LAP_PCLOSE); |
1636 | break; | 1636 | break; |
1637 | default: | 1637 | default: |
1638 | IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__, | 1638 | IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__, |
1639 | irlap_event[event]); | 1639 | irlap_event[event]); |
1640 | 1640 | ||
1641 | ret = -1; | 1641 | ret = -1; |
@@ -1656,7 +1656,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event, | |||
1656 | { | 1656 | { |
1657 | int ret = 0; | 1657 | int ret = 0; |
1658 | 1658 | ||
1659 | IRDA_DEBUG(3, "%s(), event = %s\n", __FUNCTION__, irlap_event[event]); | 1659 | IRDA_DEBUG(3, "%s(), event = %s\n", __func__, irlap_event[event]); |
1660 | 1660 | ||
1661 | IRDA_ASSERT(self != NULL, return -1;); | 1661 | IRDA_ASSERT(self != NULL, return -1;); |
1662 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 1662 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
@@ -1714,7 +1714,7 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event, | |||
1714 | * state | 1714 | * state |
1715 | */ | 1715 | */ |
1716 | if (!info) { | 1716 | if (!info) { |
1717 | IRDA_DEBUG(3, "%s(), RECV_SNRM_CMD\n", __FUNCTION__); | 1717 | IRDA_DEBUG(3, "%s(), RECV_SNRM_CMD\n", __func__); |
1718 | irlap_initiate_connection_state(self); | 1718 | irlap_initiate_connection_state(self); |
1719 | irlap_wait_min_turn_around(self, &self->qos_tx); | 1719 | irlap_wait_min_turn_around(self, &self->qos_tx); |
1720 | irlap_send_ua_response_frame(self, &self->qos_rx); | 1720 | irlap_send_ua_response_frame(self, &self->qos_rx); |
@@ -1724,12 +1724,12 @@ static int irlap_state_reset(struct irlap_cb *self, IRLAP_EVENT event, | |||
1724 | } else { | 1724 | } else { |
1725 | IRDA_DEBUG(0, | 1725 | IRDA_DEBUG(0, |
1726 | "%s(), SNRM frame contained an I field!\n", | 1726 | "%s(), SNRM frame contained an I field!\n", |
1727 | __FUNCTION__); | 1727 | __func__); |
1728 | } | 1728 | } |
1729 | break; | 1729 | break; |
1730 | default: | 1730 | default: |
1731 | IRDA_DEBUG(1, "%s(), Unknown event %s\n", | 1731 | IRDA_DEBUG(1, "%s(), Unknown event %s\n", |
1732 | __FUNCTION__, irlap_event[event]); | 1732 | __func__, irlap_event[event]); |
1733 | 1733 | ||
1734 | ret = -1; | 1734 | ret = -1; |
1735 | break; | 1735 | break; |
@@ -1749,7 +1749,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
1749 | { | 1749 | { |
1750 | int ret = 0; | 1750 | int ret = 0; |
1751 | 1751 | ||
1752 | IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[event]); | 1752 | IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[event]); |
1753 | 1753 | ||
1754 | IRDA_ASSERT(self != NULL, return -ENODEV;); | 1754 | IRDA_ASSERT(self != NULL, return -ENODEV;); |
1755 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); | 1755 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); |
@@ -1786,7 +1786,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
1786 | */ | 1786 | */ |
1787 | if((!nextfit) && (skb->len > self->bytes_left)) { | 1787 | if((!nextfit) && (skb->len > self->bytes_left)) { |
1788 | IRDA_DEBUG(0, "%s(), Not allowed to transmit" | 1788 | IRDA_DEBUG(0, "%s(), Not allowed to transmit" |
1789 | " more bytes!\n", __FUNCTION__); | 1789 | " more bytes!\n", __func__); |
1790 | /* Requeue the skb */ | 1790 | /* Requeue the skb */ |
1791 | skb_queue_head(&self->txq, skb_get(skb)); | 1791 | skb_queue_head(&self->txq, skb_get(skb)); |
1792 | 1792 | ||
@@ -1832,7 +1832,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
1832 | ret = -EPROTO; | 1832 | ret = -EPROTO; |
1833 | } | 1833 | } |
1834 | } else { | 1834 | } else { |
1835 | IRDA_DEBUG(2, "%s(), Unable to send!\n", __FUNCTION__); | 1835 | IRDA_DEBUG(2, "%s(), Unable to send!\n", __func__); |
1836 | skb_queue_head(&self->txq, skb_get(skb)); | 1836 | skb_queue_head(&self->txq, skb_get(skb)); |
1837 | ret = -EPROTO; | 1837 | ret = -EPROTO; |
1838 | } | 1838 | } |
@@ -1848,7 +1848,7 @@ static int irlap_state_xmit_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
1848 | * when we return... - Jean II */ | 1848 | * when we return... - Jean II */ |
1849 | break; | 1849 | break; |
1850 | default: | 1850 | default: |
1851 | IRDA_DEBUG(2, "%s(), Unknown event %s\n", __FUNCTION__, | 1851 | IRDA_DEBUG(2, "%s(), Unknown event %s\n", __func__, |
1852 | irlap_event[event]); | 1852 | irlap_event[event]); |
1853 | 1853 | ||
1854 | ret = -EINVAL; | 1854 | ret = -EINVAL; |
@@ -1871,7 +1871,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
1871 | int nr_status; | 1871 | int nr_status; |
1872 | int ret = 0; | 1872 | int ret = 0; |
1873 | 1873 | ||
1874 | IRDA_DEBUG(4, "%s(), event=%s\n", __FUNCTION__, irlap_event[ event]); | 1874 | IRDA_DEBUG(4, "%s(), event=%s\n", __func__, irlap_event[ event]); |
1875 | 1875 | ||
1876 | IRDA_ASSERT(self != NULL, return -1;); | 1876 | IRDA_ASSERT(self != NULL, return -1;); |
1877 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); | 1877 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -1;); |
@@ -1880,7 +1880,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
1880 | case RECV_I_CMD: /* Optimize for the common case */ | 1880 | case RECV_I_CMD: /* Optimize for the common case */ |
1881 | /* FIXME: must check for remote_busy below */ | 1881 | /* FIXME: must check for remote_busy below */ |
1882 | IRDA_DEBUG(4, "%s(), event=%s nr=%d, vs=%d, ns=%d, " | 1882 | IRDA_DEBUG(4, "%s(), event=%s nr=%d, vs=%d, ns=%d, " |
1883 | "vr=%d, pf=%d\n", __FUNCTION__, | 1883 | "vr=%d, pf=%d\n", __func__, |
1884 | irlap_event[event], info->nr, | 1884 | irlap_event[event], info->nr, |
1885 | self->vs, info->ns, self->vr, info->pf); | 1885 | self->vs, info->ns, self->vr, info->pf); |
1886 | 1886 | ||
@@ -2112,21 +2112,21 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
2112 | irlap_next_state(self, LAP_NRM_S); | 2112 | irlap_next_state(self, LAP_NRM_S); |
2113 | } else { | 2113 | } else { |
2114 | IRDA_DEBUG(1, "%s(), invalid nr not implemented!\n", | 2114 | IRDA_DEBUG(1, "%s(), invalid nr not implemented!\n", |
2115 | __FUNCTION__); | 2115 | __func__); |
2116 | } | 2116 | } |
2117 | break; | 2117 | break; |
2118 | case RECV_SNRM_CMD: | 2118 | case RECV_SNRM_CMD: |
2119 | /* SNRM frame is not allowed to contain an I-field */ | 2119 | /* SNRM frame is not allowed to contain an I-field */ |
2120 | if (!info) { | 2120 | if (!info) { |
2121 | del_timer(&self->wd_timer); | 2121 | del_timer(&self->wd_timer); |
2122 | IRDA_DEBUG(1, "%s(), received SNRM cmd\n", __FUNCTION__); | 2122 | IRDA_DEBUG(1, "%s(), received SNRM cmd\n", __func__); |
2123 | irlap_next_state(self, LAP_RESET_CHECK); | 2123 | irlap_next_state(self, LAP_RESET_CHECK); |
2124 | 2124 | ||
2125 | irlap_reset_indication(self); | 2125 | irlap_reset_indication(self); |
2126 | } else { | 2126 | } else { |
2127 | IRDA_DEBUG(0, | 2127 | IRDA_DEBUG(0, |
2128 | "%s(), SNRM frame contained an I-field!\n", | 2128 | "%s(), SNRM frame contained an I-field!\n", |
2129 | __FUNCTION__); | 2129 | __func__); |
2130 | 2130 | ||
2131 | } | 2131 | } |
2132 | break; | 2132 | break; |
@@ -2158,7 +2158,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
2158 | * which explain why we use (self->N2 / 2) here !!! | 2158 | * which explain why we use (self->N2 / 2) here !!! |
2159 | * Jean II | 2159 | * Jean II |
2160 | */ | 2160 | */ |
2161 | IRDA_DEBUG(1, "%s(), retry_count = %d\n", __FUNCTION__, | 2161 | IRDA_DEBUG(1, "%s(), retry_count = %d\n", __func__, |
2162 | self->retry_count); | 2162 | self->retry_count); |
2163 | 2163 | ||
2164 | if (self->retry_count < (self->N2 / 2)) { | 2164 | if (self->retry_count < (self->N2 / 2)) { |
@@ -2211,7 +2211,7 @@ static int irlap_state_nrm_s(struct irlap_cb *self, IRLAP_EVENT event, | |||
2211 | irlap_send_test_frame(self, self->caddr, info->daddr, skb); | 2211 | irlap_send_test_frame(self, self->caddr, info->daddr, skb); |
2212 | break; | 2212 | break; |
2213 | default: | 2213 | default: |
2214 | IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__, | 2214 | IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__, |
2215 | event, irlap_event[event]); | 2215 | event, irlap_event[event]); |
2216 | 2216 | ||
2217 | ret = -EINVAL; | 2217 | ret = -EINVAL; |
@@ -2228,7 +2228,7 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event, | |||
2228 | { | 2228 | { |
2229 | int ret = 0; | 2229 | int ret = 0; |
2230 | 2230 | ||
2231 | IRDA_DEBUG(1, "%s()\n", __FUNCTION__); | 2231 | IRDA_DEBUG(1, "%s()\n", __func__); |
2232 | 2232 | ||
2233 | IRDA_ASSERT(self != NULL, return -ENODEV;); | 2233 | IRDA_ASSERT(self != NULL, return -ENODEV;); |
2234 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); | 2234 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); |
@@ -2285,7 +2285,7 @@ static int irlap_state_sclose(struct irlap_cb *self, IRLAP_EVENT event, | |||
2285 | break; /* stay in SCLOSE */ | 2285 | break; /* stay in SCLOSE */ |
2286 | } | 2286 | } |
2287 | 2287 | ||
2288 | IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__, | 2288 | IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__, |
2289 | event, irlap_event[event]); | 2289 | event, irlap_event[event]); |
2290 | 2290 | ||
2291 | ret = -EINVAL; | 2291 | ret = -EINVAL; |
@@ -2301,7 +2301,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event, | |||
2301 | { | 2301 | { |
2302 | int ret = 0; | 2302 | int ret = 0; |
2303 | 2303 | ||
2304 | IRDA_DEBUG(1, "%s(), event=%s\n", __FUNCTION__, irlap_event[event]); | 2304 | IRDA_DEBUG(1, "%s(), event=%s\n", __func__, irlap_event[event]); |
2305 | 2305 | ||
2306 | IRDA_ASSERT(self != NULL, return -ENODEV;); | 2306 | IRDA_ASSERT(self != NULL, return -ENODEV;); |
2307 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); | 2307 | IRDA_ASSERT(self->magic == LAP_MAGIC, return -EBADR;); |
@@ -2322,7 +2322,7 @@ static int irlap_state_reset_check( struct irlap_cb *self, IRLAP_EVENT event, | |||
2322 | irlap_next_state(self, LAP_SCLOSE); | 2322 | irlap_next_state(self, LAP_SCLOSE); |
2323 | break; | 2323 | break; |
2324 | default: | 2324 | default: |
2325 | IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __FUNCTION__, | 2325 | IRDA_DEBUG(1, "%s(), Unknown event %d, (%s)\n", __func__, |
2326 | event, irlap_event[event]); | 2326 | event, irlap_event[event]); |
2327 | 2327 | ||
2328 | ret = -EINVAL; | 2328 | ret = -EINVAL; |