[PATCH] mesh: Make inactivity timer configurable

Masashi Honma masashi.honma
Fri Jan 16 01:07:05 PST 2015


2015-01-15 11:49 GMT+09:00 Bob Copeland <me at bobcopeland.com>:
> How about:
>
>     u32 timeout = params->conf.peer_link_timeout;
>
>     /*
>      * Set kernel inactivity timeout to max when unspecified,
>      * or when implementing MPM because it may interfere with
>      * userspace inactivity timer.
>      */
>     if (!timeout ||
>         (params->conf.flags & WPA_DRIVER_MESH_FLAG_USER_MPM)) {
>         timeout = 0xffffffff;
>     }
>
>     if (nla_put_u32(msg, NL80211_MESHCONF_PLINK_TIMEOUT, timeout)) {
>         ...
>     }
>
> This is what I meant about pulling out the inner conditional -- you
> can still run the nla_put_u32 unconditionally, but this makes it more
> obvious what's going on compared to putting a ternary operator inside
> the function call parameter.

I see. I will modify it.



More information about the Hostap mailing list