linux/net/caif/cfvidl.c
<<
tionv2./spa > v2./form > v2.a tionv2 href="../linux+v3="v10/net/caif/cfvidl.c">tionv2.img src="../.static/gfx/right.png" alt=">>">ti./spa >ti.spa class="lxr_search">tiontionv2.input typtiohidden" namtionavtarget" tionv2.input typtiotext" namtiosearch" idiosearch">tionv2.butt.12typtiosubmit">Search v2./form > ./spa >ti.spa class="lxr_prefs" > v2.a href="+prefs?return=net/caif/cfvidl.c"tionv2 onclick="return ajax_prefs();">tionv2Prefs> v2./a>ti./spa >onv2 2./div >onv2 2.form ac" ="ajax+*" method="post" onsubmit="return false;">ti.input typtiohidden" namtioajax_lookup" idioajax_lookup" tonv2 2./form >tonv2 2.div class="headingbott.m">
onv2
onv2 v2 2.div idiosearch_results" class="search_results"> v >onv2 2./div > .div idiocontent">> .div idiofile_contents"
2 21./a>.spa  class="comment">/*./spa  >2 22./a>.spa  class="comment"> * Copyright (C) ST-Ericss.12AB 20.27.spa  >2 23./a>.spa  class="comment"> * Author:onv2 2Sjur Brendeland/sjur.brandeland@stericss.1.com7.spa  >2 24./a>.spa  class="comment"> * License terms: GNU General Public License (GPL) vers2.1227.spa  >2 25./a>.spa  class="comment"> */7.spa  >2 26./a>t2 27./a>#define2.a href="+code=pr_fmt" class="sref">pr_fmt./a>(.a href="+code=fmt" class="sref">fmt./a>)2.a href="+code=KBUILD_MODNAME" class="sref">KBUILD_MODNAME./a> .spa  class="string">":%s(): "7.spa  2.a href="+code=fmt" class="sref">fmt./a>,2.a href="+code=__func__" class="sref">__func__./a>t2 28./a>t2 29./a>#include <7a href="include/linux/kernel.h" class="fref">linux/kernel.h./a>>t2 .27.a>#include <7a href="include/linux/typts.h" class="fref">linux/typts.h./a>>t2 117.a>#include <7a href="include/linux/slab.h" class="fref">linux/slab.h./a>>t2 127.a>#include <7a href="include/linux/errno.h" class="fref">linux/errno.h./a>>t2 137.a>#include <7a href="include/net/caif/caif_layer.h" class="fref">net/caif/caif_layer.h./a>>t2 147.a>#include <7a href="include/net/caif/cfsrvl.h" class="fref">net/caif/cfsrvl.h./a>>t2 157.a>#include <7a href="include/net/caif/cfpkt.h" class="fref">net/caif/cfpkt.h./a>>t2 16./a>t2 17./a>#define2.a href="+code=container_obj" class="sref">container_obj./a>(.a href="+code=layr" class="sref">layr./a>)2((struct2.a href="+code=cfsrvl" class="sref">cfsrvl./a> *)2.a href="+code=layr" class="sref">layr./a>)t2 18./a>t2 19./a>static int2.a href="+code=cfvidl_receive" class="sref">cfvidl_receive./a>(struct2.a href="+code=cflayer" class="sref">cflayer./a> *.a href="+code=layr" class="sref">layr./a>, struct2.a href="+code=cfpkt" class="sref">cfpkt./a> *.a href="+code=pkt" class="sref">pkt./a>);t2 20./a>static int2.a href="+code=cfvidl_transmit" class="sref">cfvidl_transmit./a>(struct2.a href="+code=cflayer" class="sref">cflayer./a> *.a href="+code=layr" class="sref">layr./a>, struct2.a href="+code=cfpkt" class="sref">cfpkt./a> *.a href="+code=pkt" class="sref">pkt./a>);t2 21./a>t2 22./a>struct2.a href="+code=cflayer" class="sref">cflayer./a> *.a href="+code=cfvidl_create" class="sref">cfvidl_create./a>(.a href="+code=u8" class="sref">u8./a> .a href="+code=channel_id" class="sref">channel_id./a>, struct2.a href="+code=dev_info" class="sref">dev_info./a> *.a href="+code=dev_info" class="sref">dev_info./a>)t2 237.a>{t2 247.a>        struct2.a href="+code=cfsrvl" class="sref">cfsrvl./a> *.a href="+code=vid" class="sref">vid./a> =2.a href="+code=kzalloc" class="sref">kzalloc./a>(sizeof(struct2.a href="+code=cfsrvl" class="sref">cfsrvl./a>),2.a href="+code=GFP_ATOMIC" class="sref">GFP_ATOMIC./a>);t2 257.a>        if (!.a href="+code=vid" class="sref">vid./a>)t2 267.a>                return .a href="+code=NULL" class="sref">NULL7.a>;t2 277.a>        .a href="+code=caif_assert" class="sref">caif_assert./a>(.a href="+code=offsetof" class="sref">offsetof./a>(struct2.a href="+code=cfsrvl" class="sref">cfsrvl./a>,2.a href="+code=layer" class="sref">layer./a>) == 0);t2 28./a>t2 297.a>        .a href="+code=cfsrvl_init" class="sref">cfsrvl_init./a>(.a href="+code=vid" class="sref">vid./a>,2.a href="+code=channel_id" class="sref">channel_id./a>, .a href="+code=dev_info" class="sref">dev_info./a>, .a href="+code=false" class="sref">false./a>);t2 307.a>        .a href="+code=vid" class="sref">vid./a>->.a href="+code=layer" class="sref">layer./a>..a href="+code=receive" class="sref">receive./a> =2.a href="+code=cfvidl_receive" class="sref">cfvidl_receive./a>;t2 317.a>        .a href="+code=vid" class="sref">vid./a>->.a href="+code=layer" class="sref">layer./a>..a href="+code=transmit" class="sref">transmit./a> =2.a href="+code=cfvidl_transmit" class="sref">cfvidl_transmit./a>;t2 327.a>        .a href="+code=snprintf" class="sref">snprintf./a>(.a href="+code=vid" class="sref">vid./a>->.a href="+code=layer" class="sref">layer./a>..a href="+code=namt" class="sref">namt./a>, .a href="+code=CAIF_LAYER_NAME_SZ" class="sref">CAIF_LAYER_NAME_SZ7.a> - 1, .spa  class="string">"vid1"7.spa  );t2 337.a>        return &.a href="+code=vid" class="sref">vid./a>->.a href="+code=layer" class="sref">layer./a>;t2 347.a>}t2 35./a>t2 36./a>static int2.a href="+code=cfvidl_receive" class="sref">cfvidl_receive./a>(struct2.a href="+code=cflayer" class="sref">cflayer./a> *.a href="+code=layr" class="sref">layr./a>, struct2.a href="+code=cfpkt" class="sref">cfpkt./a> *.a href="+code=pkt" class="sref">pkt./a>)t2 377.a>{t2 387.a>        .a href="+code=u32" class="sref">u327.a> .a href="+code=videoheader" class="sref">videoheader./a>;t2 397.a>        if (.a href="+code=cfpkt_extr_head" class="sref">cfpkt_extr_head./a>(.a href="+code=pkt" class="sref">pkt./a>, &.a href="+code=videoheader" class="sref">videoheader./a>, 4) < 0) {t2 407.a>                .a href="+code=pr_err" class="sref">pr_err./a>(.spa  class="string">"Packet is erroneous!\n"7.spa  );t2 417.a>                .a href="+code=cfpkt_destroy" class="sref">cfpkt_destroy./a>(.a href="+code=pkt" class="sref">pkt./a>);t2 427.a>                return -.a href="+code=EPROTO" class="sref">EPROTO./a>;t2 437.a>        }t2 447.a>        return .a href="+code=layr" class="sref">layr./a>->.a href="+code=up" class="sref">up./a>->.a href="+code=receive" class="sref">receive./a>(.a href="+code=layr" class="sref">layr./a>->.a href="+code=up" class="sref">up./a>, .a href="+code=pkt" class="sref">pkt./a>);t2 457.a>}t2 46./a>t2 47./a>static int2.a href="+code=cfvidl_transmit" class="sref">cfvidl_transmit./a>(struct2.a href="+code=cflayer" class="sref">cflayer./a> *.a href="+code=layr" class="sref">layr./a>, struct2.a href="+code=cfpkt" class="sref">cfpkt./a> *.a href="+code=pkt" class="sref">pkt./a>)t2 487.a>{t2 497.a>        struct2.a href="+code=cfsrvl" class="sref">cfsrvl./a> *.a href="+code=service" class="sref">service./a> =2.a href="+code=container_obj" class="sref">container_obj./a>(.a href="+code=layr" class="sref">layr./a>);t2 507.a>        struct2.a href="+code=caif_payload_info" class="sref">caif_payload_info./a> *.a href="+code=info" class="sref">info./a>;t2 517.a>        .a href="+code=u32" class="sref">u327.a> .a href="+code=videoheader" class="sref">videoheader./a> =20;t2 527.a>        int2.a href="+code=ret" class="sref">ret./a>;t2 53./a>t2 547.a>        if (!.a href="+code=cfsrvl_ready" class="sref">cfsrvl_ready./a>(.a href="+code=service" class="sref">service./a>, &.a href="+code=ret" class="sref">ret./a>)) {t2 557.a>                .a href="+code=cfpkt_destroy" class="sref">cfpkt_destroy./a>(.a href="+code=pkt" class="sref">pkt./a>);t2 567.a>                return .a href="+code=ret" class="sref">ret./a>;t2 577.a>        }t2 58./a>t2 597.a>        .a href="+code=cfpkt_add_head" class="sref">cfpkt_add_head./a>(.a href="+code=pkt" class="sref">pkt./a>, &.a href="+code=videoheader" class="sref">videoheader./a>, 4);t2 607.a>        .spa  class="comment">/* Add info for MUX-layer to route the packet out */7.spa  >2 617.a>        .a href="+code=info" class="sref">info./a> =2.a href="+code=cfpkt_info" class="sref">cfpkt_info./a>(.a href="+code=pkt" class="sref">pkt./a>);t2 627.a>        .a href="+code=info" class="sref">info./a>->.a href="+code=channel_id" class="sref">channel_id./a> =2.a href="+code=service" class="sref">service./a>->.a href="+code=layer" class="sref">layer./a>..a href="+code=id" class="sref">id./a>;t2 637.a>        .a href="+code=info" class="sref">info./a>->.a href="+code=dev_info" class="sref">dev_info./a> = &.a href="+code=service" class="sref">service./a>->.a href="+code=dev_info" class="sref">dev_info./a>;t2 647.a>        return .a href="+code=layr" class="sref">layr./a>->.a href="+code=dn" class="sref">dn./a>->.a href="+code=transmit" class="sref">transmit./a>(.a href="+code=layr" class="sref">layr./a>->.a href="+code=dn" class="sref">dn./a>, .a href="+code=pkt" class="sref">pkt./a>);t2 657.a>}t2 667.a>
./div > .div class="footer"> The original LXR software by the LXR community./a>, this experimental vers2.12by lxr@linux.no./a>. ./div >.div class="subfooter"> lxr.linux.no kindly hosted2by Redpill Linpro AS./a>, provider of Linux consulting and opera" s services since 1995. ./div > ./body >./html >