diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-11-02 15:15:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-02 15:15:51 -0400 |
commit | c125d5e846894043361c0c89c1140be8fd6600b7 (patch) | |
tree | 8c613b696dc65b047ae6660e55abcd0c008be490 /net | |
parent | 6a32e4f9dd9219261f8856f817e6655114cfec2f (diff) | |
parent | 6b441fab28ea1cbbf3da75dcd1e7438e6cba704c (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_core.c | 2 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 2 | ||||
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 9 |
3 files changed, 8 insertions, 5 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index b84458dcc226..be84ae33ae36 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -613,7 +613,7 @@ static int hci_dev_do_close(struct hci_dev *hdev) | |||
613 | if (!test_bit(HCI_RAW, &hdev->flags)) { | 613 | if (!test_bit(HCI_RAW, &hdev->flags)) { |
614 | set_bit(HCI_INIT, &hdev->flags); | 614 | set_bit(HCI_INIT, &hdev->flags); |
615 | __hci_request(hdev, hci_reset_req, 0, | 615 | __hci_request(hdev, hci_reset_req, 0, |
616 | msecs_to_jiffies(250)); | 616 | msecs_to_jiffies(HCI_INIT_TIMEOUT)); |
617 | clear_bit(HCI_INIT, &hdev->flags); | 617 | clear_bit(HCI_INIT, &hdev->flags); |
618 | } | 618 | } |
619 | 619 | ||
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 5a94eec06caa..5caff4d47596 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -147,8 +147,6 @@ static int read_index_list(struct sock *sk) | |||
147 | 147 | ||
148 | hci_del_off_timer(d); | 148 | hci_del_off_timer(d); |
149 | 149 | ||
150 | set_bit(HCI_MGMT, &d->flags); | ||
151 | |||
152 | if (test_bit(HCI_SETUP, &d->flags)) | 150 | if (test_bit(HCI_SETUP, &d->flags)) |
153 | continue; | 151 | continue; |
154 | 152 | ||
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 38b618c96de6..4e32e18211f9 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -1802,6 +1802,11 @@ static inline void rfcomm_process_dlcs(struct rfcomm_session *s) | |||
1802 | continue; | 1802 | continue; |
1803 | } | 1803 | } |
1804 | 1804 | ||
1805 | if (test_bit(RFCOMM_ENC_DROP, &d->flags)) { | ||
1806 | __rfcomm_dlc_close(d, ECONNREFUSED); | ||
1807 | continue; | ||
1808 | } | ||
1809 | |||
1805 | if (test_and_clear_bit(RFCOMM_AUTH_ACCEPT, &d->flags)) { | 1810 | if (test_and_clear_bit(RFCOMM_AUTH_ACCEPT, &d->flags)) { |
1806 | rfcomm_dlc_clear_timer(d); | 1811 | rfcomm_dlc_clear_timer(d); |
1807 | if (d->out) { | 1812 | if (d->out) { |
@@ -2077,7 +2082,7 @@ static void rfcomm_security_cfm(struct hci_conn *conn, u8 status, u8 encrypt) | |||
2077 | if (test_and_clear_bit(RFCOMM_SEC_PENDING, &d->flags)) { | 2082 | if (test_and_clear_bit(RFCOMM_SEC_PENDING, &d->flags)) { |
2078 | rfcomm_dlc_clear_timer(d); | 2083 | rfcomm_dlc_clear_timer(d); |
2079 | if (status || encrypt == 0x00) { | 2084 | if (status || encrypt == 0x00) { |
2080 | __rfcomm_dlc_close(d, ECONNREFUSED); | 2085 | set_bit(RFCOMM_ENC_DROP, &d->flags); |
2081 | continue; | 2086 | continue; |
2082 | } | 2087 | } |
2083 | } | 2088 | } |
@@ -2088,7 +2093,7 @@ static void rfcomm_security_cfm(struct hci_conn *conn, u8 status, u8 encrypt) | |||
2088 | rfcomm_dlc_set_timer(d, RFCOMM_AUTH_TIMEOUT); | 2093 | rfcomm_dlc_set_timer(d, RFCOMM_AUTH_TIMEOUT); |
2089 | continue; | 2094 | continue; |
2090 | } else if (d->sec_level == BT_SECURITY_HIGH) { | 2095 | } else if (d->sec_level == BT_SECURITY_HIGH) { |
2091 | __rfcomm_dlc_close(d, ECONNREFUSED); | 2096 | set_bit(RFCOMM_ENC_DROP, &d->flags); |
2092 | continue; | 2097 | continue; |
2093 | } | 2098 | } |
2094 | } | 2099 | } |