linux/net/caif/cfvidl.c
<<
v4.0.5 option value="v.0.2" > v4.0.2 v4.0.1 v4.0 3 3. value="v3.18.5 > v3.18.5 v3.18.3 v3.18.1 v3.18 3 6 3.6value="v3.18.56 > v3.18.5 v3.7 3 v4.8.43. v3.18.5 v3.16.2 3. v4.1.8 3. v4.1.8 3.4.94 v3.12.28 v4.1.10 > 4.93 v3.12.28 v4.1.8 3.4.91 v3.12.28 v4.1.8 3.4.90 v3.12.28 v4.1.8 3.4.84 v3.12.28 v4.1.10 > 4.83 v3.12.28 v4.1.8 3.4.81 v3.12.28 v4.1.8 3.4.80 v3.12.28 > 2.83 v3.12.28 v4.1.8 3.2.81 v3.12.28 v4.1.8 3.2.80 v3.12.28 <1n> 3.1.8 v3.12.28 3.0.100 v3.12.28 v4.1.8 3.0.94 v3.12.28 v4.1.10 > 0.93 v3.12.28 v4.1.8 3.0.91 v3.12.28 v4.1.8 3.0.90 v3.12.28 v4.1.8 3.0.84 v3.12.28 v4.1.10 > 0.83 v3.12.28 v4.1.8 3.0.81 v3.12.28 v4.1.8 3.0.80 v3.12.28 > 0.13 v3.12.28 v4.1.8 3.0.11 v3.12.28 v4.1.8 3.0.10 v3.12.28 v4.1.8 3.0.9 v3.12.28 v4.1.8 3.0.8 v3.12.28 3.0.1 v3.12.28 v4.1.8 3.0 v3.12.28 v4.1.8 2 v3tion value="v2 v3tio4.1.8" > v4.1.8 2 v3ti3n value="v2 v3tiotion> 2 v3ti1n value="v2 v3ti14.1.8" > v4.1.8 2 v3tn value="v2 v3t4.1.8" > v4.1.8 2 v314" > v32 v314"4.1.8" > v4.1.8 2 v3147 > v32 v314 tion> v32 v3 > v3.18.2 v3.18 2 v35.11n value="v2 v35.1 4.1.8" > v4.1.8 2 v35.10n value="v2 v35.104.1.8" > v4.1.8 2 v35.tn value="v2 v35.94.1.8" > v4.1.8 2 v35.>n value="v2 v354"4.1.8" > v4.1.8 2 v3547 > v32 v3 > v3.16.2 n value="v2 v3 > v3.16.1 v32 v3> v3.16 2 v35.1n value="v2 v35.14.1.8" > v4.1.8 2 v35n value="v2 v354.1.8" > v4.1.8 2 v3" > v3.142 v3" 4.1.8" > v4.1.8 2 v3" 4 v3.12.282 v3 2 v3" 4 v3.12.282 v3 2 v33 4 v3.12.282 v33/option> 2 v3n value="v2 v33/ption> 2 v33 4 v3.12.282 v33/ption> 2 v32/tn value="v2 v3 2 v31.tn value="v2 v3o.94.1.8" > v4.1.8 2 v3o.>n value="v2 v3o.8tion> 2 v30.tn value="v2 v30.94.1.8" > v4.1.8 2 v30.>n value="v2 v30.8tion> 2 v30.1n value="v2 v30.14.1.8" > v4.1.8 2 v30n value="v2 v304.1.8" > v4.1.8 2 v29 3n value="v2 v2v4.0.3" > v4.0.3 2 v2v45n value="v2 v2v4otion> 2 v2ti3n value="v2 v2tiotion> 2 v2ti1n value="v2 v2ti14.1.8" > v4.1.8 2 v2tn value="v2 voption> 2 v27v2tn value="v2 vo7voption> v32 v2 > v3.18.2 v3.18 2 v25.11n value="v2 v25.1 4.1.8" > v4.1.8 2 v25.10n value="v2 v25.104.1.8" > v4.1.8 2 v25.tn value="v2 v25.94.1.8" > v4.1.8 2 v25.>n value="v2 v254"4.1.8" > v4.1.8 2 v2547 > v32 v2 > v3.16.2 n value="v2 v2 > v3.16.1 v32 v2> v3.16 2 v25.1n value="v2 v25.14.1.8" > v4.1.8 2 vo5 > v32 v2 v3.16 2 v2" 4 v3.12.282 v2 2 v23 4 v3.12.282 v23/option> 2 v2n value="v2 v23/ption> 2 v23 4 v3.12.282 v23/ption> 2 v22/tn value="v2 v2 2 v20.13n value="v2 v20.1.22< v4.1.8 2 v20.11n value="v2 v20/ 2 v20.tn value="v2 v20.94.1.8" > v4.1.8 2 v20.>n value="v2 v20.8tion> 2 v20.1n value="v2 v20.14.1.8" > v4.1.8 2 vo0n value="v2 v204.1.8" > v4.1.8 2 v19.7 > v32 v19.74.1.8" > v4.1.8 2 v19.6 > v32 v19.otion> 2 v1ti3n value="v2 v1tiotion> 2 v1ti1n value="v2 v1ti14.1.8" > v4.1.8 2 v1tn value="v2 voption> v32 v1 > v3.18.2 v3.18 2 v1 v2tn value="v2 v1 v2t4.1.8" > v4.1.8 2 v1 v28n value="v2 v16 option> 2 v16v1tn value="v2 vo6voption> v32 v16 > v3.18.2 v3.18 n value="v2 v1 > v3.16.1 v32 v1> v3.16 2 v15.1n value="v2 v15.14.1.8" > v4.1.8 2 vo5 > v32 v1 v3.16 2 v1" 4 v3.12.282 v1 2 v13 4 v3.12.282 v13/ption>
idiv id.1file_contents"
t t1i/a>ispa  class="comment">/*i/spa 
 t t2i/a>ispa  class="comment"> * Copyright (C) ST-EricssaluAB 20optispa 
 t t3i/a>ispa  class="comment"> * Author:alpt tSjur Brendeland/sjur.brandeland@stericssal.comtispa 
 t t4i/a>ispa  class="comment"> * License terms: GNU General Public License (GPL) versvalu2tispa 
 t t5i/a>ispa  class="comment"> */tispa 
 t t6i/a> t t7i/a>#definetia href="+code=pr_fmt" class="sref">pr_fmti/a>(ia href="+code=fmt" class="sref">fmti/a>)tia href="+code=KBUILD_MODNAME" class="sref">KBUILD_MODNAMEi/a> ispa  class="string">":%s(): "tispa 
