diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-02-26 13:56:40 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-03-06 16:35:50 +0100 |
commit | 723d568aa585028a145c79a744dba2e018815873 (patch) | |
tree | f6fc5ffdab309a7c6c3b8eccc08abd5e66f65f61 /net/wireless | |
parent | mac80211: Allow drivers to differentiate between ROC types (diff) | |
download | linux-723d568aa585028a145c79a744dba2e018815873.tar.xz linux-723d568aa585028a145c79a744dba2e018815873.zip |
cfg80211: prohibit zero keepalive interval
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 <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 3acde3f88d3a..a8bd453d22b9 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -7636,7 +7636,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]); |