From fa6adfe9e625a6a843a1abed5f4e7a000c11952c Mon Sep 17 00:00:00 2001 From: Emmanuel Grumbach Date: Tue, 24 Jun 2008 13:37:58 +0300 Subject: [PATCH] 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 Signed-off-by: Tomas Winkler Acked-by: Johannes Berg Signed-off-by: John W. Linville --- net/mac80211/wext.c | 3 +++ 1 file changed, 3 insertions(+) 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, if (rts->disabled) local->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD; + else if (!rts->fixed) + /* if the rts value is not fixed, then take default */ + local->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD; else if (rts->value < 0 || rts->value > IEEE80211_MAX_RTS_THRESHOLD) return -EINVAL; else -- 2.30.2