Commit 375da53b authored by John W. Linville's avatar John W. Linville

libertas: correct "limited range of data type" warning

  CC [M]  drivers/net/wireless/libertas/wext.o
drivers/net/wireless/libertas/wext.c: In function ‘lbs_get_rts’:
drivers/net/wireless/libertas/wext.c:307: warning: comparison is always
false due to limited range of data type
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 75d31cf1
...@@ -281,7 +281,7 @@ static int lbs_set_rts(struct net_device *dev, struct iw_request_info *info, ...@@ -281,7 +281,7 @@ static int lbs_set_rts(struct net_device *dev, struct iw_request_info *info,
if (vwrq->disabled) if (vwrq->disabled)
val = MRVDRV_RTS_MAX_VALUE; val = MRVDRV_RTS_MAX_VALUE;
if (val < MRVDRV_RTS_MIN_VALUE || val > MRVDRV_RTS_MAX_VALUE) if (val > MRVDRV_RTS_MAX_VALUE) /* min rts value is 0 */
return -EINVAL; return -EINVAL;
ret = lbs_set_snmp_mib(priv, SNMP_MIB_OID_RTS_THRESHOLD, (u16) val); ret = lbs_set_snmp_mib(priv, SNMP_MIB_OID_RTS_THRESHOLD, (u16) val);
...@@ -304,8 +304,7 @@ static int lbs_get_rts(struct net_device *dev, struct iw_request_info *info, ...@@ -304,8 +304,7 @@ static int lbs_get_rts(struct net_device *dev, struct iw_request_info *info,
goto out; goto out;
vwrq->value = val; vwrq->value = val;
vwrq->disabled = ((val < MRVDRV_RTS_MIN_VALUE) vwrq->disabled = val > MRVDRV_RTS_MAX_VALUE; /* min rts value is 0 */
|| (val > MRVDRV_RTS_MAX_VALUE));
vwrq->fixed = 1; vwrq->fixed = 1;
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment