[PATCH] mesh: Make inactivity timer configurable
Bob Copeland
me
Wed Jan 14 06:14:49 PST 2015
On Wed, Jan 14, 2015 at 11:26:06AM +0900, Masashi Honma wrote:
> Current mesh code uses ap_max_inactivity as inactivity timer. This patch makes
> it cofigurable.
"configurable"
> There is another mesh inactivity timer in mac80211. The timer works even if
> user_mpm=1. So this patch sets the max value to the timer for workaround. This
> looks bug in mac80211. I will fix the mac80211. But this patch will be needed
> for backward compatibility.
Question - is existing wpa_s-based station expiration now working with
this patch, or is there more to do to start timers, etc?
> + /**
> + * Set NL80211_MESHCONF_PLINK_TIMEOUT even if user mpm is used.
> + * Because the timer could disconnect statios even if user mpm is used.
"stations"
> + *
> + * Set 0xffffffff instead of 0. Because NL80211_MESHCONF_PLINK_TIMEOUT
> + * does not allow 0.
> + */
> + if (nla_put_u32(msg, NL80211_MESHCONF_PLINK_TIMEOUT,
> + ((params->conf.flags & WPA_DRIVER_MESH_FLAG_USER_MPM) ||
> + params->conf.peer_link_timeout < 1) ? 0xffffffff :
> + params->conf.peer_link_timeout)) {
> + wpa_printf(MSG_ERROR, "nl80211: Failed to set PLINK_TIMEOUT");
> + goto fail;
> + }
I think the inner conditional should be extracted from the nla_put_u32
call.
> +# Timeout in seconds to detect STA inactivity (default: 300 seconds)
> +#
> +# This timeout value is used in mesh STA to clean up inactive stations.
> +#mesh_max_inactivity=300
This is a much lower timeout than the default in the kernel. Maybe it
doesn't matter, but just pointing that out.
--
Bob Copeland %% http://bobcopeland.com/
More information about the Hostap
mailing list