From: Wei Yongjun Date: Sun, 26 Aug 2012 00:52:48 +0000 (+0800) Subject: staging: wlags49_h2: use is_broadcast_ether_addr() instead of memcmp() X-Git-Tag: next-20120905~19^2~88 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4f19b38f135aaf3c71198bb55cb7a88693a4ba00;p=karo-tx-linux.git staging: wlags49_h2: use is_broadcast_ether_addr() instead of memcmp() Using is_broadcast_ether_addr() instead of directly use memcmp() to determine if the ethernet address is broadcast address. Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wlags49_h2/wl_wext.c b/drivers/staging/wlags49_h2/wl_wext.c index 7e6bad9273d7..cef12f7f31bd 100644 --- a/drivers/staging/wlags49_h2/wl_wext.c +++ b/drivers/staging/wlags49_h2/wl_wext.c @@ -62,6 +62,7 @@ #include #include #include +#include #include #include @@ -173,7 +174,7 @@ static int hermes_clear_tkip_keys(ltv_t *ltv, u16 key_idx, u8 *addr) switch (key_idx) { case 0: - if (memcmp(addr, "\xff\xff\xff\xff\xff\xff", ETH_ALEN) != 0) { + if (!is_broadcast_ether_addr(addr)) { ltv->len = 7; ltv->typ = CFG_REMOVE_TKIP_MAPPED_KEY; memcpy(<v->u.u8[0], addr, ETH_ALEN);