On Fri, Oct 19, 2012 at 4:06 PM,  <[email protected]> wrote:
> From: Marco Porsch <[email protected]>
>
Commit log is always preferable.
> Signed-off-by: Marco Porsch <[email protected]>
> ---
>  include/linux/nl80211.h |    4 ++++
>  include/net/cfg80211.h  |    3 +++
>  net/mac80211/cfg.c      |    2 ++
>  net/mac80211/mesh.c     |    2 +-
>  net/mac80211/mesh.h     |    1 -
>  net/wireless/mesh.c     |    2 ++
>  net/wireless/nl80211.c  |    9 ++++++++-
>  7 files changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
> index 7df9b50..e1c804a 100644
> --- a/include/linux/nl80211.h
> +++ b/include/linux/nl80211.h
> @@ -2281,6 +2281,9 @@ enum nl80211_mntr_flags {
>   *     (in TUs) during which a mesh STA can send only one Action frame
>   *     containing a PREQ element for root path confirmation.
>   *
> + * @NL80211_MESHCONF_PEER_INACTIVITY_LIMIT: Timeout (in seconds) for peer STA
> + *     that have not sent any beacons or other frames to the local STA.
Indentation style here?
> + *
>   * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
>   */
>  enum nl80211_meshconf_params {
> @@ -2310,6 +2313,7 @@ enum nl80211_meshconf_params {
>         NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT,
>         NL80211_MESHCONF_HWMP_ROOT_INTERVAL,
>         NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL,
> +       NL80211_MESHCONF_PEER_INACTIVITY_LIMIT,
>
>         /* keep last */
>         __NL80211_MESHCONF_ATTR_AFTER_LAST,
> diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
> index ab78b53..6d3a67f 100644
> --- a/include/net/cfg80211.h
> +++ b/include/net/cfg80211.h
> @@ -876,6 +876,8 @@ struct bss_parameters {
>   * @dot11MeshHWMPconfirmationInterval: The minimum interval of time (in TUs)
>   *     during which a mesh STA can send only one Action frame containing
>   *     a PREQ element for root path confirmation.
> + * @peer_inactivity_limit: Timeout (in seconds) for peer STA that have not
> + *     sent any beacons or other frames to the local STA.
Indentation style here too? Could be gmail garbling the style.
>   */
>  struct mesh_config {
>         u16 dot11MeshRetryTimeout;
> @@ -903,6 +905,7 @@ struct mesh_config {
>         u32 dot11MeshHWMPactivePathToRootTimeout;
>         u16 dot11MeshHWMProotInterval;
>         u16 dot11MeshHWMPconfirmationInterval;
> +       u16 peer_inactivity_limit;
>  };
>
>  /**
> diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
> index 05f3a31..c9ff02e 100644
> --- a/net/mac80211/cfg.c
> +++ b/net/mac80211/cfg.c
> @@ -1648,6 +1648,8 @@ static int ieee80211_update_mesh_config(struct wiphy 
> *wiphy,
>         if (_chg_mesh_attr(NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL, mask))
>                 conf->dot11MeshHWMPconfirmationInterval =
>                         nconf->dot11MeshHWMPconfirmationInterval;
> +       if (_chg_mesh_attr(NL80211_MESHCONF_PEER_INACTIVITY_LIMIT, mask))
> +               conf->peer_inactivity_limit = nconf->peer_inactivity_limit;
>         return 0;
>  }
>
> diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
> index ff0296c..41bf40e 100644
> --- a/net/mac80211/mesh.c
> +++ b/net/mac80211/mesh.c
> @@ -531,7 +531,7 @@ static void ieee80211_mesh_housekeeping(struct 
> ieee80211_sub_if_data *sdata,
>  {
>         u32 changed;
>
> -       ieee80211_sta_expire(sdata, IEEE80211_MESH_PEER_INACTIVITY_LIMIT);
> +       ieee80211_sta_expire(sdata, ifmsh->mshcfg.peer_inactivity_limit * HZ);
>         mesh_path_expire(sdata);
>
>         changed = mesh_accept_plinks_update(sdata);
> diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
> index 25d0f17..cdb591a 100644
> --- a/net/mac80211/mesh.h
> +++ b/net/mac80211/mesh.h
> @@ -202,7 +202,6 @@ struct mesh_rmc {
>         u32 idx_mask;
>  };
>
> -#define IEEE80211_MESH_PEER_INACTIVITY_LIMIT (1800 * HZ)
>  #define IEEE80211_MESH_HOUSEKEEPING_INTERVAL (60 * HZ)
>
>  #define MESH_DEFAULT_BEACON_INTERVAL           1000    /* in 1024 us units */
> diff --git a/net/wireless/mesh.c b/net/wireless/mesh.c
> index c384e77..00f19e4 100644
> --- a/net/wireless/mesh.c
> +++ b/net/wireless/mesh.c
> @@ -38,6 +38,7 @@
>
>  /* Default maximum number of established plinks per interface */
>  #define MESH_MAX_ESTAB_PLINKS  32
> +#define MESH_PEER_INACTIVITY_LIMIT     1800    /* in seconds */
>
>  #define MESH_MAX_PREQ_RETRIES  4
>
> @@ -68,6 +69,7 @@ const struct mesh_config default_mesh_config = {
>         .dot11MeshHWMPactivePathToRootTimeout = MESH_PATH_TO_ROOT_TIMEOUT,
>         .dot11MeshHWMProotInterval = MESH_ROOT_INTERVAL,
>         .dot11MeshHWMPconfirmationInterval = MESH_ROOT_CONFIRMATION_INTERVAL,
> +       .peer_inactivity_limit = MESH_PEER_INACTIVITY_LIMIT,
>  };
>
>  const struct mesh_setup default_mesh_setup = {
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index f1047ae..ad1dfaf 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -3736,7 +3736,9 @@ static int nl80211_get_mesh_config(struct sk_buff *skb,
>             nla_put_u16(msg, NL80211_MESHCONF_HWMP_ROOT_INTERVAL,
>                         cur_params.dot11MeshHWMProotInterval) ||
>             nla_put_u16(msg, NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL,
> -                       cur_params.dot11MeshHWMPconfirmationInterval))
> +                       cur_params.dot11MeshHWMPconfirmationInterval) ||
> +           nla_put_u16(msg, NL80211_MESHCONF_PEER_INACTIVITY_LIMIT,
> +                       cur_params.peer_inactivity_limit))
>                 goto nla_put_failure;
>         nla_nest_end(msg, pinfoattr);
>         genlmsg_end(msg, hdr);
> @@ -3775,6 +3777,7 @@ static const struct nla_policy 
> nl80211_meshconf_params_policy[NL80211_MESHCONF_A
>         [NL80211_MESHCONF_HWMP_PATH_TO_ROOT_TIMEOUT] = { .type = NLA_U32 },
>         [NL80211_MESHCONF_HWMP_ROOT_INTERVAL] = { .type = NLA_U16 },
>         [NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL] = { .type = NLA_U16 },
> +       [NL80211_MESHCONF_PEER_INACTIVITY_LIMIT] = { .type = NLA_U16 },
>  };
>
>  static const struct nla_policy
> @@ -3893,6 +3896,10 @@ do {\
>                                   dot11MeshHWMPconfirmationInterval, mask,
>                                   NL80211_MESHCONF_HWMP_CONFIRMATION_INTERVAL,
>                                   nla_get_u16);
> +       FILL_IN_MESH_PARAM_IF_SET(tb, cfg,
> +                                 peer_inactivity_limit, mask,
> +                                 NL80211_MESHCONF_PEER_INACTIVITY_LIMIT,
> +                                 nla_get_u16);
>         if (mask_out)
>                 *mask_out = mask;
>
> --
> 1.7.9.5
>
_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

Reply via email to