From: Sergio Paracuellos Date: Tue, 24 Apr 2018 13:50:05 +0000 (+0200) Subject: staging: ks7010: use ether_addr_equal in hostif_data_request X-Git-Tag: v5.15~8661^2~508 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f1e8524c98516641c759b47ac3b91162d0380d62;p=mirror_ubuntu-kernels.git 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 --- 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;