aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorAnkita Bajaj <bankita@codeaurora.org>2018-10-16 14:32:19 (GMT)
committerJouni Malinen <j@w1.fi>2018-10-30 13:43:01 (GMT)
commit0f0aa2a640ff1a1037c7f3323009bb1d12e7a6cd (patch)
tree3a1e8dccbd9d8a91e8eb0e79a35af874ed3a7fd3 /hostapd
parent1695b4dc371dbaa1ac6c40700f5f56e9eeeb1a6c (diff)
downloadhostap-0f0aa2a640ff1a1037c7f3323009bb1d12e7a6cd.zip
hostap-0f0aa2a640ff1a1037c7f3323009bb1d12e7a6cd.tar.gz
hostap-0f0aa2a640ff1a1037c7f3323009bb1d12e7a6cd.tar.bz2
OCE: Move OCE checks to IE formation from hostapd initialization
Earlier, the OCE flags were checked during hostapd initialization. This doesn't address few cases like for example when the interface is added from control interface. Move the OCE flag checks to the functions that are forming the MBO/OCE IEs to cover all the different paths for enabling a BSS. Also use macros as appropriate for readability. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/main.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/hostapd/main.c b/hostapd/main.c
index cbeb607..61da9be 100644
--- a/hostapd/main.c
+++ b/hostapd/main.c
@@ -873,27 +873,8 @@ int main(int argc, char *argv[])
*/
interfaces.terminate_on_error = interfaces.count;
for (i = 0; i < interfaces.count; i++) {
- if (hostapd_driver_init(interfaces.iface[i]))
- goto out;
-#ifdef CONFIG_MBO
- for (j = 0; j < interfaces.iface[i]->num_bss; j++) {
- struct hostapd_data *hapd = interfaces.iface[i]->bss[j];
-
- if (hapd && (hapd->conf->oce & OCE_STA_CFON) &&
- (interfaces.iface[i]->drv_flags &
- WPA_DRIVER_FLAGS_OCE_STA_CFON))
- hapd->enable_oce = OCE_STA_CFON;
-
- if (hapd && (hapd->conf->oce & OCE_AP) &&
- (interfaces.iface[i]->drv_flags &
- WPA_DRIVER_FLAGS_OCE_STA_CFON)) {
- /* TODO: Need to add OCE-AP support */
- wpa_printf(MSG_ERROR,
- "OCE-AP feature is not yet supported");
- }
- }
-#endif /* CONFIG_MBO */
- if (hostapd_setup_interface(interfaces.iface[i]))
+ if (hostapd_driver_init(interfaces.iface[i]) ||
+ hostapd_setup_interface(interfaces.iface[i]))
goto out;
}