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.
This commit is contained in:
parent
803a811b73
commit
2a91091e15
1 changed files with 17 additions and 17 deletions
|
@ -1146,6 +1146,23 @@ wpa_driver_bsd_disassociate(void *priv, const u8 *addr, int reason_code)
|
||||||
return set80211var(drv, IEEE80211_IOC_MLME, &mlme, sizeof(mlme));
|
return set80211var(drv, IEEE80211_IOC_MLME, &mlme, sizeof(mlme));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
static int
|
||||||
wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params)
|
wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params)
|
||||||
{
|
{
|
||||||
|
@ -1199,23 +1216,6 @@ wpa_driver_bsd_associate(void *priv, struct wpa_driver_associate_params *params)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
static int
|
||||||
wpa_driver_bsd_scan(void *priv, struct wpa_driver_scan_params *params)
|
wpa_driver_bsd_scan(void *priv, struct wpa_driver_scan_params *params)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue