From e04dac17ad97b5cc04ac8687d4c8ad01e3d421c1 Mon Sep 17 00:00:00 2001 From: Wei Yongjun Date: Thu, 23 Aug 2012 14:55:02 +0800 Subject: [PATCH] --- yaml --- r: 327894 b: refs/heads/master c: 6977a6b01dc14a1a3d6b70cacfc22dc83cf11984 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/orinoco/wext.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 2c5454796aac..bdf896c63d11 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7949d20c133ab00ba3d2ae7b099171046aa32252 +refs/heads/master: 6977a6b01dc14a1a3d6b70cacfc22dc83cf11984 diff --git a/trunk/drivers/net/wireless/orinoco/wext.c b/trunk/drivers/net/wireless/orinoco/wext.c index 33747e131a96..3b5508f982e8 100644 --- a/trunk/drivers/net/wireless/orinoco/wext.c +++ b/trunk/drivers/net/wireless/orinoco/wext.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -159,15 +160,13 @@ static int orinoco_ioctl_setwap(struct net_device *dev, struct orinoco_private *priv = ndev_priv(dev); int err = -EINPROGRESS; /* Call commit handler */ unsigned long flags; - static const u8 off_addr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - static const u8 any_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; if (orinoco_lock(priv, &flags) != 0) return -EBUSY; /* Enable automatic roaming - no sanity checks are needed */ - if (memcmp(&ap_addr->sa_data, off_addr, ETH_ALEN) == 0 || - memcmp(&ap_addr->sa_data, any_addr, ETH_ALEN) == 0) { + if (is_zero_ether_addr(ap_addr->sa_data) || + is_broadcast_ether_addr(ap_addr->sa_data)) { priv->bssid_fixed = 0; memset(priv->desired_bssid, 0, ETH_ALEN);