mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
fix(ble/bluedroid): optimize bluedroid some code
(cherry picked from commit 6b09de6dbf)
Co-authored-by: zhiweijian <zhiweijian@espressif.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user