aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/wlan-ng/prism2sta.c
diff options
context:
space:
mode:
authorMoritz Muehlenhoff <jmm@debian.org>2009-01-21 22:00:41 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 14:53:16 -0700
commit28b17a4bdf148b7591c004efd10a8850d52849ec (patch)
treef5efadf76aa6850d79f475e5f16e2160450341f3 /drivers/staging/wlan-ng/prism2sta.c
parent9cba46dc1c1c98d9e1c44be7b8d435ad553f799e (diff)
downloadkernel_samsung_smdk4412-28b17a4bdf148b7591c004efd10a8850d52849ec.zip
kernel_samsung_smdk4412-28b17a4bdf148b7591c004efd10a8850d52849ec.tar.gz
kernel_samsung_smdk4412-28b17a4bdf148b7591c004efd10a8850d52849ec.tar.bz2
Staging: wlan-ng: Remove use of WLAN_ADDR_LEN
Replace the driver local WLAN_ADDR_LEN constant through the kernel-wide ETH_ALEN definiton. Signed-off-by: Moritz Muehlenhoff <jmm@debian.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/wlan-ng/prism2sta.c')
-rw-r--r--drivers/staging/wlan-ng/prism2sta.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/staging/wlan-ng/prism2sta.c b/drivers/staging/wlan-ng/prism2sta.c
index b279c97..a871cbb 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -70,6 +70,7 @@
#include <linux/delay.h>
#include <asm/byteorder.h>
#include <linux/if_arp.h>
+#include <linux/if_ether.h>
#include "wlan_compat.h"
@@ -920,7 +921,7 @@ static int prism2sta_getcardinfo(wlandevice_t *wlandev)
/* Collect the MAC address */
result = hfa384x_drvr_getconfig(hw, HFA384x_RID_CNFOWNMACADDR,
- wlandev->netdev->dev_addr, WLAN_ADDR_LEN);
+ wlandev->netdev->dev_addr, ETH_ALEN);
if ( result != 0 ) {
WLAN_LOG_ERROR("Failed to retrieve mac address\n");
goto failed;
@@ -1588,7 +1589,7 @@ static void prism2sta_inf_assocstatus(wlandevice_t *wlandev,
*/
for (i = 0; i < hw->authlist.cnt; i++)
- if (memcmp(rec.sta_addr, hw->authlist.addr[i], WLAN_ADDR_LEN) == 0)
+ if (memcmp(rec.sta_addr, hw->authlist.addr[i], ETH_ALEN) == 0)
break;
if (i >= hw->authlist.cnt) {
@@ -1662,7 +1663,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
** authentication.
*/
- memcpy(rec.address, inf->info.authreq.sta_addr, WLAN_ADDR_LEN);
+ memcpy(rec.address, inf->info.authreq.sta_addr, ETH_ALEN);
rec.status = P80211ENUM_status_unspec_failure;
/*
@@ -1679,7 +1680,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
for (i = 0; i < hw->authlist.cnt; i++)
if (memcmp(rec.address, hw->authlist.addr[i],
- WLAN_ADDR_LEN) == 0) {
+ ETH_ALEN) == 0) {
rec.status = P80211ENUM_status_successful;
break;
}
@@ -1715,8 +1716,8 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
addr = hw->allow.addr1[0];
}
- for (i = 0; i < cnt; i++, addr += WLAN_ADDR_LEN)
- if (memcmp(rec.address, addr, WLAN_ADDR_LEN) == 0) {
+ for (i = 0; i < cnt; i++, addr += ETH_ALEN)
+ if (memcmp(rec.address, addr, ETH_ALEN) == 0) {
rec.status = P80211ENUM_status_successful;
break;
}
@@ -1745,8 +1746,8 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
rec.status = P80211ENUM_status_successful;
- for (i = 0; i < cnt; i++, addr += WLAN_ADDR_LEN)
- if (memcmp(rec.address, addr, WLAN_ADDR_LEN) == 0) {
+ for (i = 0; i < cnt; i++, addr += ETH_ALEN)
+ if (memcmp(rec.address, addr, ETH_ALEN) == 0) {
rec.status = P80211ENUM_status_unspec_failure;
break;
}
@@ -1767,7 +1768,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
if (rec.status == P80211ENUM_status_successful) {
for (i = 0; i < hw->authlist.cnt; i++)
- if (memcmp(rec.address, hw->authlist.addr[i], WLAN_ADDR_LEN) == 0)
+ if (memcmp(rec.address, hw->authlist.addr[i], ETH_ALEN) == 0)
break;
if (i >= hw->authlist.cnt) {
@@ -1775,7 +1776,7 @@ static void prism2sta_inf_authreq_defer(wlandevice_t *wlandev,
rec.status = P80211ENUM_status_ap_full;
} else {
memcpy(hw->authlist.addr[hw->authlist.cnt],
- rec.address, WLAN_ADDR_LEN);
+ rec.address, ETH_ALEN);
hw->authlist.cnt++;
added = 1;
}