Commit 66311106 authored by Yang Yingliang's avatar Yang Yingliang Committed by Kalle Valo

wifi: rtlwifi: use eth_broadcast_addr() to assign broadcast address

Use eth_broadcast_addr() to assign broadcast address instead
of memcpy().
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Acked-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230804090120.1332091-1-yangyingliang@huawei.com
parent eb2624f5
...@@ -1656,7 +1656,7 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, ...@@ -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], memcpy(rtlpriv->sec.key_buf[key_idx],
key->key, key->keylen); key->key, key->keylen);
rtlpriv->sec.key_len[key_idx] = 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 */ } else { /* pairwise key */
rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG, rtl_dbg(rtlpriv, COMP_SEC, DBG_DMESG,
"set pairwise key\n"); "set pairwise key\n");
......
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