Changeset 044cf4d7 in rtems
- Timestamp:
- 10/08/14 06:11:28 (9 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 419accf
- Parents:
- 77dd9a4
- git-author:
- Sebastian Huber <sebastian.huber@…> (10/08/14 06:11:28)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (10/08/14 06:12:24)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/libnetworking/net/if_ppp.c
r77dd9a4 r044cf4d7 196 196 #endif 197 197 198 static int 199 ppp_unit(struct ppp_softc *sc) 200 { 201 return sc->sc_if.if_unit; 202 } 203 198 204 static rtems_task ppp_rxdaemon(rtems_task_argument arg) 199 205 { … … 415 421 if ( sc->sc_rxtask == 0 ) { 416 422 /* start rx daemon task */ 417 status = rtems_task_create(rtems_build_name('R','x','P','0'+ sc->sc_if.if_unit), priority, 2048,423 status = rtems_task_create(rtems_build_name('R','x','P','0'+ppp_unit(sc)), priority, 2048, 418 424 RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0), 419 425 RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL, … … 430 436 431 437 /* start tx daemon task */ 432 status = rtems_task_create(rtems_build_name('T','x','P','0'+ sc->sc_if.if_unit), priority, 2048,438 status = rtems_task_create(rtems_build_name('T','x','P','0'+ppp_unit(sc)), priority, 2048, 433 439 RTEMS_PREEMPT|RTEMS_NO_TIMESLICE|RTEMS_NO_ASR|RTEMS_INTERRUPT_LEVEL(0), 434 440 RTEMS_NO_FLOATING_POINT|RTEMS_LOCAL, … … 655 661 656 662 case PPPIOCGUNIT: 657 *(int *)data = sc->sc_if.if_unit;663 *(int *)data = ppp_unit(sc); 658 664 break; 659 665 … … 733 739 if (sc->sc_flags & SC_DEBUG) 734 740 printf("ppp%d: comp_alloc failed\n", 735 sc->sc_if.if_unit);741 ppp_unit(sc)); 736 742 error = ENOBUFS; 737 743 } … … 748 754 if (sc->sc_flags & SC_DEBUG) 749 755 printf("ppp%d: decomp_alloc failed\n", 750 sc->sc_if.if_unit);756 ppp_unit(sc)); 751 757 error = ENOBUFS; 752 758 } … … 759 765 if (sc->sc_flags & SC_DEBUG) 760 766 printf("ppp%d: no compressor for [%x %x %x], %x\n", 761 sc->sc_if.if_unit, ccp_option[0], ccp_option[1],767 ppp_unit(sc), ccp_option[0], ccp_option[1], 762 768 ccp_option[2], nb); 763 769 return (EINVAL); /* no handler found */ … … 993 999 break; 994 1000 default: 995 printf("ppp%d: af%d not supported\n", ifp->if_unit, dst->sa_family);1001 printf("ppp%d: af%d not supported\n", ppp_unit(sc), dst->sa_family); 996 1002 error = EAFNOSUPPORT; 997 1003 goto bad; … … 1036 1042 1037 1043 if (sc->sc_flags & SC_LOG_OUTPKT) { 1038 printf("ppp%d output: ", ifp->if_unit);1044 printf("ppp%d output: ", ppp_unit(sc)); 1039 1045 pppdumpm(m0); 1040 1046 } … … 1357 1363 && (*sc->sc_xcomp->comp_init) 1358 1364 (sc->sc_xc_state, dp + CCP_HDRLEN, slen - CCP_HDRLEN, 1359 sc->sc_if.if_unit, 0, sc->sc_flags & SC_DEBUG)) {1365 ppp_unit(sc), 0, sc->sc_flags & SC_DEBUG)) { 1360 1366 s = splimp(); 1361 1367 sc->sc_flags |= SC_COMP_RUN; … … 1367 1373 && (*sc->sc_rcomp->decomp_init) 1368 1374 (sc->sc_rc_state, dp + CCP_HDRLEN, slen - CCP_HDRLEN, 1369 sc->sc_if.if_unit, 0, sc->sc_mru,1375 ppp_unit(sc), 0, sc->sc_mru, 1370 1376 sc->sc_flags & SC_DEBUG)) { 1371 1377 s = splimp(); … … 1447 1453 for (mp = m; mp != NULL; mp = mp->m_next) 1448 1454 ilen += mp->m_len; 1449 printf("ppp%d: got %d bytes\n", ifp->if_unit, ilen);1455 printf("ppp%d: got %d bytes\n", ppp_unit(sc), ilen); 1450 1456 pppdumpm(m); 1451 1457 } … … 1491 1497 */ 1492 1498 if (sc->sc_flags & SC_DEBUG) 1493 printf("ppp%d: decompress failed %d\n", ifp->if_unit, rv);1499 printf("ppp%d: decompress failed %d\n", ppp_unit(sc), rv); 1494 1500 s = splimp(); 1495 1501 sc->sc_flags |= SC_VJ_RESET; … … 1542 1548 if (sc->sc_flags & SC_DEBUG) 1543 1549 printf("ppp%d: VJ uncompress failed on type comp\n", 1544 ifp->if_unit);1550 ppp_unit(sc)); 1545 1551 goto bad; 1546 1552 } … … 1597 1603 if (sc->sc_flags & SC_DEBUG) 1598 1604 printf("ppp%d: VJ uncompress failed on type uncomp\n", 1599 ifp->if_unit);1605 ppp_unit(sc)); 1600 1606 goto bad; 1601 1607 } … … 1697 1703 splx(s); 1698 1704 if (sc->sc_flags & SC_DEBUG) 1699 printf("ppp%d: input queue full\n", ifp->if_unit);1705 printf("ppp%d: input queue full\n", ppp_unit(sc)); 1700 1706 ifp->if_iqdrops++; 1701 1707 goto bad;
Note: See TracChangeset
for help on using the changeset viewer.