diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2008-06-24 06:37:58 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-27 09:09:19 -0400 |
commit | fa6adfe9e625a6a843a1abed5f4e7a000c11952c (patch) | |
tree | e9a569b3b1e90a852cb2ca49ba363921a8134aa0 /net/mac80211/wext.c | |
parent | 14a7dd6f6c1e0b361a37b6df52d4dc2ea36757d2 (diff) |
mac80211: don't return -EINVAL upon iwconfig wlan0 rts auto
This patch avoids returning -EINVAL upon iwconfig wlan0 rts auto. If
rts->fixed is 0, then we should choose a default value instead of failing.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wext.c')
-rw-r--r-- | net/mac80211/wext.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index f47d13bdf7f7..3cbaf5301d00 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -721,6 +721,9 @@ static int ieee80211_ioctl_siwrts(struct net_device *dev, | |||
721 | 721 | ||
722 | if (rts->disabled) | 722 | if (rts->disabled) |
723 | local->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD; | 723 | local->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD; |
724 | else if (!rts->fixed) | ||
725 | /* if the rts value is not fixed, then take default */ | ||
726 | local->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD; | ||
724 | else if (rts->value < 0 || rts->value > IEEE80211_MAX_RTS_THRESHOLD) | 727 | else if (rts->value < 0 || rts->value > IEEE80211_MAX_RTS_THRESHOLD) |
725 | return -EINVAL; | 728 | return -EINVAL; |
726 | else | 729 | else |