Commit a9be1864 authored by Ruan Jinjie's avatar Ruan Jinjie Committed by Kalle Valo

wifi: mwifiex: use is_zero_ether_addr() instead of ether_addr_equal()

Use is_zero_ether_addr() instead of ether_addr_equal()
to check if the ethernet address is all zeros.
Signed-off-by: default avatarRuan Jinjie <ruanjinjie@huawei.com>
Acked-by: default avatarBrian Norris <briannorris@chromium.org>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230808081023.2303423-1-ruanjinjie@huawei.com
parent 35983875
...@@ -828,7 +828,6 @@ mwifiex_config_scan(struct mwifiex_private *priv, ...@@ -828,7 +828,6 @@ mwifiex_config_scan(struct mwifiex_private *priv,
u8 ssid_filter; u8 ssid_filter;
struct mwifiex_ie_types_htcap *ht_cap; struct mwifiex_ie_types_htcap *ht_cap;
struct mwifiex_ie_types_bss_mode *bss_mode; struct mwifiex_ie_types_bss_mode *bss_mode;
const u8 zero_mac[6] = {0, 0, 0, 0, 0, 0};
/* The tlv_buf_len is calculated for each scan command. The TLVs added /* The tlv_buf_len is calculated for each scan command. The TLVs added
in this routine will be preserved since the routine that sends the in this routine will be preserved since the routine that sends the
...@@ -966,7 +965,7 @@ mwifiex_config_scan(struct mwifiex_private *priv, ...@@ -966,7 +965,7 @@ mwifiex_config_scan(struct mwifiex_private *priv,
sizeof(struct mwifiex_ie_types_scan_chan_gap); sizeof(struct mwifiex_ie_types_scan_chan_gap);
} }
if (!ether_addr_equal(user_scan_in->random_mac, zero_mac)) { if (!is_zero_ether_addr(user_scan_in->random_mac)) {
random_mac_tlv = (void *)tlv_pos; random_mac_tlv = (void *)tlv_pos;
random_mac_tlv->header.type = random_mac_tlv->header.type =
cpu_to_le16(TLV_TYPE_RANDOM_MAC); cpu_to_le16(TLV_TYPE_RANDOM_MAC);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment