tipc: reduce locking scope during packet reception
[cascardo/linux.git] / net / tipc / core.h
index 0fcf133..f4ed677 100644 (file)
@@ -129,6 +129,11 @@ static inline int less(u16 left, u16 right)
        return less_eq(left, right) && (mod(right) != mod(left));
 }
 
+static inline int in_range(u16 val, u16 min, u16 max)
+{
+       return !less(val, min) && !more(val, max);
+}
+
 #ifdef CONFIG_SYSCTL
 int tipc_register_sysctl(void);
 void tipc_unregister_sysctl(void);