summaryrefslogtreecommitdiff
path: root/include/net/red.h
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2021-02-23 11:33:13 +0100
committerJiri Kosina <jkosina@suse.cz>2021-02-23 11:33:13 +0100
commitd6310078d9f8c416e85f641a631aecf58f9c97ff (patch)
tree58ed5d9818ada3e970d93438083731abd6293ba9 /include/net/red.h
parentf8dd50e097b221e35c34b844826db92158ec18c2 (diff)
parentdf7b622906f24be954beca94e60c195fde65c6d5 (diff)
Merge branch 'for-5.12/google' into for-linus
- User experience improvements for hid-google from Nicolas Boichat
Diffstat (limited to 'include/net/red.h')
-rw-r--r--include/net/red.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/red.h b/include/net/red.h
index fc455445f4b2..932f0d79d60c 100644
--- a/include/net/red.h
+++ b/include/net/red.h
@@ -168,12 +168,14 @@ static inline void red_set_vars(struct red_vars *v)
v->qcount = -1;
}
-static inline bool red_check_params(u32 qth_min, u32 qth_max, u8 Wlog)
+static inline bool red_check_params(u32 qth_min, u32 qth_max, u8 Wlog, u8 Scell_log)
{
if (fls(qth_min) + Wlog > 32)
return false;
if (fls(qth_max) + Wlog > 32)
return false;
+ if (Scell_log >= 32)
+ return false;
if (qth_max < qth_min)
return false;
return true;