Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updates the btm_rrm_t task to use the same core as in the wifi (IDFGH-14049) #14868

Open
wants to merge 1 commit into
base: release/v5.3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion components/wpa_supplicant/esp_supplicant/src/esp_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,25 @@ int esp_supplicant_common_init(struct wpa_funcs *wpa_cb)
ret = -1;
goto err;
}
ret = os_task_create(btm_rrm_task, "btm_rrm_t", SUPPLICANT_TASK_STACK_SIZE, NULL, 2, &s_supplicant_task_hdl);
// Define the core to pin the task based on configuration
#ifdef CONFIG_ESP_WIFI_TASK_PINNED_TO_CORE_0
#define SUPPLICANT_TASK_CORE 0
#elif defined(CONFIG_ESP_WIFI_TASK_PINNED_TO_CORE_1)
#define SUPPLICANT_TASK_CORE 1
#else
#define SUPPLICANT_TASK_CORE tskNO_AFFINITY // If no specific core, run on any core
#endif
// Create the task pinned to the specified core
ret = xTaskCreatePinnedToCore(
btm_rrm_task, // Task function
"btm_rrm_t", // Task name
SUPPLICANT_TASK_STACK_SIZE, // Stack size
NULL, // Task parameter (NULL in this case)
2, // Task priority
s_supplicant_task_hdl, // Task handle
SUPPLICANT_TASK_CORE // Core to pin the task to
);
// ret = os_task_create(btm_rrm_task, "btm_rrm_t", SUPPLICANT_TASK_STACK_SIZE, NULL, 2, &s_supplicant_task_hdl);
if (ret != TRUE) {
wpa_printf(MSG_ERROR, "btm: failed to create task");
ret = -1;
Expand Down