linux/net/bluetooth/sco.c
<<
< /spa" /form a < href="../linux+v3 va1/net/bopttooth/sco.c"> < img src="../.static/gfx/right.png" alt=">>"> /spa" spa" class="lxr_search"> < < input typtiohidden" namtionavtarget" < input typtiotext" namtiosearch" idiosearch"> < butt.13typtiosubmit">Search < Prefs /a> /spa" < /div < form ac.13"="ajax+*" method="post" onsubmit="return false;"> input typtiohidden" namtioajax_lookup" idioajax_lookup" < /form < div class="headingbott.m">
div idiofile_contents"
   1 /a> spa" class="comment">/* /spa"
	   2 /a> spa" class="comment">   BoptZ - Bopttooth protocol stack for Linux /spa"
	   3 /a> spa" class="comment">   Copyright (C) 2000-2001 Qualcomm Incorporated /spa"
	   4 /a>
   5 /a> spa" class="comment">   Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> /spa"
	   6 /a>
   7 /a> spa" class="comment">   This program is free software; you ca" redistribute it and/or modify /spa"
	   8 /a> spa" class="comment">   it under the terms of the GNU General Public License vers4.132 as /spa"
	   9 /a> spa" class="comment">   published by the Free Software Founda.13"; /spa"
	  ="v3a>
  11 /a> spa" class="comment">   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS /spa"
	  12 /a> spa" class="comment">   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, /spa"
	  13 /a> spa" class="comment">   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. /spa"
	  14 /a> spa" class="comment">   IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY /spa"
	  15 /a> spa" class="comment">   CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES /spa"
	  16 /a> spa" class="comment">   WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN /spa"
	  17 /a> spa" class="comment">   ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF /spa"
	  18 /a> spa" class="comment">   OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. /spa"
	  19v3a>
  20 /a> spa" class="comment">   ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, /spa"
	  21 /a> spa" class="comment">   COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS /spa"
	  22 /a> spa" class="comment">   SOFTWARE IS DISCLAIMED. /spa"
	  23 /a> spa" class="comment">*/ /spa"
	  24 /a>
  25 /a> spa" class="comment">/* Bopttooth SCO sockets. */ /spa"
	  26 /a>
  27 /a>#include <linux/module.h /a>>
  28 /a>#include <linux/debugfs.h /a>>
  29 /a>#include <linux/seq_file.h /a>>
  3"v3a>
  31 /a>#include <net/bopttooth/bopttooth.h /a>>
  32 /a>#include <net/bopttooth/hci_core.h /a>>
  33 /a>#include <net/bopttooth/sco.h /a>>
  34 /a>
  35 /a>static  a href="+code=bool" class="sref">bool /a>  a href="+code=disable_esco" class="sref">disable_esco /a>;
  36 /a>
  37 /a>static const struct  a href="+code=proto_ops" class="sref">proto_ops /a>  a href="+code=sco_sock_ops" class="sref">sco_sock_ops /a>;
  38 /a>
  39 /a>static struct  a href="+code=bt_sock_list" class="sref">bt_sock_list /a>  a href="+code=sco_sk_list" class="sref">sco_sk_list /a> = {	  4"v3a>        . a href="+code=lock" class="sref">lock /a> =  a href="+code=__RW_LOCK_UNLOCKED" class="sref">__RW_LOCK_UNLOCKED /a>( a href="+code=sco_sk_list" class="sref">sco_sk_list /a>. a href="+code=lock" class="sref">lock /a>)	  41 /a>};
  42 /a>
  43 /a>static void  a href="+code=__sco_chan_add" class="sref">__sco_chan_add /a>(struct  a href="+code=sco_conn" class="sref">sco_conn /a> * a href="+code=conn" class="sref">conn /a>, struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>, struct  a href="+code=sock" class="sref">sock /a> * a href="+code=parent" class="sref">parent /a>);
  44 /a>static void  a href="+code=sco_chan_del" class="sref">sco_chan_del /a>(struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>, int  a href="+code=err" class="sref">err /a>);
  45 /a>
  46 /a>static void  a href="+code=sco_sock_close" class="sref">sco_sock_close /a>(struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>);
  47 /a>static void  a href="+code=sco_sock_kill" class="sref">sco_sock_kill /a>(struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>);
  48 /a>
  49 /a> spa" class="comment">/* ---- SCO timers ---- */ /spa"
	  50 /a>static void  a href="+code=sco_sock_timeout" class="sref">sco_sock_timeout /a>(unsigned long  a href="+code=arg" class="sref">arg /a>)	  51 /a>{	  52v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a> = (struct  a href="+code=sock" class="sref">sock /a> *)  a href="+code=arg" class="sref">arg /a>;
  53 /a>
  54v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sock %p state %d" /spa"
,  a href="+code=sk" class="sref">sk /a>,  a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a>);
  55 /a>
  56v3a>         a href="+code=bh_lock_sock" class="sref">bh_lock_sock /a>( a href="+code=sk" class="sref">sk /a>);
  57v3a>         a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_err" class="sref">sk_err /a> =  a href="+code=ETIMEDOUT" class="sref">ETIMEDOUT /a>;
  58v3a>         a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state_change" class="sref">sk_state_change /a>( a href="+code=sk" class="sref">sk /a>);
  59v3a>         a href="+code=bh_unlock_sock" class="sref">bh_unlock_sock /a>( a href="+code=sk" class="sref">sk /a>);
  6"v3a>
  61v3a>         a href="+code=sco_sock_kill" class="sref">sco_sock_kill /a>( a href="+code=sk" class="sref">sk /a>);
  62v3a>         a href="+code=sock_put" class="sref">sock_put /a>( a href="+code=sk" class="sref">sk /a>);
  63 /a>}
  64 /a>
  65 /a>static void  a href="+code=sco_sock_set_timer" class="sref">sco_sock_set_timer /a>(struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>, long  a href="+code=timeout" class="sref">timeout /a>)	  66 /a>{	  67v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sock %p state %d timeout %ld" /spa"
,  a href="+code=sk" class="sref">sk /a>,  a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a>,  a href="+code=timeout" class="sref">timeout /a>);
  68v3a>         a href="+code=sk_reset_timer" class="sref">sk_reset_timer /a>( a href="+code=sk" class="sref">sk /a>, & a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_timer" class="sref">sk_timer /a>,  a href="+code=jiffies" class="sref">jiffiesv3a> +  a href="+code=timeout" class="sref">timeout /a>);
  69 /a>}
  7"v3a>
  71 /a>static void  a href="+code=sco_sock_clear_timer" class="sref">sco_sock_clear_timer /a>(struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>)
  72 /a>{	  73v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sock %p state %d" /spa"
,  a href="+code=sk" class="sref">sk /a>,  a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a>);
  74v3a>         a href="+code=sk_stop_timer" class="sref">sk_stop_timer /a>( a href="+code=sk" class="sref">sk /a>, & a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_timer" class="sref">sk_timer /a>);
  75 /a>}
  76 /a>
  77 /a> spa" class="comment">/* ---- SCO connec.13"s ---- */ /spa"
	  78 /a>static struct  a href="+code=sco_conn" class="sref">sco_conn /a> * a href="+code=sco_conn_add" class="sref">sco_conn_add /a>(struct  a href="+code=hci_conn" class="sref">hci_conn /a> * a href="+code=hcon" class="sref">hcon /a>)
  79 /a>{	  8"v3a>        struct  a href="+code=hci_dev" class="sref">hci_dev /a> * a href="+code=hdev" class="sref">hdev /a> =  a href="+code=hcon" class="sref">hcon /a>-> a href="+code=hdev" class="sref">hdev /a>;
  81v3a>        struct  a href="+code=sco_conn" class="sref">sco_conn /a> * a href="+code=conn" class="sref">conn /a> =  a href="+code=hcon" class="sref">hcon /a>-> a href="+code=sco_data" class="sref">sco_data /a>;
  82 /a>
  83v3a>        if ( a href="+code=conn" class="sref">conn /a>)
  84v3a>                return  a href="+code=conn" class="sref">conn /a>;
  85 /a>
  86v3a>         a href="+code=conn" class="sref">conn /a> =  a href="+code=kzalloc" class="sref">kzalloc /a>(sizeof(struct  a href="+code=sco_conn" class="sref">sco_conn /a>),  a href="+code=GFP_ATOMIC" class="sref">GFP_ATOMIC /a>);
  87v3a>        if (! a href="+code=conn" class="sref">conn /a>)
  88v3a>                return  a href="+code=NULL" class="sref">NULL /a>;
  89v3a>
  90v3a>         a href="+code=spin_lock_init" class="sref">spin_lock_init /a>(& a href="+code=conn" class="sref">conn /a>-> a href="+code=lock" class="sref">lock /a>);
  91v3a>
  92v3a>         a href="+code=hcon" class="sref">hcon /a>-> a href="+code=sco_data" class="sref">sco_data /a> =  a href="+code=conn" class="sref">conn /a>;
  93v3a>         a href="+code=conn" class="sref">conn /a>-> a href="+code=hcon" class="sref">hcon /a> =  a href="+code=hcon" class="sref">hcon /a>;
  94 /a>
  95v3a>         a href="+code=conn" class="sref">conn /a>-> a href="+code=src" class="sref">src /a> = & a href="+code=hdev" class="sref">hdev /a>-> a href="+code=bdaddr" class="sref">bdaddr /a>;
  96v3a>         a href="+code=conn" class="sref">conn /a>-> a href="+code=dst" class="sref">dst /a> = & a href="+code=hcon" class="sref">hcon /a>-> a href="+code=dst" class="sref">dst /a>;
  97 /a>
  98v3a>        if ( a href="+code=hdev" class="sref">hdev /a>-> a href="+code=sco_mtu" class="sref">sco_mtuv3a> > 0)
  99v3a>                 a href="+code=conn" class="sref">conn /a>-> a href="+code=mtu" class="sref">mtuv3a> =  a href="+code=hdev" class="sref">hdev /a>-> a href="+code=sco_mtu" class="sref">sco_mtuv3a>;
 100v3a>        else
 101v3a>                 a href="+code=conn" class="sref">conn /a>-> a href="+code=mtu" class="sref">mtuv3a> = 60;
 102 /a>
 103v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"hcon %p conn %p" /spa"
,  a href="+code=hcon" class="sref">hcon /a>,  a href="+code=conn" class="sref">conn /a>);
 104 /a>
 105v3a>        return  a href="+code=conn" class="sref">conn /a>;
 106 /a>}
 107 /a>
 108 /a>static struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sco_chan_get" class="sref">sco_chan_get /a>(struct  a href="+code=sco_conn" class="sref">sco_conn /a> * a href="+code=conn" class="sref">conn /a>)
 109 /a>{	 11"v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a> =  a href="+code=NULL" class="sref">NULL /a>;
 111v3a>         a href="+code=sco_conn_lock" class="sref">sco_conn_lock /a>( a href="+code=conn" class="sref">conn /a>);
 112v3a>         a href="+code=sk" class="sref">sk /a> =  a href="+code=conn" class="sref">conn /a>-> a href="+code=sk" class="sref">sk /a>;
 113v3a>         a href="+code=sco_conn_unlock" class="sref">sco_conn_unlock /a>( a href="+code=conn" class="sref">conn /a>);
 114v3a>        return  a href="+code=sk" class="sref">sk /a>;
 115 /a>}
 116 /a>
 117 /a>static int  a href="+code=sco_conn_del" class="sref">sco_conn_del /a>(struct  a href="+code=hci_conn" class="sref">hci_conn /a> * a href="+code=hcon" class="sref">hcon /a>, int  a href="+code=err" class="sref">err /a>)
 118 /a>{	 119v3a>        struct  a href="+code=sco_conn" class="sref">sco_conn /a> * a href="+code=conn" class="sref">conn /a> =  a href="+code=hcon" class="sref">hcon /a>-> a href="+code=sco_data" class="sref">sco_data /a>;
 12"v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>;
 121v3a>
 122v3a>        if (! a href="+code=conn" class="sref">conn /a>)
 123v3a>                return 0;
 124 /a>
 125v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"hcon %p conn %p, err %d" /spa"
,  a href="+code=hcon" class="sref">hcon /a>,  a href="+code=conn" class="sref">conn /a>,  a href="+code=err" class="sref">err /a>);
 126 /a>
 127v3a>         spa" class="comment">/* Kill socket */ /spa"
	 128v3a>         a href="+code=sk" class="sref">sk /a> =  a href="+code=sco_chan_get" class="sref">sco_chan_get /a>( a href="+code=conn" class="sref">conn /a>);
 129v3a>        if ( a href="+code=sk" class="sref">sk /a>) {	 130v3a>                 a href="+code=bh_lock_sock" class="sref">bh_lock_sock /a>( a href="+code=sk" class="sref">sk /a>);
 131v3a>                 a href="+code=sco_sock_clear_timer" class="sref">sco_sock_clear_timer /a>( a href="+code=sk" class="sref">sk /a>);
 132v3a>                 a href="+code=sco_chan_del" class="sref">sco_chan_del /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=err" class="sref">err /a>);
 133v3a>                 a href="+code=bh_unlock_sock" class="sref">bh_unlock_sock /a>( a href="+code=sk" class="sref">sk /a>);
 134 /a>
 135v3a>                 a href="+code=sco_conn_lock" class="sref">sco_conn_lock /a>( a href="+code=conn" class="sref">conn /a>);
 136v3a>                 a href="+code=conn" class="sref">conn /a>-> a href="+code=sk" class="sref">sk /a> =  a href="+code=NULL" class="sref">NULL /a>;
 137v3a>                 a href="+code=sco_pi" class="sref">sco_pi /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=conn" class="sref">conn /a> =  a href="+code=NULL" class="sref">NULL /a>;
 138v3a>                 a href="+code=sco_conn_unlock" class="sref">sco_conn_unlock /a>( a href="+code=conn" class="sref">conn /a>);
 139v3a>
 140v3a>                if ( a href="+code=conn" class="sref">conn /a>-> a href="+code=hcon" class="sref">hcon /a>)
 141v3a>                         a href="+code=hci_conn_put" class="sref">hci_conn_put /a>( a href="+code=conn" class="sref">conn /a>-> a href="+code=hcon" class="sref">hcon /a>);
 142 /a>
 143v3a>                 a href="+code=sco_sock_kill" class="sref">sco_sock_kill /a>( a href="+code=sk" class="sref">sk /a>);
 144v3a>        }
 145 /a>
 146v3a>         a href="+code=hcon" class="sref">hcon /a>-> a href="+code=sco_data" class="sref">sco_data /a> =  a href="+code=NULL" class="sref">NULL /a>;
 147v3a>         a href="+code=kfree" class="sref">kfree /a>( a href="+code=conn" class="sref">conn /a>);
 148v3a>        return 0;
 149 /a>}
 15"v3a>
 151 /a>static int  a href="+code=sco_chan_add" class="sref">sco_chan_add /a>(struct  a href="+code=sco_conn" class="sref">sco_conn /a> * a href="+code=conn" class="sref">conn /a>, struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>,
 152v3a>                        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=parent" class="sref">parent /a>)
 153 /a>{	 154v3a>        int  a href="+code=err" class="sref">err /a> = 0;
 155 /a>
 156v3a>         a href="+code=sco_conn_lock" class="sref">sco_conn_lock /a>( a href="+code=conn" class="sref">conn /a>);
 157v3a>        if ( a href="+code=conn" class="sref">conn /a>-> a href="+code=sk" class="sref">sk /a>)
 158v3a>                 a href="+code=err" class="sref">err /a> = - a href="+code=EBUSY" class="sref">EBUSY /a>;
 159v3a>        else
 160v3a>                 a href="+code=__sco_chan_add" class="sref">__sco_chan_add /a>( a href="+code=conn" class="sref">conn /a>,  a href="+code=sk" class="sref">sk /a>,  a href="+code=parent" class="sref">parent /a>);
 161v3a>
 162v3a>         a href="+code=sco_conn_unlock" class="sref">sco_conn_unlock /a>( a href="+code=conn" class="sref">conn /a>);
 163v3a>        return  a href="+code=err" class="sref">err /a>;
 164 /a>}
 165 /a>
 166 /a>static int  a href="+code=sco_connect" class="sref">sco_connect /a>(struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>)
 167v3a>{	 168v3a>         a href="+code=bdaddr_t" class="sref">bdaddr_t /a> * a href="+code=src" class="sref">src /a> = & a href="+code=bt_sk" class="sref">bt_sk /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=src" class="sref">src /a>;
 169v3a>         a href="+code=bdaddr_t" class="sref">bdaddr_t /a> * a href="+code=dst" class="sref">dst /a> = & a href="+code=bt_sk" class="sref">bt_sk /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=dst" class="sref">dst /a>;
 17"v3a>        struct  a href="+code=sco_conn" class="sref">sco_conn /a> * a href="+code=conn" class="sref">conn /a>;
 171v3a>        struct  a href="+code=hci_conn" class="sref">hci_conn /a> * a href="+code=hcon" class="sref">hcon /a>;
 172v3a>        struct  a href="+code=hci_dev" class="sref">hci_dev /a>  * a href="+code=hdev" class="sref">hdev /a>;
 173v3a>        int  a href="+code=err" class="sref">err /a>,  a href="+code=type" class="sref">type /a>;
 174 /a>
 175v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"%s -> %s" /spa"
,  a href="+code=batostr" class="sref">batostr /a>( a href="+code=src" class="sref">src /a>),  a href="+code=batostr" class="sref">batostr /a>( a href="+code=dst" class="sref">dst /a>));
 176 /a>
 177v3a>         a href="+code=hdev" class="sref">hdev /a> =  a href="+code=hci_get_route" class="sref">hci_get_route /a>( a href="+code=dst" class="sref">dst /a>,  a href="+code=src" class="sref">src /a>);
 178v3a>        if (! a href="+code=hdev" class="sref">hdev /a>)
 179v3a>                return - a href="+code=EHOSTUNREACH" class="sref">EHOSTUNREACH /a>;
 18"v3a>
 181v3a>         a href="+code=hci_dev_lock" class="sref">hci_dev_lock /a>( a href="+code=hdev" class="sref">hdev /a>);
 182 /a>
 183v3a>        if ( a href="+code=lmp_esco_capable" class="sref">lmp_esco_capable /a>( a href="+code=hdev" class="sref">hdev /a>) && ! a href="+code=disable_esco" class="sref">disable_esco /a>)
 184v3a>                 a href="+code=type" class="sref">type /a> =  a href="+code=ESCO_LINK" class="sref">ESCO_LINK /a>;
 185v3a>        else
 186v3a>                 a href="+code=type" class="sref">type /a> =  a href="+code=SCO_LINK" class="sref">SCO_LINK /a>;
 187 /a>
 188v3a>         a href="+code=hcon" class="sref">hcon /a> =  a href="+code=hci_connect" class="sref">hci_connect /a>( a href="+code=hdev" class="sref">hdev /a>,  a href="+code=type" class="sref">type /a>,  a href="+code=dst" class="sref">dst /a>,  a href="+code=BDADDR_BREDR" class="sref">BDADDR_BREDR /a>,  a href="+code=BT_SECURITY_LOW" class="sref">BT_SECURITY_LOW /a>,
 189v3a>                            a href="+code=HCI_AT_NO_BONDING" class="sref">HCI_AT_NO_BONDING /a>);
 190v3a>        if ( a href="+code=IS_ERR" class="sref">IS_ERR /a>( a href="+code=hcon" class="sref">hcon /a>)) {	 191v3a>                 a href="+code=err" class="sref">err /a> =  a href="+code=PTR_ERR" class="sref">PTR_ERR /a>( a href="+code=hcon" class="sref">hcon /a>);
 192v3a>                goto  a href="+code=done" class="sref">done /a>;
 193v3a>        }
 194 /a>
 195v3a>         a href="+code=conn" class="sref">conn /a> =  a href="+code=sco_conn_add" class="sref">sco_conn_add /a>( a href="+code=hcon" class="sref">hcon /a>);
 196v3a>        if (! a href="+code=conn" class="sref">conn /a>) {	 197v3a>                 a href="+code=hci_conn_put" class="sref">hci_conn_put /a>( a href="+code=hcon" class="sref">hcon /a>);
 198v3a>                 a href="+code=err" class="sref">err /a> = - a href="+code=ENOMEM" class="sref">ENOMEM /a>;
 199v3a>                goto  a href="+code=done" class="sref">done /a>;
 200v3a>        }
 201v3a>
 202v3a>         spa" class="comment">/* Update source addr of the socket */ /spa"
	 203v3a>         a href="+code=bacpy" class="sref">bacpy /a>( a href="+code=src" class="sref">src /a>,  a href="+code=conn" class="sref">conn /a>-> a href="+code=src" class="sref">src /a>);
 204 /a>
 205v3a>         a href="+code=err" class="sref">err /a> =  a href="+code=sco_chan_add" class="sref">sco_chan_add /a>( a href="+code=conn" class="sref">conn /a>,  a href="+code=sk" class="sref">sk /a>,  a href="+code=NULL" class="sref">NULL /a>);
 206v3a>        if ( a href="+code=err" class="sref">err /a>)
 207v3a>                goto  a href="+code=done" class="sref">done /a>;
 208 /a>
 209v3a>        if ( a href="+code=hcon" class="sref">hcon /a>-> a href="+code=state" class="sref">state /a> ==  a href="+code=BT_CONNECTED" class="sref">BT_CONNECTED /a>) {	 210v3a>                 a href="+code=sco_sock_clear_timer" class="sref">sco_sock_clear_timer /a>( a href="+code=sk" class="sref">sk /a>);
 211v3a>                 a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> =  a href="+code=BT_CONNECTED" class="sref">BT_CONNECTED /a>;
 212v3a>        } else {	 213v3a>                 a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> =  a href="+code=BT_CONNECT" class="sref">BT_CONNECT /a>;
 214v3a>                 a href="+code=sco_sock_set_timer" class="sref">sco_sock_set_timer /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_sndtimeo" class="sref">sk_sndtimeo /a>);
 215v3a>        }
 216 /a>
 217 /a> a href="+code=done" class="sref">done /a>:
 218v3a>         a href="+code=hci_dev_unlock" class="sref">hci_dev_unlock /a>( a href="+code=hdev" class="sref">hdev /a>);
 219v3a>         a href="+code=hci_dev_put" class="sref">hci_dev_put /a>( a href="+code=hdev" class="sref">hdev /a>);
 22"v3a>        return  a href="+code=err" class="sref">err /a>;
 221v3a>}
 222 /a>
 223 /a>static int  a href="+code=sco_send_framt" class="sref">sco_send_framt /a>(struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>, struct  a href="+code=msghdr" class="sref">msghdr /a> * a href="+code=msg" class="sref">msg /a>, int  a href="+code=len" class="sref">len /a>)
 224 /a>{	 225v3a>        struct  a href="+code=sco_conn" class="sref">sco_conn /a> * a href="+code=conn" class="sref">conn /a> =  a href="+code=sco_pi" class="sref">sco_pi /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=conn" class="sref">conn /a>;
 226v3a>        struct  a href="+code=sk_buff" class="sref">sk_buff /a> * a href="+code=skb" class="sref">skb /a>;
 227v3a>        int  a href="+code=err" class="sref">err /a>;
 228 /a>
 229v3a>         spa" class="comment">/* Check outgoing MTU */ /spa"
	 230v3a>        if ( a href="+code=len" class="sref">len /a> >  a href="+code=conn" class="sref">conn /a>-> a href="+code=mtu" class="sref">mtuv3a>)
 231v3a>                return - a href="+code=EINVAL" class="sref">EINVAL /a>;
 232 /a>
 233v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sk %p len %d" /spa"
,  a href="+code=sk" class="sref">sk /a>,  a href="+code=len" class="sref">len /a>);
 234 /a>
 235v3a>         a href="+code=skb" class="sref">skb /a> =  a href="+code=bt_skb_send_alloc" class="sref">bt_skb_send_alloc /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=len" class="sref">len /a>,  a href="+code=msg" class="sref">msg /a>-> a href="+code=msg_flags" class="sref">msg_flags /a> &  a href="+code=MSG_DONTWAIT" class="sref">MSG_DONTWAIT /a>, & a href="+code=err" class="sref">err /a>);
 236v3a>        if (! a href="+code=skb" class="sref">skb /a>)
 237v3a>                return  a href="+code=err" class="sref">err /a>;
 238 /a>
 239v3a>        if ( a href="+code=memcpy_fromiovec" class="sref">memcpy_fromiovec /a>( a href="+code=skb_put" class="sref">skb_put /a>( a href="+code=skb" class="sref">skb /a>,  a href="+code=len" class="sref">len /a>),  a href="+code=msg" class="sref">msg /a>-> a href="+code=msg_iov" class="sref">msg_iov /a>,  a href="+code=len" class="sref">len /a>)) {	 240v3a>                 a href="+code=kfree_skb" class="sref">kfree_skb /a>( a href="+code=skb" class="sref">skb /a>);
 241v3a>                return - a href="+code=EFAULT" class="sref">EFAULT /a>;
 242v3a>        }
 243v3a>
 244v3a>         a href="+code=hci_send_sco" class="sref">hci_send_sco /a>( a href="+code=conn" class="sref">conn /a>-> a href="+code=hcon" class="sref">hcon /a>,  a href="+code=skb" class="sref">skb /a>);
 245 /a>
 246v3a>        return  a href="+code=len" class="sref">len /a>;
 247v3a>}
 248 /a>
 249 /a>static void  a href="+code=sco_recv_framt" class="sref">sco_recv_framt /a>(struct  a href="+code=sco_conn" class="sref">sco_conn /a> * a href="+code=conn" class="sref">conn /a>, struct  a href="+code=sk_buff" class="sref">sk_buff /a> * a href="+code=skb" class="sref">skb /a>)
 25"v3a>{	 251v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a> =  a href="+code=sco_chan_get" class="sref">sco_chan_get /a>( a href="+code=conn" class="sref">conn /a>);
 252 /a>
 253v3a>        if (! a href="+code=sk" class="sref">sk /a>)
 254v3a>                goto  a href="+code=drop" class="sref">drop /a>;
 255 /a>
 256v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sk %p len %d" /spa"
