Staging: batman-adv: Use kernel functions to identify broadcasts
authorSven Eckelmann <sven.eckelmann@gmx.de>
Sun, 21 Nov 2010 23:56:07 +0000 (00:56 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 29 Nov 2010 19:09:14 +0000 (11:09 -0800)
commit951c44e0dbfaa580d5b4fb13427ab93ee252636a
tree76477a2882a4d711bbb734132aaebd0623d77076
parent8cab2fbe6dacfdd3b122c450d2fffde6ac06a8b6
Staging: batman-adv: Use kernel functions to identify broadcasts

linux/etherdevice.h already provides functions to classify different
ethernet addresses. These inlineable functions should be used instead of
custom functions.

The check for multicast together with multicast can also be replaced
with a single test for multicast because for every ethernet address x
following is always true:

is_broadcast_ether_addr(x) => is_multicast_ether_addr(x)

or when looking more at the implementation:

(FF:FF:FF:FF:FF:FF == x) => [(01:00:00:00:00:00 & x) != 00:00:00:00:00:00]

Reported-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/batman-adv/main.c
drivers/staging/batman-adv/main.h
drivers/staging/batman-adv/routing.c
drivers/staging/batman-adv/soft-interface.c
drivers/staging/batman-adv/unicast.c
drivers/staging/batman-adv/vis.c