drivers: wifi: Port the simplelink wifi to the new timeouts API

Port the code so it uses the new timeouts API.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
This commit is contained in:
Carles Cufi 2020-05-05 17:56:24 +02:00 committed by Carles Cufí
commit c61faf6c55
2 changed files with 3 additions and 3 deletions

View file

@ -111,7 +111,7 @@ static void simplelink_scan_work_handler(struct k_work *work)
if (delay > 0) { if (delay > 0) {
LOG_DBG("Retrying scan..."); LOG_DBG("Retrying scan...");
} }
k_delayed_work_submit(&simplelink_data.work, delay); k_delayed_work_submit(&simplelink_data.work, K_MSEC(delay));
} else { } else {
/* Encountered an error, or max retries exceeded: */ /* Encountered an error, or max retries exceeded: */
@ -145,7 +145,7 @@ static int simplelink_mgmt_scan(struct device *dev, scan_result_cb_t cb)
simplelink_data.num_results_or_err = err; simplelink_data.num_results_or_err = err;
simplelink_data.scan_retries = 0; simplelink_data.scan_retries = 0;
k_delayed_work_submit(&simplelink_data.work, delay); k_delayed_work_submit(&simplelink_data.work, K_MSEC(delay));
status = 0; status = 0;
} else { } else {
status = -EIO; status = -EIO;

View file

@ -541,7 +541,7 @@ static int simplelink_poll(struct pollfd *fds, int nfds, int msecs)
} }
/* Convert time to SlTimeval struct values: */ /* Convert time to SlTimeval struct values: */
if (msecs == K_FOREVER) { if (msecs == SYS_FOREVER_MS) {
ptv = NULL; ptv = NULL;
} else { } else {
tv.tv_sec = msecs / ONE_THOUSAND; tv.tv_sec = msecs / ONE_THOUSAND;