staging: ks7010: use ether_addr_equal in hostif_data_indication
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Tue, 24 Apr 2018 13:50:04 +0000 (15:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2018 13:50:19 +0000 (15:50 +0200)
Instead of comparing ethernet address using memcmp in function
hostif_data_indication use ether_addr_equal function created
for this function.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c

index fac7f8e..b137927 100644 (file)
@@ -375,7 +375,7 @@ void hostif_data_indication(struct ks_wlan_private *priv)
        eth_proto = ntohs(eth_hdr->h_proto);
 
        /* source address check */
-       if (memcmp(&priv->eth_addr[0], eth_hdr->h_source, ETH_ALEN) == 0) {
+       if (ether_addr_equal(&priv->eth_addr[0], eth_hdr->h_source)) {
                netdev_err(priv->net_dev, "invalid : source is own mac address !!\n");
                netdev_err(priv->net_dev,
                           "eth_hdrernet->h_dest=%02X:%02X:%02X:%02X:%02X:%02X\n",