summaryrefslogtreecommitdiff
path: root/include/net/red.h
diff options
context:
space:
mode:
authorWolfram Sang <wsa@kernel.org>2021-01-28 10:03:25 +0100
committerWolfram Sang <wsa@kernel.org>2021-01-28 10:03:25 +0100
commit2e7f3db5d886701c2a31219530845f642fe700d9 (patch)
treecc14a072dec431cdb69597f76282e6375420e71f /include/net/red.h
parent73cc584cfced260133cfc635f9921d66da676749 (diff)
parent6ee1d745b7c9fd573fba142a2efdad76a9f1cb04 (diff)
Merge tag 'v5.11-rc5' into i2c/for-5.12
Linux 5.11-rc5
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;