summaryrefslogtreecommitdiff
path: root/net/lapb/lapb_iface.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-08-05 23:22:42 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-08-05 23:22:42 -0700
commitc34c07d6946ec8969fa71ba03dbb95091f4eb9d3 (patch)
treecc3b2b288177e85d444380e9ed7e149028d04a31 /net/lapb/lapb_iface.c
parentbce896984c59bcb0804e9eccc19163dccbff064b (diff)
parent558e10a57db10de355ee97712d2b6df49e9b7849 (diff)
downloadlinux-3.10-c34c07d6946ec8969fa71ba03dbb95091f4eb9d3.tar.gz
linux-3.10-c34c07d6946ec8969fa71ba03dbb95091f4eb9d3.tar.bz2
linux-3.10-c34c07d6946ec8969fa71ba03dbb95091f4eb9d3.zip
Merge gregkh@master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/lapb/lapb_iface.c')
-rw-r--r--net/lapb/lapb_iface.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c
index d504eed416f..7e6bc41eeb2 100644
--- a/net/lapb/lapb_iface.c
+++ b/net/lapb/lapb_iface.c
@@ -238,11 +238,13 @@ int lapb_setparms(struct net_device *dev, struct lapb_parms_struct *parms)
goto out_put;
if (lapb->state == LAPB_STATE_0) {
- if (((parms->mode & LAPB_EXTENDED) &&
- (parms->window < 1 || parms->window > 127)) ||
- (parms->window < 1 || parms->window > 7))
- goto out_put;
-
+ if (parms->mode & LAPB_EXTENDED) {
+ if (parms->window < 1 || parms->window > 127)
+ goto out_put;
+ } else {
+ if (parms->window < 1 || parms->window > 7)
+ goto out_put;
+ }
lapb->mode = parms->mode;
lapb->window = parms->window;
}