diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2023-08-04 12:01:20 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@kernel.org> | 2023-08-21 19:13:00 +0300 |
commit | 66311106b20b5aba36ca4974d0bc5d637ccf0948 (patch) | |
tree | f50b5aabeaf989e49acf6169e865d26be0456d47 | |
parent | eb2624f55ad14634f97efbf56cb0cb815800508a (diff) | |
download | linux-66311106b20b5aba36ca4974d0bc5d637ccf0948.tar.xz |
wifi: rtlwifi: use eth_broadcast_addr() to assign broadcast address
Use eth_broadcast_addr() to assign broadcast address instead
of memcpy().
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230804090120.1332091-1-yangyingliang@huawei.com
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c index 4fb16f5f6f83..3835b639d453 100644 --- a/drivers/net/wireless/realtek/rtlwifi/core.c +++ b/drivers/net/wireless/realtek/rtlwifi/core.c @@ -1656,7 +1656,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"); |