From f1e8524c98516641c759b47ac3b91162d0380d62 Mon Sep 17 00:00:00 2001 From: Sergio Paracuellos Date: Tue, 24 Apr 2018 15:50:05 +0200 Subject: [PATCH] staging: ks7010: use ether_addr_equal in hostif_data_request Use ether_addr_equal to compare addresses in ether_addr_equal function instead of comparing using memcmp. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ks7010/ks_hostif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index b1379276c84b..fb01594994f7 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1059,7 +1059,7 @@ int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb) /* skb check */ eth = (struct ethhdr *)skb->data; - if (memcmp(&priv->eth_addr[0], eth->h_source, ETH_ALEN) != 0) { + if (!ether_addr_equal(&priv->eth_addr[0], eth->h_source)) { netdev_err(priv->net_dev, "invalid mac address !!\n"); netdev_err(priv->net_dev, "ethernet->h_source=%pM\n", eth->h_source); ret = -ENXIO; -- 2.30.2