From 4f19b38f135aaf3c71198bb55cb7a88693a4ba00 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Sun, 26 Aug 2012 08:52:48 +0800 Subject: [PATCH] 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 --- drivers/staging/wlags49_h2/wl_wext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.30.2