aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_bsd.c
diff options
context:
space:
mode:
authorMasashi Honma <honma@ictec.co.jp>2009-12-07 19:35:35 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-07 19:35:35 (GMT)
commit2a91091e154e99cb57f16a2f95fc90d9920c2907 (patch)
treea236a4dfb3aabfed495b16e0387b2646d5dcbe21 /src/drivers/driver_bsd.c
parent803a811b7357881eea151bbde83928c012ce0a8e (diff)
downloadhostap-2a91091e154e99cb57f16a2f95fc90d9920c2907.zip
hostap-2a91091e154e99cb57f16a2f95fc90d9920c2907.tar.gz
hostap-2a91091e154e99cb57f16a2f95fc90d9920c2907.tar.bz2
Fix driver_bsd.c build
On NetBSD 5.0.1, driver_bsd.c build fails with message below. ../src/drivers/driver_bsd.c: In function 'wpa_driver_bsd_associate': ../src/drivers/driver_bsd.c:1170: warning: implicit declaration of function 'wpa_driver_bsd_set_auth_alg' ../src/drivers/driver_bsd.c: At top level: ../src/drivers/driver_bsd.c:1204: error: static declaration of 'wpa_driver_bsd_set_auth_alg' follows non-static declaration ../src/drivers/driver_bsd.c:1170: error: previous implicit declaration of 'wpa_driver_bsd_set_auth_alg' was here gmake: *** [../src/drivers/driver_bsd.o] Error 1 This patch solves this issue.
Diffstat (limited to 'src/drivers/driver_bsd.c')
-rw-r--r--src/drivers/driver_bsd.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index 7cf6159..a495f5f 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -1147,6 +1147,23 @@ wpa_driver_bsd_disassociate(void *priv, const u8 *addr, int reason_code)
}
static int
+wpa_driver_bsd_set_auth_alg(void *priv, int auth_alg)
+{
+ struct wpa_driver_bsd_data *drv = priv;
+ int authmode;
+
+ if ((auth_alg & AUTH_ALG_OPEN_SYSTEM) &&
+ (auth_alg & AUTH_ALG_SHARED_KEY))
+ authmode = IEEE80211_AUTH_AUTO;
+ else if (auth_alg & AUTH_ALG_SHARED_KEY)
+ authmode = IEEE80211_AUTH_SHARED;
+ else
+ authmode = IEEE80211_AUTH_OPEN;
+
+ return set80211param(drv, IEEE80211_IOC_AUTHMODE, authmode);
+}
+
+static int
wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params)
{
struct wpa_driver_bsd_data *drv = priv;
@@ -1200,23 +1217,6 @@ wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params)
}
static int
-wpa_driver_bsd_set_auth_alg(void *priv, int auth_alg)
-{
- struct wpa_driver_bsd_data *drv = priv;
- int authmode;
-
- if ((auth_alg & AUTH_ALG_OPEN_SYSTEM) &&
- (auth_alg & AUTH_ALG_SHARED_KEY))
- authmode = IEEE80211_AUTH_AUTO;
- else if (auth_alg & AUTH_ALG_SHARED_KEY)
- authmode = IEEE80211_AUTH_SHARED;
- else
- authmode = IEEE80211_AUTH_OPEN;
-
- return set80211param(drv, IEEE80211_IOC_AUTHMODE, authmode);
-}
-
-static int
wpa_driver_bsd_scan(void *priv, struct wpa_driver_scan_params *params)
{
struct wpa_driver_bsd_data *drv = priv;