From: Gregory Greenman <gregory.greenman@xxxxxxxxx> Signed-off-by: Gregory Greenman <gregory.greenman@xxxxxxxxx> Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx> --- backport/backport-include/linux/random.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backport/backport-include/linux/random.h b/backport/backport-include/linux/random.h index 0a247321785a..89e9ce022505 100644 --- a/backport/backport-include/linux/random.h +++ b/backport/backport-include/linux/random.h @@ -3,6 +3,13 @@ #include_next <linux/random.h> #include <linux/version.h> +#if LINUX_VERSION_IS_LESS(6,1,0) +static inline u16 get_random_u16(void) +{ + return get_random_int() & 0xffff; +} +#endif + #if LINUX_VERSION_IS_LESS(6,2,0) static inline u32 get_random_u32_below(u32 ceil) { -- 2.45.1