aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ap.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-10-29 14:23:23 (GMT)
committerJouni Malinen <j@w1.fi>2013-10-29 14:58:21 (GMT)
commitebd79f07c47b02b71c0ac7744a6a94a2bae92fcf (patch)
treea8cb1715c26bdba2062a8e924b7ae513f041e716 /wpa_supplicant/ap.c
parenta781e211f9cc45ad369d742a204d41c8a98e61d0 (diff)
downloadhostap-ebd79f07c47b02b71c0ac7744a6a94a2bae92fcf.zip
hostap-ebd79f07c47b02b71c0ac7744a6a94a2bae92fcf.tar.gz
hostap-ebd79f07c47b02b71c0ac7744a6a94a2bae92fcf.tar.bz2
hostapd: Make hostapd_config::bss array of pointers
This makes it more convenient to move BSS configuration entries between struct hostapd_config instances to clean up per-BSS configuration file design. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/ap.c')
-rw-r--r--wpa_supplicant/ap.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index b7b58cd..6887469 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -73,7 +73,7 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
struct wpa_ssid *ssid,
struct hostapd_config *conf)
{
- struct hostapd_bss_config *bss = &conf->bss[0];
+ struct hostapd_bss_config *bss = conf->bss[0];
conf->driver = wpa_s->driver;
@@ -561,8 +561,8 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
sizeof(wpa_s->conf->wmm_ac_params));
if (params.uapsd > 0) {
- conf->bss->wmm_enabled = 1;
- conf->bss->wmm_uapsd = 1;
+ conf->bss[0]->wmm_enabled = 1;
+ conf->bss[0]->wmm_uapsd = 1;
}
if (wpa_supplicant_conf_ap(wpa_s, ssid, conf)) {
@@ -573,9 +573,9 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
#ifdef CONFIG_P2P
if (ssid->mode == WPAS_MODE_P2P_GO)
- conf->bss[0].p2p = P2P_ENABLED | P2P_GROUP_OWNER;
+ conf->bss[0]->p2p = P2P_ENABLED | P2P_GROUP_OWNER;
else if (ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION)
- conf->bss[0].p2p = P2P_ENABLED | P2P_GROUP_OWNER |
+ conf->bss[0]->p2p = P2P_ENABLED | P2P_GROUP_OWNER |
P2P_GROUP_FORMATION;
#endif /* CONFIG_P2P */
@@ -590,7 +590,7 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
for (i = 0; i < conf->num_bss; i++) {
hapd_iface->bss[i] =
hostapd_alloc_bss_data(hapd_iface, conf,
- &conf->bss[i]);
+ conf->bss[i]);
if (hapd_iface->bss[i] == NULL) {
wpa_supplicant_ap_deinit(wpa_s);
return -1;
@@ -1042,9 +1042,9 @@ int wpa_supplicant_ap_update_beacon(struct wpa_supplicant *wpa_s)
#ifdef CONFIG_P2P
if (ssid->mode == WPAS_MODE_P2P_GO)
- iface->conf->bss[0].p2p = P2P_ENABLED | P2P_GROUP_OWNER;
+ iface->conf->bss[0]->p2p = P2P_ENABLED | P2P_GROUP_OWNER;
else if (ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION)
- iface->conf->bss[0].p2p = P2P_ENABLED | P2P_GROUP_OWNER |
+ iface->conf->bss[0]->p2p = P2P_ENABLED | P2P_GROUP_OWNER |
P2P_GROUP_FORMATION;
#endif /* CONFIG_P2P */