Site Tools


OpenWRT as FreeBSD WiFi driver

For peoples who want to use Linux WiFi drivers on FreeBSD with minimum support overhead :)

This how-to describes how to use OpenWRT as driver with WebUI for WiFi adapters. No more pain with slow speed, no strange wpa_supplicant gui tools.

This upgrades WiFi speed from “36Mbps mode 11a” to 866Mbps on my notebook with intel 8265.

Resources required

  • 256 Mb ram
  • 128 Mb on hard drive
  • IOMMU support
  • FreeBSD AMD64

1. Download EFI based build. WWW:

cd /root/
gunzip openwrt-x86-64-generic-squashfs-combined-efi.img.gz

2. Configure system: WWW:

echo '' » /etc/sysctl.conf


kld_list="nmdm vmm"
ifconfig_wifi0="inet netmask up"
ifconfig_wifi0_ipv6="inet6 accept_rtadv auto_linklocal -ifdisabled"


# bhyve PCI device passthru.
# "1/0/0" - PCI dev ident, see: pciconf -lv

# For AMD systems

3. Start OpenWRT

/usr/sbin/bhyvectl --destroy --vm=owrt
/usr/sbin/bhyve \
	-A \
	-H \
	-c 2 \
	-m 256M \
	-S \
	-s 0:0,hostbridge \
	-s 1:0,lpc -l com1,stdio \
	-s 3:0,ahci-hd,openwrt-x86-64-generic-squashfs-combined-efi.img \
	-s 5:0,e1000,tap0,mac=00:be:fa:76:45:01 \
	-s 7,passthru,1/0/0 \
	-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \

To disable output remove: “-l com1,stdio”
“1/0/0” - PCI dev ident, same as in loader.conf.

4. Configure OpenWRT:

uci set network.lan.ipaddr=''
uci set network.lan.netmask=''
uci set network.lan.gateway=''
uci add_list network.lan.dns=''
uci commit network
/etc/init.d/network restart

opkg update
opkg install luci wpad-mesh-wolfssl iwlwifi-firmware-iwl3168 kmod-iwlwifi

Now web GUI can be used to install wpad*, hostapd*, WiFi driver and other staff.

If you want use OpenWRT as bridge - read this: Better to start with simple rourer+nat mode.

software/freebsd/wifi_owrt.txt · Last modified: 2022/06/29 01:33 by root