From: Roel Kluin Date: Tue, 25 Aug 2009 12:31:11 +0000 (+0200) Subject: Staging: rt2860: Fix test in rt_ioctl_siwfrag() X-Git-Tag: MMI-PSA29.97-13-9~26941^2~102 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8f679185a300d89b73ed348ecae361515b97ef59;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: rt2860: Fix test in rt_ioctl_siwfrag() The test always evaluated to true. MIN_FRAG_THRESHOLD is defined 256, MAX_FRAG_THRESHOLD is defined 2346 Signed-off-by: Roel Kluin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c index b6cdf13fbfaa..c0e04251e126 100644 --- a/drivers/staging/rt2860/sta_ioctl.c +++ b/drivers/staging/rt2860/sta_ioctl.c @@ -1369,8 +1369,8 @@ int rt_ioctl_siwfrag(struct net_device *dev, if (frag->disabled) val = MAX_FRAG_THRESHOLD; - else if (frag->value >= MIN_FRAG_THRESHOLD || frag->value <= MAX_FRAG_THRESHOLD) - val = __cpu_to_le16(frag->value & ~0x1); /* even numbers only */ + else if (frag->value >= MIN_FRAG_THRESHOLD && frag->value <= MAX_FRAG_THRESHOLD) + val = __cpu_to_le16(frag->value & ~0x1); /* even numbers only */ else if (frag->value == 0) val = MAX_FRAG_THRESHOLD; else