[net-next] mwifiex: use eth_broadcast_addr() to assign broadcast address
diff mbox series

Message ID 20190710072524.65953-1-maowenan@huawei.com
State Changes Requested
Delegated to: Kalle Valo
Headers show
Series
  • [net-next] mwifiex: use eth_broadcast_addr() to assign broadcast address
Related show

Commit Message

maowenan July 10, 2019, 7:25 a.m. UTC
This patch is to use eth_broadcast_addr() to assign broadcast address
insetad of memcpy().

Signed-off-by: Mao Wenan <maowenan@huawei.com>
---
 drivers/net/wireless/marvell/mwifiex/tdls.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

maowenan July 24, 2019, 1:32 a.m. UTC | #1
gentle ping...

On 2019/7/10 15:25, Mao Wenan wrote:
> This patch is to use eth_broadcast_addr() to assign broadcast address
> insetad of memcpy().
> 
> Signed-off-by: Mao Wenan <maowenan@huawei.com>
> ---
>  drivers/net/wireless/marvell/mwifiex/tdls.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/marvell/mwifiex/tdls.c b/drivers/net/wireless/marvell/mwifiex/tdls.c
> index 18e654d..0931304 100644
> --- a/drivers/net/wireless/marvell/mwifiex/tdls.c
> +++ b/drivers/net/wireless/marvell/mwifiex/tdls.c
> @@ -731,7 +731,6 @@ mwifiex_construct_tdls_action_frame(struct mwifiex_private *priv,
>  				    u16 status_code, struct sk_buff *skb)
>  {
>  	struct ieee80211_mgmt *mgmt;
> -	u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
>  	int ret;
>  	u16 capab;
>  	struct ieee80211_ht_cap *ht_cap;
> @@ -765,7 +764,7 @@ mwifiex_construct_tdls_action_frame(struct mwifiex_private *priv,
>  		memmove(pos + ETH_ALEN, &mgmt->u.action.category,
>  			sizeof(mgmt->u.action.u.tdls_discover_resp));
>  		/* init address 4 */
> -		memcpy(pos, bc_addr, ETH_ALEN);
> +		eth_broadcast_addr(pos);
>  
>  		ret = mwifiex_tdls_append_rates_ie(priv, skb);
>  		if (ret) {
>
Kalle Valo July 24, 2019, 5:42 a.m. UTC | #2
maowenan <maowenan@huawei.com> writes:

> gentle ping...

I don't apply patches during the merge window, so you just have to wait
untill I'll open wireless-drivers-next. And this for
wireless-drivers-next, not net-next.

Patch
diff mbox series

diff --git a/drivers/net/wireless/marvell/mwifiex/tdls.c b/drivers/net/wireless/marvell/mwifiex/tdls.c
index 18e654d..0931304 100644
--- a/drivers/net/wireless/marvell/mwifiex/tdls.c
+++ b/drivers/net/wireless/marvell/mwifiex/tdls.c
@@ -731,7 +731,6 @@  mwifiex_construct_tdls_action_frame(struct mwifiex_private *priv,
 				    u16 status_code, struct sk_buff *skb)
 {
 	struct ieee80211_mgmt *mgmt;
-	u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 	int ret;
 	u16 capab;
 	struct ieee80211_ht_cap *ht_cap;
@@ -765,7 +764,7 @@  mwifiex_construct_tdls_action_frame(struct mwifiex_private *priv,
 		memmove(pos + ETH_ALEN, &mgmt->u.action.category,
 			sizeof(mgmt->u.action.u.tdls_discover_resp));
 		/* init address 4 */
-		memcpy(pos, bc_addr, ETH_ALEN);
+		eth_broadcast_addr(pos);
 
 		ret = mwifiex_tdls_append_rates_ie(priv, skb);
 		if (ret) {