aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-11-26 06:51:52 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-28 07:26:23 -0500
commitd9d8b01978f6510a262ddc4da3b3694d5b149cfe (patch)
treee0e8f5e476bdbb2b40a5fbfd646deb6476369dc8 /net
parent339afbf4819e5c7c0a0422af43b8c2eccd059abf (diff)
nl80211: remove unnecessary checks
The CQM TX-error rate/interval can't be less than zero since they're unsigned values, remove checks. Also fix indentation of the function. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/wireless/nl80211.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 7f53aafd47f7..7cce43bc9489 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -6555,14 +6555,13 @@ nl80211_attr_cqm_policy[NL80211_ATTR_CQM_MAX + 1] __read_mostly = {
6555}; 6555};
6556 6556
6557static int nl80211_set_cqm_txe(struct genl_info *info, 6557static int nl80211_set_cqm_txe(struct genl_info *info,
6558 u32 rate, u32 pkts, u32 intvl) 6558 u32 rate, u32 pkts, u32 intvl)
6559{ 6559{
6560 struct cfg80211_registered_device *rdev = info->user_ptr[0]; 6560 struct cfg80211_registered_device *rdev = info->user_ptr[0];
6561 struct wireless_dev *wdev; 6561 struct wireless_dev *wdev;
6562 struct net_device *dev = info->user_ptr[1]; 6562 struct net_device *dev = info->user_ptr[1];
6563 6563
6564 if ((rate < 0 || rate > 100) || 6564 if (rate > 100 || intvl > NL80211_CQM_TXE_MAX_INTVL)
6565 (intvl < 0 || intvl > NL80211_CQM_TXE_MAX_INTVL))
6566 return -EINVAL; 6565 return -EINVAL;
6567 6566
6568 wdev = dev->ieee80211_ptr; 6567 wdev = dev->ieee80211_ptr;