P2P: Allow driver wrapper to indicate how many stations are supported

This can be used to limit the number of clients allowed to connect
to the group on the GO.
This commit is contained in:
Jouni Malinen 2010-07-29 15:32:33 -07:00 committed by Jouni Malinen
parent f80a2237ca
commit c4ea4c5c90
4 changed files with 9 additions and 1 deletions

View file

@ -550,6 +550,12 @@ struct wpa_driver_capa {
* max_remain_on_chan - Maximum remain-on-channel duration in msec * max_remain_on_chan - Maximum remain-on-channel duration in msec
*/ */
unsigned int max_remain_on_chan; unsigned int max_remain_on_chan;
/**
* max_stations - Maximum number of associated stations the driver
* supports in AP mode
*/
unsigned int max_stations;
}; };

View file

@ -2160,7 +2160,7 @@ int wpas_p2p_init(struct wpa_global *global, struct wpa_supplicant *wpa_s)
p2p.concurrent_operations = !!(wpa_s->drv_flags & p2p.concurrent_operations = !!(wpa_s->drv_flags &
WPA_DRIVER_FLAGS_P2P_CONCURRENT); WPA_DRIVER_FLAGS_P2P_CONCURRENT);
p2p.max_peers = 100; p2p.max_peers = wpa_s->max_stations ? wpa_s->max_stations : 100;
if (wpa_s->conf->p2p_ssid_postfix) { if (wpa_s->conf->p2p_ssid_postfix) {
p2p.ssid_postfix_len = p2p.ssid_postfix_len =

View file

@ -2101,6 +2101,7 @@ next_driver:
} }
wpa_s->max_scan_ssids = capa.max_scan_ssids; wpa_s->max_scan_ssids = capa.max_scan_ssids;
wpa_s->max_remain_on_chan = capa.max_remain_on_chan; wpa_s->max_remain_on_chan = capa.max_remain_on_chan;
wpa_s->max_stations = capa.max_stations;
} }
if (wpa_s->max_remain_on_chan == 0) if (wpa_s->max_remain_on_chan == 0)
wpa_s->max_remain_on_chan = 1000; wpa_s->max_remain_on_chan = 1000;

View file

@ -408,6 +408,7 @@ struct wpa_supplicant {
unsigned int drv_flags; unsigned int drv_flags;
int max_scan_ssids; int max_scan_ssids;
unsigned int max_remain_on_chan; unsigned int max_remain_on_chan;
unsigned int max_stations;
int pending_mic_error_report; int pending_mic_error_report;
int pending_mic_error_pairwise; int pending_mic_error_pairwise;