From: Thomas Pedersen Date: Mon, 1 Sep 2014 04:23:26 +0000 (-0400) Subject: mesh: Add mesh mode config option X-Git-Tag: hostap_2_4~1246 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.git;a=commitdiff_plain;h=476e6bb68d29953dd1a6db9af4118cabec4642b1 mesh: Add mesh mode config option Modify network mode to support mode number 5 when CONFIG_MESH is enabled. Signed-off-by: Javier Lopez Signed-off-by: Jason Mobarak Signed-off-by: Thomas Pedersen --- diff --git a/src/drivers/driver.h b/src/drivers/driver.h index f534b08..081db0d 100644 --- a/src/drivers/driver.h +++ b/src/drivers/driver.h @@ -170,6 +170,7 @@ struct hostapd_hw_modes { #define IEEE80211_MODE_INFRA 0 #define IEEE80211_MODE_IBSS 1 #define IEEE80211_MODE_AP 2 +#define IEEE80211_MODE_MESH 5 #define IEEE80211_CAP_ESS 0x0001 #define IEEE80211_CAP_IBSS 0x0002 diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c index 99c5187..f6ec4a1 100644 --- a/wpa_supplicant/config.c +++ b/wpa_supplicant/config.c @@ -1730,7 +1730,11 @@ static const struct parse_data ssid_fields[] = { { INTe(fragment_size) }, { INTe(ocsp) }, #endif /* IEEE8021X_EAPOL */ +#ifdef CONFIG_MESH + { INT_RANGE(mode, 0, 5) }, +#else /* CONFIG_MESH */ { INT_RANGE(mode, 0, 4) }, +#endif /* CONFIG_MESH */ { INT_RANGE(proactive_key_caching, 0, 1) }, { INT_RANGE(disabled, 0, 2) }, { STR(id_str) }, diff --git a/wpa_supplicant/config_ssid.h b/wpa_supplicant/config_ssid.h index f50b2d4..82fa2c5 100644 --- a/wpa_supplicant/config_ssid.h +++ b/wpa_supplicant/config_ssid.h @@ -317,6 +317,8 @@ struct wpa_ssid { * 4 = P2P Group Formation (used internally; not in configuration * files) * + * 5 = Mesh + * * Note: IBSS can only be used with key_mgmt NONE (plaintext and static * WEP) and WPA-PSK (with proto=RSN). In addition, key_mgmt=WPA-NONE * (fixed group key TKIP/CCMP) is available for backwards compatibility, @@ -331,6 +333,7 @@ struct wpa_ssid { WPAS_MODE_AP = 2, WPAS_MODE_P2P_GO = 3, WPAS_MODE_P2P_GROUP_FORMATION = 4, + WPAS_MODE_MESH = 5, } mode; /** diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c index fff4eb4..6761c1a 100644 --- a/wpa_supplicant/events.c +++ b/wpa_supplicant/events.c @@ -1102,7 +1102,8 @@ wpa_supplicant_pick_new_network(struct wpa_supplicant *wpa_s) if (wpas_network_disabled(wpa_s, ssid)) continue; if (ssid->mode == IEEE80211_MODE_IBSS || - ssid->mode == IEEE80211_MODE_AP) + ssid->mode == IEEE80211_MODE_AP || + ssid->mode == IEEE80211_MODE_MESH) return ssid; } }