P2P: Add preliminary P2P Manager AP support for hostapd
[libeap.git] / hostapd / config_file.c
index 8916b03..0032504 100644 (file)
@@ -1313,6 +1313,8 @@ struct hostapd_config * hostapd_config_read(const char *fname)
                } else if (os_strcmp(buf, "dh_file") == 0) {
                        os_free(bss->dh_file);
                        bss->dh_file = os_strdup(pos);
+               } else if (os_strcmp(buf, "fragment_size") == 0) {
+                       bss->fragment_size = atoi(pos);
 #ifdef EAP_SERVER_FAST
                } else if (os_strcmp(buf, "pac_opaque_encr_key") == 0) {
                        os_free(bss->pac_opaque_encr_key);
@@ -1986,6 +1988,19 @@ struct hostapd_config * hostapd_config_read(const char *fname)
                        os_free(bss->upc);
                        bss->upc = os_strdup(pos);
 #endif /* CONFIG_WPS */
+#ifdef CONFIG_P2P_MANAGER
+               } else if (os_strcmp(buf, "manage_p2p") == 0) {
+                       int manage = atoi(pos);
+                       if (manage)
+                               bss->p2p |= P2P_MANAGE;
+                       else
+                               bss->p2p &= ~P2P_MANAGE;
+               } else if (os_strcmp(buf, "allow_cross_connection") == 0) {
+                       if (atoi(pos))
+                               bss->p2p |= P2P_ALLOW_CROSS_CONNECTION;
+                       else
+                               bss->p2p &= ~P2P_ALLOW_CROSS_CONNECTION;
+#endif /* CONFIG_P2P_MANAGER */
                } else {
                        wpa_printf(MSG_ERROR, "Line %d: unknown configuration "
                                   "item '%s'", line, buf);