Use is_multicast_ether_addr() and is_unicast_ether_addr()
instead of open-coding them to perfom the Checking.
Ruan Jinjie (2):
wifi: ath: Use is_multicast_ether_addr() to check multicast Ether
address
wifi: mwifiex: Use helpers to check multicast addresses
drivers/net/wireless/ath/key.c | 2 +-
drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +-
drivers/net/wireless/marvell/mwifiex/wmm.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
--
2.34.1
Use is_multicast_ether_addr() and is_unicast_ether_addr()
to check the addresses.
Signed-off-by: Ruan Jinjie <[email protected]>
---
drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +-
drivers/net/wireless/marvell/mwifiex/wmm.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index ba4e29713a8c..d8c0f90a86fc 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -3356,7 +3356,7 @@ static int mwifiex_set_wowlan_mef_entry(struct mwifiex_private *priv,
}
if (!wowlan->patterns[i].pkt_offset) {
- if (!(byte_seq[0] & 0x01) &&
+ if (is_unicast_ether_addr(byte_seq) &&
(byte_seq[MWIFIEX_MEF_MAX_BYTESEQ] == 1)) {
mef_cfg->criteria |= MWIFIEX_CRITERIA_UNICAST;
continue;
diff --git a/drivers/net/wireless/marvell/mwifiex/wmm.c b/drivers/net/wireless/marvell/mwifiex/wmm.c
index 00a5679b5c51..8558995e8fc7 100644
--- a/drivers/net/wireless/marvell/mwifiex/wmm.c
+++ b/drivers/net/wireless/marvell/mwifiex/wmm.c
@@ -871,7 +871,7 @@ mwifiex_wmm_add_buf_txqueue(struct mwifiex_private *priv,
}
} else {
memcpy(ra, skb->data, ETH_ALEN);
- if (ra[0] & 0x01 || mwifiex_is_skb_mgmt_frame(skb))
+ if (is_multicast_ether_addr(ra) || mwifiex_is_skb_mgmt_frame(skb))
eth_broadcast_addr(ra);
ra_list = mwifiex_wmm_get_queue_raptr(priv, tid_down, ra);
}
--
2.34.1
Ruan Jinjie <[email protected]> wrote:
> Use is_multicast_ether_addr() and is_unicast_ether_addr()
> to check the addresses.
>
> Signed-off-by: Ruan Jinjie <[email protected]>
Patch applied to wireless-next.git, thanks.
899c0e8a2219 wifi: mwifiex: Use helpers to check multicast addresses
--
https://patchwork.kernel.org/project/linux-wireless/patch/[email protected]/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches