summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-08-26 09:24:21 +0800
committerJohn W. Linville <linville@tuxdriver.com>2012-09-07 15:03:40 -0400
commit6b6752d4880eb263daf2debfcbda06a9185ed9d0 (patch)
tree3af446f3724d39d82d83ef1ef78bfc9ed913b0e2
parent35622dc26eeb1c9046df659be43b3a9316b0bf65 (diff)
downloadop-kernel-dev-6b6752d4880eb263daf2debfcbda06a9185ed9d0.zip
op-kernel-dev-6b6752d4880eb263daf2debfcbda06a9185ed9d0.tar.gz
wl3501_cs: use is_broadcast_ether_addr() instead of memcmp()
Using is_broadcast_ether_addr() instead of directly use memcmp() to determine if the ethernet address is broadcast address. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/wl3501_cs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 00f6e69..730186d 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1520,13 +1520,12 @@ static int wl3501_set_wap(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
struct wl3501_card *this = netdev_priv(dev);
- static const u8 bcast[ETH_ALEN] = { 255, 255, 255, 255, 255, 255 };
int rc = -EINVAL;
/* FIXME: we support other ARPHRDs...*/
if (wrqu->ap_addr.sa_family != ARPHRD_ETHER)
goto out;
- if (!memcmp(bcast, wrqu->ap_addr.sa_data, ETH_ALEN)) {
+ if (is_broadcast_ether_addr(wrqu->ap_addr.sa_data)) {
/* FIXME: rescan? */
} else
memcpy(this->bssid, wrqu->ap_addr.sa_data, ETH_ALEN);
OpenPOWER on IntegriCloud