diff options
author | Vaishali Thakkar | 2015-06-26 06:07:25 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-07-15 07:46:20 +0200 |
commit | 3e3148c51190d680b7cc2ebdc556e6ea27a93989 (patch) | |
tree | 48b680d72ad0935eca28cf0963184fe388a363c4 /drivers/staging/rtl8192e/rtllib_softmac.c | |
parent | staging: rtl8192e: rtllib_softmac: Make functions static (diff) | |
download | kernel-qcow2-linux-3e3148c51190d680b7cc2ebdc556e6ea27a93989.tar.gz kernel-qcow2-linux-3e3148c51190d680b7cc2ebdc556e6ea27a93989.tar.xz kernel-qcow2-linux-3e3148c51190d680b7cc2ebdc556e6ea27a93989.zip |
Staging: rtl8192e: Replace memset with eth_zero_addr
Use eth_zero_addr to assign the zero address to the given address
array instead of memset when second argument is address of zero.
Note that the 6 in the third argument of memset appears to represent
an ethernet address size (ETH_ALEN).
The Coccinelle semantic patch that makes this change is as follows:
// <smpl>
@eth_zero_addr@
expression e;
@@
-memset(e,0x00,6);
+eth_zero_addr(e);
// </smpl>
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192e/rtllib_softmac.c')
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_softmac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 635a1c40c309..1503cbb3574e 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -3086,7 +3086,7 @@ static int rtllib_wpa_enable(struct rtllib_device *ieee, int value) */ netdev_info(ieee->dev, "%s WPA\n", value ? "enabling" : "disabling"); ieee->wpa_enabled = value; - memset(ieee->ap_mac_addr, 0, 6); + eth_zero_addr(ieee->ap_mac_addr); return 0; } |