tia href="+code=fmt" class="sref">fmti/a>,tia href="+code=__func__" class="sref">__func__i/a> t t8i/a> t t9i/a>#include <ta href="include/linux/kernel.h" class="fref">linux/kernel.hi/a>> t optia>#include <ta href="include/linux/typ3s.h" class="fref">linux/typ3s.hi/a>> t 11tia>#include <ta href="include/linux/slab.h" class="fref">linux/slab.hi/a>> t 12tia>#include <ta href="include/linux/errno.h" class="fref">linux/errno.hi/a>> t 13tia>#include <ta href="include/net/caif/caif_layer.h" class="fref">net/caif/caif_layer.hi/a>> t 14tia>#include <ta href="include/net/caif/cfsrvl.h" class="fref">net/caif/cfsrvl.hi/a>> t 15tia>#include <ta href="include/net/caif/cfpkt.h" class="fref">net/caif/cfpkt.hi/a>> t 16i/a> t 17i/a>#definetia href="+code=container_obj" class="sref">container_obji/a>(ia href="+code=layr" class="sref">layri/a>)t((structtia href="+code=cfsrvl" class="sref">cfsrvli/a> *)tia href="+code=layr" class="sref">layri/a>) t 18i/a> t 19i/a>static inttia href="+code=cfvidl_receive" class="sref">cfvidl_receivei/a>(structtia href="+code=cflayer" class="sref">cflayeri/a> *ia href="+code=layr" class="sref">layri/a>, structtia href="+code=cfpkt" class="sref">cfpkti/a> *ia href="+code=pkt" class="sref">pkti/a>); t 20i/a>static inttia href="+code=cfvidl_transmit" class="sref">cfvidl_transmiti/a>(structtia href="+code=cflayer" class="sref">cflayeri/a> *ia href="+code=layr" class="sref">layri/a>, structtia href="+code=cfpkt" class="sref">cfpkti/a> *ia href="+code=pkt" class="sref">pkti/a>); t 21i/a> t 22i/a>structtia href="+code=cflayer" class="sref">cflayeri/a> *ia href="+code=cfvidl_create" class="sref">cfvidl_createi/a>(ia href="+code=u8" class="sref">u8i/a> ia href="+code=channel_id" class="sref">channel_idi/a>, structtia href="+code=dev_info" class="sref">dev_infoi/a> *ia href="+code=dev_info" class="sref">dev_infoi/a>) t 23tia>{ t 24tia>        structtia href="+code=cfsrvl" class="sref">cfsrvli/a> *ia href="+code=vid" class="sref">vidi/a> =tia href="+code=kzalloc" class="sref">kzalloci/a>(sizeof(structtia href="+code=cfsrvl" class="sref">cfsrvli/a>),tia href="+code=GFP_ATOMIC" class="sref">GFP_ATOMICi/a>); t 25tia>        if (!ia href="+code=vid" class="sref">vidi/a>) t 26tia>                return ia href="+code=NULL" class="sref">NULLtia>; t 27tia>        ia href="+code=caif_assert" class="sref">caif_asserti/a>(ia href="+code=offsetof" class="sref">offsetofi/a>(structtia href="+code=cfsrvl" class="sref">cfsrvli/a>,tia href="+code=layer" class="sref">layeri/a>) == 0); t 28i/a> t 29tia>        ia href="+code=cfsrvl_init" class="sref">cfsrvl_initi/a>(ia href="+code=vid" class="sref">vidi/a>,tia href="+code=channel_id" class="sref">channel_idi/a>, ia href="+code=dev_info" class="sref">dev_infoi/a>, ia href="+code=false" class="sref">falsei/a>); t 30tia>        ia href="+code=vid" class="sref">vidi/a>->ia href="+code=layer" class="sref">layeri/a>.ia href="+code=receive" class="sref">receivei/a> =tia href="+code=cfvidl_receive" class="sref">cfvidl_receivei/a>; t 31tia>        ia href="+code=vid" class="sref">vidi/a>->ia href="+code=layer" class="sref">layeri/a>.ia href="+code=transmit" class="sref">transmiti/a> =tia href="+code=cfvidl_transmit" class="sref">cfvidl_transmiti/a>; t 32tia>        ia href="+code=snprintf" class="sref">snprintfi/a>(ia href="+code=vid" class="sref">vidi/a>->ia href="+code=layer" class="sref">layeri/a>.ia href="+code=nam3" class="sref">nam3i/a>, ia href="+code=CAIF_LAYER_NAME_SZ" class="sref">CAIF_LAYER_NAME_SZtia> - 1, ispa  class="string">"vid1"tispa 
); t 33tia>        return &ia href="+code=vid" class="sref">vidi/a>->ia href="+code=layer" class="sref">layeri/a>; t 34tia>} t 35i/a> t 36i/a>static inttia href="+code=cfvidl_receive" class="sref">cfvidl_receivei/a>(structtia href="+code=cflayer" class="sref">cflayeri/a> *ia href="+code=layr" class="sref">layri/a>, structtia href="+code=cfpkt" class="sref">cfpkti/a> *ia href="+code=pkt" class="sref">pkti/a>) t 37tia>{ t 38tia>        ia href="+code=u32" class="sref">u32tia> ia href="+code=videoheader" class="sref">videoheaderi/a>; t 39tia>        if (ia href="+code=cfpkt_extr_head" class="sref">cfpkt_extr_headi/a>(ia href="+code=pkt" class="sref">pkti/a>, &ia href="+code=videoheader" class="sref">videoheaderi/a>, 4) < 0) { t 40tia>                ia href="+code=pr_err" class="sref">pr_erri/a>(ispa  class="string">"Packet is erroneous!\n"tispa 
); t 41tia>                ia href="+code=cfpkt_destroy" class="sref">cfpkt_destroyi/a>(ia href="+code=pkt" class="sref">pkti/a>); t 42tia>                return -ia href="+code=EPROTO" class="sref">EPROTOi/a>; t 43tia>        } t 44tia>        return ia href="+code=layr" class="sref">layri/a>->ia href="+code=up" class="sref">upi/a>->ia href="+code=receive" class="sref">receivei/a>(ia href="+code=layr" class="sref">layri/a>->ia href="+code=up" class="sref">upi/a>, ia href="+code=pkt" class="sref">pkti/a>); t 45tia>} t 46i/a> t 47i/a>static inttia href="+code=cfvidl_transmit" class="sref">cfvidl_transmiti/a>(structtia href="+code=cflayer" class="sref">cflayeri/a> *ia href="+code=layr" class="sref">layri/a>, structtia href="+code=cfpkt" class="sref">cfpkti/a> *ia href="+code=pkt" class="sref">pkti/a>) t 48tia>{ t 49tia>        structtia href="+code=cfsrvl" class="sref">cfsrvli/a> *ia href="+code=service" class="sref">servicei/a> =tia href="+code=container_obj" class="sref">container_obji/a>(ia href="+code=layr" class="sref">layri/a>); t 50tia>        structtia href="+code=caif_payload_info" class="sref">caif_payload_infoi/a> *ia href="+code=info" class="sref">infoi/a>; t 51tia>        ia href="+code=u32" class="sref">u32tia> ia href="+code=videoheader" class="sref">videoheaderi/a> =t0; t 52tia>        inttia href="+code=ret" class="sref">reti/a>; t 53i/a> t 54tia>        if (!ia href="+code=cfsrvl_ready" class="sref">cfsrvl_readyi/a>(ia href="+code=service" class="sref">servicei/a>, &ia href="+code=ret" class="sref">reti/a>)) { t 55tia>                ia href="+code=cfpkt_destroy" class="sref">cfpkt_destroyi/a>(ia href="+code=pkt" class="sref">pkti/a>); t 56tia>                return ia href="+code=ret" class="sref">reti/a>; t 57tia>        } t 58i/a> t 59tia>        ia href="+code=cfpkt_add_head" class="sref">cfpkt_add_headi/a>(ia href="+code=pkt" class="sref">pkti/a>, &ia href="+code=videoheader" class="sref">videoheaderi/a>, 4); t 60tia>        ispa  class="comment">/* Add info for MUX-layer to route the packet out */tispa 
 t 61tia>        ia href="+code=info" class="sref">infoi/a> =tia href="+code=cfpkt_info" class="sref">cfpkt_infoi/a>(ia href="+code=pkt" class="sref">pkti/a>); t 62tia>        ia href="+code=info" class="sref">infoi/a>->ia href="+code=channel_id" class="sref">channel_idi/a> =tia href="+code=service" class="sref">servicei/a>->ia href="+code=layer" class="sref">layeri/a>.ia href="+code=id" class="sref">idi/a>; t 63tia>        ia href="+code=info" class="sref">infoi/a>->ia href="+code=dev_info" class="sref">dev_infoi/a> = &ia href="+code=service" class="sref">servicei/a>->ia href="+code=dev_info" class="sref">dev_infoi/a>; t 64tia>        return ia href="+code=layr" class="sref">layri/a>->ia href="+code=dn" class="sref">dni/a>->ia href="+code=transmit" class="sref">transmiti/a>(ia href="+code=layr" class="sref">layri/a>->ia href="+code=dn" class="sref">dni/a>, ia href="+code=pkt" class="sref">pkti/a>); t 65tia>} t 66tia>
The original LXR software by the LXR communityi/a>, this experimental versvaluby lxr@linux.noi/a>. i/div idiv class="subfooter"> lxr.linux.no kindly hosteduby Redpill Linpro ASi/a>, provider of Linux consulting and opera> s services since 1995. i/div i/body i/html