]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: ks7010: use ether_addr_equal in hostif_data_request
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Tue, 24 Apr 2018 13:50:05 +0000 (15:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2018 13:50:20 +0000 (15:50 +0200)
Use ether_addr_equal to compare addresses in ether_addr_equal
function instead of comparing using memcmp.

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 b1379276c84bfccf5da0eb501e186972dbf5e7a7..fb01594994f7961c65ac0b0d313c78456d774889 100644 (file)
@@ -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;