Recover adapter when 'hci command disallowed' is responded 22/213222/1
authorDeokhyun Kim <dukan.kim@samsung.com>
Tue, 3 Sep 2019 04:26:58 +0000 (13:26 +0900)
committerDeokhyun Kim <dukan.kim@samsung.com>
Tue, 3 Sep 2019 04:26:58 +0000 (13:26 +0900)
vsc adv status of controller is abnormal while le connection & disconnection
are repeated. Recover adapter when 'hci command disallowed' is responded.

Change-Id: I1d39f3160784799ff2d7af7ded8c9ea8b7f8c579
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
src/adapter_le_vsc_features.c

index f4241fc..518252e 100755 (executable)
@@ -283,6 +283,8 @@ gboolean adapter_le_enable_multi_adv (struct btd_adapter *adapter,
 
        if (HCI_SUCCESS != rp.status) {
                DBG("Fail to send VSC :: sub[%x] - status [0x%02x]", rp.subcode, rp.status);
+               if (HCI_COMMAND_DISALLOWED == rp.status)
+                       adapter_send_event("HardwareError");
                return FALSE;
        }