[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200727021606.8602-1-vulab@iscas.ac.cn>
Date: Mon, 27 Jul 2020 02:16:06 +0000
From: Xu Wang <vulab@...as.ac.cn>
To: pkshih@...ltek.com, kvalo@...eaurora.org, davem@...emloft.net,
kuba@...nel.org, linux-wireless@...r.kernel.org,
netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Xu Wang <vulab@...as.ac.cn>
Subject: [PATCH] rtlwifi: core: use eth_broadcast_addr() to assign broadcast
This patch is to use eth_broadcast_addr() to assign broadcast address
insetad of memcpy().
Signed-off-by: Xu Wang <vulab@...as.ac.cn>
---
drivers/net/wireless/realtek/rtlwifi/core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtlwifi/core.c b/drivers/net/wireless/realtek/rtlwifi/core.c
index 4dd82c6052f0..8bb49b77b5c8 100644
--- a/drivers/net/wireless/realtek/rtlwifi/core.c
+++ b/drivers/net/wireless/realtek/rtlwifi/core.c
@@ -1512,7 +1512,6 @@ static int rtl_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
bool wep_only = false;
int err = 0;
u8 mac_addr[ETH_ALEN];
- u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
rtlpriv->btcoexist.btc_info.in_4way = false;
@@ -1634,7 +1633,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 */
RT_TRACE(rtlpriv, COMP_SEC, DBG_DMESG,
"set pairwise key\n");
--
2.17.1
Powered by blists - more mailing lists