diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index a196e2484..3c3b92f37 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -178,7 +178,11 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s, os_memcpy(bss->os_version, wpa_s->conf->os_version, 4); #endif /* CONFIG_WPS */ - bss->max_num_sta = wpa_s->conf->max_num_sta; + if (wpa_s->max_stations && + wpa_s->max_stations < wpa_s->conf->max_num_sta) + bss->max_num_sta = wpa_s->max_stations; + else + bss->max_num_sta = wpa_s->conf->max_num_sta; return 0; } diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 63b7ea938..950e51690 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -2204,7 +2204,7 @@ int wpas_p2p_init(struct wpa_global *global, struct wpa_supplicant *wpa_s) p2p.concurrent_operations = !!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_CONCURRENT); - p2p.max_peers = wpa_s->max_stations ? wpa_s->max_stations : 100; + p2p.max_peers = 100; if (wpa_s->conf->p2p_ssid_postfix) { p2p.ssid_postfix_len =