mesh: Add mesh mode config option
Modify network mode to support mode number 5 when CONFIG_MESH is enabled. 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:
parent
a3335ef518
commit
476e6bb68d
4 changed files with 10 additions and 1 deletions
|
@ -170,6 +170,7 @@ struct hostapd_hw_modes {
|
||||||
#define IEEE80211_MODE_INFRA 0
|
#define IEEE80211_MODE_INFRA 0
|
||||||
#define IEEE80211_MODE_IBSS 1
|
#define IEEE80211_MODE_IBSS 1
|
||||||
#define IEEE80211_MODE_AP 2
|
#define IEEE80211_MODE_AP 2
|
||||||
|
#define IEEE80211_MODE_MESH 5
|
||||||
|
|
||||||
#define IEEE80211_CAP_ESS 0x0001
|
#define IEEE80211_CAP_ESS 0x0001
|
||||||
#define IEEE80211_CAP_IBSS 0x0002
|
#define IEEE80211_CAP_IBSS 0x0002
|
||||||
|
|
|
@ -1730,7 +1730,11 @@ static const struct parse_data ssid_fields[] = {
|
||||||
{ INTe(fragment_size) },
|
{ INTe(fragment_size) },
|
||||||
{ INTe(ocsp) },
|
{ INTe(ocsp) },
|
||||||
#endif /* IEEE8021X_EAPOL */
|
#endif /* IEEE8021X_EAPOL */
|
||||||
|
#ifdef CONFIG_MESH
|
||||||
|
{ INT_RANGE(mode, 0, 5) },
|
||||||
|
#else /* CONFIG_MESH */
|
||||||
{ INT_RANGE(mode, 0, 4) },
|
{ INT_RANGE(mode, 0, 4) },
|
||||||
|
#endif /* CONFIG_MESH */
|
||||||
{ INT_RANGE(proactive_key_caching, 0, 1) },
|
{ INT_RANGE(proactive_key_caching, 0, 1) },
|
||||||
{ INT_RANGE(disabled, 0, 2) },
|
{ INT_RANGE(disabled, 0, 2) },
|
||||||
{ STR(id_str) },
|
{ STR(id_str) },
|
||||||
|
|
|
@ -317,6 +317,8 @@ struct wpa_ssid {
|
||||||
* 4 = P2P Group Formation (used internally; not in configuration
|
* 4 = P2P Group Formation (used internally; not in configuration
|
||||||
* files)
|
* files)
|
||||||
*
|
*
|
||||||
|
* 5 = Mesh
|
||||||
|
*
|
||||||
* Note: IBSS can only be used with key_mgmt NONE (plaintext and static
|
* 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
|
* WEP) and WPA-PSK (with proto=RSN). In addition, key_mgmt=WPA-NONE
|
||||||
* (fixed group key TKIP/CCMP) is available for backwards compatibility,
|
* (fixed group key TKIP/CCMP) is available for backwards compatibility,
|
||||||
|
@ -331,6 +333,7 @@ struct wpa_ssid {
|
||||||
WPAS_MODE_AP = 2,
|
WPAS_MODE_AP = 2,
|
||||||
WPAS_MODE_P2P_GO = 3,
|
WPAS_MODE_P2P_GO = 3,
|
||||||
WPAS_MODE_P2P_GROUP_FORMATION = 4,
|
WPAS_MODE_P2P_GROUP_FORMATION = 4,
|
||||||
|
WPAS_MODE_MESH = 5,
|
||||||
} mode;
|
} mode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1102,7 +1102,8 @@ wpa_supplicant_pick_new_network(struct wpa_supplicant *wpa_s)
|
||||||
if (wpas_network_disabled(wpa_s, ssid))
|
if (wpas_network_disabled(wpa_s, ssid))
|
||||||
continue;
|
continue;
|
||||||
if (ssid->mode == IEEE80211_MODE_IBSS ||
|
if (ssid->mode == IEEE80211_MODE_IBSS ||
|
||||||
ssid->mode == IEEE80211_MODE_AP)
|
ssid->mode == IEEE80211_MODE_AP ||
|
||||||
|
ssid->mode == IEEE80211_MODE_MESH)
|
||||||
return ssid;
|
return ssid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue