]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
mesh: Add user_mpm config option
authorThomas Pedersen <thomas@noack.us>
Mon, 1 Sep 2014 04:23:26 +0000 (00:23 -0400)
committerJouni Malinen <j@w1.fi>
Sat, 25 Oct 2014 14:43:24 +0000 (17:43 +0300)
Add user_mpm config parameter, when this is set to 1 (the default) the
peer link management is done on userspace, otherwise the peer management
will be done by the kernel.

Signed-off-by: Javier Lopez <jlopex@gmail.com>
Signed-off-by: Jason Mobarak <x@jason.mobarak.name>
Signed-off-by: Thomas Pedersen <thomas@noack.us>
wpa_supplicant/config.c
wpa_supplicant/config.h
wpa_supplicant/config_file.c
wpa_supplicant/wpa_supplicant.conf

index 45a346a9634d1d72eac952eeab2bac0db7926e01..99c51875625afd22cb198a97019efb21beb385e2 100644 (file)
@@ -3310,6 +3310,7 @@ struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface,
                return NULL;
        config->eapol_version = DEFAULT_EAPOL_VERSION;
        config->ap_scan = DEFAULT_AP_SCAN;
+       config->user_mpm = DEFAULT_USER_MPM;
        config->fast_reauth = DEFAULT_FAST_REAUTH;
        config->p2p_go_intent = DEFAULT_P2P_GO_INTENT;
        config->p2p_intra_bss = DEFAULT_P2P_INTRA_BSS;
@@ -3856,6 +3857,9 @@ static const struct global_parse_data global_fields[] = {
 #endif /* CONFIG_MACSEC */
        { INT(ap_scan), 0 },
        { FUNC(bgscan), 0 },
+#ifdef CONFIG_MESH
+       { INT(user_mpm), 0 },
+#endif /* CONFIG_MESH */
        { INT(disable_scan_offload), 0 },
        { INT(fast_reauth), 0 },
        { STR(opensc_engine_path), 0 },
index ba6e2d926c0613ec11825444d394a08f952b723b..2c3d6f5b6ab5a6cf47ff9550dfbe381d513d6962 100644 (file)
@@ -15,6 +15,7 @@
 #else /* CONFIG_NO_SCAN_PROCESSING */
 #define DEFAULT_AP_SCAN 1
 #endif /* CONFIG_NO_SCAN_PROCESSING */
+#define DEFAULT_USER_MPM 1
 #define DEFAULT_FAST_REAUTH 1
 #define DEFAULT_P2P_GO_INTENT 7
 #define DEFAULT_P2P_INTRA_BSS 1
@@ -1100,6 +1101,16 @@ struct wpa_config {
         * rekeying operation.
         */
        int key_mgmt_offload;
+
+       /**
+        * user_mpm - MPM residency
+        *
+        * 0: MPM lives in driver.
+        * 1: wpa_supplicant handles peering and station allocation.
+        *
+        * If AMPE or SAE is enabled, the MPM is always in userspace.
+        */
+       int user_mpm;
 };
 
 
index 1661f88c08f0ed802a9dece32dd9722c9032cec3..d58707eeaf1582842094c8a344c782bfedd1edca 100644 (file)
@@ -1195,6 +1195,9 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
 
        if (config->key_mgmt_offload != DEFAULT_KEY_MGMT_OFFLOAD)
                fprintf(f, "key_mgmt_offload=%u\n", config->key_mgmt_offload);
+
+       if (config->user_mpm != DEFAULT_USER_MPM)
+               fprintf(f, "user_mpm=%d\n", config->user_mpm);
 }
 
 #endif /* CONFIG_NO_CONFIG_WRITE */
index 9f5ad536af791c7c057d627cdfff5c04dac8ea2d..0e8a28a5500dd42a707785466c5cd4403e34f1bd 100644 (file)
@@ -114,6 +114,15 @@ eapol_version=1
 # networks are found, a new IBSS or AP mode network is created.
 ap_scan=1
 
+# MPM residency
+# By default, wpa_supplicant implements the mesh peering manager (MPM) for an
+# open mesh. However, if the driver can implement the MPM, you may set this to
+# 0 to use the driver version. When AMPE is enabled, the wpa_supplicant MPM is
+# always used.
+# 0: MPM lives in the driver
+# 1: wpa_supplicant provides an MPM which handles peering (default)
+#user_mpm=1
+
 # EAP fast re-authentication
 # By default, fast re-authentication is enabled for all EAP methods that
 # support it. This variable can be used to disable fast re-authentication.