dpp: rework order of operations after being configured

Now the result is sent immediately. Prior a connect attempt or
scan could have started, potentially losing this frame. In addition
the offchannel operation is cancelled after sending the result
which will allow the subsequent connect or scan to happen much
faster since it doesn't have to wait for ROC to expire.
This commit is contained in:
James Prestwood 2022-01-11 16:55:53 -08:00 committed by Denis Kenzior
parent 94afeabc18
commit fc61e5fe46
1 changed files with 7 additions and 7 deletions

View File

@ -639,6 +639,11 @@ static void dpp_handle_config_response_frame(const struct mmpdu_header *frame,
}
dpp_write_config(config, network);
dpp_configuration_free(config);
send_config_result(dpp, dpp->auth_addr);
offchannel_cancel(dpp->wdev_id, dpp->offchannel_id);
if (network && bss)
__station_connect_network(station, network, bss);
@ -647,15 +652,10 @@ static void dpp_handle_config_response_frame(const struct mmpdu_header *frame,
dpp_scan_triggered,
dpp_scan_results, dpp,
dpp_scan_destroy);
if (!dpp->connect_scan_id)
goto scan_failed;
if (dpp->connect_scan_id)
return;
}
dpp_configuration_free(config);
send_config_result(dpp, dpp->auth_addr);
scan_failed:
dpp_reset(dpp);
}