From: Emmanuel Grumbach Date: Tue, 24 Jun 2008 10:37:58 +0000 (+0300) Subject: mac80211: don't return -EINVAL upon iwconfig wlan0 rts auto X-Git-Tag: v2.6.27-rc1~964^2~255^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fa6adfe9e625a6a843a1abed5f4e7a000c11952c;p=platform%2Fkernel%2Flinux-stable.git 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 --- diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index f47d13b..3cbaf53 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