diff options
-rw-r--r-- | drivers/net/wireless/orinoco/wext.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/orinoco/wext.c b/drivers/net/wireless/orinoco/wext.c index 33747e131a9..3b5508f982e 100644 --- a/drivers/net/wireless/orinoco/wext.c +++ b/drivers/net/wireless/orinoco/wext.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include <linux/if_arp.h> | 7 | #include <linux/if_arp.h> |
8 | #include <linux/wireless.h> | 8 | #include <linux/wireless.h> |
9 | #include <linux/ieee80211.h> | 9 | #include <linux/ieee80211.h> |
10 | #include <linux/etherdevice.h> | ||
10 | #include <net/iw_handler.h> | 11 | #include <net/iw_handler.h> |
11 | #include <net/cfg80211.h> | 12 | #include <net/cfg80211.h> |
12 | #include <net/cfg80211-wext.h> | 13 | #include <net/cfg80211-wext.h> |
@@ -159,15 +160,13 @@ static int orinoco_ioctl_setwap(struct net_device *dev, | |||
159 | struct orinoco_private *priv = ndev_priv(dev); | 160 | struct orinoco_private *priv = ndev_priv(dev); |
160 | int err = -EINPROGRESS; /* Call commit handler */ | 161 | int err = -EINPROGRESS; /* Call commit handler */ |
161 | unsigned long flags; | 162 | unsigned long flags; |
162 | static const u8 off_addr[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; | ||
163 | static const u8 any_addr[] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; | ||
164 | 163 | ||
165 | if (orinoco_lock(priv, &flags) != 0) | 164 | if (orinoco_lock(priv, &flags) != 0) |
166 | return -EBUSY; | 165 | return -EBUSY; |
167 | 166 | ||
168 | /* Enable automatic roaming - no sanity checks are needed */ | 167 | /* Enable automatic roaming - no sanity checks are needed */ |
169 | if (memcmp(&ap_addr->sa_data, off_addr, ETH_ALEN) == 0 || | 168 | if (is_zero_ether_addr(ap_addr->sa_data) || |
170 | memcmp(&ap_addr->sa_data, any_addr, ETH_ALEN) == 0) { | 169 | is_broadcast_ether_addr(ap_addr->sa_data)) { |
171 | priv->bssid_fixed = 0; | 170 | priv->bssid_fixed = 0; |
172 | memset(priv->desired_bssid, 0, ETH_ALEN); | 171 | memset(priv->desired_bssid, 0, ETH_ALEN); |
173 | 172 | ||