ath10k: prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()
authorKalle Valo <kvalo@qca.qualcomm.com>
Wed, 13 Apr 2016 11:13:49 +0000 (14:13 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 14 Apr 2016 14:30:53 +0000 (17:30 +0300)
Fixes checkpatch warnings:

drivers/net/wireless/ath/ath10k/mac.c:452: Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()
drivers/net/wireless/ath/ath10k/mac.c:455: Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()
drivers/net/wireless/ath/ath10k/txrx.c:133: Prefer ether_addr_equal() or ether_addr_equal_unaligned() over memcmp()

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/mac.c
drivers/net/wireless/ath/ath10k/txrx.c

index 4300410ecddfce3c1bb094203aa23c06850dcfbc..76ea1ccb59c58a661e294e10e8e602af8f67aacb 100644 (file)
@@ -449,10 +449,10 @@ static int ath10k_mac_vif_update_wep_key(struct ath10k_vif *arvif,
        lockdep_assert_held(&ar->conf_mutex);
 
        list_for_each_entry(peer, &ar->peers, list) {
-               if (!memcmp(peer->addr, arvif->vif->addr, ETH_ALEN))
+               if (ether_addr_equal(peer->addr, arvif->vif->addr))
                        continue;
 
-               if (!memcmp(peer->addr, arvif->bssid, ETH_ALEN))
+               if (ether_addr_equal(peer->addr, arvif->bssid))
                        continue;
 
                if (peer->keys[key->keyidx] == key)
index c503ff601a54c4d199433bdc6f08beae51775da5..8c7086989a71cb4614e1e759f3e9e26a2bf5fac7 100644 (file)
@@ -130,7 +130,7 @@ struct ath10k_peer *ath10k_peer_find(struct ath10k *ar, int vdev_id,
        list_for_each_entry(peer, &ar->peers, list) {
                if (peer->vdev_id != vdev_id)
                        continue;
-               if (memcmp(peer->addr, addr, ETH_ALEN))
+               if (!ether_addr_equal(peer->addr, addr))
                        continue;
 
                return peer;