tag | line | file | source code |
ppp | 84 | drivers/net/ppp.c | #define CHECK_PPP(a) if (!ppp->inuse) { PRINTK ((ppp_warning, __LINE__)) return a;} |
ppp | 85 | drivers/net/ppp.c | #define CHECK_PPP_VOID() if (!ppp->inuse) { PRINTK ((ppp_warning, __LINE__)) return;} |
ppp | 87 | drivers/net/ppp.c | #define in_xmap(ppp,c) (ppp->xmit_async_map[(c) >> 5] & (1 << ((c) & 0x1f))) |
ppp | 88 | drivers/net/ppp.c | #define in_rmap(ppp,c) ((((unsigned int) (unsigned char) (c)) < 0x20) && \ |
ppp | 89 | drivers/net/ppp.c | ppp->recv_async_map & (1 << (c))) |
ppp | 100 | drivers/net/ppp.c | static void ppp_init_ctrl_blk(struct ppp *); |
ppp | 104 | drivers/net/ppp.c | static void ppp_kick_tty(struct ppp *); |
ppp | 107 | drivers/net/ppp.c | #define ppp_find(tty) ((struct ppp *) tty->disc_data) |
ppp | 110 | drivers/net/ppp.c | static void ppp_unesc(struct ppp *ppp, unsigned char *c, int n); |
ppp | 111 | drivers/net/ppp.c | static struct ppp *ppp_find(struct tty_struct *); |
ppp | 114 | drivers/net/ppp.c | static void ppp_doframe(struct ppp *); |
ppp | 115 | drivers/net/ppp.c | static int ppp_do_ip(struct ppp *, unsigned short, unsigned char *, int); |
ppp | 116 | drivers/net/ppp.c | static int ppp_us_queue(struct ppp *, unsigned short, unsigned char *, int); |
ppp | 134 | drivers/net/ppp.c | static struct ppp *ppp_alloc(void); |
ppp | 135 | drivers/net/ppp.c | static int ppp_lock(struct ppp *); |
ppp | 136 | drivers/net/ppp.c | static void ppp_unlock(struct ppp *); |
ppp | 137 | drivers/net/ppp.c | static void ppp_add_fcs(struct ppp *); |
ppp | 138 | drivers/net/ppp.c | static int ppp_check_fcs(struct ppp *); |
ppp | 200 | drivers/net/ppp.c | static struct ppp ppp_ctrl[PPP_NRUNIT]; |
ppp | 213 | drivers/net/ppp.c | struct ppp *ppp; |
ppp | 216 | drivers/net/ppp.c | ppp = &ppp_ctrl[dev->base_addr]; |
ppp | 261 | drivers/net/ppp.c | ppp_init_ctrl_blk (ppp); |
ppp | 262 | drivers/net/ppp.c | ppp->inuse = 0; |
ppp | 263 | drivers/net/ppp.c | ppp->line = dev->base_addr; |
ppp | 264 | drivers/net/ppp.c | ppp->tty = NULL; |
ppp | 265 | drivers/net/ppp.c | ppp->dev = dev; |
ppp | 268 | drivers/net/ppp.c | memset (&ppp->stats, '\0', sizeof (struct ppp_stats)); |
ppp | 304 | drivers/net/ppp.c | ppp_init_ctrl_blk(struct ppp *ppp) |
ppp | 306 | drivers/net/ppp.c | ppp->magic = PPP_MAGIC; |
ppp | 307 | drivers/net/ppp.c | ppp->sending = 0; |
ppp | 308 | drivers/net/ppp.c | ppp->toss = 0xFE; |
ppp | 309 | drivers/net/ppp.c | ppp->escape = 0; |
ppp | 311 | drivers/net/ppp.c | ppp->flags = 0; |
ppp | 312 | drivers/net/ppp.c | ppp->mtu = PPP_MTU; |
ppp | 313 | drivers/net/ppp.c | ppp->mru = PPP_MRU; |
ppp | 314 | drivers/net/ppp.c | ppp->fcs = 0; |
ppp | 316 | drivers/net/ppp.c | memset (ppp->xmit_async_map, 0, sizeof (ppp->xmit_async_map)); |
ppp | 317 | drivers/net/ppp.c | ppp->xmit_async_map[0] = 0xffffffff; |
ppp | 318 | drivers/net/ppp.c | ppp->xmit_async_map[3] = 0x60000000; |
ppp | 319 | drivers/net/ppp.c | ppp->recv_async_map = 0x00000000; |
ppp | 321 | drivers/net/ppp.c | ppp->slcomp = NULL; |
ppp | 322 | drivers/net/ppp.c | ppp->rbuff = NULL; |
ppp | 323 | drivers/net/ppp.c | ppp->xbuff = NULL; |
ppp | 324 | drivers/net/ppp.c | ppp->cbuff = NULL; |
ppp | 326 | drivers/net/ppp.c | ppp->rhead = NULL; |
ppp | 327 | drivers/net/ppp.c | ppp->rend = NULL; |
ppp | 328 | drivers/net/ppp.c | ppp->rcount = 0; |
ppp | 329 | drivers/net/ppp.c | ppp->xhead = NULL; |
ppp | 330 | drivers/net/ppp.c | ppp->xtail = NULL; |
ppp | 332 | drivers/net/ppp.c | ppp->us_rbuff = NULL; |
ppp | 333 | drivers/net/ppp.c | ppp->us_rbuff_end = NULL; |
ppp | 334 | drivers/net/ppp.c | ppp->us_rbuff_head = NULL; |
ppp | 335 | drivers/net/ppp.c | ppp->us_rbuff_tail = NULL; |
ppp | 336 | drivers/net/ppp.c | ppp->read_wait = NULL; |
ppp | 337 | drivers/net/ppp.c | ppp->write_wait = NULL; |
ppp | 338 | drivers/net/ppp.c | ppp->us_rbuff_lock = 0; |
ppp | 339 | drivers/net/ppp.c | ppp->inp_sig = 0; |
ppp | 340 | drivers/net/ppp.c | ppp->inp_sig_pid = 0; |
ppp | 343 | drivers/net/ppp.c | ppp->last_xmit = jiffies - OPTIMIZE_FLAG_TIME; |
ppp | 345 | drivers/net/ppp.c | ppp->last_xmit = 0; |
ppp | 349 | drivers/net/ppp.c | memset (&ppp->stats, '\0', sizeof (struct ppp_stats)); |
ppp | 352 | drivers/net/ppp.c | ppp->ddinfo.ip_sjiffies = |
ppp | 353 | drivers/net/ppp.c | ppp->ddinfo.ip_rjiffies = |
ppp | 354 | drivers/net/ppp.c | ppp->ddinfo.nip_sjiffies = |
ppp | 355 | drivers/net/ppp.c | ppp->ddinfo.nip_rjiffies = jiffies; |
ppp | 365 | drivers/net/ppp.c | ppp_changedmtu (struct ppp *ppp, int new_mtu, int new_mru) |
ppp | 374 | drivers/net/ppp.c | dev = ppp->dev; |
ppp | 415 | drivers/net/ppp.c | old_xbuff = ppp->xbuff; |
ppp | 416 | drivers/net/ppp.c | old_rbuff = ppp->rbuff; |
ppp | 417 | drivers/net/ppp.c | old_cbuff = ppp->cbuff; |
ppp | 419 | drivers/net/ppp.c | ppp->xbuff = new_xbuff; |
ppp | 420 | drivers/net/ppp.c | ppp->rbuff = new_rbuff; |
ppp | 421 | drivers/net/ppp.c | ppp->cbuff = new_cbuff; |
ppp | 427 | drivers/net/ppp.c | ppp->rend = (unsigned char *) |
ppp | 430 | drivers/net/ppp.c | ppp->rhead = new_rbuff; |
ppp | 434 | drivers/net/ppp.c | ppp->toss = 0xFE; |
ppp | 435 | drivers/net/ppp.c | ppp->escape = 0; |
ppp | 436 | drivers/net/ppp.c | ppp->sending = 0; |
ppp | 437 | drivers/net/ppp.c | ppp->rcount = 0; |
ppp | 439 | drivers/net/ppp.c | ppp->mru = new_mru; |
ppp | 441 | drivers/net/ppp.c | ppp->mtu = |
ppp | 462 | drivers/net/ppp.c | ppp_release(struct ppp *ppp) |
ppp | 465 | drivers/net/ppp.c | if (ppp->tty != NULL && ppp->tty->disc_data == ppp) |
ppp | 466 | drivers/net/ppp.c | ppp->tty->disc_data = NULL; /* Break the tty->ppp link */ |
ppp | 469 | drivers/net/ppp.c | if (ppp->dev) { |
ppp | 470 | drivers/net/ppp.c | dev_close (ppp->dev); |
ppp | 471 | drivers/net/ppp.c | ppp->dev->flags = 0; |
ppp | 474 | drivers/net/ppp.c | kfree (ppp->xbuff); |
ppp | 475 | drivers/net/ppp.c | kfree (ppp->cbuff); |
ppp | 476 | drivers/net/ppp.c | kfree (ppp->rbuff); |
ppp | 477 | drivers/net/ppp.c | kfree (ppp->us_rbuff); |
ppp | 479 | drivers/net/ppp.c | ppp->xbuff = |
ppp | 480 | drivers/net/ppp.c | ppp->cbuff = |
ppp | 481 | drivers/net/ppp.c | ppp->rbuff = |
ppp | 482 | drivers/net/ppp.c | ppp->us_rbuff = NULL; |
ppp | 484 | drivers/net/ppp.c | if (ppp->slcomp) { |
ppp | 485 | drivers/net/ppp.c | slhc_free(ppp->slcomp); |
ppp | 486 | drivers/net/ppp.c | ppp->slcomp = NULL; |
ppp | 489 | drivers/net/ppp.c | ppp->inuse = 0; |
ppp | 490 | drivers/net/ppp.c | ppp->tty = NULL; |
ppp | 496 | drivers/net/ppp.c | struct ppp *ppp = ppp_find(tty); |
ppp | 498 | drivers/net/ppp.c | if (ppp == NULL || ppp->magic != PPP_MAGIC) { |
ppp | 502 | drivers/net/ppp.c | ppp_release (ppp); |
ppp | 504 | drivers/net/ppp.c | PRINTKN (2,(KERN_INFO "ppp: channel %s closing.\n", ppp->dev->name)); |
ppp | 515 | drivers/net/ppp.c | struct ppp *ppp = ppp_find(tty); |
ppp | 517 | drivers/net/ppp.c | if (ppp) { |
ppp | 519 | drivers/net/ppp.c | ppp->magic == PPP_MAGIC ? ppp->dev->name : "unknown")); |
ppp | 523 | drivers/net/ppp.c | ppp = ppp_alloc(); |
ppp | 524 | drivers/net/ppp.c | if (ppp == NULL) { |
ppp | 530 | drivers/net/ppp.c | ppp_init_ctrl_blk (ppp); |
ppp | 532 | drivers/net/ppp.c | ppp->tty = tty; |
ppp | 535 | drivers/net/ppp.c | tty->disc_data = ppp; |
ppp | 545 | drivers/net/ppp.c | if ((ppp->slcomp = slhc_init(16, 16)) == NULL) { |
ppp | 547 | drivers/net/ppp.c | ppp_release (ppp); |
ppp | 552 | drivers/net/ppp.c | ppp_changedmtu (ppp, ppp->dev->mtu, ppp->mru); |
ppp | 553 | drivers/net/ppp.c | if (ppp->rbuff == NULL) { |
ppp | 554 | drivers/net/ppp.c | ppp_release (ppp); |
ppp | 559 | drivers/net/ppp.c | ppp->us_rbuff = (unsigned char *) kmalloc (RBUFSIZE, GFP_KERNEL); |
ppp | 560 | drivers/net/ppp.c | if (ppp->us_rbuff == NULL) { |
ppp | 562 | drivers/net/ppp.c | ppp_release (ppp); |
ppp | 566 | drivers/net/ppp.c | ppp->us_rbuff_head = |
ppp | 567 | drivers/net/ppp.c | ppp->us_rbuff_tail = ppp->us_rbuff; |
ppp | 568 | drivers/net/ppp.c | ppp->us_rbuff_end = ppp->us_rbuff + RBUFSIZE; |
ppp | 570 | drivers/net/ppp.c | PRINTKN (2,(KERN_INFO "ppp: channel %s open\n", ppp->dev->name)); |
ppp | 576 | drivers/net/ppp.c | return (ppp->line); |
ppp | 584 | drivers/net/ppp.c | struct ppp *ppp = &ppp_ctrl[dev->base_addr]; |
ppp | 589 | drivers/net/ppp.c | if (ppp->tty == NULL) { |
ppp | 605 | drivers/net/ppp.c | struct ppp *ppp = &ppp_ctrl[dev->base_addr]; |
ppp | 607 | drivers/net/ppp.c | if (ppp->tty == NULL) { |
ppp | 622 | drivers/net/ppp.c | struct ppp *ppp = &ppp_ctrl[dev->base_addr]; |
ppp | 638 | drivers/net/ppp.c | memcpy_tofs (&result->ppp_stats, &ppp->stats, sizeof (struct ppp_stats)); |
ppp | 639 | drivers/net/ppp.c | if (ppp->slcomp) |
ppp | 640 | drivers/net/ppp.c | memcpy_tofs (&result->slhc, ppp->slcomp, sizeof (struct slcompress)); |
ppp | 658 | drivers/net/ppp.c | ppp_output_done (void *ppp) |
ppp | 661 | drivers/net/ppp.c | ppp_unlock ((struct ppp *) ppp); |
ppp | 665 | drivers/net/ppp.c | if (((struct ppp *) ppp)->dev->flags & IFF_UP) |
ppp | 669 | drivers/net/ppp.c | dev_tint (((struct ppp *) ppp)->dev); |
ppp | 673 | drivers/net/ppp.c | wake_up_interruptible (&((struct ppp *) ppp)->write_wait); |
ppp | 678 | drivers/net/ppp.c | ppp_kick_tty (struct ppp *ppp) |
ppp | 680 | drivers/net/ppp.c | register int count = ppp->xhead - ppp->xbuff; |
ppp | 683 | drivers/net/ppp.c | ppp->stats.sbytes += count; |
ppp | 685 | drivers/net/ppp.c | answer = tty_write_data (ppp->tty, |
ppp | 686 | drivers/net/ppp.c | ppp->xbuff, |
ppp | 689 | drivers/net/ppp.c | (void *) ppp); |
ppp | 692 | drivers/net/ppp.c | ppp_output_done (ppp); /* Should not happen */ |
ppp | 695 | drivers/net/ppp.c | ppp->stats.serrors++; |
ppp | 696 | drivers/net/ppp.c | ppp_output_done (ppp); /* unlock the transmitter */ |
ppp | 703 | drivers/net/ppp.c | ppp_kick_tty (struct ppp *ppp) |
ppp | 707 | drivers/net/ppp.c | count = ppp->xhead - ppp->xbuff; |
ppp | 709 | drivers/net/ppp.c | actual = ppp->tty->driver.write(ppp->tty, 0, ppp->xbuff, count); |
ppp | 710 | drivers/net/ppp.c | ppp->stats.sbytes += actual; |
ppp | 712 | drivers/net/ppp.c | ppp_output_done(ppp); |
ppp | 714 | drivers/net/ppp.c | ppp->xtail = ppp->xbuff + actual; |
ppp | 715 | drivers/net/ppp.c | ppp->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP); |
ppp | 722 | drivers/net/ppp.c | struct ppp *ppp = ppp_find(tty); |
ppp | 724 | drivers/net/ppp.c | if (!ppp || ppp->magic != PPP_MAGIC) { |
ppp | 731 | drivers/net/ppp.c | if (!ppp->xtail) |
ppp | 735 | drivers/net/ppp.c | if (ppp->flags & SC_XMIT_BUSY) { |
ppp | 739 | drivers/net/ppp.c | ppp->flags |= SC_XMIT_BUSY; |
ppp | 742 | drivers/net/ppp.c | count = ppp->xhead - ppp->xtail; |
ppp | 744 | drivers/net/ppp.c | actual = tty->driver.write(tty, 0, ppp->xtail, count); |
ppp | 745 | drivers/net/ppp.c | ppp->stats.sbytes += actual; |
ppp | 747 | drivers/net/ppp.c | ppp->xtail = 0; |
ppp | 750 | drivers/net/ppp.c | ppp_output_done(ppp); |
ppp | 752 | drivers/net/ppp.c | ppp->xtail += actual; |
ppp | 754 | drivers/net/ppp.c | ppp->flags &= ~SC_XMIT_BUSY; |
ppp | 769 | drivers/net/ppp.c | ppp_enqueue(struct ppp *ppp, unsigned char c) |
ppp | 775 | drivers/net/ppp.c | if (ppp->rhead < ppp->rend) { |
ppp | 776 | drivers/net/ppp.c | *ppp->rhead = c; |
ppp | 777 | drivers/net/ppp.c | ppp->rhead++; |
ppp | 778 | drivers/net/ppp.c | ppp->rcount++; |
ppp | 780 | drivers/net/ppp.c | ppp->stats.roverrun++; |
ppp | 822 | drivers/net/ppp.c | struct ppp *ppp = ppp_find(tty); |
ppp | 827 | drivers/net/ppp.c | if (!ppp || ppp->magic != PPP_MAGIC) { |
ppp | 837 | drivers/net/ppp.c | ppp_dump_inqueue(ppp->tty); |
ppp | 853 | drivers/net/ppp.c | ppp->stats.rbytes += n; |
ppp | 854 | drivers/net/ppp.c | ppp_unesc(ppp,buff,n); |
ppp | 856 | drivers/net/ppp.c | ppp->toss = error; |
ppp | 866 | drivers/net/ppp.c | ppp_unesc(struct ppp *ppp, unsigned char *c, int n) |
ppp | 887 | drivers/net/ppp.c | ppp->escape = PPP_TRANS; |
ppp | 891 | drivers/net/ppp.c | if (ppp->escape) /* PPP_ESC just before PPP_FLAG is illegal */ |
ppp | 892 | drivers/net/ppp.c | ppp->toss = 0xFF; |
ppp | 894 | drivers/net/ppp.c | if ((ppp->toss & 0x80) == 0) |
ppp | 895 | drivers/net/ppp.c | ppp_doframe(ppp); /* pass frame on to next layers */ |
ppp | 897 | drivers/net/ppp.c | ppp->rcount = 0; |
ppp | 898 | drivers/net/ppp.c | ppp->rhead = ppp->rbuff; |
ppp | 899 | drivers/net/ppp.c | ppp->escape = 0; |
ppp | 900 | drivers/net/ppp.c | ppp->toss = 0; |
ppp | 904 | drivers/net/ppp.c | if (!in_rmap (ppp, *c)) { |
ppp | 905 | drivers/net/ppp.c | if (ppp->toss == 0) |
ppp | 906 | drivers/net/ppp.c | ppp_enqueue (ppp, *c ^ ppp->escape); |
ppp | 907 | drivers/net/ppp.c | ppp->escape = 0; |
ppp | 924 | drivers/net/ppp.c | register struct ppp *ppp = ppp_find (tty); |
ppp | 929 | drivers/net/ppp.c | if (!ppp || ppp->magic != PPP_MAGIC) { |
ppp | 941 | drivers/net/ppp.c | ppp->stats.rbytes += count; |
ppp | 947 | drivers/net/ppp.c | if (*fp && ppp->toss == 0) |
ppp | 948 | drivers/net/ppp.c | ppp->toss = *fp; |
ppp | 954 | drivers/net/ppp.c | ppp->flags |= SC_RCV_B7_1; |
ppp | 956 | drivers/net/ppp.c | ppp->flags |= SC_RCV_B7_0; |
ppp | 959 | drivers/net/ppp.c | ppp->flags |= SC_RCV_ODDP; |
ppp | 961 | drivers/net/ppp.c | ppp->flags |= SC_RCV_EVNP; |
ppp | 966 | drivers/net/ppp.c | ppp->escape = PPP_TRANS; |
ppp | 970 | drivers/net/ppp.c | if (ppp->escape) /* PPP_ESC just before PPP_FLAG is "cancel"*/ |
ppp | 971 | drivers/net/ppp.c | ppp->toss = 0xFF; |
ppp | 973 | drivers/net/ppp.c | if ((ppp->toss & 0x80) == 0) |
ppp | 974 | drivers/net/ppp.c | ppp_doframe(ppp); /* pass frame on to next layers */ |
ppp | 976 | drivers/net/ppp.c | ppp->rcount = 0; |
ppp | 977 | drivers/net/ppp.c | ppp->rhead = ppp->rbuff; |
ppp | 978 | drivers/net/ppp.c | ppp->escape = 0; |
ppp | 979 | drivers/net/ppp.c | ppp->toss = 0; |
ppp | 983 | drivers/net/ppp.c | if (!in_rmap (ppp, c)) { |
ppp | 984 | drivers/net/ppp.c | if (ppp->toss == 0) |
ppp | 985 | drivers/net/ppp.c | ppp_enqueue (ppp, c ^ ppp->escape); |
ppp | 986 | drivers/net/ppp.c | ppp->escape = 0; |
ppp | 996 | drivers/net/ppp.c | ppp_doframe(struct ppp *ppp) |
ppp | 998 | drivers/net/ppp.c | u_char *c = ppp->rbuff; |
ppp | 1000 | drivers/net/ppp.c | int count = ppp->rcount; |
ppp | 1003 | drivers/net/ppp.c | if (ppp->toss) { |
ppp | 1005 | drivers/net/ppp.c | ppp->toss)); |
ppp | 1006 | drivers/net/ppp.c | slhc_toss (ppp->slcomp); |
ppp | 1007 | drivers/net/ppp.c | ppp->stats.rerrors++; |
ppp | 1020 | drivers/net/ppp.c | slhc_toss (ppp->slcomp); |
ppp | 1021 | drivers/net/ppp.c | ppp->stats.runts++; |
ppp | 1026 | drivers/net/ppp.c | if (!ppp_check_fcs(ppp)) { |
ppp | 1028 | drivers/net/ppp.c | slhc_toss (ppp->slcomp); |
ppp | 1029 | drivers/net/ppp.c | ppp->stats.rerrors++; |
ppp | 1051 | drivers/net/ppp.c | if ((ppp->dev->flags & IFF_UP) && ppp_do_ip(ppp, proto, c, count)) { |
ppp | 1052 | drivers/net/ppp.c | ppp->ddinfo.ip_rjiffies = jiffies; |
ppp | 1062 | drivers/net/ppp.c | if (ppp_us_queue (ppp, proto, c, count+2)) { |
ppp | 1063 | drivers/net/ppp.c | ppp->ddinfo.nip_rjiffies = jiffies; |
ppp | 1064 | drivers/net/ppp.c | ppp->stats.rothers++; |
ppp | 1071 | drivers/net/ppp.c | slhc_toss (ppp->slcomp); |
ppp | 1072 | drivers/net/ppp.c | ppp->stats.tossed++; |
ppp | 1080 | drivers/net/ppp.c | ppp_do_ip (struct ppp *ppp, unsigned short proto, unsigned char *c, |
ppp | 1090 | drivers/net/ppp.c | PRINTK (("KERN_DEBUG %s <-- proto %x len %d\n", ppp->dev->name, |
ppp | 1095 | drivers/net/ppp.c | ppp->stats.runcomp++; |
ppp | 1099 | drivers/net/ppp.c | if ((proto == PROTO_VJCOMP) && !(ppp->flags & SC_REJ_COMP_TCP)) { |
ppp | 1104 | drivers/net/ppp.c | if ((ppp->rhead + 80) < ppp->rend) { |
ppp | 1105 | drivers/net/ppp.c | ppp->rhead += 80; |
ppp | 1106 | drivers/net/ppp.c | ppp->rcount += 80; |
ppp | 1114 | drivers/net/ppp.c | ppp->stats.roverrun++; |
ppp | 1115 | drivers/net/ppp.c | slhc_toss (ppp->slcomp); |
ppp | 1119 | drivers/net/ppp.c | count = slhc_uncompress(ppp->slcomp, c, count); |
ppp | 1121 | drivers/net/ppp.c | ppp->stats.rerrors++; |
ppp | 1123 | drivers/net/ppp.c | slhc_toss (ppp->slcomp); |
ppp | 1126 | drivers/net/ppp.c | ppp->stats.rcomp++; |
ppp | 1130 | drivers/net/ppp.c | if ((proto == PROTO_VJUNCOMP) && !(ppp->flags & SC_REJ_COMP_TCP)) { |
ppp | 1131 | drivers/net/ppp.c | if (slhc_remember(ppp->slcomp, c, count) <= 0) { |
ppp | 1132 | drivers/net/ppp.c | ppp->stats.rerrors++; |
ppp | 1134 | drivers/net/ppp.c | slhc_toss (ppp->slcomp); |
ppp | 1137 | drivers/net/ppp.c | ppp->stats.runcomp++; |
ppp | 1147 | drivers/net/ppp.c | PRINTK ((KERN_INFO "%s <-- src %x dst %x len %d\n", ppp->dev->name, |
ppp | 1159 | drivers/net/ppp.c | skb->dev=ppp->dev; |
ppp | 1168 | drivers/net/ppp.c | #define PUTC(c,label) *ppp->us_rbuff_head++ = c; \ |
ppp | 1169 | drivers/net/ppp.c | if (ppp->us_rbuff_head == ppp->us_rbuff_end) \ |
ppp | 1170 | drivers/net/ppp.c | ppp->us_rbuff_head = ppp->us_rbuff; \ |
ppp | 1171 | drivers/net/ppp.c | if (ppp->us_rbuff_head == ppp->us_rbuff_tail) \ |
ppp | 1173 | drivers/net/ppp.c | #define GETC(c) c = *ppp->us_rbuff_tail++; \ |
ppp | 1174 | drivers/net/ppp.c | if (ppp->us_rbuff_tail == ppp->us_rbuff_end) \ |
ppp | 1175 | drivers/net/ppp.c | ppp->us_rbuff_tail = ppp->us_rbuff; |
ppp | 1178 | drivers/net/ppp.c | ppp_us_queue(struct ppp *ppp, unsigned short proto, |
ppp | 1186 | drivers/net/ppp.c | if (set_bit(1, &ppp->us_rbuff_lock)) { |
ppp | 1190 | drivers/net/ppp.c | saved_head = ppp->us_rbuff_head; |
ppp | 1202 | drivers/net/ppp.c | clear_bit(1, &ppp->us_rbuff_lock); |
ppp | 1203 | drivers/net/ppp.c | wake_up_interruptible (&ppp->read_wait); |
ppp | 1206 | drivers/net/ppp.c | kill_fasync(ppp->tty->fasync, SIGIO); |
ppp | 1209 | drivers/net/ppp.c | if (ppp->inp_sig && ppp->inp_sig_pid) |
ppp | 1210 | drivers/net/ppp.c | if (kill_proc (ppp->inp_sig_pid, ppp->inp_sig, 1) != 0) { |
ppp | 1214 | drivers/net/ppp.c | ppp->inp_sig = 0; |
ppp | 1215 | drivers/net/ppp.c | ppp->inp_sig_pid = 0; |
ppp | 1220 | drivers/net/ppp.c | ppp->us_rbuff_head = saved_head; |
ppp | 1221 | drivers/net/ppp.c | clear_bit(1, &ppp->us_rbuff_lock); |
ppp | 1243 | drivers/net/ppp.c | struct ppp *ppp = ppp_find(tty); |
ppp | 1247 | drivers/net/ppp.c | if (!ppp || ppp->magic != PPP_MAGIC) { |
ppp | 1259 | drivers/net/ppp.c | if (set_bit(0, &ppp->us_rbuff_lock) == 0) { |
ppp | 1261 | drivers/net/ppp.c | if (ppp->us_rbuff_head == ppp->us_rbuff_tail) { |
ppp | 1264 | drivers/net/ppp.c | clear_bit(0, &ppp->us_rbuff_lock); |
ppp | 1265 | drivers/net/ppp.c | if (ppp->inp_sig) { |
ppp | 1272 | drivers/net/ppp.c | ppp->ddinfo.nip_rjiffies = jiffies; |
ppp | 1283 | drivers/net/ppp.c | ppp->us_rbuff_head += len; |
ppp | 1284 | drivers/net/ppp.c | if (ppp->us_rbuff_head > ppp->us_rbuff_end) |
ppp | 1285 | drivers/net/ppp.c | ppp->us_rbuff_head += - (ppp->us_rbuff_end - ppp->us_rbuff); |
ppp | 1286 | drivers/net/ppp.c | clear_bit(0, &ppp->us_rbuff_lock); |
ppp | 1287 | drivers/net/ppp.c | wake_up_interruptible (&ppp->read_wait); |
ppp | 1288 | drivers/net/ppp.c | ppp->stats.rgiants++; |
ppp | 1301 | drivers/net/ppp.c | clear_bit(0, &ppp->us_rbuff_lock); |
ppp | 1303 | drivers/net/ppp.c | ppp->stats.rothers++; |
ppp | 1311 | drivers/net/ppp.c | interruptible_sleep_on (&ppp->read_wait); |
ppp | 1321 | drivers/net/ppp.c | ppp_stuff_char(struct ppp *ppp, unsigned char c) |
ppp | 1323 | drivers/net/ppp.c | int curpt = ppp->xhead - ppp->xbuff; |
ppp | 1326 | drivers/net/ppp.c | ppp->xbuff, ppp->xhead, curpt)) |
ppp | 1328 | drivers/net/ppp.c | if (in_xmap (ppp, c)) { |
ppp | 1329 | drivers/net/ppp.c | *ppp->xhead++ = PPP_ESC; |
ppp | 1330 | drivers/net/ppp.c | *ppp->xhead++ = c ^ PPP_TRANS; |
ppp | 1332 | drivers/net/ppp.c | *ppp->xhead++ = c; |
ppp | 1333 | drivers/net/ppp.c | ppp->fcs = (ppp->fcs >> 8) ^ fcstab[(ppp->fcs ^ c) & 0xff]; |
ppp | 1343 | drivers/net/ppp.c | struct ppp *ppp = ppp_find(tty); |
ppp | 1346 | drivers/net/ppp.c | if (!ppp || ppp->magic != PPP_MAGIC) { |
ppp | 1353 | drivers/net/ppp.c | if (ppp->mtu != ppp->dev->mtu) /* Someone has been ifconfigging */ |
ppp | 1354 | drivers/net/ppp.c | ppp_changedmtu (ppp, ppp->dev->mtu, ppp->mru); |
ppp | 1356 | drivers/net/ppp.c | if (nr > ppp->mtu) { |
ppp | 1359 | drivers/net/ppp.c | nr, ppp->mtu)); |
ppp | 1360 | drivers/net/ppp.c | nr = ppp->mtu; |
ppp | 1368 | drivers/net/ppp.c | while ((ppp->sending == 1) || !ppp_lock(ppp)) { |
ppp | 1371 | drivers/net/ppp.c | interruptible_sleep_on(&ppp->write_wait); |
ppp | 1379 | drivers/net/ppp.c | ppp->xhead = ppp->xbuff; |
ppp | 1382 | drivers/net/ppp.c | if (jiffies - ppp->last_xmit > OPTIMIZE_FLAG_TIME) |
ppp | 1383 | drivers/net/ppp.c | *ppp->xhead++ = PPP_FLAG; |
ppp | 1384 | drivers/net/ppp.c | ppp->last_xmit = jiffies; |
ppp | 1386 | drivers/net/ppp.c | *ppp->xhead++ = PPP_FLAG; |
ppp | 1389 | drivers/net/ppp.c | ppp->fcs = PPP_FCS_INIT; |
ppp | 1392 | drivers/net/ppp.c | ppp_stuff_char(ppp,get_user(buf++)); |
ppp | 1394 | drivers/net/ppp.c | ppp_add_fcs(ppp); /* concatenate FCS at end */ |
ppp | 1396 | drivers/net/ppp.c | *ppp->xhead++ = PPP_FLAG; |
ppp | 1399 | drivers/net/ppp.c | ppp->ddinfo.nip_sjiffies = jiffies; |
ppp | 1402 | drivers/net/ppp.c | ppp_print_buffer ("xmit buffer", ppp->xbuff, ppp->xhead - ppp->xbuff, KERNEL_DS); |
ppp | 1405 | drivers/net/ppp.c | (int) (ppp->xhead - ppp->xbuff))); |
ppp | 1409 | drivers/net/ppp.c | ++ppp->stats.sothers; |
ppp | 1410 | drivers/net/ppp.c | ppp_kick_tty(ppp); |
ppp | 1419 | drivers/net/ppp.c | struct ppp *ppp = ppp_find(tty); |
ppp | 1423 | drivers/net/ppp.c | if (!ppp || ppp->magic != PPP_MAGIC) { |
ppp | 1440 | drivers/net/ppp.c | if (ppp->mru != temp_i) |
ppp | 1441 | drivers/net/ppp.c | ppp_changedmtu (ppp, ppp->dev->mtu, temp_i); |
ppp | 1448 | drivers/net/ppp.c | temp_i = (ppp->flags & SC_MASK); |
ppp | 1463 | drivers/net/ppp.c | ppp->flags ^= ((ppp->flags ^ temp_i) & SC_MASK); |
ppp | 1471 | drivers/net/ppp.c | put_user (ppp->xmit_async_map[0], (int *) l); |
ppp | 1473 | drivers/net/ppp.c | l, (unsigned long) ppp->xmit_async_map[0])); |
ppp | 1480 | drivers/net/ppp.c | ppp->xmit_async_map[0] = get_user ((int *) l); |
ppp | 1481 | drivers/net/ppp.c | bset (ppp->xmit_async_map, PPP_FLAG); |
ppp | 1482 | drivers/net/ppp.c | bset (ppp->xmit_async_map, PPP_ESC); |
ppp | 1484 | drivers/net/ppp.c | (unsigned long) ppp->xmit_async_map[0])); |
ppp | 1491 | drivers/net/ppp.c | ppp->recv_async_map = get_user ((int *) l); |
ppp | 1493 | drivers/net/ppp.c | (unsigned long) ppp->recv_async_map)); |
ppp | 1500 | drivers/net/ppp.c | put_user (ppp->dev->base_addr, (int *) l); |
ppp | 1501 | drivers/net/ppp.c | PRINTKN (3,(KERN_INFO "ppp_ioctl: get unit: %ld", ppp->dev->base_addr)); |
ppp | 1508 | drivers/net/ppp.c | ppp->inp_sig = get_user ((int *) l); |
ppp | 1509 | drivers/net/ppp.c | ppp->inp_sig_pid = current->pid; |
ppp | 1510 | drivers/net/ppp.c | PRINTKN (3,(KERN_INFO "ppp_ioctl: set input signal %d\n", ppp->inp_sig)); |
ppp | 1537 | drivers/net/ppp.c | memcpy_tofs ((void *) l, &ppp->stats, sizeof (struct ppp_stats)); |
ppp | 1549 | drivers/net/ppp.c | cur_ddinfo.ip_sjiffies = cur_jiffies - ppp->ddinfo.ip_sjiffies; |
ppp | 1550 | drivers/net/ppp.c | cur_ddinfo.ip_rjiffies = cur_jiffies - ppp->ddinfo.ip_rjiffies; |
ppp | 1551 | drivers/net/ppp.c | cur_ddinfo.nip_sjiffies = cur_jiffies - ppp->ddinfo.nip_sjiffies; |
ppp | 1552 | drivers/net/ppp.c | cur_ddinfo.nip_rjiffies = cur_jiffies - ppp->ddinfo.nip_rjiffies; |
ppp | 1562 | drivers/net/ppp.c | sizeof (ppp->xmit_async_map)); |
ppp | 1565 | drivers/net/ppp.c | ppp->xmit_async_map, |
ppp | 1566 | drivers/net/ppp.c | sizeof (ppp->xmit_async_map)); |
ppp | 1573 | drivers/net/ppp.c | sizeof (ppp->xmit_async_map)); |
ppp | 1577 | drivers/net/ppp.c | memcpy_fromfs (temp_tbl, (void *) l, sizeof (ppp->xmit_async_map)); |
ppp | 1587 | drivers/net/ppp.c | memcpy (ppp->xmit_async_map, temp_tbl, sizeof (ppp->xmit_async_map)); |
ppp | 1598 | drivers/net/ppp.c | if (ppp->slcomp != NULL) |
ppp | 1599 | drivers/net/ppp.c | slhc_free (ppp->slcomp); |
ppp | 1601 | drivers/net/ppp.c | ppp->slcomp = slhc_init (temp_i, temp_i); |
ppp | 1603 | drivers/net/ppp.c | if (ppp->slcomp == NULL) { |
ppp | 1605 | drivers/net/ppp.c | ppp_release (ppp); |
ppp | 1641 | drivers/net/ppp.c | struct ppp *ppp = ppp_find (tty); |
ppp | 1643 | drivers/net/ppp.c | if (!ppp || ppp->magic != PPP_MAGIC) { |
ppp | 1654 | drivers/net/ppp.c | if (set_bit(0, &ppp->us_rbuff_lock) == 0) { |
ppp | 1656 | drivers/net/ppp.c | if (ppp->us_rbuff_head != ppp->us_rbuff_tail) { |
ppp | 1657 | drivers/net/ppp.c | clear_bit (0, &ppp->us_rbuff_lock); |
ppp | 1660 | drivers/net/ppp.c | clear_bit (0, &ppp->us_rbuff_lock); |
ppp | 1676 | drivers/net/ppp.c | select_wait (&ppp->read_wait, wait); |
ppp | 1680 | drivers/net/ppp.c | if (ppp_lock (ppp)) { |
ppp | 1681 | drivers/net/ppp.c | if (ppp->sending == 0) { |
ppp | 1682 | drivers/net/ppp.c | ppp_unlock (ppp); |
ppp | 1685 | drivers/net/ppp.c | ppp_unlock (ppp); |
ppp | 1687 | drivers/net/ppp.c | select_wait (&ppp->write_wait, wait); |
ppp | 1705 | drivers/net/ppp.c | struct ppp *ppp; |
ppp | 1717 | drivers/net/ppp.c | ppp = &ppp_ctrl[dev->base_addr]; |
ppp | 1718 | drivers/net/ppp.c | tty = ppp->tty; |
ppp | 1724 | drivers/net/ppp.c | (unsigned long int) skb, ppp->sending)); |
ppp | 1727 | drivers/net/ppp.c | if (!ppp->inuse) { |
ppp | 1755 | drivers/net/ppp.c | if (ppp->flags & SC_IP_DOWN) { |
ppp | 1756 | drivers/net/ppp.c | if (ppp->flags & SC_IP_FLUSH == 0) { |
ppp | 1757 | drivers/net/ppp.c | if (ppp_us_queue (ppp, proto, p, len)) |
ppp | 1758 | drivers/net/ppp.c | ppp->flags |= SC_IP_FLUSH; |
ppp | 1764 | drivers/net/ppp.c | if (ppp->sending || !ppp_lock(ppp)) { |
ppp | 1766 | drivers/net/ppp.c | ppp->stats.sbusy++; |
ppp | 1770 | drivers/net/ppp.c | ppp->xhead = ppp->xbuff; |
ppp | 1773 | drivers/net/ppp.c | if (ppp->flags & SC_COMP_TCP) { |
ppp | 1774 | drivers/net/ppp.c | len = slhc_compress(ppp->slcomp, p, len, ppp->cbuff, &p, |
ppp | 1775 | drivers/net/ppp.c | !(ppp->flags & SC_NO_TCP_CCID)); |
ppp | 1788 | drivers/net/ppp.c | ++ppp->stats.scomp; |
ppp | 1790 | drivers/net/ppp.c | ++ppp->stats.suncomp; |
ppp | 1801 | drivers/net/ppp.c | if (jiffies - ppp->last_xmit > OPTIMIZE_FLAG_TIME) |
ppp | 1802 | drivers/net/ppp.c | *ppp->xhead++ = PPP_FLAG; |
ppp | 1803 | drivers/net/ppp.c | ppp->last_xmit = jiffies; |
ppp | 1805 | drivers/net/ppp.c | *ppp->xhead++ = PPP_FLAG; |
ppp | 1808 | drivers/net/ppp.c | ppp->fcs = PPP_FCS_INIT; |
ppp | 1809 | drivers/net/ppp.c | if (!(ppp->flags & SC_COMP_AC)) { |
ppp | 1810 | drivers/net/ppp.c | ppp_stuff_char(ppp, PPP_ADDRESS); |
ppp | 1811 | drivers/net/ppp.c | ppp_stuff_char(ppp, PPP_CONTROL); |
ppp | 1814 | drivers/net/ppp.c | if (!(ppp->flags & SC_COMP_PROT) || (proto & 0xff00)) |
ppp | 1815 | drivers/net/ppp.c | ppp_stuff_char(ppp, proto>>8); |
ppp | 1816 | drivers/net/ppp.c | ppp_stuff_char(ppp, proto&0xff); |
ppp | 1820 | drivers/net/ppp.c | ppp_stuff_char(ppp, *p++); |
ppp | 1823 | drivers/net/ppp.c | ppp_add_fcs(ppp); |
ppp | 1824 | drivers/net/ppp.c | *ppp->xhead++ = PPP_FLAG; |
ppp | 1827 | drivers/net/ppp.c | ppp->ddinfo.ip_sjiffies = jiffies; |
ppp | 1831 | drivers/net/ppp.c | ppp_print_buffer ("xmit buffer", ppp->xbuff, ppp->xhead - ppp->xbuff, KERNEL_DS); |
ppp | 1834 | drivers/net/ppp.c | (int) (ppp->xhead - ppp->xbuff))); |
ppp | 1837 | drivers/net/ppp.c | ppp_kick_tty(ppp); |
ppp | 1883 | drivers/net/ppp.c | struct ppp *ppp = &ppp_ctrl[dev->base_addr]; |
ppp | 1886 | drivers/net/ppp.c | ppp_stats.rx_packets = ppp->stats.rcomp + ppp->stats.runcomp; |
ppp | 1887 | drivers/net/ppp.c | ppp_stats.rx_errors = ppp->stats.rerrors; |
ppp | 1888 | drivers/net/ppp.c | ppp_stats.rx_dropped = ppp->stats.tossed; |
ppp | 1890 | drivers/net/ppp.c | ppp_stats.rx_length_errors = ppp->stats.runts; |
ppp | 1891 | drivers/net/ppp.c | ppp_stats.rx_over_errors = ppp->stats.roverrun; |
ppp | 1894 | drivers/net/ppp.c | ppp_stats.tx_packets = ppp->stats.scomp + ppp->stats.suncomp; |
ppp | 1895 | drivers/net/ppp.c | ppp_stats.tx_errors = ppp->stats.serrors; |
ppp | 1898 | drivers/net/ppp.c | ppp_stats.collisions = ppp->stats.sbusy; |
ppp | 1915 | drivers/net/ppp.c | struct ppp * |
ppp | 1927 | drivers/net/ppp.c | static struct ppp * |
ppp | 1943 | drivers/net/ppp.c | ppp_lock(struct ppp *ppp) |
ppp | 1948 | drivers/net/ppp.c | locked = ppp->sending; |
ppp | 1949 | drivers/net/ppp.c | ppp->sending = 1; |
ppp | 1950 | drivers/net/ppp.c | if (ppp->dev->flags & IFF_UP) |
ppp | 1951 | drivers/net/ppp.c | ppp->dev->tbusy = 1; |
ppp | 1957 | drivers/net/ppp.c | ppp_unlock(struct ppp *ppp) |
ppp | 1962 | drivers/net/ppp.c | ppp->sending = 0; |
ppp | 1963 | drivers/net/ppp.c | if (ppp->dev->flags & IFF_UP) |
ppp | 1964 | drivers/net/ppp.c | ppp->dev->tbusy = 0; |
ppp | 1971 | drivers/net/ppp.c | ppp_add_fcs(struct ppp *ppp) |
ppp | 1973 | drivers/net/ppp.c | unsigned short fcs = ppp->fcs; |
ppp | 1976 | drivers/net/ppp.c | ppp_stuff_char(ppp, fcs & 0x00ff); |
ppp | 1977 | drivers/net/ppp.c | ppp_stuff_char(ppp, (fcs & 0xff00) >> 8); |
ppp | 1978 | drivers/net/ppp.c | ASSERT (ppp->fcs == PPP_FCS_GOOD); |
ppp | 1984 | drivers/net/ppp.c | ppp_check_fcs(struct ppp *ppp) |
ppp | 1987 | drivers/net/ppp.c | unsigned char *c = ppp->rbuff; |
ppp | 1990 | drivers/net/ppp.c | for (i = 0; i < ppp->rcount - 2; i++, c++) |