From: Zhu Yi Date: Mon, 21 Aug 2006 03:38:17 +0000 (+0800) Subject: [PATCH] ipw2200: mark "iwconfig retry 255" as invalid X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=d5f7ac203924a51d0e678338a11be42135fa7996;p=deliverable%2Flinux.git [PATCH] ipw2200: mark "iwconfig retry 255" as invalid The ipw2200 firmware/ucode only support values from 0 to 254. So mark 255 as invalid. Signed-off-by: Zhu Yi Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index 0e5548a15f41..e18fbca83cef 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c @@ -9255,7 +9255,7 @@ static int ipw_wx_set_retry(struct net_device *dev, if (!(wrqu->retry.flags & IW_RETRY_LIMIT)) return 0; - if (wrqu->retry.value < 0 || wrqu->retry.value > 255) + if (wrqu->retry.value < 0 || wrqu->retry.value >= 255) return -EINVAL; mutex_lock(&priv->mutex);