summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/assoc.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-05-25 23:28:30 +0200
committerJohn W. Linville <linville@tuxdriver.com>2007-06-11 20:28:42 +0200
commit3cf20931fa8ffd765a95f72d7539ab34770684d9 (patch)
tree139a04214a99689234fa901252345f0075f878a2 /drivers/net/wireless/libertas/assoc.c
parent[PATCH] libertas: use MAC_FMT and MAC_ARG where appropriate (diff)
downloadlinux-3cf20931fa8ffd765a95f72d7539ab34770684d9.tar.xz
linux-3cf20931fa8ffd765a95f72d7539ab34770684d9.zip
[PATCH] libertas: use compare_ether_addr() rather than memcmp() where appropriate
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/assoc.c')
-rw-r--r--drivers/net/wireless/libertas/assoc.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index b18464224b95..afce32761bfd 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -2,6 +2,7 @@
#include <linux/bitops.h>
#include <net/ieee80211.h>
+#include <linux/etherdevice.h>
#include "assoc.h"
#include "join.h"
@@ -161,8 +162,8 @@ static int assoc_helper_associate(wlan_private *priv,
/* If we're given and 'any' BSSID, try associating based on SSID */
if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) {
- if (memcmp(bssid_any, assoc_req->bssid, ETH_ALEN)
- && memcmp(bssid_off, assoc_req->bssid, ETH_ALEN)) {
+ if (compare_ether_addr(bssid_any, assoc_req->bssid)
+ && compare_ether_addr(bssid_off, assoc_req->bssid)) {
ret = assoc_helper_bssid(priv, assoc_req);
done = 1;
if (ret) {
@@ -488,8 +489,8 @@ void libertas_association_worker(struct work_struct *work)
/* But don't use 'any' SSID if there's a valid locked BSSID to use */
if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) {
- if (memcmp(&assoc_req->bssid, bssid_any, ETH_ALEN)
- && memcmp(&assoc_req->bssid, bssid_off, ETH_ALEN))
+ if (compare_ether_addr(assoc_req->bssid, bssid_any)
+ && compare_ether_addr(assoc_req->bssid, bssid_off))
find_any_ssid = 0;
}