Commit 8f679185 authored by Roel Kluin's avatar Roel Kluin Committed by Greg Kroah-Hartman

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: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 49debb56
......@@ -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
......
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