Verify that beacon setup succeeds before proceeding

There is no point in starting the AP operations unless
the driver can be successfully configured to beacon.

Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2013-12-24 22:46:20 +02:00
parent 7d7f7be2e5
commit bad5cdf491
3 changed files with 33 additions and 17 deletions

View file

@ -810,8 +810,8 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
return -1;
}
if (!hapd->conf->start_disabled)
ieee802_11_set_beacon(hapd);
if (!hapd->conf->start_disabled && ieee802_11_set_beacon(hapd) < 0)
return -1;
if (hapd->wpa_auth && wpa_init_keys(hapd->wpa_auth) < 0)
return -1;