At least FreeBSD 7 does not seem to define this and failed to build
after the previous changes.
static int
bsd_set_freq(int s, const char *ifname, u16 channel)
{
+#ifdef SIOCS80211CHANNEL
struct ieee80211chanreq creq;
u32 mode;
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
}