2023-08-04 09:33:48

by Yang Yingliang

[permalink] [raw]
Subject: [PATCH -next] 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 <[email protected]>
---
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 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");
--
2.25.1



2023-08-08 02:24:49

by Ping-Ke Shih

[permalink] [raw]
Subject: RE: [PATCH -next] wifi: rtlwifi: use eth_broadcast_addr() to assign broadcast address



> -----Original Message-----
> From: Yang Yingliang <[email protected]>
> Sent: Friday, August 4, 2023 5:01 PM
> To: [email protected]
> Cc: Ping-Ke Shih <[email protected]>; [email protected]; [email protected]
> Subject: [PATCH -next] 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 <[email protected]>

Acked-by: Ping-Ke Shih <[email protected]>


> ---
> 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 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");
> --
> 2.25.1
>
>
> ------Please consider the environment before printing this e-mail.