mesh: Add user_mpm config option

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>
This commit is contained in:
Thomas Pedersen 2014-09-01 00:23:26 -04:00 committed by Jouni Malinen
parent 8319e3120d
commit e45e898970
4 changed files with 27 additions and 0 deletions

View file

@ -3310,6 +3310,7 @@ struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface,
return NULL; return NULL;
config->eapol_version = DEFAULT_EAPOL_VERSION; config->eapol_version = DEFAULT_EAPOL_VERSION;
config->ap_scan = DEFAULT_AP_SCAN; config->ap_scan = DEFAULT_AP_SCAN;
config->user_mpm = DEFAULT_USER_MPM;
config->fast_reauth = DEFAULT_FAST_REAUTH; config->fast_reauth = DEFAULT_FAST_REAUTH;
config->p2p_go_intent = DEFAULT_P2P_GO_INTENT; config->p2p_go_intent = DEFAULT_P2P_GO_INTENT;
config->p2p_intra_bss = DEFAULT_P2P_INTRA_BSS; config->p2p_intra_bss = DEFAULT_P2P_INTRA_BSS;
@ -3856,6 +3857,9 @@ static const struct global_parse_data global_fields[] = {
#endif /* CONFIG_MACSEC */ #endif /* CONFIG_MACSEC */
{ INT(ap_scan), 0 }, { INT(ap_scan), 0 },
{ FUNC(bgscan), 0 }, { FUNC(bgscan), 0 },
#ifdef CONFIG_MESH
{ INT(user_mpm), 0 },
#endif /* CONFIG_MESH */
{ INT(disable_scan_offload), 0 }, { INT(disable_scan_offload), 0 },
{ INT(fast_reauth), 0 }, { INT(fast_reauth), 0 },
{ STR(opensc_engine_path), 0 }, { STR(opensc_engine_path), 0 },

View file

@ -15,6 +15,7 @@
#else /* CONFIG_NO_SCAN_PROCESSING */ #else /* CONFIG_NO_SCAN_PROCESSING */
#define DEFAULT_AP_SCAN 1 #define DEFAULT_AP_SCAN 1
#endif /* CONFIG_NO_SCAN_PROCESSING */ #endif /* CONFIG_NO_SCAN_PROCESSING */
#define DEFAULT_USER_MPM 1
#define DEFAULT_FAST_REAUTH 1 #define DEFAULT_FAST_REAUTH 1
#define DEFAULT_P2P_GO_INTENT 7 #define DEFAULT_P2P_GO_INTENT 7
#define DEFAULT_P2P_INTRA_BSS 1 #define DEFAULT_P2P_INTRA_BSS 1
@ -1100,6 +1101,16 @@ struct wpa_config {
* rekeying operation. * rekeying operation.
*/ */
int key_mgmt_offload; 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;
}; };

View 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) if (config->key_mgmt_offload != DEFAULT_KEY_MGMT_OFFLOAD)
fprintf(f, "key_mgmt_offload=%u\n", config->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 */ #endif /* CONFIG_NO_CONFIG_WRITE */

View file

@ -114,6 +114,15 @@ eapol_version=1
# networks are found, a new IBSS or AP mode network is created. # networks are found, a new IBSS or AP mode network is created.
ap_scan=1 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 # EAP fast re-authentication
# By default, fast re-authentication is enabled for all EAP methods that # By default, fast re-authentication is enabled for all EAP methods that
# support it. This variable can be used to disable fast re-authentication. # support it. This variable can be used to disable fast re-authentication.