,  a href="+code=sk" class="sref">sk /a>,  a href="+code=skb" class="sref">skb /a>-> a href="+code=len" class="sref">len /a>);
 257 /a>
 258v3a>        if ( a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> !=  a href="+code=BT_CONNECTED" class="sref">BT_CONNECTED /a>)
 259v3a>                goto  a href="+code=drop" class="sref">drop /a>;
 26"v3a>
 261v3a>        if (! a href="+code=sock_queue_rcv_skb" class="sref">sock_queue_rcv_skb /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=skb" class="sref">skb /a>))
 262v3a>                return;
 263v3a>
 264 /a> a href="+code=drop" class="sref">drop /a>:
 265v3a>         a href="+code=kfree_skb" class="sref">kfree_skb /a>( a href="+code=skb" class="sref">skb /a>);
 266 /a>}
 267 /a>
 268v3a> spa" class="comment">/* -------- Socket interface ---------- */ /spa"
	 269 /a>static struct  a href="+code=sock" class="sref">sock /a> * a href="+code=__sco_get_sock_listen_by_addr" class="sref">__sco_get_sock_listen_by_addr /a>( a href="+code=bdaddr_t" class="sref">bdaddr_t /a> * a href="+code=ba" class="sref">ba /a>)
 27"v3a>{	 271v3a>        struct  a href="+code=hlist_node" class="sref">hlist_node /a> * a href="+code=node" class="sref">node /a>;
 272v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>;
 273v3a>
 274v3a>         a href="+code=sk_for_each" class="sref">sk_for_each /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=node" class="sref">node /a>, & a href="+code=sco_sk_list" class="sref">sco_sk_list /a>. a href="+code=head" class="sref">head /a>) {	 275v3a>                if ( a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> !=  a href="+code=BT_LISTEN" class="sref">BT_LISTEN /a>)
 276v3a>                        continue;
 277 /a>
 278v3a>                if (! a href="+code=bacmp" class="sref">bacmp /a>(& a href="+code=bt_sk" class="sref">bt_sk /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=src" class="sref">src /a>,  a href="+code=ba" class="sref">ba /a>))
 279v3a>                        return  a href="+code=sk" class="sref">sk /a>;
 280v3a>        }
 281v3a>
 282v3a>        return  a href="+code=NULL" class="sref">NULL /a>;
 283v3a>}
 284 /a>
 285v3a> spa" class="comment">/* Find socket listening on source bdaddr. /spa"
	 286v3a> spa" class="comment"> * Returns closest match. /spa"
	 287 /a> spa" class="comment"> */ /spa"
	 288 /a>static struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sco_get_sock_listen" class="sref">sco_get_sock_listen /a>( a href="+code=bdaddr_t" class="sref">bdaddr_t /a> * a href="+code=src" class="sref">src /a>)	 289 /a>{	 29"v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a> =  a href="+code=NULL" class="sref">NULL /a>, * a href="+code=sk1" class="sref">sk1 /a> =  a href="+code=NULL" class="sref">NULL /a>;
 291v3a>        struct  a href="+code=hlist_node" class="sref">hlist_node /a> * a href="+code=node" class="sref">node /a>;
 292 /a>
 293v3a>         a href="+code=read_lock" class="sref">read_lock /a>(& a href="+code=sco_sk_list" class="sref">sco_sk_list /a>. a href="+code=lock" class="sref">lock /a>);
 294 /a>
 295v3a>         a href="+code=sk_for_each" class="sref">sk_for_each /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=node" class="sref">node /a>, & a href="+code=sco_sk_list" class="sref">sco_sk_list /a>. a href="+code=head" class="sref">head /a>) {	 296v3a>                if ( a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> !=  a href="+code=BT_LISTEN" class="sref">BT_LISTEN /a>)
 297v3a>                        continue;
 298 /a>
 299v3a>                 spa" class="comment">/* Exact match. */ /spa"
	 300v3a>                if (! a href="+code=bacmp" class="sref">bacmp /a>(& a href="+code=bt_sk" class="sref">bt_sk /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=src" class="sref">src /a>,  a href="+code=src" class="sref">src /a>))
 301v3a>                        break;
 302 /a>
 303v3a>                 spa" class="comment">/* Closest match */ /spa"
	 304v3a>                if (! a href="+code=bacmp" class="sref">bacmp /a>(& a href="+code=bt_sk" class="sref">bt_sk /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=src" class="sref">src /a>,  a href="+code=BDADDR_ANY" class="sref">BDADDR_ANY /a>))
 305v3a>                         a href="+code=sk1" class="sref">sk1 /a> =  a href="+code=sk" class="sref">sk /a>;
 306v3a>        }
 307 /a>
 308v3a>         a href="+code=read_unlock" class="sref">read_unlock /a>(& a href="+code=sco_sk_list" class="sref">sco_sk_list /a>. a href="+code=lock" class="sref">lock /a>);
 309v3a>
 31"v3a>        return  a href="+code=node" class="sref">node /a> ?  a href="+code=sk" class="sref">sk /a> :  a href="+code=sk1" class="sref">sk1 /a>;
 311v3a>}
 312 /a>
 313 /a>static void  a href="+code=sco_sock_destruct" class="sref">sco_sock_destruct /a>(struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>)
 314 /a>{	 315v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sk %p" /spa"
,  a href="+code=sk" class="sref">sk /a>);
 316 /a>
 317v3a>         a href="+code=skb_queue_purge" class="sref">skb_queue_purge /a>(& a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_receive_queue" class="sref">sk_receive_queue /a>);
 318v3a>         a href="+code=skb_queue_purge" class="sref">skb_queue_purge /a>(& a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_write_queue" class="sref">sk_write_queue /a>);
 319 /a>}
 32"v3a>
 321 /a>static void  a href="+code=sco_sock_cleanup_listen" class="sref">sco_sock_cleanup_listen /a>(struct  a href="+code=sock" class="sref">sock /a> * a href="+code=parent" class="sref">parent /a>)
 322 /a>{	 323v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>;
 324 /a>
 325v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"parent %p" /spa"
,  a href="+code=parent" class="sref">parent /a>);
 326 /a>
 327v3a>         spa" class="comment">/* Close not yet accepted channels */ /spa"
	 328v3a>        while (( a href="+code=sk" class="sref">sk /a> =  a href="+code=bt_accept_dequeue" class="sref">bt_accept_dequeue /a>( a href="+code=parent" class="sref">parent /a>,  a href="+code=NULL" class="sref">NULL /a>))) {	 329v3a>                 a href="+code=sco_sock_close" class="sref">sco_sock_close /a>( a href="+code=sk" class="sref">sk /a>);
 330v3a>                 a href="+code=sco_sock_kill" class="sref">sco_sock_kill /a>( a href="+code=sk" class="sref">sk /a>);
 331v3a>        }
 332 /a>
 333v3a>         a href="+code=parent" class="sref">parent /a>-> a href="+code=sk_state" class="sref">sk_state /a>  =  a href="+code=BT_CLOSED" class="sref">BT_CLOSED /a>;
 334v3a>         a href="+code=sock_set_flag" class="sref">sock_set_flag /a>( a href="+code=parent" class="sref">parent /a>,  a href="+code=SOCK_ZAPPED" class="sref">SOCK_ZAPPED /a>);
 335v3a>}
 336 /a>
 337 /a> spa" class="comment">/* Kill socket (only if zapped and orphan) /spa"
	 338v3a> spa" class="comment"> * Must be called on unlocked socket. /spa"
	 339v3a> spa" class="comment"> */ /spa"
	 340v3a>static void  a href="+code=sco_sock_kill" class="sref">sco_sock_kill /a>(struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>)
 341v3a>{	 342v3a>        if (! a href="+code=sock_flag" class="sref">sock_flag /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=SOCK_ZAPPED" class="sref">SOCK_ZAPPED /a>) ||  a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_socket" class="sref">sk_socket /a>)
 343v3a>                return;
 344 /a>
 345v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sk %p state %d" /spa"
,  a href="+code=sk" class="sref">sk /a>,  a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a>);
 346 /a>
 347v3a>         spa" class="comment">/* Kill poor orphan */ /spa"
	 348v3a>         a href="+code=bt_sock_unlink" class="sref">bt_sock_unlink /a>(& a href="+code=sco_sk_list" class="sref">sco_sk_list /a>,  a href="+code=sk" class="sref">sk /a>);
 349v3a>         a href="+code=sock_set_flag" class="sref">sock_set_flag /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=SOCK_DEAD" class="sref">SOCK_DEAD /a>);
 350v3a>         a href="+code=sock_put" class="sref">sock_put /a>( a href="+code=sk" class="sref">sk /a>);
 351v3a>}
 352 /a>
 353 /a>static void  a href="+code=__sco_sock_close" class="sref">__sco_sock_close /a>(struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>)
 354 /a>{	 355v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sk %p state %d socket %p" /spa"
,  a href="+code=sk" class="sref">sk /a>,  a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a>,  a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_socket" class="sref">sk_socket /a>);
 356 /a>
 357v3a>        switch ( a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a>) {	 358v3a>        case  a href="+code=BT_LISTEN" class="sref">BT_LISTEN /a>:
 359v3a>                 a href="+code=sco_sock_cleanup_listen" class="sref">sco_sock_cleanup_listen /a>( a href="+code=sk" class="sref">sk /a>);
 360v3a>                break;
 361v3a>
 362v3a>        case  a href="+code=BT_CONNECTED" class="sref">BT_CONNECTED /a>:
 363v3a>        case  a href="+code=BT_CONFIG" class="sref">BT_CONFIG /a>:
 364v3a>                if ( a href="+code=sco_pi" class="sref">sco_pi /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=conn" class="sref">conn /a>) {	 365v3a>                         a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> =  a href="+code=BT_DISCONN" class="sref">BT_DISCONN /a>;
 366v3a>                         a href="+code=sco_sock_set_timer" class="sref">sco_sock_set_timer /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=SCO_DISCONN_TIMEOUT" class="sref">SCO_DISCONN_TIMEOUT /a>);
 367v3a>                         a href="+code=hci_conn_put" class="sref">hci_conn_put /a>( a href="+code=sco_pi" class="sref">sco_pi /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=conn" class="sref">conn /a>-> a href="+code=hcon" class="sref">hcon /a>);
 368v3a>                         a href="+code=sco_pi" class="sref">sco_pi /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=conn" class="sref">conn /a>-> a href="+code=hcon" class="sref">hcon /a> =  a href="+code=NULL" class="sref">NULL /a>;
 369v3a>                } else
 370v3a>                         a href="+code=sco_chan_del" class="sref">sco_chan_del /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=ECONNRESET" class="sref">ECONNRESET /a>);
 371v3a>                break;
 372 /a>
 373v3a>        case  a href="+code=BT_CONNECT" class="sref">BT_CONNECT /a>:
 374v3a>        case  a href="+code=BT_DISCONN" class="sref">BT_DISCONN /a>:
 375v3a>                 a href="+code=sco_chan_del" class="sref">sco_chan_del /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=ECONNRESET" class="sref">ECONNRESET /a>);
 376v3a>                break;
 377 /a>
 378v3a>        default:
 379v3a>                 a href="+code=sock_set_flag" class="sref">sock_set_flag /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=SOCK_ZAPPED" class="sref">SOCK_ZAPPED /a>);
 380v3a>                break;
 381v3a>        }
 382v3a>}
 383v3a>
 384 /a> spa" class="comment">/* Must be called on unlocked socket. */ /spa"
	 385v3a>static void  a href="+code=sco_sock_close" class="sref">sco_sock_close /a>(struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>)
 386v3a>{	 387v3a>         a href="+code=sco_sock_clear_timer" class="sref">sco_sock_clear_timer /a>( a href="+code=sk" class="sref">sk /a>);
 388v3a>         a href="+code=lock_sock" class="sref">lock_sock /a>( a href="+code=sk" class="sref">sk /a>);
 389v3a>         a href="+code=__sco_sock_close" class="sref">__sco_sock_close /a>( a href="+code=sk" class="sref">sk /a>);
 390v3a>         a href="+code=release_sock" class="sref">release_sock /a>( a href="+code=sk" class="sref">sk /a>);
 391v3a>         a href="+code=sco_sock_kill" class="sref">sco_sock_kill /a>( a href="+code=sk" class="sref">sk /a>);
 392v3a>}
 393v3a>
 394 /a>static void  a href="+code=sco_sock_init" class="sref">sco_sock_init /a>(struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>, struct  a href="+code=sock" class="sref">sock /a> * a href="+code=parent" class="sref">parent /a>)
 395v3a>{	 396v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sk %p" /spa"
,  a href="+code=sk" class="sref">sk /a>);
 397 /a>
 398v3a>        if ( a href="+code=parent" class="sref">parent /a>) {	 399v3a>                 a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_type" class="sref">sk_type /a> =  a href="+code=parent" class="sref">parent /a>-> a href="+code=sk_type" class="sref">sk_type /a>;
 400v3a>                 a href="+code=security_sk_clone" class="sref">security_sk_clone /a>( a href="+code=parent" class="sref">parent /a>,  a href="+code=sk" class="sref">sk /a>);
 401v3a>        }
 402v3a>}
 403v3a>
 404 /a>static struct  a href="+code=proto" class="sref">protov3a>  a href="+code=sco_proto" class="sref">sco_proto /a> = {	 405v3a>        . a href="+code=namt" class="sref">namtv3a>           =  spa" class="string">"SCO" /spa"
,	 406v3a>        . a href="+code=owner" class="sref">ownerv3a>          =  a href="+code=THIS_MODULE" class="sref">THIS_MODULE /a>,	 407v3a>        . a href="+code=obj_sizt" class="sref">obj_siztv3a>       = siztof(struct  a href="+code=sco_pinfo" class="sref">sco_pinfo /a>)
 408v3a>};
 409v3a>
 410 /a>static struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sco_sock_alloc" class="sref">sco_sock_alloc /a>(struct  a href="+code=net" class="sref">net /a> * a href="+code=net" class="sref">net /a>, struct  a href="+code=socket" class="sref">socket /a> * a href="+code=sock" class="sref">sock /a>, int  a href="+code=proto" class="sref">protov3a>,  a href="+code=gfp_t" class="sref">gfp_tv3a>  a href="+code=prio" class="sref">prio /a>)
 411v3a>{	 412v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>;
 413v3a>
 414v3a>         a href="+code=sk" class="sref">sk /a> =  a href="+code=sk_alloc" class="sref">sk_alloc /a>( a href="+code=net" class="sref">net /a>,  a href="+code=PF_BLUETOOTH" class="sref">PF_BLUETOOTH /a>,  a href="+code=prio" class="sref">prio /a>, & a href="+code=sco_proto" class="sref">sco_proto /a>);
 415v3a>        if (! a href="+code=sk" class="sref">sk /a>)
 416v3a>                return  a href="+code=NULL" class="sref">NULL /a>;
 417 /a>
 418v3a>         a href="+code=sock_init_data" class="sref">sock_init_data /a>( a href="+code=sock" class="sref">sock /a>,  a href="+code=sk" class="sref">sk /a>);
 419v3a>         a href="+code=INIT_LIST_HEAD" class="sref">INIT_LIST_HEAD /a>(& a href="+code=bt_sk" class="sref">bt_sk /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=accept_q" class="sref">accept_q /a>);
 42"v3a>
 421v3a>         a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_destruct" class="sref">sk_destruct /a> =  a href="+code=sco_sock_destruct" class="sref">sco_sock_destruct /a>;
 422v3a>         a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_sndtimeo" class="sref">sk_sndtimeo /a> =  a href="+code=SCO_CONN_TIMEOUT" class="sref">SCO_CONN_TIMEOUT /a>;
 423v3a>
 424v3a>         a href="+code=sock_reset_flag" class="sref">sock_reset_flag /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=SOCK_ZAPPED" class="sref">SOCK_ZAPPED /a>);
 425 /a>
 426v3a>         a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_protocol" class="sref">sk_protocol /a> =  a href="+code=proto" class="sref">protov3a>;
 427v3a>         a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a>    =  a href="+code=BT_OPEN" class="sref">BT_OPENv3a>;
 428 /a>
 429v3a>         a href="+code=setup_timer" class="sref">setup_timer /a>(& a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_timer" class="sref">sk_timer /a>,  a href="+code=sco_sock_timeout" class="sref">sco_sock_timeout /a>, (unsigned long) a href="+code=sk" class="sref">sk /a>);
 43"v3a>
 431v3a>         a href="+code=bt_sock_link" class="sref">bt_sock_link /a>(& a href="+code=sco_sk_list" class="sref">sco_sk_list /a>,  a href="+code=sk" class="sref">sk /a>);
 432v3a>        return  a href="+code=sk" class="sref">sk /a>;
 433v3a>}
 434 /a>
 435v3a>static int  a href="+code=sco_sock_create" class="sref">sco_sock_create /a>(struct  a href="+code=net" class="sref">net /a> * a href="+code=net" class="sref">net /a>, struct  a href="+code=socket" class="sref">socket /a> * a href="+code=sock" class="sref">sock /a>, int  a href="+code=protocol" class="sref">protocol /a>,	 436v3a>                           int  a href="+code=kern" class="sref">kern /a>)
 437 /a>{	 438v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a>;
 439v3a>
 440v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sock %p" /spa"
,  a href="+code=sock" class="sref">sock /a>);
 441v3a>
 442v3a>         a href="+code=sock" class="sref">sock /a>-> a href="+code=state" class="sref">state /a> =  a href="+code=SS_UNCONNECTED" class="sref">SS_UNCONNECTED /a>;
 443v3a>
 444v3a>        if ( a href="+code=sock" class="sref">sock /a>-> a href="+code=type" class="sref">type /a> !=  a href="+code=SOCK_SEQPACKET" class="sref">SOCK_SEQPACKET /a>)
 445v3a>                return - a href="+code=ESOCKTNOSUPPORT" class="sref">ESOCKTNOSUPPORT /a>;
 446 /a>
 447v3a>         a href="+code=sock" class="sref">sock /a>-> a href="+code=ops" class="sref">ops /a> = & a href="+code=sco_sock_ops" class="sref">sco_sock_ops /a>;
 448 /a>
 449v3a>         a href="+code=sk" class="sref">sk /a> =  a href="+code=sco_sock_alloc" class="sref">sco_sock_alloc /a>( a href="+code=net" class="sref">net /a>,  a href="+code=sock" class="sref">sock /a>,  a href="+code=protocol" class="sref">protocol /a>,  a href="+code=GFP_ATOMIC" class="sref">GFP_ATOMIC /a>);
 450v3a>        if (! a href="+code=sk" class="sref">sk /a>)
 451v3a>                return - a href="+code=ENOMEM" class="sref">ENOMEM /a>;
 452 /a>
 453v3a>         a href="+code=sco_sock_init" class="sref">sco_sock_init /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=NULL" class="sref">NULL /a>);
 454v3a>        return 0;
 455v3a>}
 456 /a>
 457v3a>static int  a href="+code=sco_sock_bind" class="sref">sco_sock_bind /a>(struct  a href="+code=socket" class="sref">socket /a> * a href="+code=sock" class="sref">sock /a>, struct  a href="+code=sockaddr" class="sref">sockaddr /a> * a href="+code=addr" class="sref">addr /a>, int  a href="+code=addr_len" class="sref">addr_len /a>)
 458v3a>{	 459v3a>        struct  a href="+code=sockaddr_sco" class="sref">sockaddr_sco /a> * a href="+code=sa" class="sref">sa /a> = (struct  a href="+code=sockaddr_sco" class="sref">sockaddr_sco /a> *)  a href="+code=addr" class="sref">addr /a>;
 46"v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a> =  a href="+code=sock" class="sref">sock /a>-> a href="+code=sk" class="sref">sk /a>;
 461v3a>        int  a href="+code=err" class="sref">err /a> = 0;
 462 /a>
 463v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sk %p %s" /spa"
,  a href="+code=sk" class="sref">sk /a>,  a href="+code=batostr" class="sref">batostr /a>(& a href="+code=sa" class="sref">sa /a>-> a href="+code=sco_bdaddr" class="sref">sco_bdaddr /a>));
 464 /a>
 465v3a>        if (! a href="+code=addr" class="sref">addr /a> ||  a href="+code=addr" class="sref">addr /a>-> a href="+code=sa_family" class="sref">sa_family /a> !=  a href="+code=AF_BLUETOOTH" class="sref">AF_BLUETOOTH /a>)
 466v3a>                return - a href="+code=EINVAL" class="sref">EINVAL /a>;
 467 /a>
 468v3a>         a href="+code=lock_sock" class="sref">lock_sock /a>( a href="+code=sk" class="sref">sk /a>);
 469v3a>
 470v3a>        if ( a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> !=  a href="+code=BT_OPEN" class="sref">BT_OPENv3a>) {	 471v3a>                 a href="+code=err" class="sref">err /a> = - a href="+code=EBADFD" class="sref">EBADFD /a>;
 472v3a>                goto  a href="+code=done" class="sref">done /a>;
 473v3a>        }
 474 /a>
 475v3a>        if ( a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_type" class="sref">sk_type /a> !=  a href="+code=SOCK_SEQPACKET" class="sref">SOCK_SEQPACKET /a>) {	 476v3a>                 a href="+code=err" class="sref">err /a> = - a href="+code=EINVAL" class="sref">EINVAL /a>;
 477v3a>                goto  a href="+code=done" class="sref">done /a>;
 478v3a>        }
 479v3a>
 480v3a>         a href="+code=bacpy" class="sref">bacpy /a>(& a href="+code=bt_sk" class="sref">bt_sk /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=src" class="sref">src /a>, & a href="+code=sa" class="sref">sa /a>-> a href="+code=sco_bdaddr" class="sref">sco_bdaddr /a>);
 481v3a>
 482v3a>         a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> =  a href="+code=BT_BOUND" class="sref">BT_BOUND /a>;
 483v3a>
 484 /a> a href="+code=done" class="sref">done /a>:
 485v3a>         a href="+code=release_sock" class="sref">release_sock /a>( a href="+code=sk" class="sref">sk /a>);
 486v3a>        return  a href="+code=err" class="sref">err /a>;
 487v3a>}
 488 /a>
 489v3a>static int  a href="+code=sco_sock_connect" class="sref">sco_sock_connect /a>(struct  a href="+code=socket" class="sref">socket /a> * a href="+code=sock" class="sref">sock /a>, struct  a href="+code=sockaddr" class="sref">sockaddr /a> * a href="+code=addr" class="sref">addr /a>, int  a href="+code=alen" class="sref">alen /a>, int  a href="+code=flags" class="sref">flags /a>)
 490v3a>{	 491v3a>        struct  a href="+code=sockaddr_sco" class="sref">sockaddr_sco /a> * a href="+code=sa" class="sref">sa /a> = (struct  a href="+code=sockaddr_sco" class="sref">sockaddr_sco /a> *)  a href="+code=addr" class="sref">addr /a>;
 492v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a> =  a href="+code=sock" class="sref">sock /a>-> a href="+code=sk" class="sref">sk /a>;
 493v3a>        int  a href="+code=err" class="sref">err /a> = 0;
 494 /a>
 495 /a>
 496v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sk %p" /spa"
,  a href="+code=sk" class="sref">sk /a>);
 497 /a>
 498v3a>        if ( a href="+code=alen" class="sref">alen /a> < siztof(struct  a href="+code=sockaddr_sco" class="sref">sockaddr_sco /a>) ||
 499v3a>             a href="+code=addr" class="sref">addr /a>-> a href="+code=sa_family" class="sref">sa_family /a> !=  a href="+code=AF_BLUETOOTH" class="sref">AF_BLUETOOTH /a>)
 500v3a>                return - a href="+code=EINVAL" class="sref">EINVAL /a>;
 501v3a>
 502v3a>        if ( a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> !=  a href="+code=BT_OPEN" class="sref">BT_OPENv3a> &&  a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> !=  a href="+code=BT_BOUND" class="sref">BT_BOUND /a>)
 503v3a>                return - a href="+code=EBADFD" class="sref">EBADFD /a>;
 504 /a>
 505v3a>        if ( a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_type" class="sref">sk_type /a> !=  a href="+code=SOCK_SEQPACKET" class="sref">SOCK_SEQPACKET /a>)
 506v3a>                return - a href="+code=EINVAL" class="sref">EINVAL /a>;
 507 /a>
 508v3a>         a href="+code=lock_sock" class="sref">lock_sock /a>( a href="+code=sk" class="sref">sk /a>);
 509v3a>
 510v3a>         spa" class="comment">/* Set destination address and psm */ /spa"
	 511v3a>         a href="+code=bacpy" class="sref">bacpy /a>(& a href="+code=bt_sk" class="sref">bt_sk /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=dst" class="sref">dst /a>, & a href="+code=sa" class="sref">sa /a>-> a href="+code=sco_bdaddr" class="sref">sco_bdaddr /a>);
 512 /a>
 513v3a>         a href="+code=err" class="sref">err /a> =  a href="+code=sco_connect" class="sref">sco_connect /a>( a href="+code=sk" class="sref">sk /a>);
 514v3a>        if ( a href="+code=err" class="sref">err /a>)
 515v3a>                goto  a href="+code=done" class="sref">done /a>;
 516 /a>
 517v3a>         a href="+code=err" class="sref">err /a> =  a href="+code=bt_sock_wait_state" class="sref">bt_sock_wait_state /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=BT_CONNECTED" class="sref">BT_CONNECTED /a>,	 518v3a>                                  a href="+code=sock_sndtimeo" class="sref">sock_sndtimeo /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=flags" class="sref">flags /a> &  a href="+code=O_NONBLOCK" class="sref">O_NONBLOCK /a>));
 519v3a>
 52"v3a> a href="+code=done" class="sref">done /a>:
 521v3a>         a href="+code=release_sock" class="sref">release_sock /a>( a href="+code=sk" class="sref">sk /a>);
 522v3a>        return  a href="+code=err" class="sref">err /a>;
 523v3a>}
 524 /a>
 525v3a>static int  a href="+code=sco_sock_listen" class="sref">sco_sock_listen /a>(struct  a href="+code=socket" class="sref">socket /a> * a href="+code=sock" class="sref">sock /a>, int  a href="+code=backlog" class="sref">backlog /a>)
 526v3a>{	 527v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a> =  a href="+code=sock" class="sref">sock /a>-> a href="+code=sk" class="sref">sk /a>;
 528v3a>         a href="+code=bdaddr_t" class="sref">bdaddr_t /a> * a href="+code=src" class="sref">src /a> = & a href="+code=bt_sk" class="sref">bt_sk /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=src" class="sref">src /a>;
 529v3a>        int  a href="+code=err" class="sref">err /a> = 0;
 53"v3a>
 531v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sk %p backlog %d" /spa"
,  a href="+code=sk" class="sref">sk /a>,  a href="+code=backlog" class="sref">backlog /a>);
 532 /a>
 533v3a>         a href="+code=lock_sock" class="sref">lock_sock /a>( a href="+code=sk" class="sref">sk /a>);
 534 /a>
 535v3a>        if ( a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> !=  a href="+code=BT_BOUND" class="sref">BT_BOUND /a>) {	 536v3a>                 a href="+code=err" class="sref">err /a> = - a href="+code=EBADFD" class="sref">EBADFD /a>;
 537v3a>                goto  a href="+code=done" class="sref">done /a>;
 538v3a>        }
 539v3a>
 540v3a>        if ( a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_type" class="sref">sk_type /a> !=  a href="+code=SOCK_SEQPACKET" class="sref">SOCK_SEQPACKET /a>) {	 541v3a>                 a href="+code=err" class="sref">err /a> = - a href="+code=EINVAL" class="sref">EINVAL /a>;
 542v3a>                goto  a href="+code=done" class="sref">done /a>;
 543v3a>        }
 544 /a>
 545v3a>         a href="+code=write_lock" class="sref">write_lock /a>(& a href="+code=sco_sk_list" class="sref">sco_sk_list /a>. a href="+code=lock" class="sref">lock /a>);
 546 /a>
 547v3a>        if ( a href="+code=__sco_get_sock_listen_by_addr" class="sref">__sco_get_sock_listen_by_addr /a>( a href="+code=src" class="sref">src /a>)) {	 548v3a>                 a href="+code=err" class="sref">err /a> = - a href="+code=EADDRINUSE" class="sref">EADDRINUSE /a>;
 549v3a>                goto  a href="+code=unlock" class="sref">unlock /a>;
 550v3a>        }
 551v3a>
 552v3a>         a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_max_ack_backlog" class="sref">sk_max_ack_backlog /a> =  a href="+code=backlog" class="sref">backlog /a>;
 553v3a>         a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_ack_backlog" class="sref">sk_ack_backlog /a> = 0;
 554 /a>
 555v3a>         a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> =  a href="+code=BT_LISTEN" class="sref">BT_LISTEN /a>;
 556 /a>
 557v3a> a href="+code=unlock" class="sref">unlock /a>:
 558v3a>         a href="+code=write_unlock" class="sref">write_unlock /a>(& a href="+code=sco_sk_list" class="sref">sco_sk_list /a>. a href="+code=lock" class="sref">lock /a>);
 559v3a>
 56"v3a> a href="+code=done" class="sref">done /a>:
 561v3a>         a href="+code=release_sock" class="sref">release_sock /a>( a href="+code=sk" class="sref">sk /a>);
 562v3a>        return  a href="+code=err" class="sref">err /a>;
 563v3a>}
 564 /a>
 565v3a>static int  a href="+code=sco_sock_accept" class="sref">sco_sock_accept /a>(struct  a href="+code=socket" class="sref">socket /a> * a href="+code=sock" class="sref">sock /a>, struct  a href="+code=socket" class="sref">socket /a> * a href="+code=newsock" class="sref">newsock /a>, int  a href="+code=flags" class="sref">flags /a>)
 566v3a>{	 567v3a>         a href="+code=DECLARE_WAITQUEUE" class="sref">DECLARE_WAITQUEUE /a>( a href="+code=wait" class="sref">wait /a>,  a href="+code=current" class="sref">current /a>);
 568v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a> =  a href="+code=sock" class="sref">sock /a>-> a href="+code=sk" class="sref">sk /a>, * a href="+code=ch" class="sref">ch /a>;
 569v3a>        long  a href="+code=timeo" class="sref">timeo /a>;
 570v3a>        int  a href="+code=err" class="sref">err /a> = 0;
 571v3a>
 572v3a>         a href="+code=lock_sock" class="sref">lock_sock /a>( a href="+code=sk" class="sref">sk /a>);
 573v3a>
 574v3a>         a href="+code=timeo" class="sref">timeo /a> =  a href="+code=sock_rcvtimeo" class="sref">sock_rcvtimeo /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=flags" class="sref">flags /a> &  a href="+code=O_NONBLOCK" class="sref">O_NONBLOCK /a>);
 575 /a>
 576v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sk %p timeo %ld" /spa"
,  a href="+code=sk" class="sref">sk /a>,  a href="+code=timeo" class="sref">timeo /a>);
 577 /a>
 578v3a>         spa" class="comment">/* Wait for a" incoming connection. (wake-one). */ /spa"
	 579v3a>         a href="+code=add_wait_queue_exclusive" class="sref">add_wait_queue_exclusive /a>( a href="+code=sk_sleep" class="sref">sk_sleep /a>( a href="+code=sk" class="sref">sk /a>), & a href="+code=wait" class="sref">wait /a>);
 580v3a>        while (1) {	 581v3a>                 a href="+code=set_current_state" class="sref">set_current_state /a>( a href="+code=TASK_INTERRUPTIBLE" class="sref">TASK_INTERRUPTIBLE /a>);
 582 /a>
 583v3a>                if ( a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> !=  a href="+code=BT_LISTEN" class="sref">BT_LISTEN /a>) {	 584v3a>                         a href="+code=err" class="sref">err /a> = - a href="+code=EBADFD" class="sref">EBADFD /a>;
 585v3a>                        break;
 586v3a>                }
 587 /a>
 588v3a>                 a href="+code=ch" class="sref">ch /a> =  a href="+code=bt_accept_dequeue" class="sref">bt_accept_dequeue /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=newsock" class="sref">newsock /a>);
 589v3a>                if ( a href="+code=ch" class="sref">ch /a>)
 590v3a>                        break;
 591v3a>
 592v3a>                if (! a href="+code=timeo" class="sref">timeo /a>) {	 593v3a>                         a href="+code=err" class="sref">err /a> = - a href="+code=EAGAIN" class="sref">EAGAIN /a>;
 594v3a>                        break;
 595v3a>                }
 596 /a>
 597v3a>                if ( a href="+code=signal_pending" class="sref">signal_pending /a>( a href="+code=current" class="sref">current /a>)) {	 598v3a>                         a href="+code=err" class="sref">err /a> =  a href="+code=sock_intr_errno" class="sref">sock_intr_errno /a>( a href="+code=timeo" class="sref">timeo /a>);
 599v3a>                        break;
 600v3a>                }
 601v3a>
 602v3a>                 a href="+code=release_sock" class="sref">release_sock /a>( a href="+code=sk" class="sref">sk /a>);
 603v3a>                 a href="+code=timeo" class="sref">timeo /a> =  a href="+code=schedule_timeout" class="sref">schedule_timeout /a>( a href="+code=timeo" class="sref">timeo /a>);
 604v3a>                 a href="+code=lock_sock" class="sref">lock_sock /a>( a href="+code=sk" class="sref">sk /a>);
 605v3a>        }
 606v3a>         a href="+code=__set_current_state" class="sref">__set_current_state /a>( a href="+code=TASK_RUNNING" class="sref">TASK_RUNNING /a>);
 607v3a>         a href="+code=remove_wait_queue" class="sref">remove_wait_queue /a>( a href="+code=sk_sleep" class="sref">sk_sleep /a>( a href="+code=sk" class="sref">sk /a>), & a href="+code=wait" class="sref">wait /a>);
 608 /a>
 609v3a>        if ( a href="+code=err" class="sref">err /a>)
 610v3a>                goto  a href="+code=done" class="sref">done /a>;
 611v3a>
 612v3a>         a href="+code=newsock" class="sref">newsock /a>-> a href="+code=state" class="sref">state /a> =  a href="+code=SS_CONNECTED" class="sref">SS_CONNECTED /a>;
 613v3a>
 614v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"new socket %p" /spa"
,  a href="+code=ch" class="sref">ch /a>);
 615 /a>
 616 /a> a href="+code=done" class="sref">done /a>:
 617v3a>         a href="+code=release_sock" class="sref">release_sock /a>( a href="+code=sk" class="sref">sk /a>);
 618v3a>        return  a href="+code=err" class="sref">err /a>;
 619v3a>}
 62"v3a>
 621v3a>static int  a href="+code=sco_sock_getnamt" class="sref">sco_sock_getnamt /a>(struct  a href="+code=socket" class="sref">socket /a> * a href="+code=sock" class="sref">sock /a>, struct  a href="+code=sockaddr" class="sref">sockaddr /a> * a href="+code=addr" class="sref">addr /a>, int * a href="+code=len" class="sref">len /a>, int  a href="+code=peer" class="sref">peer /a>)
 622v3a>{	 623v3a>        struct  a href="+code=sockaddr_sco" class="sref">sockaddr_sco /a> * a href="+code=sa" class="sref">sa /a> = (struct  a href="+code=sockaddr_sco" class="sref">sockaddr_sco /a> *)  a href="+code=addr" class="sref">addr /a>;
 624v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a> =  a href="+code=sock" class="sref">sock /a>-> a href="+code=sk" class="sref">sk /a>;
 625 /a>
 626v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sock %p, sk %p" /spa"
,  a href="+code=sock" class="sref">sock /a>,  a href="+code=sk" class="sref">sk /a>);
 627 /a>
 628v3a>         a href="+code=addr" class="sref">addr /a>-> a href="+code=sa_family" class="sref">sa_family /a> =  a href="+code=AF_BLUETOOTH" class="sref">AF_BLUETOOTH /a>;
 629v3a>        * a href="+code=len" class="sref">len /a> = siztof(struct  a href="+code=sockaddr_sco" class="sref">sockaddr_sco /a>);
 63"v3a>
 631v3a>        if ( a href="+code=peer" class="sref">peer /a>)
 632v3a>                 a href="+code=bacpy" class="sref">bacpy /a>(& a href="+code=sa" class="sref">sa /a>-> a href="+code=sco_bdaddr" class="sref">sco_bdaddr /a>, & a href="+code=bt_sk" class="sref">bt_sk /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=dst" class="sref">dst /a>);
 633v3a>        else
 634v3a>                 a href="+code=bacpy" class="sref">bacpy /a>(& a href="+code=sa" class="sref">sa /a>-> a href="+code=sco_bdaddr" class="sref">sco_bdaddr /a>, & a href="+code=bt_sk" class="sref">bt_sk /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=src" class="sref">src /a>);
 635 /a>
 636v3a>        return 0;
 637v3a>}
 638 /a>
 639v3a>static int  a href="+code=sco_sock_sendmsg" class="sref">sco_sock_sendmsg /a>(struct  a href="+code=kiocb" class="sref">kiocb /a> * a href="+code=iocb" class="sref">iocb /a>, struct  a href="+code=socket" class="sref">socket /a> * a href="+code=sock" class="sref">sock /a>,
 640v3a>                            struct  a href="+code=msghdr" class="sref">msghdr /a> * a href="+code=msg" class="sref">msg /a>,  a href="+code=sizt_t" class="sref">sizt_t /a>  a href="+code=len" class="sref">len /a>)
 641v3a>{	 642v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a> =  a href="+code=sock" class="sref">sock /a>-> a href="+code=sk" class="sref">sk /a>;
 643v3a>        int  a href="+code=err" class="sref">err /a>;
 644 /a>
 645v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sock %p, sk %p" /spa"
,  a href="+code=sock" class="sref">sock /a>,  a href="+code=sk" class="sref">sk /a>);
 646 /a>
 647v3a>         a href="+code=err" class="sref">err /a> =  a href="+code=sock_error" class="sref">sock_error /a>( a href="+code=sk" class="sref">sk /a>);
 648v3a>        if ( a href="+code=err" class="sref">err /a>)
 649v3a>                return  a href="+code=err" class="sref">err /a>;
 65"v3a>
 651v3a>        if ( a href="+code=msg" class="sref">msg /a>-> a href="+code=msg_flags" class="sref">msg_flagsv3a> &  a href="+code=MSG_OOB" class="sref">MSG_OOB /a>)
 652v3a>                return - a href="+code=EOPNOTSUPP" class="sref">EOPNOTSUPP /a>;
 653v3a>
 654v3a>         a href="+code=lock_sock" class="sref">lock_sock /a>( a href="+code=sk" class="sref">sk /a>);
 655 /a>
 656v3a>        if ( a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> ==  a href="+code=BT_CONNECTED" class="sref">BT_CONNECTED /a>)
 657v3a>                 a href="+code=err" class="sref">err /a> =  a href="+code=sco_send_framt" class="sref">sco_send_framt /a>( a href="+code=sk" class="sref">sk /a>,  a href="+code=msg" class="sref">msg /a>,  a href="+code=len" class="sref">len /a>);
 658v3a>        else
 659v3a>                 a href="+code=err" class="sref">err /a> = - a href="+code=ENOTCONN" class="sref">ENOTCONN /a>;
 66"v3a>
 661v3a>         a href="+code=release_sock" class="sref">release_sock /a>( a href="+code=sk" class="sref">sk /a>);
 662v3a>        return  a href="+code=err" class="sref">err /a>;
 663v3a>}
 664 /a>
 665v3a>static int  a href="+code=sco_sock_setsockopt" class="sref">sco_sock_setsockopt /a>(struct  a href="+code=socket" class="sref">socket /a> * a href="+code=sock" class="sref">sock /a>, int  a href="+code=level" class="sref">level /a>, int  a href="+code=optnamt" class="sref">optnamt /a>, char  a href="+code=__user" class="sref">__user /a> * a href="+code=optval" class="sref">optval /a>, unsigned int  a href="+code=optlen" class="sref">optlen /a>)
 666v3a>{	 667v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a> =  a href="+code=sock" class="sref">sock /a>-> a href="+code=sk" class="sref">sk /a>;
 668v3a>        int  a href="+code=err" class="sref">err /a> = 0;
 669v3a>
 670v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sk %p" /spa"
,  a href="+code=sk" class="sref">sk /a>);
 671v3a>
 672v3a>         a href="+code=lock_sock" class="sref">lock_sock /a>( a href="+code=sk" class="sref">sk /a>);
 673v3a>
 674v3a>        switch ( a href="+code=optnamt" class="sref">optnamt /a>) {	 675v3a>        default:
 676v3a>                 a href="+code=err" class="sref">err /a> = - a href="+code=ENOPROTOOPT" class="sref">ENOPROTOOPT /a>;
 677v3a>                break;
 678v3a>        }
 679v3a>
 680v3a>         a href="+code=release_sock" class="sref">release_sock /a>( a href="+code=sk" class="sref">sk /a>);
 681v3a>        return  a href="+code=err" class="sref">err /a>;
 682 /a>}
 683v3a>
 684v3a>static int  a href="+code=sco_sock_getsockopt_old" class="sref">sco_sock_getsockopt_old /a>(struct  a href="+code=socket" class="sref">socket /a> * a href="+code=sock" class="sref">sock /a>, int  a href="+code=optnamt" class="sref">optnamt /a>, char  a href="+code=__user" class="sref">__user /a> * a href="+code=optval" class="sref">optval /a>, int  a href="+code=__user" class="sref">__user /a> * a href="+code=optlen" class="sref">optlen /a>)
 685v3a>{	 686v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a> =  a href="+code=sock" class="sref">sock /a>-> a href="+code=sk" class="sref">sk /a>;
 687v3a>        struct  a href="+code=sco_options" class="sref">sco_options /a>  a href="+code=opts" class="sref">opts /a>;
 688v3a>        struct  a href="+code=sco_conninfo" class="sref">sco_conninfo /a>  a href="+code=cinfo" class="sref">cinfo /a>;
 689v3a>        int  a href="+code=len" class="sref">len /a>,  a href="+code=err" class="sref">err /a> = 0;
 69"v3a>
 691v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sk %p" /spa"
,  a href="+code=sk" class="sref">sk /a>);
 692 /a>
 693v3a>        if ( a href="+code=get_user" class="sref">get_user /a>( a href="+code=len" class="sref">len /a>,  a href="+code=optlen" class="sref">optlen /a>))
 694v3a>                return - a href="+code=EFAULT" class="sref">EFAULT /a>;
 695 /a>
 696v3a>         a href="+code=lock_sock" class="sref">lock_sock /a>( a href="+code=sk" class="sref">sk /a>);
 697 /a>
 698v3a>        switch ( a href="+code=optnamt" class="sref">optnamt /a>) {	 699v3a>        case  a href="+code=SCO_OPTIONS" class="sref">SCO_OPTIONSv3a>:
 700v3a>                if ( a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> !=  a href="+code=BT_CONNECTED" class="sref">BT_CONNECTED /a>) {	 701v3a>                         a href="+code=err" class="sref">err /a> = - a href="+code=ENOTCONN" class="sref">ENOTCONN /a>;
 702v3a>                        break;
 703v3a>                }
 704 /a>
 705v3a>                 a href="+code=opts" class="sref">opts /a>. a href="+code=mtu" class="sref">mtu /a> =  a href="+code=sco_pi" class="sref">sco_pi /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=conn" class="sref">conn /a>-> a href="+code=mtu" class="sref">mtu /a>;
 706 /a>
 707v3a>                 a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"mtu %d" /spa"
,  a href="+code=opts" class="sref">opts /a>. a href="+code=mtu" class="sref">mtu /a>);
 708 /a>
 709v3a>                 a href="+code=len" class="sref">len /a> =  a href="+code=min_t" class="sref">min_t /a>(unsigned int,  a href="+code=len" class="sref">len /a>, siztof( a href="+code=opts" class="sref">opts /a>));
 710v3a>                if ( a href="+code=copy_to_user" class="sref">copy_to_user /a>( a href="+code=optval" class="sref">optval /a>, (char *)& a href="+code=opts" class="sref">opts /a>,  a href="+code=len" class="sref">len /a>))
 711v3a>                         a href="+code=err" class="sref">err /a> = - a href="+code=EFAULT" class="sref">EFAULT /a>;
 712 /a>
 713v3a>                break;
 714 /a>
 715v3a>        case  a href="+code=SCO_CONNINFO" class="sref">SCO_CONNINFOv3a>:
 716v3a>                if ( a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_state" class="sref">sk_state /a> !=  a href="+code=BT_CONNECTED" class="sref">BT_CONNECTED /a>) {	 717v3a>                         a href="+code=err" class="sref">err /a> = - a href="+code=ENOTCONN" class="sref">ENOTCONN /a>;
 718v3a>                        break;
 719v3a>                }
 72"v3a>
 721v3a>                 a href="+code=memset" class="sref">memset /a>(& a href="+code=cinfo" class="sref">cinfo /a>, 0, siztof( a href="+code=cinfo" class="sref">cinfo /a>));
 722v3a>                 a href="+code=cinfo" class="sref">cinfo /a>. a href="+code=hci_handle" class="sref">hci_handle /a> =  a href="+code=sco_pi" class="sref">sco_pi /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=conn" class="sref">conn /a>-> a href="+code=hcon" class="sref">hcon /a>-> a href="+code=handle" class="sref">handle /a>;
 723v3a>                 a href="+code=memcpy" class="sref">memcpy /a>( a href="+code=cinfo" class="sref">cinfo /a>. a href="+code=dev_class" class="sref">dev_class /a>,  a href="+code=sco_pi" class="sref">sco_pi /a>( a href="+code=sk" class="sref">sk /a>)-> a href="+code=conn" class="sref">conn /a>-> a href="+code=hcon" class="sref">hcon /a>-> a href="+code=dev_class" class="sref">dev_class /a>, 3);
 724 /a>
 725v3a>                 a href="+code=len" class="sref">len /a> =  a href="+code=min_t" class="sref">min_t /a>(unsigned int,  a href="+code=len" class="sref">len /a>, siztof( a href="+code=cinfo" class="sref">cinfo /a>));
 726v3a>                if ( a href="+code=copy_to_user" class="sref">copy_to_user /a>( a href="+code=optval" class="sref">optval /a>, (char *)& a href="+code=cinfo" class="sref">cinfo /a>,  a href="+code=len" class="sref">len /a>))
 727v3a>                         a href="+code=err" class="sref">err /a> = - a href="+code=EFAULT" class="sref">EFAULT /a>;
 728 /a>
 729v3a>                break;
 73"v3a>
 731v3a>        default:
 732v3a>                 a href="+code=err" class="sref">err /a> = - a href="+code=ENOPROTOOPT" class="sref">ENOPROTOOPT /a>;
 733v3a>                break;
 734v3a>        }
 735 /a>
 736v3a>         a href="+code=release_sock" class="sref">release_sock /a>( a href="+code=sk" class="sref">sk /a>);
 737v3a>        return  a href="+code=err" class="sref">err /a>;
 738 /a>}
 739v3a>
 740v3a>static int  a href="+code=sco_sock_getsockopt" class="sref">sco_sock_getsockopt /a>(struct  a href="+code=socket" class="sref">socket /a> * a href="+code=sock" class="sref">sock /a>, int  a href="+code=level" class="sref">level /a>, int  a href="+code=optnamt" class="sref">optnamt /a>, char  a href="+code=__user" class="sref">__user /a> * a href="+code=optval" class="sref">optval /a>, int  a href="+code=__user" class="sref">__user /a> * a href="+code=optlen" class="sref">optlen /a>)
 741v3a>{	 742v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a> =  a href="+code=sock" class="sref">sock /a>-> a href="+code=sk" class="sref">sk /a>;
 743v3a>        int  a href="+code=len" class="sref">len /a>,  a href="+code=err" class="sref">err /a> = 0;
 744 /a>
 745v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sk %p" /spa"
,  a href="+code=sk" class="sref">sk /a>);
 746 /a>
 747v3a>        if ( a href="+code=level" class="sref">level /a> ==  a href="+code=SOL_SCO" class="sref">SOL_SCO /a>)
 748v3a>                return  a href="+code=sco_sock_getsockopt_old" class="sref">sco_sock_getsockopt_old /a>( a href="+code=sock" class="sref">sock /a>,  a href="+code=optnamt" class="sref">optnamt /a>,  a href="+code=optval" class="sref">optval /a>,  a href="+code=optlen" class="sref">optlen /a>);
 749v3a>
 750v3a>        if ( a href="+code=get_user" class="sref">get_user /a>( a href="+code=len" class="sref">len /a>,  a href="+code=optlen" class="sref">optlen /a>))
 751v3a>                return - a href="+code=EFAULT" class="sref">EFAULT /a>;
 752 /a>
 753v3a>         a href="+code=lock_sock" class="sref">lock_sock /a>( a href="+code=sk" class="sref">sk /a>);
 754 /a>
 755v3a>        switch ( a href="+code=optnamt" class="sref">optnamt /a>) {	 756v3a>        default:
 757v3a>                 a href="+code=err" class="sref">err /a> = - a href="+code=ENOPROTOOPT" class="sref">ENOPROTOOPT /a>;
 758v3a>                break;
 759v3a>        }
 76"v3a>
 761v3a>         a href="+code=release_sock" class="sref">release_sock /a>( a href="+code=sk" class="sref">sk /a>);
 762v3a>        return  a href="+code=err" class="sref">err /a>;
 763v3a>}
 764 /a>
 765v3a>static int  a href="+code=sco_sock_shutdown" class="sref">sco_sock_shutdown /a>(struct  a href="+code=socket" class="sref">socket /a> * a href="+code=sock" class="sref">sock /a>, int  a href="+code=how" class="sref">how /a>)
 766v3a>{	 767v3a>        struct  a href="+code=sock" class="sref">sock /a> * a href="+code=sk" class="sref">sk /a> =  a href="+code=sock" class="sref">sock /a>-> a href="+code=sk" class="sref">sk /a>;
 768v3a>        int  a href="+code=err" class="sref">err /a> = 0;
 769v3a>
 770v3a>         a href="+code=BT_DBG" class="sref">BT_DBG /a>( spa" class="string">"sock %p, sk %p" /spa"
,  a href="+code=sock" class="sref">sock /a>,  a href="+code=sk" class="sref">sk /a>);
 771v3a>
 772v3a>        if (! a href="+code=sk" class="sref">sk /a>)
 773v3a>                return 0;
 774 /a>
 775v3a>         a href="+code=lock_sock" class="sref">lock_sock /a>( a href="+code=sk" class="sref">sk /a>);
 776v3a>        if (! a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_shutdown" class="sref">sk_shutdown /a>) {	 777v3a>                 a href="+code=sk" class="sref">sk /a>-> a href="+code=sk_shutdown" class="sref">sk_shutdown /a> =  a href="+code=SHUTDOWtopttooth/sco.c#L687" idioL687" class="line" namtioL687"> 687v3a>        struct  a href="+code=sco_options" class="(Hf="+code=sk" cla8o8f="+code=err" class="sref">err /a> = class="li7e" namtioL679"> 679v3a>
7a hre77"sref">bt_accept_dequeue /a>( a hrefs="sref">clasr4" cllass="sref">sk /a>)-ref">clasr4" cll" namtioL776"> 776v3a>        if (! a href="+code=sk" class="sref">sk /a>->e" namtioL680"> 680v3a>         a7href=77_t /a>(unsigned int,  a href="+code=__a>)-ref">clos756v3a>        d__a>)-ref">clos7" namtioL776"> 776v3a>        if (! a href="+code=sk" class="sref">sk /a>->se_sock /7>( a href="+code=sk" cla7s="sr78code=release_sock" class="sref">relea;
dioLdioL771" class="lin>dioL" namtioL776"> 776v3a>        if (! a href=amtioL771"> 771v3SOCK_LINGERv3a>             CK_LINGER a hre"net/lass="line" namtioL65SHUTDOWtopttooth/sco.c#L687" idioL687" class="othger" clmtioL687"> 687v3a>othger" clturn 0;
 683v3a>
 703v3a>                }" namtioL769"> 769v3a>
 ef="lin>a>), ref="net/bopttooth/sef="lin>a>), ref="" namtioL776"> 776v3a>        if (! a href=amtioL771"> 771v3    LOS717"> 717v3a>        LOS71ref=a0;
 684v3a>static int7 a hr78"sref">EAGAIN /a>;
 687v3a>othger" clturn +code=sk" class="sref">sk /a>->se" namtioco_sock_getsockopt_old /7>(str78"net/bopttooth/sco.c#L736" idioL736" class="liine" namt7oL686"> 686v3a>        s7ruct 78a>);
 762v3a>        return  a href="+code=err" class="sref">err /a>a> * a hr7f="+code=sk" class="sref7>sk /78
 763v3a>}
sco_con7info /a>  a href="+code=7info"78eak;
er7 /a> 78de=kiocb" class="sref">kiocb /a> * a hre class=ass="sref">sk /a>)-ref"> class=, int  a href="+code=how" class="sref">how /a>)
 691v3a>         a7href=7+code=f="+code=sk" class="sref">sk /a>- spa" cla7s="string">"sk Źp&quo7; /spa"
,  a hcode=sock" class="sref">sock /a>-> a href="+code=sk" class="sref">sk /a>;
 768v3a>        int  a href="+code=err" class="sref">err /a> = ne" namti7L693"> 693v3a>        if7( a h79 class="line" ine" namtioL769"> 769v3a>
EFAU7T /a>;
sock /a>,  a href="+code=sk" class="sref">sk /a>);
 771v3a>
 696v3a>         a7href=7+code=lock_sock" class="sref">lock_so7k /a>( a 7ref="+code=sk" class="sr7f">sk79sk_shutdown /a>) {	 698v3a>        sw7tch (79f">sk_shutdown /a> = bopttooth/sco.c#L775" idioL775" class="litnamt /a>7 {	:
( a hrefs="sref">clos756v3a>        da>)-ref">clos7" namtioL776"> 776v3a>        if (! a href="+code=sk" class="sref">sk /a>-&g8/a>-> 8 href="+code=sk_state" c8ass="80code=release_sock" class="sref">rele8">err /a>8= - a href="+code=ENOTCO8N" cl80sg_flagsv3a> &  a href="+codNef">dioLdioL771" class="lin>dioL" namtioL776"> 776v3a>        if (! a href=amtioL771"> 771v3SOCK_LINGERv3a>             CK_LINGER a hre"net/lass="line" namtioL65SHUTDOWtopttooth/sco.c#L687" idioL687" class="othger" clmtioL687"> 687v3a>othger" clturn ef="+code=sk" class="sref">sk /a>8co.c#L7038 idioL703" class="line" 8amtio8703"> 703v3a>         "net/bopttooth/sco.c#L776" idioL776" class="line" namtioL776"> 776v3a>        if (! a href="+code=sk" class="sref">sk /a>-&g8ioL704" c8ass="line" namtioL704"> 804 /a8
 769v3a>
 ef="lin>a>), ref="net/bopttooth/sef="lin>a>), ref="" namtioL776"> 776v3a>        if (! a href=amtioL771"> 771v3    LOS717"> 717v3a>        LOS71ref=anline" namtioL65SHUTDOWtopttooth/sco.c#L687" idioL687" class="othger" clmtioL687"> 687v3a>othger" clturn +code=sk" class="sref">sk /a>-&g8ne" namti8L705"> 705v3a>          8     80>sa /a>-> a href="+code=sco_bdaddtooth/sco.c#L762" idioL762" class="line" namtioL762"> 762v3a>        return  a href="+code=err" class="sref">err /a8/a>. a hr8f="+code=mtu" class="sre8">mtu8/a> =  a href=h/sco.c#L639" idioL639" class="l8ne" namti8L707"> 707v3a>          8     8a href="+code=BT_DBG" class="sref">BT8DBG /a>( 8pa" class="string">"8mtu &80rror /a>( a href="+code=sk" "lin>orphaamtioL687"> 687v3lin>orphaa" namtioL762"> 762v3a>        return  a href="+code=err" class="sref">err /a8/8G /a>( 8p{	)-ref">kilo.c#L749" idioL7a>)-ref">kilo" namtioL762"> 762v3a>        return  a href="+code=err" class="sref">err /a8/9G /a>( 8p3a>:
m8n_t /a>(unsign/bopttomtioL763"> 763v3a>}
co8y_to_user /a>( a href="+8ode=o8tval" h/sco.c#L639" idioL639" class="l8">err /a>8= - a href="+code=EFAULT8 clas81ef="+code=sk" class="sref">sk /a>)
<8ne" namti8L713"> 713v3a>          8     8reak;
ocb" clvoid  a href="+code=__a>)-chaa_ad=optnamt" class=__a>)-chaa_ad=, int  a href="+code=how" cl689" cl.c#L749" idioL7a>)-_class /de=sk" class="sres" class="sref">dev_class /a href="net/bopttooth/sco.c#ck /a>-> a href="+code=sk" class="sref">sk /a>;
-> a href="+code=sk" class="sreparen"sref">how /a>)
paren"" id 0;
 784 /a>
f="+code=sk" class="sref">sk /a>8ne" namti8L715"> 715v3a>        ca8e  a 81o.c#L695" idi /spa"
,  a href="+code=sock" class="sref">sock /a>,  a href="+code=sk" cl_claa>);
dev_class /f="+code=err" class="sref">err /a8SCO_CONNI8FOv3a>:
lock_so8/a>-> 8 href="+code=sk_state" c8ass="81">sk /a>);
conn /a>-> a href="+code=hcon" class="sref">hcon /a>-> a href="+code=dev_class" class="sref">dev_class /too" namtioL769"> s" class="sref">dev_class /="+code=err" class="sref">err /a8SBG /a>( 8= - a href="+code=ENOTCO8N" cl81rror /a>( a href="+code=sk" s" class="sref">dev_class /a>, 3);
sk /a>;
err /a> =8co.c#L7198 idioL719" class="line" 8amtio81eak;
 82"v3a8
 632aren"sref">how /a>)
paren"" id 0;
 721v3a>          8     82val" class="sref">opt" namtioL769"> ef=accept_enqueu"net/bopttooth/sef=accept_enqueu"f="+code=hcon" class2aren"sref">how /a>)
paren"" idamtioL771"> 771v3a>
lock_so8cpy /a>( 8 href="+code=cinfo" clas8="sre8">cinf /a>,  a hrefcommen"s>/* Dclateint nnel."net/bolock_sock" class="sref">lock_so8ce" namti8L725"> 725v3a>          8     8a href /a>,  a hrefcommen"s> * Must beinalled on the ass=ed lock_so8cCO_CONNI8f="+code=min_t" class="s8ef">m82code=socket"void  a href="+code=a>)-chaa_d/sco.c#L748" idioa>)-chaa_d/s, int  a href="+code=how" classck /a>-> a href="+code=sk" class="sref">sk /a>;
 769v3a>
-> 8y_to_user /a>( a href="+8ode=o82 href="+code=sock" class="sref">sock 8">err /a>8= - a href="+code=EFAULT8 clas82s="sref">opts /a>;
)-_class /de=sk" class="sres" class="sref">dev_class /h/sco.c#L772" idioL772" class="l8so.c#L7198L729"> 729v3a>          8     8reak;
 782.c#L700" idioeue /a>( a hrefs" class="sref">dev_class /too" namtioL769"> ="sref">conn /a>-> a href="+code=hcon" class="sref">hcon /a>-> a href="+code=dev_class" class="sref">dev_class /h/sco.c#L772" idioL772" class="l8ne" namti8L731"> 731v3a>        de8ault:8 782v3a>83 /spa"
,  a href="+code=sk" class="sref">sk /a>);
);
);
 771v3s" class="sref">dev_class /a " namtioL769"> 769v3a>
lock_so84" idioL784" class="line" namtioL784"> 783a>);
BT_CONNECTED /a>)
 771v3    LOS717"> 717v3a>        LOS71ref=h/sco.c#L772" idioL772" class="l8ne" namti8e" namtioL735"> 735 /a>
8a hre83o.c#L695" idi /spa"
,  a hreNNECTED" class="sref">BT_CONNECTED /a>)

 771v33a>}
 736v3a>         a8href=83a>);
BT_CONNECTED /a>)
 762v3a>        return  a href="+code=err" class="sref">err /a8se_sock /8>( a href="+code=sk" cla8s="sr83 href="+code=BT_DBG" class="sref">BT8;
( a href="+code=sk" "lin>set>dioLdioL771" class="lin>set>dioL" namtioL776"> 776v3a>        if (! a href=amtioL771"> 771v3SOCK_ZAPP717"> 717v3a>    SOCK_ZAPP71 href="+code=err" class="sref">err /a8so.c#L7198oL739"> 739v3a>
 740v3a>static int8 a hr8f="+code=sco_sock_getsockopt" class="8ref">sco_8ock_getsockopt /a>(struc8  a h8ef="+code=socvoid  a href="+code=a>)-ccla_reads="sref">dev_claa>)-ccla_reads, int  a href="+code=how" cl689" cl.c#L749" idioL7a>)-_class /de=sk" class="sres" class="sref">dev_class / 0;
 742v3a>        s8ruct 8a href="+code=sock" class="sref">sock 8a> * a hr8f="+code=sk" class="sref8>sk /8> =  a href="+code=sock" class="sref">sock /a>-> a href="+code=sk" class="sre2aren"sref">how /a>)
paren"" id="+code=err" class="sref">err /a8a href="+8ode=err" class="sref">er8 /a> 8 0;
sock /a>-> a href="+code=sk" class="sref">sk /a>;
dev_class /a>, 3);
sk /a>;
err /a8ae" namti8L745"> 745v3a>         a8href=8+code=BT_DBG" class="sref">BT_DBG /a>8 spa" cla8s="string">"sk źp&quo8; /spa"
,  a href="+code=sk" class="sref">sk /a>);
);
dev_class /f="+code=err" class="sref">err /a8ne" namti8L747"> 747v3a>        if8( a h8ef="+code=level" class="sref">level /8> ==  a h8ef="+code=SOL_SCO" class8"sref84rror /a>( a href="+code=sk" ">)-ccla_l>sock /a>-> a hr>)-ccla_l>so" namtioL776"> 776v3s" class="sref">dev_class /f="+code=err" class="sref">err /a8no.c#L7198ass="sref">sco_sock_gets8ckopt84eak;
 750v3a>        if8( a h84 63a>        return  a hrefef="+code=sk" class="sref">sk /a>8ser /a>( 8 href="+code=len" class=8sref"85val" class="sref">opt" namtioL769"> s="sref">clasr4" cllass="sref">sk /a>)-ref">clasr4" cll" namtioL776"> 776v3a>        if (! a href="+code=sk" class="sref">sk /a>-&g8ref">EFAU8T /a>;
 eh_sco.c#L776" idioL776" cleh_sco.c#L77" namtioL776"> 776v3a>        if (! a href="+code=sk" class="sref">sk /a>-&g8r> * a hr8L753"> 753v3a>         a8href=8503"> 703v3a>         "net/bopttooth/NNECTED" class="sref">BT_CONNECTED /a>)
 771v3    amtioL717"> 717v3a>                    +code=sk" class="sref">sk /a>-&g8r href="+8ref="+code=sk" class="sr8f">sk85 NNECTED" class="sref">BT_CONNECTED /a>)
 762v3a>        return  a href="+code=err" class="sref">err /a8ne" namti8L755"> 755v3a>        sw8tch (85>sa /a>-> a href="+code=sco_bdaddeh_unsco.c#L776" idioL776" cleh_unsco.c#L77" namtioL762"> 762v3a>        return  a href="+code=err" class="sref">err /a8nspa" cla8 {	sk /a>8se" namti8ss="line" namtioL757"> 787v3a>85ef">ENOPROTOOPT /a>;
how /a>)
paren"" idtoo" namtioL769"> ="sr)
list51v3a>           ="sr)
list51" namtioL776"> 776v3s" class="sref">dev_class /T_CONNECTED /a>)
           =rc href="+code=err" class="sref">err /a8n ==  a h8ef="+code=ENOPROTOOPT" c8ass="8ref">ENOPROTOOPT /a>;
a>) {	how /a>)
paren"" id 0;
 789v3a>        }
 donet/bopttooth/scodone    +code=sk" class="sref">sk /a>-&g8re" namti8e" namtioL760"> 76"v3a>
8a hre85="+code=sco_sock_getsockopt" class="8ne" namti8L761"> 761v3a>         a8href=86val" class="sref">opt" namtioL769"> eh_sco.c#L776" idioL776" cleh_sco.c#L77" namtioL776"> 776v32aren"sref">how /a>)
paren"" id +code=sk" class="sref">sk /a>-&g8se_sock /8>( a href="+code=sk" cla8s="sr86ef="+code=sk" class="sref">sk /a>)
<8;
 703v3a>         "net/bopttooth/NNECTED" class="sref">Btoo" namtioL769"> ="srref">alscoass="sref">sk /a>)-ref">alsco" namtioL762"> 762v3aef">n="sref">how /a>)
n="" namtioL776"> 776v32aren"sref">how /a>)
paren"" id pttooth/sco.c#L77NULLsref">how /a>)
NULLref=acode=sk" class="sref">sk /a>)
<8; href="+8oL764"> 764 /a>
EAGAIN /a>;
 771v3        748v3a>                   748ref=amtioL771"> 771v3GFP_ATOMICv3a>           GFP_ATOMIC" id +code=sk" class="sref">sk /a>-&g8se" namti8L765"> 765v3a>static int8 a hr86>sa /a>-> a href="a>) {	sk /a>8f">sco_so8k_shutdown /a>(struct  a8href=86_t /a>(unsigned int, ref">opt" namtioL769"> eh_unsco.c#L776" idioL776" cleh_unsco.c#L77" namtioL762"> 762v32aren"sref">how /a>)
paren"" id +code=sk" class="sref">sk /a>-&g8se" namti8oL767"> 767v3a>        s8ruct 86ef">ENOPROTOOPT /a>;
ffffffffgotoo" namtioL769"> donet/bopttooth/scodone    +code=sk" class="sref">sk /a>-&g8a> * a hr8f="+code=sk" class="sref8>sk /86ef">ENOPROTOOPT /a>;
h/sco.c#L740" idioL740" class="l80;
 770v3a>         a8href=86_t /a>(unsigned int,  a href="+code=a>)-ref">ini="+code=sock" class="srefini=" namtioL776"> 776v3a>        if (! a href=amtioL771"> 771v32aren"sref">how /a>)
paren"" id +code=sk" class="sref">sk /a>-&g8 spa" cla8s="string">"sock Wp, 87a href="net/bopttooth/sco.c#L732" id8ne" namti8L772"> 772v3a>        if8(! a 87o.c#L752" idioL752" c" namtioL769"> eaass="sref">dev_claeaass" nam"net/bopttooth/sco.cef="76" idioL776" clef="7f="+code=hcon" class="sref">hcon /a>-> a href="+code=dev_clashrcv3a>           =rc hrepttooth/sco.c#L77s" class="sref">dev_class /T_CONNECTED /a>)
           =rc href="+code=err" class="sref">err /a8 href="ne8/bopttooth/sco.c#L773" i8ioL778703"> 703v3a>         "net/bopttooth/eaass="sref">dev_claeaass" nam"net/bopttooth/sco.cef="76" idioL776" clef="7f="+code=hcon" class="sref">hcon /a>-> a href="+code=dev_clasds"sref">how /a>)
ds" hrepttooth/sco.c#L77s" class="sref">dev_class /T_CONNECTED /a>)
how /a>)
ds" href="+code=err" class="sref">err /a8  href="+8L774" class="line" namti8L774"87="+code=sco_sock_getsockopt_old" cla8ne" namti8L775"> 775v3a>         a8href=87>sa /a>-> a href="+code=sco_bdadd)-&gccla_hde=optnamt" class=)-&gccla_hde=" namtioL776"> 776v3s" class="sref">dev_class /T_CONNECTED /a>)
err /a8 ">sco_so8ref="+code=sk" class="sr8f">sk87_t /a>(unsigned int, NECTED /a>)
)-chaa_ad=optnamt" class=__a>)-chaa_ad=, inttioL771"> 771v3s" class="sref">dev_class /a " namtioL769"> a>        if (! a href=amtioL771"> 771v32aren"sref">how /a>)
paren"" id +code=sk" class="sref">sk /a>-&g8 e" namti8+code=sk_shutdown" class8"sref87f="+code=level" class="sref">level /8> a hr8f="+code=sk_shutdown" cl8ss="s8ef">sk_shutdown /a> =  a href="+code=SHUTDOWtopttooth/sco.c#L687" idioL687" class="l="net/bopttooth/sco.c#L657" idioLmtioL771"> 771v3    amtioL717"> 717v3a>                    +code=sk" class="sref">sk /a>-&g8class="li8e" namtioL679"> 679v3a>
8a hre87eak;
 680v3a>         a8href=87_t /a>(unsigned int,  /a>,  a hrefcommen"s>/* Wake up paren" */"net/bolock_sock" class="sref">lock_so8se_sock /8>( a href="+code=sk" cla8s="sr88val" class="sref">opt" namtioL769"> 2aren"sref">how /a>)
paren"" idL687" idioL687" class="data_reads="sref">dev_claa="data_reads" namtioL762"> 762v32aren"sref">how /a>)
paren"" id, 1 +code=sk" class="sref">sk /a>-&g8;
sk /a>)
<8ine" namt8oL683"> 683v3a>
 703v3a>         " namtioL769"> eh_unsco.c#L776" idioL776" cleh_unsco.c#L77" namtioL762"> 762v32aren"sref">how /a>)
paren"" id +code=sk" class="sref">sk /a>-&g8i774" idi8L684"> 684v3a>static int8 a hr88"sref">EAGAINh/sco.c#L740" idioL740" class="l8se" namti8co_sock_getsockopt_old /8>(str88code=BT_DBG" class="sref">BT_DBG /a>8ine" namt8oL686"> 686v3a>        s8ruct 88a>);
" namtioL769"> donet/bopttooth/scodone    f="+code=err" class="sref">err /8a> * a hr8f="+code=sk" class="sref8>sk /88">sk /a>);
-> a hr>)-ccla_unsco." namtioL776"> 776v3s" class="sref">dev_class /f="+code=err" class="sref">err /a8>sco_opti8ns /a>  a href="+code=op8s" cl88ttooth/sco.c#L639" idioL639" class="l8">sco_con8info /a>  a href="+code=8info"88eak;
er8 /a> 88de=ki /a>,  a hrefcommen"s>/* ----- SCO  inerface with lower layer (HCI) ----- */"net/bolock_sock" class="sref">lock_so8ne" namti8L691"> 691v3a>         a8href=8+code=ass="sref">kiocb /a> * _claectfin=optnamt" class="sre_claectfin=, int  a href="+code=how" c)-&gdevoptnamt" class=)-&gdev"+code=sk" class="srehdevoptnamt" class=)dev"+coamtioL771"> 771v3bdad=rde=cinfo" class="bdad=rde"+code=sk" class="srebdad=r=cinfo" class="bdad=r" id 0;
"sk źp&quo89 href="+code=sock" class="sref">sock 8ne" namti8L693"> 693v3a>        if8( a h89 =  a href="+code=sock" class="sref">sock /a>-> a href="+code=sk" class="sref">sk /a>;
err /a8ser /a>( 8 href="+code=len" class=8sref"890;
err /a8se" namti8T /a>;
 696v3a>         a8href=8+code=lock_sock" class="sref">lock_so8k /a>( a 8ref="+code=sk" class="sr8f">sk89">sk /a>);
sk /a>);
);
);
dev_claeatosco" namtioL776"> 776v3bdad=r=cinfo" class="bdad=r" id f="+code=err" class="sref">err /a8nsco_opti8L698"> 698v3a>        sw8tch (89f">sk"+code=err" class="sref">err /a8n>sco_con8 {	/* Fin= list51.c# lock_so8n href="+8v3a>:
( a hrefread_l>sock /a>-> a hread_l>so" nam"net/bopttooth/sco.cass="">list"+code=sock" class="">list" na a href="+code=sl>sock /a>-> a hl>so" naf="+code=err" class="sref">err /a9/a>-> 9 href="+code=sk_state" c9ass="90 %p" /spa"
,  a hre"">for_each="sref">dev_claa="for_each" namtioL776"> 776v3a>        if (! a href=amtioL771"> 771v3nsreoptnamt" class=nsre"+co, "net/bopttooth/sco.cass="">list"+code=sock" class="">list" na a href="+code=sheadoptnamt" class=)ead" id ef="+code=sk" class="sref">sk /a>9">err /a>9= - a href="+code=ENOTCO9N" cl90o.c#L752" idioL752" ca href="+code=BT_CONNECTED" class="sref">BT_CONNECTED /a>) {	          e" LISTE1" id 0;
 703v3a>                 _cltinue="+code=err" class="sref">err /a9/3.c#L7039 href="+code=len" class=904 /a90="+code=sco_sock_getsockopt_old" cla9ne" namti9L705"> 705v3a>          9     90>sa /a>-> a href="a>) {	dev_claeaamp" nam"net/bopttooth/sco.cef="76" idioL776" clef="7f="+code=hcon" class="sref">hcon /a>-> a href="+code=dev_clashrcv3a>           =rc hrept"net/bopttooth/sco.chdevoptnamt" class=)dev"+coL687" idioL687" clasbdad=r=cinfo" class="bdad=r" id  ||de=sco_sock_getsockopt_old" cla9n5" namti9L696"> 696v3a>         a9">mtu90_t /a>(unsigned int, ref"{	dev_claeaamp" nam"net/bopttooth/sco.cef="76" idioL776" clef="7f="+code=hcon" class="sref">hcon /a>-> a href="+code=dev_clashrcv3a>           =rc hrept717" class="lineDADDR_ANY8v3a>          eDADDR_ANY" id fef="+code=sk" class="sref">sk /a>9"6" namti9Lef="+code=sk" class="sr9     90ef">ENOPROTOOPT /a>;
ffffffffopttooth/sco.c#Lmoptnamt" class=lm idio|oL717" class="linHCI_LM_ACCE"> 758v3a>       HCI_LM_ACCE">"+co="+code=err" class="sref">err /a9DBG /a>( 9pa" class="string">"9mtu &90"sref">EFAULT /a>;
( 9p{	m90"net/bopttooth/sco.c#L761" idioL761" class="l9"sref">co9y_to_user /a>( a href="+9ode=o91 %p" /spa"
,  a hreread_unsco.ck /a>-> a hread_unsco." nam"net/bopttooth/sco.cass="">list"+code=sock" class="">list" na a href="+code=sl>sock /a>-> a hl>so" naf="+code=err" class="sref">err /a9">err /a>9= - a href="+code=EFAULT9 clas91ef="+code=sk" class="sref">sk /a>)
<9ne" namti9L713"> 713v3a>          9     91763" class="line" namtioL763"> 763vLmoptnamt" class=lm idi="+code=err" class="sref">err /a9"3.c#L70394" class="line" namtioL794"> 791ttooth/sco.c#L765" idioL765" class="l9ne" namti9L715"> 715v3a>        ca9e  a 91code=BT_DBG" class="sref">BT_DBG /a>9SCO_CONNI9FOv3a>:
kiocb /a> * _claectfcfmoptnamt" class=> * _claectfcfm, int  a href="+code=how" c)-&gs" class="sref">dev)-&gs" c"+code=sk" class="srehbopttooth/sco.c#L724" idiopt717" class="lin__u8ttooth/sco.c#L7__u8"+cod"sref">kiocb /a>#L7u4"> 724 /a>
#L7u4" id 0;
sock 9SBG /a>( 9= - a href="+code=ENOTCO9N" cl91rror /a>( a href="+code=sk" class="sref">sk /a>);
);
);
#L7u4/a>);
dev_claeatosco" nam"net/bopttooth/sco.chbopttooth/sco.c#L724" idioT_CONNECTED /a>)
how /a>)
ds" hrefa " namtioL769"> a#L7u4"> 724 /a>
#L7u4" id ="+code=err" class="sref">err /a9"8G /a>( 9 idioL719" class="line" 9amtio91L769" class="l>) {	 724 /a>
#L7u4" id ef="+code=sk" class="sref">sk /a>9ioL720" c9ass="line" namtioL720"> 92"v3a91_t /a>(unsigned int,  /a>;
)-_class /de=sk" class="sres" class="sref">dev_class /h/sco.c#L772" idioL772" class="l9ne" namti9L721"> 721v3a>          9     92a href="net/bopttooth/sco.c#L732" id9set /a>(&9mp; a href="+code=cinfo"9class92o.c#L752" idioL752" c" namtioL769"> s" class="sref">dev_class /too" namtioL769"> ="srccla_ad=optnamt" class=="srccla_ad=f="+code=hcon" class/bopttooth/sco.c#L724" idiof="+code=err" class="sref">err /a9o /a>. a 9ref="+code=hci_handle" c9ass="9203"> 703v3a>         a href="+code=BT_COs" class="sref">dev_class / 0;
EAGAIN /a>;
 ="srccla_reads="sref">dev_claa>)-ccla_reads, inttioL776"> 776v3s" class="sref">dev_class /f="+code=err" class="sref">err /a9ce" namti9L725"> 725v3a>          9     92"net/bopttooth else"+code=err" class="sref">err /a9cCO_CONNI9f="+code=min_t" class="s9ef">m92_t /a>(unsigned int, NECTED /a>)
)-ccla_d/sco.c#L748" idioa>)-ccla_d/sf="+code=hcon" class/bopttooth/sco.c#L724" idiopt717" class="linbt_toe769no6" idioL776" clef=toe769nof="+code=hcon" class=#L7u4"> 724 /a>
#L7u4" id f="+code=err" class="sref">err /a9ca>-> 9y_to_user /a>( a href="+9ode=o92f="+code=level" class="sref">level /9">err /a>9= - a href="+code=EFAULT9 clas92738" class="line" nath/sco.c#L775" idioL775" class="l9so.c#L7199L729"> 729v3a>          9     92ttooth/sco.c#L740" idioL740" class="l90" idioL790" class="line" namtioL790"> 792="+code=sco_sock_getsockopt" class="9ne" namti9L731"> 731v3a>        de9ault:93code=ass="sref">kiocb /a> * disccla_cfmoptnamt" class=> * disccla_cfm, int  a href="+code=how" c)-&gs" class="sref">dev)-&gs" c"+code=sk" class="srehbopttooth/sco.c#L724" idiopt717" class="lin__u8ttooth/sco.c#L7__u8"+cod"sref">kiocb /areasopttooth/sco.c#L7reasopss / 0;
 792v3a>93 href="+code=sock" class="sref">sock 9n /a>. a 9ef="+code=ENOPROTOOPT" c9ass="9303"> 703v3a> ref="+code=sk" class="sref">sk /a>);
);
);
 793="+code=sco_sock_getsockopt_old" cla9ne" namti9e" namtioL735"> 735 /a>
9a hre93o.c#L695" idi /spa"
,  a hreN>)-ccla_d/sco.c#L748" idioa>)-ccla_d/sf="+code=hcon" class/bopttooth/sco.c#L724" idiopt717" class="linbt_toe769no6" idioL776" clef=toe769nof="+code=hcon" classreasopttooth/sco.c#L7reasopss /  h/sco.c#L775" idioL775" class="l94CO_CONNI9L736"> 736v3a>         a9href=93a>);
sk"+code=err" class="sref">err /a9so.c#L7199oL739"> 739v3a>
kiocb /a> * recv_a>)dataco.c#L748" idioa>)-recv_a>)data, int  a href="+code=how" c)-&gs" class="sref">dev)-&gs" c"+code=sk" class="srehbopttooth/sco.c#L724" idiopt /a>;
 740v3a>static int9 a hr9f="+co="+code=sock" class="sref">sock 9ref">sco_9ock_getsockopt /a>(struc9  a h94 %p" /a>;
)-_class /de=sk" class="sres" class="sref">dev_class /too" namtioL769"> hbopttooth/sco.c#L724" idioT_CONNECTED /a>)
 * dataco.c#L748" idioa>)-data, inh/sco.c#L775" idioL775" class="l9ine" namt9oL742"> 742v3a>        s9ruct 94ef="+code=sk" class="sref">sk /a>)
<9a> * a hr9f="+code=sk" class="sref9>sk /9> =  a href="+l>) {	dev_class / 0;
er9 /a> 94"sref">EAGAIN /a>;
 drop="sref">dev_cladrop, inh/sco.c#L775" idioL775" class="l9ie" namti9L745"> 745v3a>         a9href=9+code=BT_DBG" class="sref">BT_DBG /a>9 spa" cla9s="string">"sk Żp&quo9; /spa"
,  a href="+code=sk" class="sref">sk /a>);
);
);
dev_class /a " namtioL769"> a>bnet/bopttooth/scobss /T_CONNECTED /a>)
           lepss / h/sco.c#L775" idioL775" class="l9ne" namti9L747"> 747v3a>        if9( a h9ef="+code=level" class="sref">level /9> ==  a h9ef="+code=SOL_SCO" class9"sref94rror /a>( a ha href="+code=BT_CONNbnet/bopttooth/scobss /T_CONNECTED /a>)
           lepss / ef="+code=sk" class="sref">sk /a>9no.c#L7199ass="sref">sco_sock_gets9ckopt94"sref">bt_accept_dequeue /a>( a hrefs="srecv_frss=optnamt" class=s="srecv_frss=, inttioL776"> 776v3s" class="sref">dev_class /a " namtioL769"> a>bnet/bopttooth/scobss / h/sco.c#L775" idioL775" class="l9n" idioL79L750"> 750v3a>        if9( a h94_t /a>(unsigned int, ine" nath/sco.c#L775" idioL775" class="l9ser /a>( 9 href="+code=len" class=9sref"95val" class="sh/sco.c#L740" idioL740" class="l9ref">EFAU9T /a>;
sk /a>)
<9r> * a hr9L753"> 753v3a>         a9href=9503"> " namtioL769"> drop="sref">dev_cladrop, inf="+code=err" class="sref">err /9r href="+9ref="+code=sk" class="sr9f">sk95a>);
 755v3a>        sw9tch (95>sa /a>-> ine" nath/sco.c#L775" idioL775" class="l9sspa" cla9 {	 797v3a>95f="+code=level" class="sref">level /9n ==  a h9ef="+code=ENOPROTOOPT" c9ass="9ref">Eocb" class="sref">kiocb /a> * debugfs_s3a>{	 799v3a> f="+code=sk" class="sref">sk /a>9re" namti9e" namtioL760"> 76"v3a>
9a hre95_t /a>(unsigncode=sock" class="sref">sock /a>-> a href="+code=sk" class="sref">sk /a>;
err /a9ne" namti9L761"> 761v3a>         a9href=96 %p" /a>;
err /a9se_sock /9>( a href="+code=sk" cla9s="sr96ef="+code=sk" class="sref">sk /a>)
<9;
 703v3a> ref="+code=sk" read_l>sock /a>-> a hread_l>so" nam"net/bopttooth/sco.cass="">list"+code=sock" class="">list" na a href="+code=sl>sock /a>-> a hl>so" naf="+code=err" class="sref">err /a9; href="+9oL764"> 764 /a>
 765v3a>static int9 a hr96o.c#L695" idi /spa"
,  a hreN">for_each="sref">dev_claa="for_each" namtioL776"> 776v3a>        if (! a href=amtioL771"> 771v3nsreoptnamt" class=nsre"+co, "net/bopttooth/sco.cass="">list"+code=sock" class="">list" na a href="+code=sheadoptnamt" class=)ead" id ef="+code=sk" class="sref">s" cla9sspa" cla9k_shutdown /a>(struct  a9href=96_t /a>(unsigned int, f="+code=how" cseq_po.ctfnet/bopttooth/sceq_po.ctf" namtioL776"> 776v3fnet/bopttooth/sfss /a et/bopttooth/sco.c#L746" id>);
);
);
dev_claeatosco" nam"net/bopttooth/sco.cef="76" idioL776" clef="7f="+code=hcon" class="sref">hcon /a>-> a href="+code=dev_clashrcv3a>           =rc hre)acode=sk" class="sref">sk /a>)
<9se" namti9oL767"> 767v3a>        s9ruct 96ef">ENOPROTOOPT /a>;
fffffffft, f="+code=how" cbatosco="sref">dev_claeatosco" nam"net/bopttooth/sco.cef="76" idioL776" clef="7f="+code=hcon" class="sref">hcon /a>-> a href="+code=dev_clasds"sref">how /a>)
ds" hrefa " namtioL769"> aNECTED" class="sref">BT_CONNECTED /a>) {	err /a9; ==  a h9f="+code=sk" class="sref9>sk /96ef">ENOPROTOOh/sco.c#L740" idioL740" class="l90;
 770v3a>         a9href=96.c#L700" idioeue /a>( a hrefread_unsco.ck /a>-> a hread_unsco." nam"net/bopttooth/sco.cass="">list"+code=sock" class="">list" na a href="+code=sl>sock /a>-> a hl>so" naf="+code=err" class="sref">err /a9 spa" cla9s="string">"sock ap, 97a href="net/bopttooth/sco.c#L732" id9ne" namti9L772"> 772v3a>        if9(! a 97o.c#L752" idiine" nath/sco.c#L775" idioL775" class="l9 href="ne9/bopttooth/sco.c#L773" i9ioL779703"> h/sco.c#L740" idioL740" class="l9  href="+9L774" class="line" namti9L774"97="+code=sco_sock_getsockopt_old" cla9ne" namti9L775"> 775v3a>         a9href=97>sa /ocb" class="sref">kiocb /a> * debugfs_op51v3a>           ="srdebugfs_op51, int  a href="+code=how" cinsreoptnamt" class=insre"+code=sk" class="sreinsreoptnamt" class=insre"+copt /a>;
sco_so9ref="+code=sk" class="sr9f">sk97_t /af="+code=sk" class="sref">s" cla9 e" namti9+code=sk_shutdown" class9"sref97
 763vs.c#le_op51v3a>           =.c#le_op51" namtioL776"> 776v3fil=optnamt" class=fil=ss /a " namtioL769"> a * debugfs_s3a>{	 insreoptnamt" class=insre"+coT_CONNECTED /a>) {	err /a9  ==  a h9f="+code=sk_shutdown" cl9ss="s97ttooth/sco.c#L639" idioL639" class="l9class="li9e" namtioL679"> 679v3a>
9a hre97eak;
 680v3a>         a9href=97de=kiocb" clconstt /a>;
kiocb /a> * debugfs_fop4"> 724 /a>
 * debugfs_fop4ss /toof="+code=sk" class="sref">s" cla9se_sock /9>( a href="+code=sk" cla9s="sr98val" class="s a href="+code=sop51v3a>           op51" nafffffffft, oo" namtioL769"> ="srdebugfs_op51v3a>           ="srdebugfs_op51, inacode=sk" class="sref">sk /a>)
<9;
 =eq_readoptnamt" class==eq_read, inacode=sk" class="sref">sk /a>)
<9;href="ne9oL683"> 683v3a>
 703v3a>  a href="+code=sllseeock /a>-> a hllseeo" idfffffffftoo" namtioL769"> =eq_lseeock /a>-> a h=eq_lseeo, inacode=sk" class="sref">sk /a>)
<9; href="+9L684"> 684v3a>static int9 a hr98"sref">EAGAIN a href="+code=srelass=optnamt" class=relass=sref">EAGAINoo" namtioL769"> =.c#le_relass=optnamt" class==.c#le_relass=, inacode=sk" class="sref">sk /a>)
<9;e" namti9co_sock_getsockopt_old /9>(str98code=}="+code=err" class="sref">err /a9ine" namt9oL686"> 686v3a>        s9ruct 98code=lock_sock" class="sref">lock_so9a> * a hr9f="+code=sk" class="sref9>sk /98">sk ocb" cl /a>;
dev_cladentrs"+code=sk" class="sref"srdebugfsv3a>           ="srdebugfs"+co="+code=err" class="sref">err /a9>sco_opti9ns /a>  a href="+code=op9s" cl98f">sk"+code=err" class="sref">err /a9">sco_con9info /a>  a href="+code=9info"98eak;
ocb" clconstt /a>;
 724 /a>
kiocb /a> * 3lin>op4"> 724 /a>
 * 3lin>op4ss /toof="+code=sk" class="sref">s" cla9se" namti9ode=err" class="sref">er9 /a> 989sref">EAGAIN a href="+code=sfamils="sref">dev_clafamils" idfffffffftoo" namtioL769"> PF_BLUETOOTH="sref">dev_claPF_BLUETOOTH, inacode=sk" class="sref">sk /a>)
<9ne" namti9L691"> 691v3a>         a9href=99val" class="s a href="+code=sownllass="sref">sk /ownll" idfffffffft,oo" namtioL769"> THIS_MODULEass="sref">sk /THIS_MODULE, inacode=sk" class="sref">sk /a>)
<9n
"sk Żp&quo991al" class="s a href="+code=srelass=optnamt" class=relass=sref">EAGAINoo" namtioL769"> = * 3lin>relass=optnamt" class== * 3lin>relass=, inacode=sk" class="sref">sk /a>)
<9nhref="ne9L693"> 693v3a>        if9( a h9903"> 703v3a>  a href="+code=sbin=optnamt" class=bin=, infffffffft, oo" namtioL769"> ="sr3lin>bin=optnamt" class=="sr3lin>bin=, inacode=sk" class="sref">sk /a>)
<9n href="+9 href="+code=len" class=9sref"99"sref">EAGAIN a href="+code=s_claectlass="sref">dev_claectsref">EAGAINoo" namtioL769"> = * 3lin>_claectlass="sref">dev= * 3lin>_claect, inacode=sk" class="sref">sk /a>)
<9ne" namti9T /a>;
 ="sr3lin>list51v3a>           ="srref">list51" naacode=sk" class="sref">sk /a>)
<9nne" namt9L696"> 696v3a>         a9href=995.c#L695" idi a href="+code=sacceptv3a>           accept" nafffffft, oo" namtioL769"> ="sr3lin>acceptv3a>           ="sr3lin>accept" naacode=sk" class="sref">sk /a>)
<9n> * a hr9ref="+code=sk" class="sr9f">sk99">sk /a>);
EAGAINoo" namtioL769"> = * 3lin>getass=optnamt" class== * 3lin>getass=" naacode=sk" class="sref">sk /a>)
<9nsco_opti9L698"> 698v3a>        sw9tch (997>sk /a>);
EAGAINoo" namtioL769"> = * 3lin>sendmsLdioL771" class=" * 3lin>sendmsL" naacode=sk" class="sref">sk /a>)
<9n>sco_con9 {	EAGAINoo" namtioL769"> bt 3lin>recvmsLdioL771" class=bt 3lin>recvmsL" naacode=sk" class="sref">sk /a>)
<9ne" namti9v3a>:
EAGAIN a href="+code=spolsco.c#L748" idiopols, infffffffft, oo" namtioL769"> bt 3lin>polsco.c#L748" idiobt 3lin>pols" naacode=sk" class="sref">sk /a>)
<10/a>-> 10/a>-:
EAGAIN a href="+code=sioctsco.c#L748" idioiocts" idfffffffft,oo" namtioL769"> bt 3lin>ioctsco.c#L748" idiobt 3lin>iocts" naaco/pre>>ode=sk" class="sref">sk /a>)
<10/1>-> 10/="string">"sk ๾/=">10/1al" class="s a href="+code=smma2net/bopttooth/smma2, infffffffft, oo" namtioL769"> =a h>no_mma2net/bopttooth/s=a h>no_mma2" naacode=sk" class="sref">sk /a>)
<10/2>-> 10/693"> 693v3a>        if10/69>10/03"> 703v3a>  a href="+code=ssk /aa hrepail3"> 703v3oo" namtioL769"> =a h>no_sk /aa h>no_sk /a>)
<10/3>-> 10/href="+code=len" class=10/hr>10/"sref">EAGAIN a href="+code=sshutdownass="sref">sk /ahutdownsref">EAGAIoo" namtioL769"> = * 3lin>shutdownass="sref">sk /a * 3lin>shutdown" naacode=sk" class="sref">sk /a>)
<10/4>-> 10/ /a>;
 703v3oo" namtioL769"> = * 3lin>set3linoptv3a>           = * 3lin>set3linopt" naacode=sk" class="sref">sk /a>)
<10/5>-> 10/696"> 696v3a>         a10/69>10/5.c#L695" idi a href="+code=sget3linoptv3a>           get3linopt3"> 703v3oo" namtioL769"> = * 3lin>get3linoptv3a>           = * 3lin>get3linopt">sk"+code=err" class="sref">err /a10/6>-> 10/ef="+code=sk" class="sr10/ef>10/6ode=}="+code=err" class="sref">err /a10/7>-> 10/698"> 698v3a>        sw10/69>10/f">sk"+code=err" class="sref">err /a10/8>-> 10/{	;
dev_cla" c_proto_famils"+cod"sref">kiocb /a> * 3lin>famils>op4"> 724 /a>
 * 3lin>famils>op4ss /toof="+code=sk" class="sref">s" cla10/9>-> 10/3a>:
EAGAIN a href="+code=sfamils="sref">dev_clafamils" idfoo" namtioL769"> PF_BLUETOOTH="sref">dev_claPF_BLUETOOTH, inacode=sk" class="sref">sk /a>)
<101a>-> 10y_to_user /a>( a href="+10y_t>10y_al" class="s a href="+code=sownllass="sref">sk /ownll" idffoo" namtioL769"> THIS_MODULEass="sref">sk /THIS_MODULE, inacode=sk" class="sref">sk /a>)
<10y1>-> 10= - a href="+code=EFAULT10= ->10y1al" class="s a href="+code=scref="net/bopttooth/scref="" idfoo" namtioL769"> = * 3lin>_ref="net/bopttooth/s= * 3lin>_ref=", inacode=sk" class="sref">sk /a>)
<10y2>-> 10L713"> 713v3a>          10L71>10y2ode=}="+code=err" class="sref">err /a1013>-> 104" class="line" namtioL7104" >10y="+code=sco_sock_getsockopt_old" cla10y4>-> 10L715"> 715v3a>        ca10L71>10yo.c#Lass="sref">kiocb /a_>ini="+code=sock" cl_fini=" nao" namtioL769"> = * ini="+code=sock" class=ini=" namvoid 0;
10y_t /af="+code=sk" class="sref">s" cla10y6>-> 10 href="+code=sk_state" c10 hr>10y">sk /a>);
kiocb /a3a>}
10yf">sk"+code=err" class="sref">err /a1018>-> 10 idioL719" class="line" 10 id>10yfamily /a> =  sref">kiocb /a3a>}
 proto_regist5>}
err /a10y9>-> 10ass="line" namtioL720"> 10ass>10y 633a>}
err /a102a>-> 10L721"> 721v3a>          10L72>10L7, infffffffft,      /bopttomtioL763"> 763v3a>}
10Lef="+code=sk" class="sref">sk /a>)
<10L2>-> 10ref="+code=hci_handle" c10ref>10L03"> 703v3a> ref="+code=sk" 3a>}
 bt 3lin>regist5>}
 776v3        748v3a>                   748ref=am"net/bopttooth/sco.cass="lin>famils>op4"> 724 /a>
 * 3lin>famils>op4ss /f="+code=err" class="sref">err /a1023>-> 10 href="+code=cinfo" clas10 hr>10L3a href="net/ne" namtioL632"> 633a>}
s" cla1024>-> 10L725"> 725v3a>          10L72>10L>sa /a>-> a href="+code=sco_bdaddBT_ERRv3a>             _ERR" namtt/bopttooth/sco.c#L746" idSCO err /a1025>-> 10f="+code=min_t" class="s10f=">10L_t /a>(unsigned int, gotoo" namtioL769"> bopo>}
10L">sk /a>);
10Lf">sk"+code=err" class="sref">err /a1028>-> 10L729"> 729v3a>          10L72>10LL769" class="l>) " namtioL769"> bt debugfsv3a>           bt debugfsss /fof="+code=sk" class="sref">s" cla1029>-> 100" class="line" namtioL7100" >10L_t /a>(unsigned int,  a href="+code=a>)-debugfsv3a>           ="srdebugfs"+cofoo" namtioL769"> debugfs__ref="_fil=optnamt" class=debugfs__ref="_fil=" namtt/bopttooth/sco.c#L746" id="sa href="net/bop0444pt717" class="linbt_debugfsv3a>           bt debugfsss /acode=sk" class="sref">sk /a>)
<103a>-> 10L731"> 731v3a>        de10L73>10L7t /a>(unsigned int,                                   717" class="linNULLsref">how /a>)
NULLref=am"net/bopttooth/sco.cass=debugfs_fop4"> 724 /a>
 * debugfs_fop4ss /f="+code=err" class="sref">err /a1031>-> 10ss="line" namtioL732"> 710ss=>10Lo.c#L752" idioL752" ca hr{	err /a1032>-> 10ef="+code=ENOPROTOOPT" c10ef=>10L03"> 703v3a>                 +code=sco_bdaddBT_ERRv3a>             _ERR" namtt/bopttooth/sco.c#L746" idFaile< too_ref=" SCO debug fil=a href="net/bf="+code=err" class="sref">err /a1033>-> 104" class="line" namtioL7104" >10L"sref">EAGAINh/sco.c#L740" idioL740" class="l10L4>-> 10e" namtioL735"> 735 /a>
10e" >10Lcode=BT_DBG" class="sref">BT_DBG /a>10L5>-> 10L736"> 736v3a>         a10L73>10L /spa"
,  a href="+code=sk" claINF8v3a>             aINF8" namtt/bopttooth/sco.c#L746" idSCO err /a1036>-> 10>( a href="+code=sk" cla10>( >10Lf="+code=level" class="sref">level /10L7>-> 10"net/bopttooth/sco.c#L7310"ne>10L738" class="line" nath/sco.c#L775" idioL775" class="l10L8>-> 10oL739"> 739v3a>
10Leak;
 740v3a>static int10L74>10Lde=ki  namtioL769"> bopo>}
err /104a>-> 10ock_getsockopt /a>(struc10ock>10oc/spa"
,  a href="+code=sk" proto_unregist5>}
err /a1041>-> 10oL742"> 742v3a>        s10oL7>10oo.c#L752" idiine" namtioL763"> 763v3a>}
10o03"> h/sco.c#L740" idioL740" class="l10o3>-> 10ode=err" class="sref">er10ode>10o="+code=sco_sock_getsockopt_old" cla1044>-> 10L745"> 745v3a>         a10L74>10ocode=void "sref">kiocb /a_>exi="+code=sock" cl_fexi=" nao" namtioL769"> = * exi="+code=sock" cl= * exi=" namvoid 0;
"sk ๾s=">10o_t /af="+code=sk" class="sref">s" cla1046>-> 10L747"> 747v3a>        if10L74>10o">sk /a>);
 776v3o>)-debugfsv3a>           ="srdebugfs"+cofth/sco.c#L764" idioL764" class="1047>-> 10ef="+code=SOL_SCO" class10ef=>10of">sk"+code=err" class="sref">err /a1048>-> 10ass="sref">sco_sock_gets10ass>10oL769" class="l>) " namtioL769"> bt 3lin>unregist5>}
 776v3        748v3a>                   748ref=)f< 0f"+code=err" class="sref">err /a1049>-> 10L750"> 750v3a>        if10L75>10o_t /a>(unsigned int,  a href="+code=BT_ERRv3a>             _ERR" namtt/bopttooth/sco.c#L746" idSCO err /a105a>-> 10 href="+code=len" class=10 hr>10 h">sk"+code=err" class="sref">err /a1051>-> 10T /a>;
}
err /a1052>-> 10L753"> 753v3a>         a10L75>10 03"> h/sco.c#L740" idioL740" class="l1053>-> 10ref="+code=sk" class="sr10ref>10 ="+code=sco_sock_getsockopt_old" cla1054>-> 10L755"> 755v3a>        sw10L75>10 4e=ki  namtioL769"> module_paramoptnamt" class=module_param" namtioL776"> 776v3disable_eld"optnamt" class=disable_eld"ref=am" namtioL769"> boosco.c#L748" idioboos, ina 0644f="+code=err" class="sref">err /a1055>-> 10 {	 MODULE_PARM_DESCv3a>           MODULE_PARM_DESC" namtioL776"> 776v3disable_eld"optnamt" class=disable_eld"ref=am"t/bopttooth/sco.c#L746" idDisable eSCO _claect on _ref= ona href="net/bf="+code=err" class="sref">err /a1056>-> 10ss="line" namtioL757"> 710ss=>10 ">sk o/pre>
}> The original LXR }>LXR communi=yref=amthis experimen"al vers on by +code=errmailto:lx>@amtux.no">lx>@amtux.noref=. }> lx>.amtux.no kindly host5d by +code=errhttp://www.redpill-amtpro.no">Redpill Lmtpro ASref=amprovider of Lmtuxlconsult.c# and op5rb" ons services since 1995.