* [PATCH net-next] rtlwifi: Use eth_broadcast_addr() to assign broadcast address
@ 2021-06-16 6:59 Yang Yingliang
0 siblings, 0 replies; only message in thread
From: Yang Yingliang @ 2021-06-16 6:59 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: pkshih, davem
Using eth_broadcast_addr() to assign broadcast address insetad
of an inefficient copy from an array that contains the all-ones
broadcast address.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/net/wireless/realtek/rtlwifi/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
index 8efe2f5e5b9f..d2b647930814 100644
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
@@ -1655,7 +1655,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
memcpy(rtlpriv->sec.key_buf[key_idx],
key->key, key->keylen);
rtlpriv->sec.key_len[key_idx] = key->keylen;
- memcpy(mac_addr, bcast_addr, ETH_ALEN);
+ eth_broadcast_addr(mac_addr);
} else { /* pairwise key */
rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"set pairwise key\n");
--
2.25.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-16 6:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 6:59 [PATCH net-next] rtlwifi: Use eth_broadcast_addr() to assign broadcast address Yang Yingliang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).