1
0
Fork 0

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>
hifive-unleashed-5.1
Johannes Berg 2012-11-26 12:51:52 +01:00
parent 339afbf481
commit d9d8b01978
1 changed files with 2 additions and 3 deletions

View File

@ -6555,14 +6555,13 @@ nl80211_attr_cqm_policy[NL80211_ATTR_CQM_MAX + 1] __read_mostly = {
}; };
static int nl80211_set_cqm_txe(struct genl_info *info, static int nl80211_set_cqm_txe(struct genl_info *info,
u32 rate, u32 pkts, u32 intvl) u32 rate, u32 pkts, u32 intvl)
{ {
struct cfg80211_registered_device *rdev = info->user_ptr[0]; struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct wireless_dev *wdev; struct wireless_dev *wdev;
struct net_device *dev = info->user_ptr[1]; struct net_device *dev = info->user_ptr[1];
if ((rate < 0 || rate > 100) || if (rate > 100 || intvl > NL80211_CQM_TXE_MAX_INTVL)
(intvl < 0 || intvl > NL80211_CQM_TXE_MAX_INTVL))
return -EINVAL; return -EINVAL;
wdev = dev->ieee80211_ptr; wdev = dev->ieee80211_ptr;