提交 fa6adfe9 编写于 作者: E Emmanuel Grumbach 提交者: John W. Linville

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: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Acked-by: NJohannes Berg <johannes@sipsolutions.net>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 14a7dd6f
...@@ -721,6 +721,9 @@ static int ieee80211_ioctl_siwrts(struct net_device *dev, ...@@ -721,6 +721,9 @@ static int ieee80211_ioctl_siwrts(struct net_device *dev,
if (rts->disabled) if (rts->disabled)
local->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD; 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) else if (rts->value < 0 || rts->value > IEEE80211_MAX_RTS_THRESHOLD)
return -EINVAL; return -EINVAL;
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册