diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-12-19 14:12:11 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-12-19 14:12:11 -0500 |
commit | 9763152c94ff7207b3532b4105272a0a6030cd61 (patch) | |
tree | ca5b917143a04cbb5fcd494c2459b0b7e405c64e /net | |
parent | 78feb35b8161acd95c33a703ed6ab6f554d29387 (diff) | |
parent | d7660918fce210f421cc58c060ca3de71e4ffd37 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_conn.c | 2 | ||||
-rw-r--r-- | net/bluetooth/l2cap_core.c | 12 | ||||
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 1 |
3 files changed, 13 insertions, 2 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index e0af7237cd92..c1c597e3e198 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c | |||
@@ -673,7 +673,7 @@ int hci_conn_security(struct hci_conn *conn, __u8 sec_level, __u8 auth_type) | |||
673 | goto encrypt; | 673 | goto encrypt; |
674 | 674 | ||
675 | auth: | 675 | auth: |
676 | if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend)) | 676 | if (test_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend)) |
677 | return 0; | 677 | return 0; |
678 | 678 | ||
679 | if (!hci_conn_auth(conn, sec_level, auth_type)) | 679 | if (!hci_conn_auth(conn, sec_level, auth_type)) |
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 5ea94a1eecf2..17b5b1cd9657 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -2152,7 +2152,7 @@ static int l2cap_parse_conf_rsp(struct l2cap_chan *chan, void *rsp, int len, voi | |||
2152 | void *ptr = req->data; | 2152 | void *ptr = req->data; |
2153 | int type, olen; | 2153 | int type, olen; |
2154 | unsigned long val; | 2154 | unsigned long val; |
2155 | struct l2cap_conf_rfc rfc; | 2155 | struct l2cap_conf_rfc rfc = { .mode = L2CAP_MODE_BASIC }; |
2156 | 2156 | ||
2157 | BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data); | 2157 | BT_DBG("chan %p, rsp %p, len %d, req %p", chan, rsp, len, data); |
2158 | 2158 | ||
@@ -2271,6 +2271,16 @@ static void l2cap_conf_rfc_get(struct l2cap_chan *chan, void *rsp, int len) | |||
2271 | } | 2271 | } |
2272 | } | 2272 | } |
2273 | 2273 | ||
2274 | /* Use sane default values in case a misbehaving remote device | ||
2275 | * did not send an RFC option. | ||
2276 | */ | ||
2277 | rfc.mode = chan->mode; | ||
2278 | rfc.retrans_timeout = cpu_to_le16(L2CAP_DEFAULT_RETRANS_TO); | ||
2279 | rfc.monitor_timeout = cpu_to_le16(L2CAP_DEFAULT_MONITOR_TO); | ||
2280 | rfc.max_pdu_size = cpu_to_le16(chan->imtu); | ||
2281 | |||
2282 | BT_ERR("Expected RFC option was not found, using defaults"); | ||
2283 | |||
2274 | done: | 2284 | done: |
2275 | switch (rfc.mode) { | 2285 | switch (rfc.mode) { |
2276 | case L2CAP_MODE_ERTM: | 2286 | case L2CAP_MODE_ERTM: |
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 4e32e18211f9..2d28dfe98389 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -1146,6 +1146,7 @@ static int rfcomm_recv_ua(struct rfcomm_session *s, u8 dlci) | |||
1146 | if (list_empty(&s->dlcs)) { | 1146 | if (list_empty(&s->dlcs)) { |
1147 | s->state = BT_DISCONN; | 1147 | s->state = BT_DISCONN; |
1148 | rfcomm_send_disc(s, 0); | 1148 | rfcomm_send_disc(s, 0); |
1149 | rfcomm_session_clear_timer(s); | ||
1149 | } | 1150 | } |
1150 | 1151 | ||
1151 | break; | 1152 | break; |