diff options
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 1828ec06ad1c..5576c8191507 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -448,6 +448,7 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err) | |||
448 | break; | 448 | break; |
449 | 449 | ||
450 | case BT_OPEN: | 450 | case BT_OPEN: |
451 | case BT_CONNECT2: | ||
451 | if (test_and_clear_bit(RFCOMM_DEFER_SETUP, &d->flags)) { | 452 | if (test_and_clear_bit(RFCOMM_DEFER_SETUP, &d->flags)) { |
452 | set_bit(RFCOMM_AUTH_REJECT, &d->flags); | 453 | set_bit(RFCOMM_AUTH_REJECT, &d->flags); |
453 | rfcomm_schedule(RFCOMM_SCHED_AUTH); | 454 | rfcomm_schedule(RFCOMM_SCHED_AUTH); |
@@ -1208,6 +1209,11 @@ static void rfcomm_check_accept(struct rfcomm_dlc *d) | |||
1208 | if (d->defer_setup) { | 1209 | if (d->defer_setup) { |
1209 | set_bit(RFCOMM_DEFER_SETUP, &d->flags); | 1210 | set_bit(RFCOMM_DEFER_SETUP, &d->flags); |
1210 | rfcomm_dlc_set_timer(d, RFCOMM_AUTH_TIMEOUT); | 1211 | rfcomm_dlc_set_timer(d, RFCOMM_AUTH_TIMEOUT); |
1212 | |||
1213 | rfcomm_dlc_lock(d); | ||
1214 | d->state = BT_CONNECT2; | ||
1215 | d->state_change(d, 0); | ||
1216 | rfcomm_dlc_unlock(d); | ||
1211 | } else | 1217 | } else |
1212 | rfcomm_dlc_accept(d); | 1218 | rfcomm_dlc_accept(d); |
1213 | } else { | 1219 | } else { |
@@ -1749,6 +1755,11 @@ static inline void rfcomm_process_dlcs(struct rfcomm_session *s) | |||
1749 | if (d->defer_setup) { | 1755 | if (d->defer_setup) { |
1750 | set_bit(RFCOMM_DEFER_SETUP, &d->flags); | 1756 | set_bit(RFCOMM_DEFER_SETUP, &d->flags); |
1751 | rfcomm_dlc_set_timer(d, RFCOMM_AUTH_TIMEOUT); | 1757 | rfcomm_dlc_set_timer(d, RFCOMM_AUTH_TIMEOUT); |
1758 | |||
1759 | rfcomm_dlc_lock(d); | ||
1760 | d->state = BT_CONNECT2; | ||
1761 | d->state_change(d, 0); | ||
1762 | rfcomm_dlc_unlock(d); | ||
1752 | } else | 1763 | } else |
1753 | rfcomm_dlc_accept(d); | 1764 | rfcomm_dlc_accept(d); |
1754 | } | 1765 | } |