diff options
author | Masashi Honma <masashi.honma@gmail.com> | 2015-02-24 14:42:16 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-02-28 21:31:10 +0100 |
commit | 31f909a2c0abfc1a1a76b2981d28ac85d33210e7 (patch) | |
tree | 204d09f9f14303ca93fb38c5526185b4cbd2ee3b /include/uapi | |
parent | mac80211_hwsim: support any address in userspace (diff) | |
download | linux-31f909a2c0abfc1a1a76b2981d28ac85d33210e7.tar.xz linux-31f909a2c0abfc1a1a76b2981d28ac85d33210e7.zip |
nl/mac80211: allow zero plink timeout to disable STA expiration
Both wpa_supplicant and mac80211 have and inactivity timer. By default
wpa_supplicant will be timed out in 5 minutes and mac80211's it is 30
minutes. If wpa_supplicant uses a longer timer than mac80211, it will
get unexpected disconnection by mac80211.
Using 0xffffffff instead as the configured value could solve this w/o
changing the code, but due to integer overflow in the expression used
this doesn't work. The expression is:
(current jiffies) > (frame Rx jiffies + NL80211_MESHCONF_PLINK_TIMEOUT * 250)
On 32bit system, the right side would overflow and be a very small
value if NL80211_MESHCONF_PLINK_TIMEOUT is sufficiently large,
causing unexpectedly early disconnections.
Instead allow disabling the inactivity timer to avoid this situation,
by passing the (previously invalid and useless) value 0.
Signed-off-by: Masashi Honma <masashi.honma@gmail.com>
[reword/rewrap commit log]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/nl80211.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 68b294e83944..2dcf9bba317c 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -3092,7 +3092,8 @@ enum nl80211_mesh_power_mode { * * @NL80211_MESHCONF_PLINK_TIMEOUT: If no tx activity is seen from a STA we've * established peering with for longer than this time (in seconds), then - * remove it from the STA's list of peers. Default is 30 minutes. + * remove it from the STA's list of peers. You may set this to 0 to disable + * the removal of the STA. Default is 30 minutes. * * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use */ |