aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_bsd.c
diff options
context:
space:
mode:
authorMasashi Honma <masashi.honma@gmail.com>2013-11-26 02:43:37 (GMT)
committerJouni Malinen <j@w1.fi>2013-12-08 01:46:41 (GMT)
commite706d2d30d37fd8626969a1df2adc73059f4ab35 (patch)
treeb7db8afa3eed794af68750d2407158ea3f4e2249 /src/drivers/driver_bsd.c
parent667a158d08dc17c00ceb7eed9b26a9999e5e579f (diff)
downloadhostap-e706d2d30d37fd8626969a1df2adc73059f4ab35.zip
hostap-e706d2d30d37fd8626969a1df2adc73059f4ab35.tar.gz
hostap-e706d2d30d37fd8626969a1df2adc73059f4ab35.tar.bz2
bsd: Fix compilation error for NetBSD
Commit 5dd82c634cb5e24500ac4d1374f806fb37dd88bb causes compilation error on NetBSD 6.1.2. Fix compilation with #ifdef blocks. Signed-hostap: Masashi Honma <masashi.honma@gmail.com>
Diffstat (limited to 'src/drivers/driver_bsd.c')
-rw-r--r--src/drivers/driver_bsd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index 45d6b19..fb6402d 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -85,8 +85,10 @@ get80211opmode(struct bsd_driver_data *drv)
return IEEE80211_M_HOSTAP;
if (ifmr.ifm_current & IFM_IEEE80211_MONITOR)
return IEEE80211_M_MONITOR;
+#ifdef IEEE80211_M_MBSS
if (ifmr.ifm_current & IFM_IEEE80211_MBSS)
return IEEE80211_M_MBSS;
+#endif /* IEEE80211_M_MBSS */
}
return IEEE80211_M_STA;
}
@@ -324,7 +326,9 @@ bsd_set_key(const char *ifname, void *priv, enum wpa_alg alg,
size_t seq_len, const u8 *key, size_t key_len)
{
struct ieee80211req_key wk;
+#ifdef IEEE80211_KEY_NOREPLAY
struct bsd_driver_data *drv = priv;
+#endif /* IEEE80211_KEY_NOREPLAY */
wpa_printf(MSG_DEBUG, "%s: alg=%d addr=%p key_idx=%d set_tx=%d "
"seq_len=%zu key_len=%zu", __func__, alg, addr, key_idx,
@@ -380,12 +384,14 @@ bsd_set_key(const char *ifname, void *priv, enum wpa_alg alg,
if (wk.ik_keyix != IEEE80211_KEYIX_NONE && set_tx)
wk.ik_flags |= IEEE80211_KEY_DEFAULT;
#ifndef HOSTAPD
+#ifdef IEEE80211_KEY_NOREPLAY
/*
* Ignore replay failures in IBSS and AHDEMO mode.
*/
if (drv->opmode == IEEE80211_M_IBSS ||
drv->opmode == IEEE80211_M_AHDEMO)
wk.ik_flags |= IEEE80211_KEY_NOREPLAY;
+#endif /* IEEE80211_KEY_NOREPLAY */
#endif /* HOSTAPD */
wk.ik_keylen = key_len;
if (seq) {