fix(ble/bluedroid): optimize bluedroid some code

(cherry picked from commit 6b09de6dbf)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
This commit is contained in:
Zhi Wei Jian
2026-01-05 10:07:26 +08:00
parent 78d2325639
commit d57e7a22f9
9 changed files with 197 additions and 42 deletions
@@ -37,6 +37,10 @@ esp_err_t esp_ble_iso_create_big(esp_ble_iso_big_creat_params_t *big_creat_param
return ESP_ERR_INVALID_ARG;
}
if (big_creat_param->num_bis > BLE_ISO_BIS_MAX_COUNT) {
return ESP_ERR_INVALID_ARG;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_ISO_BLE;
msg.act = BTC_ISO_ACT_BIG_CREATE;
@@ -58,6 +62,10 @@ esp_err_t esp_ble_iso_create_big_test(esp_ble_iso_big_creat_test_params_t *big_c
return ESP_ERR_INVALID_ARG;
}
if (big_creat_test_param->num_bis > BLE_ISO_BIS_MAX_COUNT) {
return ESP_ERR_INVALID_ARG;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_ISO_BLE;
msg.act = BTC_ISO_ACT_BIG_CREATE_TEST;
@@ -1940,6 +1940,10 @@ esp_err_t esp_ble_gap_set_path_loss_reporting_params(esp_ble_path_loss_rpt_param
return ESP_ERR_INVALID_STATE;
}
if (path_loss_rpt_params == NULL) {
return ESP_ERR_INVALID_ARG;
}
msg.sig = BTC_SIG_API_CALL;
msg.pid = BTC_PID_GAP_BLE;
msg.act = BTC_GAP_BLE_SET_PATH_LOSS_REPORT_PARAMS;
@@ -2006,7 +2010,7 @@ esp_err_t esp_ble_gap_set_default_subrate(esp_ble_default_subrate_param_t *defau
}
if (!default_subrate_params) {
return ESP_ERR_NOT_ALLOWED;
return ESP_ERR_INVALID_ARG;
}
msg.sig = BTC_SIG_API_CALL;
@@ -2033,7 +2037,7 @@ esp_err_t esp_ble_gap_subrate_request(esp_ble_subrate_req_param_t *subrate_req_p
}
if (!subrate_req_params) {
return ESP_ERR_NOT_ALLOWED;
return ESP_ERR_INVALID_ARG;
}
msg.sig = BTC_SIG_API_CALL;