aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_bsd.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-02-08 19:41:51 (GMT)
committerJouni Malinen <j@w1.fi>2010-02-08 19:41:51 (GMT)
commitaba7569ec8211a5b8b948649c9e625b619bb57a5 (patch)
tree67dbb02c73fcb00d41ae3da09a65090e1be94ba2 /src/drivers/driver_bsd.c
parent42f34a9b4137f2c0568bbfeb57cd6fa1d986b674 (diff)
downloadhostap-aba7569ec8211a5b8b948649c9e625b619bb57a5.zip
hostap-aba7569ec8211a5b8b948649c9e625b619bb57a5.tar.gz
hostap-aba7569ec8211a5b8b948649c9e625b619bb57a5.tar.bz2
driver_bsd: Fix build without SIOCS80211CHANNEL
At least FreeBSD 7 does not seem to define this and failed to build after the previous changes.
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 0bb60eb..1201ca5 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -488,6 +488,7 @@ bsd_send_eapol(struct l2_packet_data *sock_xmit, const u8 *addr,
static int
bsd_set_freq(int s, const char *ifname, u16 channel)
{
+#ifdef SIOCS80211CHANNEL
struct ieee80211chanreq creq;
u32 mode;
@@ -507,6 +508,11 @@ bsd_set_freq(int s, const char *ifname, u16 channel)
os_strlcpy(creq.i_name, ifname, sizeof(creq.i_name));
creq.i_channel = channel;
return ioctl(s, SIOCS80211CHANNEL, &creq);
+#else
+ wpa_printf(MSG_ERROR, "bsd_set_freq: SIOCS80211CHANNEL not "
+ "defined");
+ return -1;
+#endif
}