summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
diff options
context:
space:
mode:
authorArushi Singhal2018-03-03 22:11:42 +0100
committerGreg Kroah-Hartman2018-03-06 13:07:48 +0100
commit2dcce8ed6633e7da1c1439d4948e19278954e7ef (patch)
tree005b29e2f6852b000debfd32eabe0ca048072c8e /drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
parentstaging: rtl8723bs: Remove unnecessary semicolon. (diff)
downloadkernel-qcow2-linux-2dcce8ed6633e7da1c1439d4948e19278954e7ef.tar.gz
kernel-qcow2-linux-2dcce8ed6633e7da1c1439d4948e19278954e7ef.tar.xz
kernel-qcow2-linux-2dcce8ed6633e7da1c1439d4948e19278954e7ef.zip
staging: rtl8723bs: Replace memset with eth_zero_addr
Use eth_zero_addr to assign zero address to the given address array instead of memset when the second argument in memset is address of zero. Coccinelle was used to do the replacement and add the header file linux/etherdevice.h if not already present. The Coccinelle semantic patch that makes this change is as follows: @header@ @@ #include <linux/etherdevice.h> @r1@ expression e; @@ -memset(e,0x00,ETH_ALEN); +eth_zero_addr(e); @includeheader depends on r1 && !header@ @@ + #include <linux/etherdevice.h> #include <...> Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c')
-rw-r--r--drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 1e6c587e4550..75a4b230ae6e 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -14,6 +14,7 @@
******************************************************************************/
#define _IOCTL_CFG80211_C_
+#include <linux/etherdevice.h>
#include <drv_types.h>
#include <rtw_debug.h>
#include <linux/jiffies.h>
@@ -2391,7 +2392,7 @@ static int cfg80211_rtw_del_pmksa(struct wiphy *wiphy,
{
if (!memcmp(psecuritypriv->PMKIDList[index].Bssid, (u8 *)pmksa->bssid, ETH_ALEN))
{ /* BSSID is matched, the same AP => Remove this PMKID information and reset it. */
- memset(psecuritypriv->PMKIDList[index].Bssid, 0x00, ETH_ALEN);
+ eth_zero_addr(psecuritypriv->PMKIDList[index].Bssid);
memset(psecuritypriv->PMKIDList[index].PMKID, 0x00, WLAN_PMKID_LEN);
psecuritypriv->PMKIDList[index].bUsed = false;
bMatched = true;