Skip to content

Commit

Permalink
mac80211: don't return -EINVAL upon iwconfig wlan0 rts auto
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Emmanuel Grumbach authored and John W. Linville committed Jun 27, 2008
1 parent 14a7dd6 commit fa6adfe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions net/mac80211/wext.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa6adfe

Please sign in to comment.