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>
/* 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;