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: John W. Linville <linville@tuxdriver.com>
if (vwrq->disabled)
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;
ret = lbs_set_snmp_mib(priv, SNMP_MIB_OID_RTS_THRESHOLD, (u16) val);
goto out;
vwrq->value = val;
- vwrq->disabled = ((val < MRVDRV_RTS_MIN_VALUE)
- || (val > MRVDRV_RTS_MAX_VALUE));
+ vwrq->disabled = val > MRVDRV_RTS_MAX_VALUE; /* min rts value is 0 */
vwrq->fixed = 1;
out: