mwifiex: make use of is_zero_ether_addr()
authorBing Zhao <bzhao@marvell.com>
Tue, 28 Aug 2012 03:32:54 +0000 (20:32 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 7 Sep 2012 19:03:41 +0000 (15:03 -0400)
Use is_zero_ether_addr() instead of directly using memcmp() to
determine if the ethernet address is all zeros.

Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/scan.c

index 215d07e6c462656faa79845dd7ba4bc94ddbf4bb..9e077e5fc64a10718a6e333bc6fe9d7866113899 100644 (file)
@@ -726,7 +726,6 @@ mwifiex_config_scan(struct mwifiex_private *priv,
        struct mwifiex_ie_types_num_probes *num_probes_tlv;
        struct mwifiex_ie_types_wildcard_ssid_params *wildcard_ssid_tlv;
        struct mwifiex_ie_types_rates_param_set *rates_tlv;
-       const u8 zero_mac[ETH_ALEN] = { 0, 0, 0, 0, 0, 0 };
        u8 *tlv_pos;
        u32 num_probes;
        u32 ssid_len;
@@ -840,8 +839,7 @@ mwifiex_config_scan(struct mwifiex_private *priv,
                 *  or BSSID filter applied to the scan results in the firmware.
                 */
                if ((i && ssid_filter) ||
-                   memcmp(scan_cfg_out->specific_bssid, &zero_mac,
-                          sizeof(zero_mac)))
+                   !is_zero_ether_addr(scan_cfg_out->specific_bssid))
                        *filtered_scan = true;
        } else {
                scan_cfg_out->bss_mode = (u8) adapter->scan_mode;