diff options
-rw-r--r-- | include/linux/nl80211.h | 9 | ||||
-rw-r--r-- | include/net/cfg80211.h | 9 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 6 | ||||
-rw-r--r-- | net/mac80211/debugfs_netdev.c | 6 | ||||
-rw-r--r-- | net/wireless/mesh.c | 4 | ||||
-rw-r--r-- | net/wireless/nl80211.c | 15 |
6 files changed, 48 insertions, 1 deletions
diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h index e4f41bdebc07..6936fabe8797 100644 --- a/include/linux/nl80211.h +++ b/include/linux/nl80211.h | |||
@@ -2185,6 +2185,13 @@ enum nl80211_mntr_flags { | |||
2185 | * | 2185 | * |
2186 | * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute | 2186 | * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute |
2187 | * | 2187 | * |
2188 | * @NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT: The time (in TUs) for | ||
2189 | * which mesh STAs receiving a proactive PREQ shall consider the forwarding | ||
2190 | * information to the root mesh STA to be valid. | ||
2191 | * | ||
2192 | * @NL80211_MESHCONF_HWMP_ROOT_INTERVAL: The interval of time (in TUs) between | ||
2193 | * proactive PREQs are transmitted. | ||
2194 | * | ||
2188 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use | 2195 | * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use |
2189 | */ | 2196 | */ |
2190 | enum nl80211_meshconf_params { | 2197 | enum nl80211_meshconf_params { |
@@ -2211,6 +2218,8 @@ enum nl80211_meshconf_params { | |||
2211 | NL80211_MESHCONF_RSSI_THRESHOLD, | 2218 | NL80211_MESHCONF_RSSI_THRESHOLD, |
2212 | NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR, | 2219 | NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR, |
2213 | NL80211_MESHCONF_HT_OPMODE, | 2220 | NL80211_MESHCONF_HT_OPMODE, |
2221 | NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, | ||
2222 | NL80211_MESHCONF_HWMP_ROOT_INTERVAL, | ||
2214 | 2223 | ||
2215 | /* keep last */ | 2224 | /* keep last */ |
2216 | __NL80211_MESHCONF_ATTR_AFTER_LAST, | 2225 | __NL80211_MESHCONF_ATTR_AFTER_LAST, |
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 76d54725ea31..e52b38d7b1b6 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -842,6 +842,13 @@ struct bss_parameters { | |||
842 | * @rssi_threshold: the threshold for average signal strength of candidate | 842 | * @rssi_threshold: the threshold for average signal strength of candidate |
843 | * station to establish a peer link | 843 | * station to establish a peer link |
844 | * @ht_opmode: mesh HT protection mode | 844 | * @ht_opmode: mesh HT protection mode |
845 | * | ||
846 | * @dot11MeshHWMPactivePathToRootTimeout: The time (in TUs) for which mesh STAs | ||
847 | * receiving a proactive PREQ shall consider the forwarding information to | ||
848 | * the root mesh STA to be valid. | ||
849 | * | ||
850 | * @dot11MeshHWMProotInterval: The interval of time (in TUs) between proactive | ||
851 | * PREQs are transmitted. | ||
845 | */ | 852 | */ |
846 | struct mesh_config { | 853 | struct mesh_config { |
847 | u16 dot11MeshRetryTimeout; | 854 | u16 dot11MeshRetryTimeout; |
@@ -866,6 +873,8 @@ struct mesh_config { | |||
866 | bool dot11MeshForwarding; | 873 | bool dot11MeshForwarding; |
867 | s32 rssi_threshold; | 874 | s32 rssi_threshold; |
868 | u16 ht_opmode; | 875 | u16 ht_opmode; |
876 | u32 dot11MeshHWMPactivePathToRootTimeout; | ||
877 | u16 dot11MeshHWMProotInterval; | ||
869 | }; | 878 | }; |
870 | 879 | ||
871 | /** | 880 | /** |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index cd8b1fb05d42..d93cda1c4215 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1590,6 +1590,12 @@ static int ieee80211_update_mesh_config(struct wiphy *wiphy, | |||
1590 | sdata->vif.bss_conf.ht_operation_mode = nconf->ht_opmode; | 1590 | sdata->vif.bss_conf.ht_operation_mode = nconf->ht_opmode; |
1591 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_HT); | 1591 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_HT); |
1592 | } | 1592 | } |
1593 | if (_chg_mesh_attr(NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, mask)) | ||
1594 | conf->dot11MeshHWMPactivePathToRootTimeout = | ||
1595 | nconf->dot11MeshHWMPactivePathToRootTimeout; | ||
1596 | if (_chg_mesh_attr(NL80211_MESHCONF_HWMP_ROOT_INTERVAL, mask)) | ||
1597 | conf->dot11MeshHWMProotInterval = | ||
1598 | nconf->dot11MeshHWMProotInterval; | ||
1593 | return 0; | 1599 | return 0; |
1594 | } | 1600 | } |
1595 | 1601 | ||
diff --git a/net/mac80211/debugfs_netdev.c b/net/mac80211/debugfs_netdev.c index c429417e1322..a8cea70902e4 100644 --- a/net/mac80211/debugfs_netdev.c +++ b/net/mac80211/debugfs_netdev.c | |||
@@ -510,6 +510,10 @@ IEEE80211_IF_FILE(dot11MeshHWMPRannInterval, | |||
510 | IEEE80211_IF_FILE(dot11MeshForwarding, u.mesh.mshcfg.dot11MeshForwarding, DEC); | 510 | IEEE80211_IF_FILE(dot11MeshForwarding, u.mesh.mshcfg.dot11MeshForwarding, DEC); |
511 | IEEE80211_IF_FILE(rssi_threshold, u.mesh.mshcfg.rssi_threshold, DEC); | 511 | IEEE80211_IF_FILE(rssi_threshold, u.mesh.mshcfg.rssi_threshold, DEC); |
512 | IEEE80211_IF_FILE(ht_opmode, u.mesh.mshcfg.ht_opmode, DEC); | 512 | IEEE80211_IF_FILE(ht_opmode, u.mesh.mshcfg.ht_opmode, DEC); |
513 | IEEE80211_IF_FILE(dot11MeshHWMPactivePathToRootTimeout, | ||
514 | u.mesh.mshcfg.dot11MeshHWMPactivePathToRootTimeout, DEC); | ||
515 | IEEE80211_IF_FILE(dot11MeshHWMProotInterval, | ||
516 | u.mesh.mshcfg.dot11MeshHWMProotInterval, DEC); | ||
513 | #endif | 517 | #endif |
514 | 518 | ||
515 | #define DEBUGFS_ADD_MODE(name, mode) \ | 519 | #define DEBUGFS_ADD_MODE(name, mode) \ |
@@ -611,6 +615,8 @@ static void add_mesh_config(struct ieee80211_sub_if_data *sdata) | |||
611 | MESHPARAMS_ADD(dot11MeshGateAnnouncementProtocol); | 615 | MESHPARAMS_ADD(dot11MeshGateAnnouncementProtocol); |
612 | MESHPARAMS_ADD(rssi_threshold); | 616 | MESHPARAMS_ADD(rssi_threshold); |
613 | MESHPARAMS_ADD(ht_opmode); | 617 | MESHPARAMS_ADD(ht_opmode); |
618 | MESHPARAMS_ADD(dot11MeshHWMPactivePathToRootTimeout); | ||
619 | MESHPARAMS_ADD(dot11MeshHWMProotInterval); | ||
614 | #undef MESHPARAMS_ADD | 620 | #undef MESHPARAMS_ADD |
615 | } | 621 | } |
616 | #endif | 622 | #endif |
diff --git a/net/wireless/mesh.c b/net/wireless/mesh.c index b44c736bf9cf..2f141cfd581e 100644 --- a/net/wireless/mesh.c +++ b/net/wireless/mesh.c | |||
@@ -14,6 +14,8 @@ | |||
14 | 14 | ||
15 | #define MESH_PATH_TIMEOUT 5000 | 15 | #define MESH_PATH_TIMEOUT 5000 |
16 | #define MESH_RANN_INTERVAL 5000 | 16 | #define MESH_RANN_INTERVAL 5000 |
17 | #define MESH_PATH_TO_ROOT_TIMEOUT 6000 | ||
18 | #define MESH_ROOT_INTERVAL 5000 | ||
17 | 19 | ||
18 | /* | 20 | /* |
19 | * Minimum interval between two consecutive PREQs originated by the same | 21 | * Minimum interval between two consecutive PREQs originated by the same |
@@ -62,6 +64,8 @@ const struct mesh_config default_mesh_config = { | |||
62 | .dot11MeshForwarding = true, | 64 | .dot11MeshForwarding = true, |
63 | .rssi_threshold = MESH_RSSI_THRESHOLD, | 65 | .rssi_threshold = MESH_RSSI_THRESHOLD, |
64 | .ht_opmode = IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED, | 66 | .ht_opmode = IEEE80211_HT_OP_MODE_PROTECTION_NONHT_MIXED, |
67 | .dot11MeshHWMPactivePathToRootTimeout = MESH_PATH_TO_ROOT_TIMEOUT, | ||
68 | .dot11MeshHWMProotInterval = MESH_ROOT_INTERVAL, | ||
65 | }; | 69 | }; |
66 | 70 | ||
67 | const struct mesh_setup default_mesh_setup = { | 71 | const struct mesh_setup default_mesh_setup = { |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 7db0aee8cd5b..f8930db613df 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -3469,7 +3469,11 @@ static int nl80211_get_mesh_config(struct sk_buff *skb, | |||
3469 | nla_put_u32(msg, NL80211_MESHCONF_RSSI_THRESHOLD, | 3469 | nla_put_u32(msg, NL80211_MESHCONF_RSSI_THRESHOLD, |
3470 | cur_params.rssi_threshold) || | 3470 | cur_params.rssi_threshold) || |
3471 | nla_put_u32(msg, NL80211_MESHCONF_HT_OPMODE, | 3471 | nla_put_u32(msg, NL80211_MESHCONF_HT_OPMODE, |
3472 | cur_params.ht_opmode)) | 3472 | cur_params.ht_opmode) || |
3473 | nla_put_u32(msg, NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, | ||
3474 | cur_params.dot11MeshHWMPactivePathToRootTimeout) || | ||
3475 | nla_put_u16(msg, NL80211_MESHCONF_HWMP_ROOT_INTERVAL, | ||
3476 | cur_params.dot11MeshHWMProotInterval)) | ||
3473 | goto nla_put_failure; | 3477 | goto nla_put_failure; |
3474 | nla_nest_end(msg, pinfoattr); | 3478 | nla_nest_end(msg, pinfoattr); |
3475 | genlmsg_end(msg, hdr); | 3479 | genlmsg_end(msg, hdr); |
@@ -3505,6 +3509,8 @@ static const struct nla_policy nl80211_meshconf_params_policy[NL80211_MESHCONF_A | |||
3505 | [NL80211_MESHCONF_FORWARDING] = { .type = NLA_U8 }, | 3509 | [NL80211_MESHCONF_FORWARDING] = { .type = NLA_U8 }, |
3506 | [NL80211_MESHCONF_RSSI_THRESHOLD] = { .type = NLA_U32 }, | 3510 | [NL80211_MESHCONF_RSSI_THRESHOLD] = { .type = NLA_U32 }, |
3507 | [NL80211_MESHCONF_HT_OPMODE] = { .type = NLA_U16 }, | 3511 | [NL80211_MESHCONF_HT_OPMODE] = { .type = NLA_U16 }, |
3512 | [NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT] = { .type = NLA_U32 }, | ||
3513 | [NL80211_MESHCONF_HWMP_ROOT_INTERVAL] = { .type = NLA_U16 }, | ||
3508 | }; | 3514 | }; |
3509 | 3515 | ||
3510 | static const struct nla_policy | 3516 | static const struct nla_policy |
@@ -3612,6 +3618,13 @@ do {\ | |||
3612 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, ht_opmode, | 3618 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, ht_opmode, |
3613 | mask, NL80211_MESHCONF_HT_OPMODE, | 3619 | mask, NL80211_MESHCONF_HT_OPMODE, |
3614 | nla_get_u16); | 3620 | nla_get_u16); |
3621 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMPactivePathToRootTimeout, | ||
3622 | mask, | ||
3623 | NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT, | ||
3624 | nla_get_u32); | ||
3625 | FILL_IN_MESH_PARAM_IF_SET(tb, cfg, dot11MeshHWMProotInterval, | ||
3626 | mask, NL80211_MESHCONF_HWMP_ROOT_INTERVAL, | ||
3627 | nla_get_u16); | ||
3615 | if (mask_out) | 3628 | if (mask_out) |
3616 | *mask_out = mask; | 3629 | *mask_out = mask; |
3617 | 3630 | ||