]> Pileus Git - ~andy/linux/blobdiff - drivers/net/wireless/ipw2x00/libipw_rx.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[~andy/linux] / drivers / net / wireless / ipw2x00 / libipw_rx.c
index ce2785948be15f0a513d857f1f171d629de7b6e2..a586a85bfcfe88ccd6378ad476caca6b9aa10a15 100644 (file)
@@ -874,13 +874,13 @@ void libipw_rx_any(struct libipw_device *ieee,
        switch (ieee->iw_mode) {
        case IW_MODE_ADHOC:
                /* our BSS and not from/to DS */
-               if (memcmp(hdr->addr3, ieee->bssid, ETH_ALEN) == 0)
+               if (ether_addr_equal(hdr->addr3, ieee->bssid))
                if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == 0) {
                        /* promisc: get all */
                        if (ieee->dev->flags & IFF_PROMISC)
                                is_packet_for_us = 1;
                        /* to us */
-                       else if (memcmp(hdr->addr1, ieee->dev->dev_addr, ETH_ALEN) == 0)
+                       else if (ether_addr_equal(hdr->addr1, ieee->dev->dev_addr))
                                is_packet_for_us = 1;
                        /* mcast */
                        else if (is_multicast_ether_addr(hdr->addr1))
@@ -889,18 +889,18 @@ void libipw_rx_any(struct libipw_device *ieee,
                break;
        case IW_MODE_INFRA:
                /* our BSS (== from our AP) and from DS */
-               if (memcmp(hdr->addr2, ieee->bssid, ETH_ALEN) == 0)
+               if (ether_addr_equal(hdr->addr2, ieee->bssid))
                if ((fc & (IEEE80211_FCTL_TODS+IEEE80211_FCTL_FROMDS)) == IEEE80211_FCTL_FROMDS) {
                        /* promisc: get all */
                        if (ieee->dev->flags & IFF_PROMISC)
                                is_packet_for_us = 1;
                        /* to us */
-                       else if (memcmp(hdr->addr1, ieee->dev->dev_addr, ETH_ALEN) == 0)
+                       else if (ether_addr_equal(hdr->addr1, ieee->dev->dev_addr))
                                is_packet_for_us = 1;
                        /* mcast */
                        else if (is_multicast_ether_addr(hdr->addr1)) {
                                /* not our own packet bcasted from AP */
-                               if (memcmp(hdr->addr3, ieee->dev->dev_addr, ETH_ALEN))
+                               if (!ether_addr_equal(hdr->addr3, ieee->dev->dev_addr))
                                        is_packet_for_us = 1;
                        }
                }