summaryrefslogtreecommitdiff
path: root/drivers/staging/csr/sme_wext.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-08-25 01:39:15 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-04 21:14:08 (GMT)
commit6a5c23194e09103ed24301e098c03a7da382a656 (patch)
tree981c10be9e5ed9593561a64e67bd4c5223ef23cc /drivers/staging/csr/sme_wext.c
parentc8be681fad93aac2121efcd1bcff54ffe53403eb (diff)
downloadlinux-fsl-qoriq-6a5c23194e09103ed24301e098c03a7da382a656.tar.xz
staging: csr: use is_zero_ether_addr() instead of memcmp()
Using is_zero_ether_addr() instead of directly use memcmp() to determine if the ethernet address is all zeros. spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/csr/sme_wext.c')
-rw-r--r--drivers/staging/csr/sme_wext.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/csr/sme_wext.c b/drivers/staging/csr/sme_wext.c
index 5689123..b58c0c6 100644
--- a/drivers/staging/csr/sme_wext.c
+++ b/drivers/staging/csr/sme_wext.c
@@ -1191,8 +1191,6 @@ unifi_siwap(struct net_device *dev, struct iw_request_info *info,
netInterface_priv_t *interfacePriv = (netInterface_priv_t *)netdev_priv(dev);
unifi_priv_t *priv = interfacePriv->privPtr;
int err = 0;
- const unsigned char zero_bssid[ETH_ALEN] = {0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00};
func_enter();
@@ -1213,7 +1211,7 @@ unifi_siwap(struct net_device *dev, struct iw_request_info *info,
unifi_trace(priv, UDBG1, "unifi_siwap: asked for %pM\n",
wrqu->ap_addr.sa_data);
- if (!memcmp(wrqu->ap_addr.sa_data, zero_bssid, ETH_ALEN)) {
+ if (is_zero_ether_addr(wrqu->ap_addr.sa_data)) {
priv->ignore_bssid_join = FALSE;
err = sme_mgt_disconnect(priv);
if (err) {