Revert "staging: batman-adv: Use linux/etherdevice.h address helper functions"
[firefly-linux-kernel-4.4.55.git] / drivers / staging / batman-adv / main.c
index 6ea64200ad1669cc39d5a9f22e01ec9d7327bf4d..0587940d27238146a67ed765482877557f445206 100644 (file)
@@ -149,7 +149,7 @@ void dec_module_count(void)
 
 int compare_orig(void *data1, void *data2)
 {
-       return (compare_ether_addr(data1, data2) == 0 ? 1 : 0);
+       return (memcmp(data1, data2, ETH_ALEN) == 0 ? 1 : 0);
 }
 
 /* hashfunction to choose an entry in a hash table of given size */
@@ -192,6 +192,16 @@ int is_my_mac(uint8_t *addr)
 
 }
 
+int is_bcast(uint8_t *addr)
+{
+       return (addr[0] == (uint8_t)0xff) && (addr[1] == (uint8_t)0xff);
+}
+
+int is_mcast(uint8_t *addr)
+{
+       return *addr & 0x01;
+}
+
 module_init(batman_init);
 module_exit(batman_exit);