Use ether_addr_equal to compare addresses in ether_addr_equal function instead of comparing using memcmp. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx> --- 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 297147e..695fcd1 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c @@ -1056,7 +1056,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.7.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel