diff options
author | Bhumika Goyal <bhumirks@gmail.com> | 2016-03-01 21:48:31 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-03-12 09:09:09 +0300 |
commit | f80c1d57637800f3da8eece0859d1e942a119ea8 (patch) | |
tree | cf662fc578fa0b73d9b8a50dded0abd084a62f5b /drivers/staging/rtl8192u | |
parent | 7288cadc199ebeb1e34237f999efa1368e4a3daf (diff) | |
download | linux-f80c1d57637800f3da8eece0859d1e942a119ea8.tar.xz |
Staging: rtl8192u: Replace memset with eth_broadcast_addr
Use eth_broadcast_addr to assign the broadcast address to the given
address array instead of memset when the second argument is a broacast
address 0xff. ETH_ALEN is a macro with value 6, so 6 is treated as
ETH_ALEN if it is the third argument of memset.
Done using coccinelle.
@@
expression e;
@@
- memset(e,\(0xff\|0xFF\|255\),\(ETH_ALEN\|6\));
+ eth_broadcast_addr(e);
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u')
-rw-r--r-- | drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c index f8041f9d61c8..2fbbf35c40ac 100644 --- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c +++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c @@ -342,9 +342,9 @@ inline struct sk_buff *ieee80211_probe_req(struct ieee80211_device *ieee) req->header.frame_ctl = cpu_to_le16(IEEE80211_STYPE_PROBE_REQ); req->header.duration_id = 0; /* FIXME: is this OK? */ - memset(req->header.addr1, 0xff, ETH_ALEN); + eth_broadcast_addr(req->header.addr1); memcpy(req->header.addr2, ieee->dev->dev_addr, ETH_ALEN); - memset(req->header.addr3, 0xff, ETH_ALEN); + eth_broadcast_addr(req->header.addr3); tag = (u8 *) skb_put(skb,len+2+rate_len); |