mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
cfg80211: Userspace may inform kernel of mesh auth method.
Authentication takes place in userspace, but the beacon is generated in the kernel. Allow userspace to inform the kernel of the authentication method so the appropriate mesh config IE can be set prior to beacon generation when joining the MBSS. Signed-off-by: Colleen Twitty <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
This commit is contained in:
parent
7ade703604
commit
6e16d90b52
4 changed files with 16 additions and 0 deletions
|
|
@ -82,6 +82,7 @@ const struct mesh_setup default_mesh_setup = {
|
|||
.sync_method = IEEE80211_SYNC_METHOD_NEIGHBOR_OFFSET,
|
||||
.path_sel_proto = IEEE80211_PATH_PROTOCOL_HWMP,
|
||||
.path_metric = IEEE80211_PATH_METRIC_AIRTIME,
|
||||
.auth_id = 0, /* open */
|
||||
.ie = NULL,
|
||||
.ie_len = 0,
|
||||
.is_secure = false,
|
||||
|
|
|
|||
|
|
@ -4672,6 +4672,7 @@ static const struct nla_policy
|
|||
[NL80211_MESH_SETUP_ENABLE_VENDOR_PATH_SEL] = { .type = NLA_U8 },
|
||||
[NL80211_MESH_SETUP_ENABLE_VENDOR_METRIC] = { .type = NLA_U8 },
|
||||
[NL80211_MESH_SETUP_USERSPACE_AUTH] = { .type = NLA_FLAG },
|
||||
[NL80211_MESH_SETUP_AUTH_PROTOCOL] = { .type = NLA_U8 },
|
||||
[NL80211_MESH_SETUP_USERSPACE_MPM] = { .type = NLA_FLAG },
|
||||
[NL80211_MESH_SETUP_IE] = { .type = NLA_BINARY,
|
||||
.len = IEEE80211_MAX_DATA_LEN },
|
||||
|
|
@ -4857,6 +4858,13 @@ static int nl80211_parse_mesh_setup(struct genl_info *info,
|
|||
if (setup->is_secure)
|
||||
setup->user_mpm = true;
|
||||
|
||||
if (tb[NL80211_MESH_SETUP_AUTH_PROTOCOL]) {
|
||||
if (!setup->user_mpm)
|
||||
return -EINVAL;
|
||||
setup->auth_id =
|
||||
nla_get_u8(tb[NL80211_MESH_SETUP_AUTH_PROTOCOL]);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue