mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
fix(ble/bluedroid): preserve HCI status on BLE 4.2 GAP failures
Return BTM_HCI_ERROR | hci_status from legacy BLE 4.2 GAP HCI command paths instead of mapping failures to BTM_ILLEGAL_VALUE or BTM_NO_RESOURCES. Add btm_ble_status_from_hci() helper and propagate real status through scan start/stop completion callbacks.
This commit is contained in:
@@ -1327,12 +1327,8 @@ void btm_ble_set_channels_complete (UINT8 *p)
|
||||
case HCI_SUCCESS:
|
||||
cb_params.set_channels.status = BTM_SUCCESS;
|
||||
break;
|
||||
case HCI_ERR_UNSUPPORTED_VALUE:
|
||||
case HCI_ERR_ILLEGAL_PARAMETER_FMT:
|
||||
cb_params.set_channels.status = BTM_ILLEGAL_VALUE;
|
||||
break;
|
||||
default:
|
||||
cb_params.set_channels.status = BTM_ERR_PROCESSING;
|
||||
cb_params.set_channels.status = BTM_HCI_ERROR | cb_params.set_channels.hci_status;
|
||||
break;
|
||||
}
|
||||
BTM_LegacyBleCallbackTrigger(BTM_BLE_LEGACY_GAP_SET_CHANNELS_COMPLETE_EVT, &cb_params);
|
||||
|
||||
Reference in New Issue
Block a user