summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8192e/rtllib_softmac.c
diff options
context:
space:
mode:
authorAya Mahfouz2015-03-03 15:03:35 +0100
committerGreg Kroah-Hartman2015-03-06 18:54:34 +0100
commitcdbaf3f67279e7ee531c1be6da53731461a74237 (patch)
treecf967292cb6024c5caba7f0967a19dc7e7aa99d7 /drivers/staging/rtl8192e/rtllib_softmac.c
parentStaging: rtl8192u: Fix duplicate conditional branch (diff)
downloadkernel-qcow2-linux-cdbaf3f67279e7ee531c1be6da53731461a74237.tar.gz
kernel-qcow2-linux-cdbaf3f67279e7ee531c1be6da53731461a74237.tar.xz
kernel-qcow2-linux-cdbaf3f67279e7ee531c1be6da53731461a74237.zip
staging: rtl8192e: replace memset(x,0,ETH_ALEN) by eth_zero_addr(x)
eth_zero_addr() is a wrapper function for memset if 0 is going to be assigned to a mac address. The replacement was done by the following coccinelle script: @header@ @@ #include <linux/etherdevice.h> @eth_zero_addr@ expression e; @@ -memset(e,0,ETH_ALEN); +eth_zero_addr(e); @eth_broadcast_addr@ identifier e; @@ -memset(e,\(0xff\|0xFF\|255\),ETH_ALEN); +eth_broadcast_addr(e); @linux_header depends on !header && (eth_zero_addr || eth_broadcast_addr) @ @@ + #include <linux/etherdevice.h> + @special_header depends on !header && !linux_header && (eth_zero_addr || eth_broadcast_addr) @ @@ + + #include <linux/etherdevice.h> + @custom_header depends on !header && !linux_header && !special_header && (eth_zero_addr || eth_broadcast_addr) @ @@ + + #include <linux/etherdevice.h> Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index d992a754e72d..16aef7cf23b9 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -3751,7 +3751,7 @@ void notify_wx_assoc_event(struct rtllib_device *ieee)
printk(KERN_INFO "%s(): Tell user space disconnected\n",
__func__);
- memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
+ eth_zero_addr(wrqu.ap_addr.sa_data);
}
wireless_send_event(ieee->dev, SIOCGIWAP, &wrqu, NULL);
}