Commit 4f19b38f authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cb154c18
...@@ -62,6 +62,7 @@ ...@@ -62,6 +62,7 @@
#include <linux/if_arp.h> #include <linux/if_arp.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/etherdevice.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include <debug.h> #include <debug.h>
...@@ -173,7 +174,7 @@ static int hermes_clear_tkip_keys(ltv_t *ltv, u16 key_idx, u8 *addr) ...@@ -173,7 +174,7 @@ static int hermes_clear_tkip_keys(ltv_t *ltv, u16 key_idx, u8 *addr)
switch (key_idx) { switch (key_idx) {
case 0: case 0:
if (memcmp(addr, "\xff\xff\xff\xff\xff\xff", ETH_ALEN) != 0) { if (!is_broadcast_ether_addr(addr)) {
ltv->len = 7; ltv->len = 7;
ltv->typ = CFG_REMOVE_TKIP_MAPPED_KEY; ltv->typ = CFG_REMOVE_TKIP_MAPPED_KEY;
memcpy(&ltv->u.u8[0], addr, ETH_ALEN); memcpy(&ltv->u.u8[0], addr, ETH_ALEN);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment