cfg80211: prohibit zero keepalive interval
Johannes Berg
maintainerPATCH 1/1 cfg80211: prohibit zero keepalive interval
From: Johannes Berg <[email protected]>
It's not useful to specify a 0 keepalive interval, this would send too much data. Prohibit this to also avoid device issues.
Signed-off-by Johannes Berg <[email protected]>
--- net/wireless/nl80211.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/wireless/nl80211.c +2 -1
@@ -7603,7 +7603,8 @@ static int nl80211_parse_wowlan_tcp(struct cfg80211_registered_device *rdev,return -EINVAL ;if (nla_get_u32 (tb[NL80211_WOWLAN_TCP_DATA_INTERVAL ]) > - rdev->wiphy.wowlan.tcp->data_interval_max) + rdev->wiphy.wowlan.tcp->data_interval_max || +nla_get_u32 (tb[NL80211_WOWLAN_TCP_DATA_INTERVAL ]) ==0 )return -EINVAL ; wake_size =nla_len (tb[NL80211_WOWLAN_TCP_WAKE_PAYLOAD ]);
Signature · 1 line
1.8.0
Quoted 5 lines · Johannes Berg
From: Johannes Berg <[email protected]>
It's not useful to specify a 0 keepalive interval, this would send too much data. Prohibit this to also avoid device issues.
Applied.
johannes