aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/driver_bsd.c
diff options
context:
space:
mode:
authorMasashi Honma <honma@ictec.co.jp>2010-02-13 11:54:27 (GMT)
committerJouni Malinen <j@w1.fi>2010-02-13 11:54:27 (GMT)
commit362468d117edd3b747121e0454049585dd2306bd (patch)
tree940f8d9419e355c830788b1eba84530fc70a3040 /src/drivers/driver_bsd.c
parente1b1309b6a89495a03cc8f47a781cb79ebfbf1a0 (diff)
downloadhostap-362468d117edd3b747121e0454049585dd2306bd.zip
hostap-362468d117edd3b747121e0454049585dd2306bd.tar.gz
hostap-362468d117edd3b747121e0454049585dd2306bd.tar.bz2
FreeBSD: Enable channel control
This patch enables FreeBSD channel control. I have tested on FreeBSD 7.2 with these cases. [hostapd] RSN-PSK(CCMP)/WPA-PSK(TKIP) [wpa_supplicant(STA)] RSN-PSK(CCMP)/WPA-PSK(TKIP) [wpa_supplicant(AP)] RSN-PSK(CCMP)/WPA-PSK(TKIP)
Diffstat (limited to 'src/drivers/driver_bsd.c')
-rw-r--r--src/drivers/driver_bsd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index 628c929..c4327ce 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -537,6 +537,7 @@ bsd_set_freq(void *priv, u16 channel)
struct bsd_driver_data *drv = priv;
#ifdef SIOCS80211CHANNEL
struct ieee80211chanreq creq;
+#endif /* SIOCS80211CHANNEL */
u32 mode;
if (channel < 14)
@@ -551,15 +552,14 @@ bsd_set_freq(void *priv, u16 channel)
return -1;
}
+#ifdef SIOCS80211CHANNEL
os_memset(&creq, 0, sizeof(creq));
os_strlcpy(creq.i_name, drv->ifname, sizeof(creq.i_name));
creq.i_channel = channel;
return ioctl(drv->sock, SIOCS80211CHANNEL, &creq);
-#else
- wpa_printf(MSG_ERROR, "bsd_set_freq: SIOCS80211CHANNEL not "
- "defined");
- return -1;
-#endif
+#else /* SIOCS80211CHANNEL */
+ return set80211param(priv, IEEE80211_IOC_CHANNEL, channel);
+#endif /* SIOCS80211CHANNEL */
}