diff options
Diffstat (limited to 'net/bluetooth/rfcomm')
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 1f92f9ab4959..e7a6a03cea37 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -2003,6 +2003,14 @@ static void rfcomm_encrypt_cfm(struct hci_conn *conn, u8 status, u8 encrypt) | |||
2003 | list_for_each_safe(p, n, &s->dlcs) { | 2003 | list_for_each_safe(p, n, &s->dlcs) { |
2004 | d = list_entry(p, struct rfcomm_dlc, list); | 2004 | d = list_entry(p, struct rfcomm_dlc, list); |
2005 | 2005 | ||
2006 | if ((d->link_mode & (RFCOMM_LM_ENCRYPT | RFCOMM_LM_SECURE)) && | ||
2007 | (d->state == BT_CONNECTED || | ||
2008 | d->state == BT_CONFIG) && | ||
2009 | !status && encrypt == 0x00) { | ||
2010 | __rfcomm_dlc_close(d, ECONNREFUSED); | ||
2011 | continue; | ||
2012 | } | ||
2013 | |||
2006 | if (!test_and_clear_bit(RFCOMM_AUTH_PENDING, &d->flags)) | 2014 | if (!test_and_clear_bit(RFCOMM_AUTH_PENDING, &d->flags)) |
2007 | continue; | 2015 | continue; |
2008 | 2016 | ||