aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-08-25 14:31:11 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2009-09-15 12:02:24 -0700
commit8f679185a300d89b73ed348ecae361515b97ef59 (patch)
tree03ea7463fe3a4affc0096b922910615261c2fd39 /drivers
parent49debb5684009d56ec5a0f930e513b1044db5e76 (diff)
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 <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rt2860/sta_ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rt2860/sta_ioctl.c b/drivers/staging/rt2860/sta_ioctl.c
index b6cdf13fbfa..c0e04251e12 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