OCV: Pass ocv parameter to mesh configuration
Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
This commit is contained in:
parent
a187bf0161
commit
716ed96e8d
3 changed files with 9 additions and 2 deletions
|
@ -42,6 +42,7 @@ struct mesh_conf {
|
||||||
#define MESH_CONF_SEC_AMPE BIT(2)
|
#define MESH_CONF_SEC_AMPE BIT(2)
|
||||||
unsigned int security;
|
unsigned int security;
|
||||||
enum mfp_options ieee80211w;
|
enum mfp_options ieee80211w;
|
||||||
|
int ocv;
|
||||||
unsigned int pairwise_cipher;
|
unsigned int pairwise_cipher;
|
||||||
unsigned int group_cipher;
|
unsigned int group_cipher;
|
||||||
unsigned int mgmt_group_cipher;
|
unsigned int mgmt_group_cipher;
|
||||||
|
|
|
@ -93,6 +93,9 @@ static struct mesh_conf * mesh_config_create(struct wpa_supplicant *wpa_s,
|
||||||
conf->ieee80211w = NO_MGMT_FRAME_PROTECTION;
|
conf->ieee80211w = NO_MGMT_FRAME_PROTECTION;
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211W */
|
#endif /* CONFIG_IEEE80211W */
|
||||||
|
#ifdef CONFIG_OCV
|
||||||
|
conf->ocv = ssid->ocv;
|
||||||
|
#endif /* CONFIG_OCV */
|
||||||
|
|
||||||
cipher = wpa_pick_pairwise_cipher(ssid->pairwise_cipher, 0);
|
cipher = wpa_pick_pairwise_cipher(ssid->pairwise_cipher, 0);
|
||||||
if (cipher < 0 || cipher == WPA_CIPHER_TKIP) {
|
if (cipher < 0 || cipher == WPA_CIPHER_TKIP) {
|
||||||
|
|
|
@ -140,7 +140,7 @@ static int auth_start_ampe(void *ctx, const u8 *addr)
|
||||||
|
|
||||||
|
|
||||||
static int __mesh_rsn_auth_init(struct mesh_rsn *rsn, const u8 *addr,
|
static int __mesh_rsn_auth_init(struct mesh_rsn *rsn, const u8 *addr,
|
||||||
enum mfp_options ieee80211w)
|
enum mfp_options ieee80211w, int ocv)
|
||||||
{
|
{
|
||||||
struct wpa_auth_config conf;
|
struct wpa_auth_config conf;
|
||||||
static const struct wpa_auth_callbacks cb = {
|
static const struct wpa_auth_callbacks cb = {
|
||||||
|
@ -168,6 +168,9 @@ static int __mesh_rsn_auth_init(struct mesh_rsn *rsn, const u8 *addr,
|
||||||
if (ieee80211w != NO_MGMT_FRAME_PROTECTION)
|
if (ieee80211w != NO_MGMT_FRAME_PROTECTION)
|
||||||
conf.group_mgmt_cipher = rsn->mgmt_group_cipher;
|
conf.group_mgmt_cipher = rsn->mgmt_group_cipher;
|
||||||
#endif /* CONFIG_IEEE80211W */
|
#endif /* CONFIG_IEEE80211W */
|
||||||
|
#ifdef CONFIG_OCV
|
||||||
|
conf.ocv = ocv;
|
||||||
|
#endif /* CONFIG_OCV */
|
||||||
|
|
||||||
rsn->auth = wpa_init(addr, &conf, &cb, rsn);
|
rsn->auth = wpa_init(addr, &conf, &cb, rsn);
|
||||||
if (rsn->auth == NULL) {
|
if (rsn->auth == NULL) {
|
||||||
|
@ -240,7 +243,7 @@ struct mesh_rsn *mesh_rsn_auth_init(struct wpa_supplicant *wpa_s,
|
||||||
mesh_rsn->mgmt_group_cipher = conf->mgmt_group_cipher;
|
mesh_rsn->mgmt_group_cipher = conf->mgmt_group_cipher;
|
||||||
|
|
||||||
if (__mesh_rsn_auth_init(mesh_rsn, wpa_s->own_addr,
|
if (__mesh_rsn_auth_init(mesh_rsn, wpa_s->own_addr,
|
||||||
conf->ieee80211w) < 0) {
|
conf->ieee80211w, conf->ocv) < 0) {
|
||||||
mesh_rsn_deinit(mesh_rsn);
|
mesh_rsn_deinit(mesh_rsn);
|
||||||
os_free(mesh_rsn);
|
os_free(mesh_rsn);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue