Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / drivers / staging / rtl8192e / rtllib_rx.c
index 8aeaed5..1a011b9 100644 (file)
@@ -873,11 +873,11 @@ static size_t rtllib_rx_get_hdrlen(struct rtllib_device *ieee,
                if (net_ratelimit())
                        printk(KERN_INFO "%s: find HTCControl!\n", __func__);
                hdrlen += 4;
-               rx_stats->bContainHTC = 1;
+               rx_stats->bContainHTC = true;
        }
 
         if (RTLLIB_QOS_HAS_SEQ(fc))
-               rx_stats->bIsQosData = 1;
+               rx_stats->bIsQosData = true;
 
        return hdrlen;
 }
@@ -957,16 +957,15 @@ static void rtllib_rx_extract_addr(struct rtllib_device *ieee,
 static int rtllib_rx_data_filter(struct rtllib_device *ieee, u16 fc,
                                 u8 *dst, u8 *src, u8 *bssid, u8 *addr2)
 {
-       u8 zero_addr[ETH_ALEN] = {0};
        u8 type, stype;
 
        type = WLAN_FC_GET_TYPE(fc);
        stype = WLAN_FC_GET_STYPE(fc);
 
        /* Filter frames from different BSS */
-       if (((fc & RTLLIB_FCTL_DSTODS) != RTLLIB_FCTL_DSTODS)
-               && (compare_ether_addr(ieee->current_network.bssid, bssid) != 0)
-               && memcmp(ieee->current_network.bssid, zero_addr, ETH_ALEN)) {
+       if (((fc & RTLLIB_FCTL_DSTODS) != RTLLIB_FCTL_DSTODS) &&
+           !ether_addr_equal(ieee->current_network.bssid, bssid) &&
+           !is_zero_ether_addr(ieee->current_network.bssid)) {
                return -1;
        }
 
@@ -974,8 +973,8 @@ static int rtllib_rx_data_filter(struct rtllib_device *ieee, u16 fc,
        if (ieee->IntelPromiscuousModeInfo.bPromiscuousOn  &&
                ieee->IntelPromiscuousModeInfo.bFilterSourceStationFrame) {
                if ((fc & RTLLIB_FCTL_TODS) && !(fc & RTLLIB_FCTL_FROMDS) &&
-                       (compare_ether_addr(dst, ieee->current_network.bssid) != 0) &&
-                       (compare_ether_addr(bssid, ieee->current_network.bssid) == 0)) {
+                   !ether_addr_equal(dst, ieee->current_network.bssid) &&
+                   ether_addr_equal(bssid, ieee->current_network.bssid)) {
                        return -1;
                }
        }
@@ -1275,7 +1274,7 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb,
        /*Filter pkt not to me*/
        multicast = is_multicast_ether_addr(hdr->addr1);
        unicast = !multicast;
-       if (unicast && (compare_ether_addr(dev->dev_addr, hdr->addr1) != 0)) {
+       if (unicast && !ether_addr_equal(dev->dev_addr, hdr->addr1)) {
                if (ieee->bNetPromiscuousMode)
                        bToOtherSTA = true;
                else
@@ -1730,7 +1729,7 @@ static inline void rtllib_extract_country_ie(
                        network->CountryIeLen = info_element->len;
 
                        if (!IS_COUNTRY_IE_VALID(ieee)) {
-                               if ((rtllib_act_scanning(ieee, false) == true) && (ieee->FirstIe_InScan == 1))
+                               if (rtllib_act_scanning(ieee, false) && ieee->FirstIe_InScan)
                                        printk(KERN_INFO "Received beacon ContryIE, SSID: <%s>\n", network->ssid);
                                Dot11d_UpdateCountryIe(ieee, addr2, info_element->len, info_element->data);
                        }