aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/main.h')
-rw-r--r--net/batman-adv/main.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/batman-adv/main.h b/net/batman-adv/main.h
index e235d7bbe045..06b5b994cc20 100644
--- a/net/batman-adv/main.h
+++ b/net/batman-adv/main.h
@@ -165,4 +165,14 @@ static inline void bat_dbg(char type __always_unused,
165 pr_err("%s: " fmt, _netdev->name, ## arg); \ 165 pr_err("%s: " fmt, _netdev->name, ## arg); \
166 } while (0) 166 } while (0)
167 167
168/**
169 * returns 1 if they are the same ethernet addr
170 *
171 * note: can't use compare_ether_addr() as it requires aligned memory
172 */
173static inline int compare_eth(void *data1, void *data2)
174{
175 return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0);
176}
177
168#endif /* _NET_BATMAN_ADV_MAIN_H_ */ 178#endif /* _NET_BATMAN_ADV_MAIN_H_ */