diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-08-26 08:52:48 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-04 13:16:26 -0700 |
commit | 4f19b38f135aaf3c71198bb55cb7a88693a4ba00 (patch) | |
tree | e5109b3f2bfc8873633323282bf81fbbcba36984 /drivers/staging/wlags49_h2 | |
parent | cb154c18954e245c0d933e6b8302c381ffa13c67 (diff) | |
download | op-kernel-dev-4f19b38f135aaf3c71198bb55cb7a88693a4ba00.zip op-kernel-dev-4f19b38f135aaf3c71198bb55cb7a88693a4ba00.tar.gz |
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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wlags49_h2')
-rw-r--r-- | drivers/staging/wlags49_h2/wl_wext.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/wlags49_h2/wl_wext.c b/drivers/staging/wlags49_h2/wl_wext.c index 7e6bad9..cef12f7 100644 --- a/drivers/staging/wlags49_h2/wl_wext.c +++ b/drivers/staging/wlags49_h2/wl_wext.c @@ -62,6 +62,7 @@ #include <linux/if_arp.h> #include <linux/ioport.h> #include <linux/delay.h> +#include <linux/etherdevice.h> #include <asm/uaccess.h> #include <debug.h> @@ -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); |