driver_bsd: Fix build without SIOCS80211CHANNEL
At least FreeBSD 7 does not seem to define this and failed to build after the previous changes.
This commit is contained in:
parent
42f34a9b41
commit
aba7569ec8
1 changed files with 6 additions and 0 deletions
|
@ -488,6 +488,7 @@ bsd_send_eapol(struct l2_packet_data *sock_xmit, const u8 *addr,
|
||||||
static int
|
static int
|
||||||
bsd_set_freq(int s, const char *ifname, u16 channel)
|
bsd_set_freq(int s, const char *ifname, u16 channel)
|
||||||
{
|
{
|
||||||
|
#ifdef SIOCS80211CHANNEL
|
||||||
struct ieee80211chanreq creq;
|
struct ieee80211chanreq creq;
|
||||||
u32 mode;
|
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));
|
os_strlcpy(creq.i_name, ifname, sizeof(creq.i_name));
|
||||||
creq.i_channel = channel;
|
creq.i_channel = channel;
|
||||||
return ioctl(s, SIOCS80211CHANNEL, &creq);
|
return ioctl(s, SIOCS80211CHANNEL, &creq);
|
||||||
|
#else
|
||||||
|
wpa_printf(MSG_ERROR, "bsd_set_freq: SIOCS80211CHANNEL not "
|
||||||
|
"defined");
|
||||||
|
return -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue