|
@@ -649,8 +649,7 @@ void l2cap_chan_close(struct l2cap_chan *chan, int reason)
|
|
|
case BT_CONFIG:
|
|
|
if (chan->chan_type == L2CAP_CHAN_CONN_ORIENTED &&
|
|
|
conn->hcon->type == ACL_LINK) {
|
|
|
- struct sock *sk = chan->sk;
|
|
|
- __set_chan_timer(chan, sk->sk_sndtimeo);
|
|
|
+ __set_chan_timer(chan, chan->ops->get_sndtimeo(chan));
|
|
|
l2cap_send_disconn_req(chan, reason);
|
|
|
} else
|
|
|
l2cap_chan_del(chan, reason);
|
|
@@ -1764,7 +1763,6 @@ static struct l2cap_chan *l2cap_global_chan_by_psm(int state, __le16 psm,
|
|
|
int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid,
|
|
|
bdaddr_t *dst, u8 dst_type)
|
|
|
{
|
|
|
- struct sock *sk = chan->sk;
|
|
|
struct l2cap_conn *conn;
|
|
|
struct hci_conn *hcon;
|
|
|
struct hci_dev *hdev;
|
|
@@ -1876,7 +1874,7 @@ int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid,
|
|
|
hci_conn_drop(hcon);
|
|
|
|
|
|
l2cap_state_change(chan, BT_CONNECT);
|
|
|
- __set_chan_timer(chan, sk->sk_sndtimeo);
|
|
|
+ __set_chan_timer(chan, chan->ops->get_sndtimeo(chan));
|
|
|
|
|
|
if (hcon->state == BT_CONNECTED) {
|
|
|
if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
|
|
@@ -3817,7 +3815,7 @@ static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn,
|
|
|
|
|
|
dcid = chan->scid;
|
|
|
|
|
|
- __set_chan_timer(chan, sk->sk_sndtimeo);
|
|
|
+ __set_chan_timer(chan, chan->ops->get_sndtimeo(chan));
|
|
|
|
|
|
chan->ident = cmd->ident;
|
|
|
|