]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
driver_bsd: Fix build without SIOCS80211CHANNEL
authorJouni Malinen <j@w1.fi>
Mon, 8 Feb 2010 19:41:51 +0000 (21:41 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 8 Feb 2010 19:41:51 +0000 (21:41 +0200)
At least FreeBSD 7 does not seem to define this and failed to build
after the previous changes.

src/drivers/driver_bsd.c

index 0bb60ebc5555231074fc8a03b012c340b46a3f90..1201ca56ff86a6ac1fa3a1bbefc9b48909719d16 100644 (file)
@@ -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
 }