]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix max_stations to apply to associated STAs, not P2P peers
authorJouni Malinen <jouni.malinen@atheros.com>
Tue, 19 Oct 2010 14:17:04 +0000 (17:17 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 19 Oct 2010 14:17:04 +0000 (17:17 +0300)
This driver capability limit was supposed to indicate limit on
how many stations can associate with us in the AP mode, not how
many P2P peers are stored in the peer table.

wpa_supplicant/ap.c
wpa_supplicant/p2p_supplicant.c

index a196e248404bac46d2aa1085076267968889f3d1..3c3b92f373665f9c8cc27be8a45d98ce481f496f 100644 (file)
@@ -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;
 }
index 63b7ea9388576aee82936e628bacae3925763082..950e5169024f3e79594fe5a6046d56a2c5932527 100644 (file)
@@ -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 =