diff options
author | Dan Williams <dcbw@redhat.com> | 2007-05-25 17:28:30 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-06-11 14:28:42 -0400 |
commit | 3cf20931fa8ffd765a95f72d7539ab34770684d9 (patch) | |
tree | 139a04214a99689234fa901252345f0075f878a2 /drivers/net/wireless/libertas/assoc.c | |
parent | 02eb229bbded41d189f1ec57dbd264f80c93b5c6 (diff) |
[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.c | 9 |
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 @@ | |||
2 | 2 | ||
3 | #include <linux/bitops.h> | 3 | #include <linux/bitops.h> |
4 | #include <net/ieee80211.h> | 4 | #include <net/ieee80211.h> |
5 | #include <linux/etherdevice.h> | ||
5 | 6 | ||
6 | #include "assoc.h" | 7 | #include "assoc.h" |
7 | #include "join.h" | 8 | #include "join.h" |
@@ -161,8 +162,8 @@ static int assoc_helper_associate(wlan_private *priv, | |||
161 | /* If we're given and 'any' BSSID, try associating based on SSID */ | 162 | /* If we're given and 'any' BSSID, try associating based on SSID */ |
162 | 163 | ||
163 | if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) { | 164 | if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) { |
164 | if (memcmp(bssid_any, assoc_req->bssid, ETH_ALEN) | 165 | if (compare_ether_addr(bssid_any, assoc_req->bssid) |
165 | && memcmp(bssid_off, assoc_req->bssid, ETH_ALEN)) { | 166 | && compare_ether_addr(bssid_off, assoc_req->bssid)) { |
166 | ret = assoc_helper_bssid(priv, assoc_req); | 167 | ret = assoc_helper_bssid(priv, assoc_req); |
167 | done = 1; | 168 | done = 1; |
168 | if (ret) { | 169 | if (ret) { |
@@ -488,8 +489,8 @@ void libertas_association_worker(struct work_struct *work) | |||
488 | 489 | ||
489 | /* But don't use 'any' SSID if there's a valid locked BSSID to use */ | 490 | /* But don't use 'any' SSID if there's a valid locked BSSID to use */ |
490 | if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) { | 491 | if (test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) { |
491 | if (memcmp(&assoc_req->bssid, bssid_any, ETH_ALEN) | 492 | if (compare_ether_addr(assoc_req->bssid, bssid_any) |
492 | && memcmp(&assoc_req->bssid, bssid_off, ETH_ALEN)) | 493 | && compare_ether_addr(assoc_req->bssid, bssid_off)) |
493 | find_any_ssid = 0; | 494 | find_any_ssid = 0; |
494 | } | 495 | } |
495 | 496 | ||