|
@@ -168,6 +168,17 @@ 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)
|
|
|
+{
|
|
|
+ if (fls(qth_min) + Wlog > 32)
|
|
|
+ return false;
|
|
|
+ if (fls(qth_max) + Wlog > 32)
|
|
|
+ return false;
|
|
|
+ if (qth_max < qth_min)
|
|
|
+ return false;
|
|
|
+ return true;
|
|
|
+}
|
|
|
+
|
|
|
static inline void red_set_parms(struct red_parms *p,
|
|
|
u32 qth_min, u32 qth_max, u8 Wlog, u8 Plog,
|
|
|
u8 Scell_log, u8 *stab, u32 max_P)
|