summaryrefslogtreecommitdiff
path: root/net/wireless/wext-compat.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2014-01-17 14:43:17 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-01-17 14:43:17 -0500
commit7916a075571f0ccd0830cf3da293188a8b6045e3 (patch)
tree119c5bb9e513c8205efed485c2dc7b8271123326 /net/wireless/wext-compat.c
parentcf84eb0b09c0f09b4c70a648b9dfeec78be61f07 (diff)
parente4e19c031901e95dc7d1cf0a2c9c50525d71651f (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Diffstat (limited to 'net/wireless/wext-compat.c')
-rw-r--r--net/wireless/wext-compat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
index e7c6e862580d..5661a54ac7ee 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -370,7 +370,7 @@ static int cfg80211_wext_siwretry(struct net_device *dev,
u8 oshort = wdev->wiphy->retry_short;
int err;
- if (retry->disabled ||
+ if (retry->disabled || retry->value < 1 || retry->value > 255 ||
(retry->flags & IW_RETRY_TYPE) != IW_RETRY_LIMIT)
return -EINVAL;
@@ -412,9 +412,9 @@ int cfg80211_wext_giwretry(struct net_device *dev,
* First return short value, iwconfig will ask long value
* later if needed
*/
- retry->flags |= IW_RETRY_LIMIT;
+ retry->flags |= IW_RETRY_LIMIT | IW_RETRY_SHORT;
retry->value = wdev->wiphy->retry_short;
- if (wdev->wiphy->retry_long != wdev->wiphy->retry_short)
+ if (wdev->wiphy->retry_long == wdev->wiphy->retry_short)
retry->flags |= IW_RETRY_LONG;
return 0;