taglinefilesource code
sl79drivers/net/slip.csl_initialize(struct slip *sl, struct device *dev)
sl81drivers/net/slip.csl->magic    = SLIP_MAGIC;
sl82drivers/net/slip.csl->inuse    = 0;
sl83drivers/net/slip.csl->sending    = 0;
sl84drivers/net/slip.csl->escape    = 0;
sl85drivers/net/slip.csl->flags    = 0;
sl87drivers/net/slip.csl->mode    = SL_MODE_ADAPTIVE;  /* automatic CSLIP recognition */
sl90drivers/net/slip.csl->mode    = SL_MODE_CSLIP | SL_MODE_ADAPTIVE;  /* Default */
sl92drivers/net/slip.csl->mode    = SL_MODE_SLIP;    /* Default for non compressors */
sl96drivers/net/slip.csl->line    = dev->base_addr;
sl97drivers/net/slip.csl->tty    = NULL;
sl98drivers/net/slip.csl->dev    = dev;
sl99drivers/net/slip.csl->slcomp    = NULL;
sl102drivers/net/slip.csl->rbuff    = NULL;
sl103drivers/net/slip.csl->xbuff    = NULL;
sl104drivers/net/slip.csl->cbuff    = NULL;
sl106drivers/net/slip.csl->rhead    = NULL;
sl107drivers/net/slip.csl->rend    = NULL;
sl112drivers/net/slip.cdev->type    = ARPHRD_SLIP + sl->mode;
sl122drivers/net/slip.cstruct slip *sl;
sl128drivers/net/slip.csl = &sl_ctrl[i];
sl129drivers/net/slip.cif (sl->inuse == 0) {
sl130drivers/net/slip.csl->inuse = 1;
sl131drivers/net/slip.csl->tty = NULL;
sl133drivers/net/slip.creturn(sl);
sl143drivers/net/slip.csl_free(struct slip *sl)
sl147drivers/net/slip.cif (sl->inuse) {
sl150drivers/net/slip.csl->inuse = 0;
sl151drivers/net/slip.csl->tty = NULL;
sl160drivers/net/slip.cstatic void sl_changedmtu(struct slip *sl)
sl162drivers/net/slip.cstruct device *dev=sl->dev;
sl165drivers/net/slip.cint omtu=sl->mtu;
sl167drivers/net/slip.csl->mtu=dev->mtu;
sl184drivers/net/slip.csl->mtu=omtu;
sl197drivers/net/slip.ctf=(unsigned char *)sl->dev->mem_start;
sl198drivers/net/slip.csl->dev->mem_start=(unsigned long)tb;
sl199drivers/net/slip.csl->dev->mem_end=(unsigned long) (sl->dev->mem_start + l);
sl200drivers/net/slip.crf=(unsigned char *)sl->dev->rmem_start;
sl201drivers/net/slip.csl->dev->rmem_start=(unsigned long)rb;
sl202drivers/net/slip.csl->dev->rmem_end=(unsigned long) (sl->dev->rmem_start + l);
sl204drivers/net/slip.csl->xbuff = (unsigned char *) sl->dev->mem_start;
sl205drivers/net/slip.csl->rbuff = (unsigned char *) sl->dev->rmem_start;
sl206drivers/net/slip.csl->rend  = (unsigned char *) sl->dev->rmem_end;
sl207drivers/net/slip.csl->rhead = sl->rbuff;
sl209drivers/net/slip.ccf=sl->cbuff;
sl210drivers/net/slip.csl->cbuff=cb;
sl212drivers/net/slip.csl->escape=0;
sl213drivers/net/slip.csl->sending=0;
sl214drivers/net/slip.csl->rcount=0;
sl229drivers/net/slip.csl_enqueue(struct slip *sl, unsigned char c)
sl235drivers/net/slip.cif (sl->rhead < sl->rend) {
sl236drivers/net/slip.c*sl->rhead = c;
sl237drivers/net/slip.csl->rhead++;
sl238drivers/net/slip.csl->rcount++;
sl239drivers/net/slip.c} else sl->roverrun++;
sl245drivers/net/slip.csl_dequeue(struct slip *sl, int i)
sl251drivers/net/slip.cif (sl->rhead > sl->rbuff) {
sl252drivers/net/slip.csl->rhead -= i;
sl253drivers/net/slip.csl->rcount -= i;
sl261drivers/net/slip.csl_lock(struct slip *sl)
sl267drivers/net/slip.csl->sending = 1;
sl268drivers/net/slip.csl->dev->tbusy = 1;
sl275drivers/net/slip.csl_unlock(struct slip *sl)
sl281drivers/net/slip.csl->sending = 0;
sl282drivers/net/slip.csl->dev->tbusy = 0;
sl289drivers/net/slip.csl_bump(struct slip *sl)
sl296drivers/net/slip.ccount = sl->rcount;
sl298drivers/net/slip.cif (sl->mode & (SL_MODE_ADAPTIVE | SL_MODE_CSLIP)) {
sl299drivers/net/slip.cif ((c = sl->rbuff[0]) & SL_TYPE_COMPRESSED_TCP) {
sl302drivers/net/slip.cif (!(sl->mode & SL_MODE_CSLIP)) {
sl310drivers/net/slip.cif ((sl->rhead + 80) < sl->rend) {
sl311drivers/net/slip.csl->rhead += 80;
sl312drivers/net/slip.csl->rcount += 80;
sl315drivers/net/slip.csl->roverrun++;
sl322drivers/net/slip.ccount = slhc_uncompress(sl->slcomp, sl->rbuff, count);
sl324drivers/net/slip.csl->errors++;
sl328drivers/net/slip.cif (!(sl->mode & SL_MODE_CSLIP)) {
sl330drivers/net/slip.csl->mode |= SL_MODE_CSLIP;
sl333drivers/net/slip.csl->rbuff[0] &= 0x4f;
sl334drivers/net/slip.cif (slhc_remember(sl->slcomp, sl->rbuff, count) <= 0) {
sl335drivers/net/slip.csl->errors++;
sl345drivers/net/slip.cdone = dev_rint(sl->rbuff, count, 0, sl->dev);
sl349drivers/net/slip.csl->rpacket++;
sl354drivers/net/slip.csl_encaps(struct slip *sl, unsigned char *icp, int len)
sl360drivers/net/slip.cif(sl->mtu != sl->dev->mtu)  /* Someone has been ifconfigging */
sl361drivers/net/slip.csl_changedmtu(sl);
sl363drivers/net/slip.cif(len>sl->mtu)    /* Sigh, shouldn't occur BUT ... */
sl365drivers/net/slip.clen=sl->mtu;
sl371drivers/net/slip.cif(sl->mode & SL_MODE_CSLIP)
sl372drivers/net/slip.clen = slhc_compress(sl->slcomp, p, len, sl->cbuff, &p, 1);
sl374drivers/net/slip.cif(sl->mode & SL_MODE_SLIP6)
sl375drivers/net/slip.ccount=slip_esc6(p, (unsigned char *)sl->xbuff,len);
sl377drivers/net/slip.ccount=slip_esc(p, (unsigned char *)sl->xbuff,len);
sl378drivers/net/slip.csl->spacket++;
sl381drivers/net/slip.cactual = sl->tty->driver.write(sl->tty, 0, sl->xbuff, count);
sl383drivers/net/slip.csl_unlock(sl);
sl386drivers/net/slip.csl->xhead = sl->xbuff + count;
sl387drivers/net/slip.csl->xtail = sl->xbuff + actual;
sl388drivers/net/slip.csl->tty->flags |= (1 << TTY_DO_WRITE_WAKEUP);
sl399drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
sl402drivers/net/slip.cif (!sl || sl->magic != SLIP_MAGIC) {
sl406drivers/net/slip.cif (!sl->xtail)
sl410drivers/net/slip.cif (sl->flags & SLF_XMIT_BUSY) {
sl414drivers/net/slip.csl->flags |= SLF_XMIT_BUSY;
sl417drivers/net/slip.ccount = sl->xhead - sl->xtail;
sl419drivers/net/slip.canswer = tty->driver.write(tty, 0, sl->xtail, count);
sl421drivers/net/slip.csl->xtail = 0;
sl424drivers/net/slip.csl_unlock(sl);
sl427drivers/net/slip.csl->xtail += answer;
sl429drivers/net/slip.csl->flags &= ~SLF_XMIT_BUSY;
sl453drivers/net/slip.cstruct slip *sl;
sl457drivers/net/slip.csl = &sl_ctrl[dev->base_addr];
sl458drivers/net/slip.ctty = sl->tty;
sl465drivers/net/slip.cif (sl->sending) {
sl466drivers/net/slip.csl->sbusy++;
sl472drivers/net/slip.csl_lock(sl);
sl475drivers/net/slip.csl_encaps(sl, skb->data, size);
sl487drivers/net/slip.cstruct slip *sl=&sl_ctrl[dev->base_addr];
sl488drivers/net/slip.cif(sl->mode&SL_MODE_AX25)
sl502drivers/net/slip.cstruct slip *sl=&sl_ctrl[dev->base_addr];
sl503drivers/net/slip.cif((sl->mode&SL_MODE_AX25) && type!=htons(ETH_P_AX25))
sl519drivers/net/slip.cstruct slip *sl=&sl_ctrl[dev->base_addr];
sl521drivers/net/slip.cif(sl->mode&SL_MODE_AX25)
sl533drivers/net/slip.cstruct slip *sl;
sl537drivers/net/slip.csl = &sl_ctrl[dev->base_addr];
sl538drivers/net/slip.cif (sl->tty == NULL) {
sl541drivers/net/slip.csl->dev = dev;
sl565drivers/net/slip.csl->mtu    = dev->mtu;
sl566drivers/net/slip.csl->dev->mem_start  = (unsigned long) p;
sl567drivers/net/slip.csl->dev->mem_end  = (unsigned long) (sl->dev->mem_start + l);
sl571drivers/net/slip.ckfree((unsigned char *)sl->dev->mem_start);
sl574drivers/net/slip.csl->dev->rmem_start  = (unsigned long) p;
sl575drivers/net/slip.csl->dev->rmem_end  = (unsigned long) (sl->dev->rmem_start + l);
sl577drivers/net/slip.csl->xbuff    = (unsigned char *) sl->dev->mem_start;
sl578drivers/net/slip.csl->rbuff    = (unsigned char *) sl->dev->rmem_start;
sl579drivers/net/slip.csl->rend    = (unsigned char *) sl->dev->rmem_end;
sl580drivers/net/slip.csl->rhead    = sl->rbuff;
sl582drivers/net/slip.csl->escape    = 0;
sl583drivers/net/slip.csl->sending    = 0;
sl584drivers/net/slip.csl->rcount    = 0;
sl588drivers/net/slip.ckfree((unsigned char *)sl->dev->mem_start);
sl589drivers/net/slip.ckfree((unsigned char *)sl->dev->rmem_start);
sl592drivers/net/slip.csl->cbuff    = p;
sl594drivers/net/slip.csl->slcomp = slhc_init(16, 16);
sl595drivers/net/slip.cif (sl->slcomp == NULL) {
sl596drivers/net/slip.ckfree((unsigned char *)sl->dev->mem_start);
sl597drivers/net/slip.ckfree((unsigned char *)sl->dev->rmem_start);
sl598drivers/net/slip.ckfree((unsigned char *)sl->cbuff);
sl614drivers/net/slip.cstruct slip *sl;
sl616drivers/net/slip.csl = &sl_ctrl[dev->base_addr];
sl617drivers/net/slip.cif (sl->tty == NULL) {
sl620drivers/net/slip.csl->tty->disc_data = 0;
sl621drivers/net/slip.csl_free(sl);
sl624drivers/net/slip.ckfree(sl->rbuff);
sl625drivers/net/slip.ckfree(sl->xbuff);
sl626drivers/net/slip.ckfree(sl->cbuff);
sl628drivers/net/slip.cslhc_free(sl->slcomp);
sl630drivers/net/slip.csl_initialize(sl, dev);
sl649drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
sl651drivers/net/slip.cif (!sl || sl->magic != SLIP_MAGIC)
sl658drivers/net/slip.cif(sl->mtu!=sl->dev->mtu)
sl659drivers/net/slip.csl_changedmtu(sl);
sl664drivers/net/slip.csl->flags |= SLF_ERROR;
sl668drivers/net/slip.cif (sl->mode & SL_MODE_SLIP6)
sl669drivers/net/slip.cslip_unesc6(sl,*cp++);
sl671drivers/net/slip.cslip_unesc(sl,*cp++);
sl685drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
sl688drivers/net/slip.cif (sl && sl->magic == SLIP_MAGIC) {
sl693drivers/net/slip.cif ((sl = sl_alloc()) == NULL) {
sl696drivers/net/slip.csl->tty = tty;
sl697drivers/net/slip.ctty->disc_data = sl;
sl704drivers/net/slip.c(void) sl_open(sl->dev);
sl707drivers/net/slip.creturn(sl->line);
sl715drivers/net/slip.cstruct slip *sl;
sl719drivers/net/slip.csl = &sl_ctrl[dev->base_addr];
sl720drivers/net/slip.cif (! sl)
sl725drivers/net/slip.cstats.rx_packets = sl->rpacket;
sl726drivers/net/slip.cstats.rx_over_errors = sl->roverrun;
sl727drivers/net/slip.cstats.tx_packets = sl->spacket;
sl728drivers/net/slip.cstats.tx_dropped = sl->sbusy;
sl729drivers/net/slip.cstats.rx_errors = sl->errors;
sl731drivers/net/slip.ccomp = sl->slcomp;
sl751drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
sl754drivers/net/slip.cif (!sl || sl->magic != SLIP_MAGIC) {
sl758drivers/net/slip.c(void) dev_close(sl->dev);
sl806drivers/net/slip.cslip_unesc(struct slip *sl, unsigned char s)
sl810drivers/net/slip.csl->flags |= SLF_ESCAPE;
sl813drivers/net/slip.cif (sl->flags & SLF_ESCAPE)
sl814drivers/net/slip.csl_enqueue(sl, ESC);
sl816drivers/net/slip.csl_enqueue(sl, s);
sl817drivers/net/slip.csl->flags &= ~SLF_ESCAPE;
sl820drivers/net/slip.cif (sl->flags & SLF_ESCAPE)
sl821drivers/net/slip.csl_enqueue(sl, END);
sl823drivers/net/slip.csl_enqueue(sl, s);
sl824drivers/net/slip.csl->flags &= ~SLF_ESCAPE;
sl827drivers/net/slip.cif (sl->rcount > 2) 
sl828drivers/net/slip.csl_bump(sl);
sl829drivers/net/slip.csl_dequeue(sl, sl->rcount);
sl830drivers/net/slip.csl->rcount = 0;
sl831drivers/net/slip.csl->flags &= ~(SLF_ESCAPE | SLF_ERROR);
sl834drivers/net/slip.csl_enqueue(sl, s);
sl835drivers/net/slip.csl->flags &= ~SLF_ESCAPE;
sl888drivers/net/slip.cslip_unesc6(struct slip *sl, unsigned char s)
sl893drivers/net/slip.cif (sl->rcount > 8) {  /* XXX must be 2 for compressed slip */
sl896drivers/net/slip.csl->rbuff[0],
sl897drivers/net/slip.csl->rbuff[1],
sl898drivers/net/slip.csl->rbuff[2],
sl899drivers/net/slip.csl->rbuff[3]
sl902drivers/net/slip.csl_bump(sl);
sl904drivers/net/slip.csl_dequeue(sl, sl->rcount);
sl905drivers/net/slip.csl->rcount = 0;
sl906drivers/net/slip.csl->flags &= ~(SLF_ESCAPE | SLF_ERROR); /* SLF_ESCAPE not used */
sl907drivers/net/slip.csl->xbits = 0;
sl909drivers/net/slip.csl->xdata = (sl->xdata << 6) | ((s - 0x30) & 0x3F);
sl910drivers/net/slip.csl->xbits += 6;
sl911drivers/net/slip.cif (sl->xbits >= 8) {
sl912drivers/net/slip.csl->xbits -= 8;
sl913drivers/net/slip.cc = (unsigned char)(sl->xdata >> sl->xbits);
sl914drivers/net/slip.csl_enqueue(sl, c);
sl944drivers/net/slip.cstruct slip *sl = (struct slip *) tty->disc_data;
sl948drivers/net/slip.cif (!sl || sl->magic != SLIP_MAGIC) {
sl957drivers/net/slip.cmemcpy_tofs(arg, sl->dev->name, strlen(sl->dev->name) + 1);
sl961drivers/net/slip.cput_fs_long(sl->mode,(long *)arg);
sl965drivers/net/slip.csl->mode=get_fs_long((long *)arg);
sl967drivers/net/slip.cif(sl->mode & SL_MODE_AX25)
sl969drivers/net/slip.csl->dev->addr_len=7;  /* sizeof an AX.25 addr */
sl970drivers/net/slip.csl->dev->hard_header_len=17;  /* We don't do digipeaters */
sl974drivers/net/slip.csl->dev->addr_len=0;  /* No mac addr in slip mode */
sl975drivers/net/slip.csl->dev->hard_header_len=0;
sl978drivers/net/slip.csl->dev->type=ARPHRD_SLIP+sl->mode;
sl979drivers/net/slip.cif(sl->dev->type==260)
sl980drivers/net/slip.csl->dev->type=ARPHRD_AX25;
sl984drivers/net/slip.creturn sl_set_mac_address(sl->dev,arg);
sl1001drivers/net/slip.cstruct slip *sl;
sl1008drivers/net/slip.csl = &sl_ctrl[dev->base_addr];
sl1038drivers/net/slip.csl_initialize(sl, dev);
sl1041drivers/net/slip.csl->rcount    = 0;      /* SLIP receiver count  */
sl1042drivers/net/slip.csl->rpacket    = 0;      /* #frames received  */
sl1043drivers/net/slip.csl->roverrun    = 0;      /* "overrun" counter  */
sl1044drivers/net/slip.csl->spacket    = 0;      /* #frames sent out  */
sl1045drivers/net/slip.csl->sbusy    = 0;      /* "xmit busy" counter  */
sl1046drivers/net/slip.csl->errors    = 0;      /* not used at present  */
sl89drivers/net/slip.hextern void  slip_unesc(struct slip *sl, unsigned char s);
sl90drivers/net/slip.hextern void   slip_unesc6(struct slip *sl, unsigned char s);
sl643drivers/scsi/ultrastor.cstruct scatterlist *sl;
sl647drivers/scsi/ultrastor.csl = (struct scatterlist *) SCpnt->request_buffer;
sl650drivers/scsi/ultrastor.cmscp->sglist[i].address = (unsigned int)sl[i].address;
sl651drivers/scsi/ultrastor.cmscp->sglist[i].num_bytes = sl[i].length;
sl652drivers/scsi/ultrastor.ctransfer_length += sl[i].length;