http://www.freebsd.org/~sam/vap-2008051300.sh.gz
Note this is a shell script that overlays the CVS contents for HEAD.
To apply it you do something like:
cvs -d /usr/ncvs co src
cd src
gzcat ../vap-2008051300.sh.gz | sh
The changes are extensive and require a full buildworld and kernel
rebuild. Committers with perforce access can find this code in the
sam_vap branch.
So what is this stuff? This is work I started many years ago to
virtualize 802.11 wireless devices. The intent was (mostly) to
support multiple access points operating on top of a single radio.
The classic example is you want to run a Hotspot and offer quality
service to paying customers but still provide some level of service
to freeloaders. You can define two Virtual AP's (VAP's) and make
one open with the second require authorization. This is done by
cloning virtual ifnet's from the parent device using ifconfig; e.g.
ifconfig wlan create wlandev ral0 wlanmode hostap
will generate a wlanX ifnet that supports ap operation. Different
devices are capable of supporting different services; some
drivers/devices only support one vap at a time which is equivalent
to what is currently in CVS but without using the mediaopt mechanism
to switch "operating modes" (with vaps an interface never changes
it's operating mode; when you no longer want to use one you just
destroy it and create something else).
In practice most casual users will not encounter vaps except when
they run ifconfig and see wlanX interfaces. rc support is present
to automatically create vaps' for station mode operation. If you
have an ath0 device you add this to your rc.conf:
vaps_ath0="wlan0"
ifconfig_wlan0="DHCP WPA"
and you'll get a wlan0 ifnet created and wpa_supplicant will be
brought up as usual (thanks to Brooks Davis for this work).
Vaps were motivated by doing multi-bss ap services but evolved to
support many other features. In particular WDS support falls out
and later grew to support Dynamic WDS (DWDS) which is a follow-on
design that combines WDS operation (i.e. 4-address frame encapsulation
of wireless traffic) with normal station and access point operation
to build more powerful and useful applications. Sample scripts to
setup DWDS relay and master nodes can be found in the directory:
tools/tools/net80211/scripts
along with many other scripts used in testing.
This code includes a major rewrite of the net80211 layer and
significant changes to all wireless drivers. Two drivers are still
not converted: ipw and ndis. Station and access point operation
are well tested but adhoc mode is untested and likely broken.
Monitor mode works but has one design/usage issue that may require
changes. The documentation is alpha-quality and needs work.
This work has been used in several products and been heavily tested
in various forms but on non-FreeBSD platforms. Work on the current
version has been supported by Hobnob. The most recent previous
work was supported by Marvell (who also supported development of
the mwl driver). Atheros contributed code that was used to kickstart
the vap + 802.11n functionality. Any issues you hit are likely to be in
drivers and not net80211--particularlly drivers that are less frequently
used.
My goal is to get this work into CVS asap. There is one outstanding
locking issue that people may encounter: the net80211 layer holds a
lock over calls to the driver's init method which can cause WITNESS
complaints if the driver sleeps. This is most noticeable on drivers
that load firmware or otherwise sleep (e.g. usb drivers). Some drivers
can avoid this by loading firmware in the vap create method but the
usb drivers may have to drop the lock and open a race. Folks are
encouraged to pitch in to help with these and any other issues they
encounter.
Note there are a few new drivers included: iwn (Intel 4965), bwi
(Broadcom 43xx), and mwl (Marvell 88W8363). The iwn driver is
unfinished; it should support 802.11n but progress has been slow
due to poor vendor involvement. The bwi driver is experimental and
folks are encouraged to help sephe get it into shape for commit (it
currently is not ready CVS). mwl is provided as an example of a
working 11n driver; I'm not aware of any cardbus/pci retail products
that use this part and firmware is presently unavailable (we could
get firmware but since all applications are presently embedded
anyone that would want firmware already has it). Finally, wi users
should note there is a rewrite of the driver that now works properly
with wpa_supplicant and supports WPA (both in station and ap modes)
with Intersil Prism cards and rev 1.7.0 and later firmware. (But
the flip side is that Symbol card support was dropped and some older
cards may not work well w/o fixups.)
Please report problems to the public mailing lists. My time is scarce
so please investigate fixes and not just report problems.
BSDCan plug: I'll be giving a tutorial in Ottawa that uses this work
so folks looking to attend can get a headstart.
Sam
_______________________________________________
freebsd...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-curre...@freebsd.org"
On Sun, Apr 13, 2008 at 04:18:58PM -0700, Sam Leffler wrote:
> A patch to integrate my multi-bss (aka vap) support for wireless can be
> found here:
>=20
> http://www.freebsd.org/~sam/vap-2008051300.sh.gz
>=20
> Note this is a shell script that overlays the CVS contents for HEAD.
> To apply it you do something like:
>=20
> cvs -d /usr/ncvs co src
> cd src
> gzcat ../vap-2008051300.sh.gz | sh
>=20
> The changes are extensive and require a full buildworld and kernel
> rebuild.....
> Please report problems to the public mailing lists. My time is scarce
> so please investigate fixes and not just report problems.
>...
I'm afraid this is more of a report, as I've poked around, but
solving the apparent order-of-operations problem requires knowledge I
lack.
I started with=20
FreeBSD g1-37.catwhisker.org 8.0-CURRENT FreeBSD 8.0-CURRENT #745: Sun Apr =
13 08:43:32 PDT 2008 ro...@g1-37.catwhisker.org:/common/S4/obj/usr/src/s=
ys/CANARY i386
fetched the patch & applied it (without apparent issue -- patch(1)
reported success for each patch, certainly).
The "make buildworld" proceeded without incident, but "make kernel"
died during "make depend" in "firmware":
>>> World build completed on Sun Apr 13 20:03:34 PDT 2008
=2E..
>>> Kernel build for CANARY started on Sun Apr 13 20:03:34 PDT 2008
=2E..
>>> stage 3.1: making dependencies
=2E..
=3D=3D=3D> firewire/sbp_targ (depend)
@ -> /usr/src/sys
machine -> /usr/src/sys/i386/include
ln -sf /common/S2/obj/usr/src/sys/CANARY/opt_cam.h opt_cam.h
ln -sf /common/S2/obj/usr/src/sys/CANARY/opt_scsi.h opt_scsi.h
awk -f @/tools/makeobjops.awk @/kern/bus_if.m -h
awk -f @/tools/makeobjops.awk @/kern/device_if.m -h
rm -f .depend
mkdep -f .depend -a -nostdinc -D_KERNEL -DKLD_MODULE -DHAVE_KERNEL_OPTION=
_HEADERS -I. -I@ -I@/contrib/altq -I/common/S2/obj/usr/src/sys/CANARY /usr/=
src/sys/modules/firewire/sbp_targ/../../../dev/firewire/sbp_targ.c
=3D=3D=3D> firmware (depend)
@ -> /usr/src/sys
machine -> /usr/src/sys/i386/include
rm -f .depend
mkdep -f .depend -a -nostdinc -D_KERNEL -DKLD_MODULE -DHAVE_KERNEL_OPTION=
_HEADERS -I. -I@ -I@/contrib/altq -I/common/S2/obj/usr/src/sys/CANARY /usr/=
src/sys/modules/firmware/../../kern/subr_firmware.c
In file included from /usr/src/sys/modules/firmware/../../kern/subr_firmwar=
e.c:47:
@/sys/vnode.h:540:22: error: vnode_if.h: No such file or directory
mkdep: compile failed
*** Error code 1
1 error
*** Error code 2
1 error
*** Error code 2
1 error
*** Error code 2
1 error
*** Error code 2
1 error
g1-37(8.0-C)[15]=20
Checking for files of similar name:
g1-37(8.0-C)[16] find . -type f -name vnode_if.\*
=2E/sys/kern/vnode_if.src
=2E/sys/tools/vnode_if.awk
g1-37(8.0-C)[17]=20
So it *looks* to me as if sys/tools/vnode_if.awk might have needed to be
fed to awk(1), eating sys/kern/vnode_if.src & creating vnode_if.{c,h},
perhaps, but that apparently needs to happen before "make depend" is run?
I'm willing to experiment (as I'm able).
Peace,
david
--=20
David H. Wolfskill da...@catwhisker.org
I submit that "conspiracy" would be an appropriate collective noun for cats.
See http://www.catwhisker.org/~david/publickey.gpg for my public key.
--GUPx2O/K0ibUojHx
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)
iEYEARECAAYFAkgC08QACgkQmprOCmdXAD3fSwCfV0esj3o1843U7KOCgSudSpuc
XtgAn0XXBadF6NxGRRZJRu0BHr5SQIqH
=ce7O
-----END PGP SIGNATURE-----
--GUPx2O/K0ibUojHx--
Stop in /usr/src/sbin/ifconfig.
*** Error code 1
Stop in /tmp/obj/usr/src/rescue/rescue.
*** Error code 1
Stop in /usr/src/rescue/rescue.
*** Error code 1
Stop in /usr/src/rescue.
*** Error code 1
Stop in /usr/src.
*** Error code 1
Stop in /usr/src.
*** Error code 1
Stop in /usr/src.
#
# uname -a
FreeBSD acer.lissyara.int.otradno.ru 8.0-CURRENT FreeBSD 8.0-CURRENT #0:
Mon Apr 7 23:36:27 MSD 2008
liss...@acer.lissyara.int.otradno.ru:/tmp/obj/usr/src/sys/main-color-console
amd64
#
source updated 2 hour ago
Thank You for this.
> Note there are a few new drivers included: iwn (Intel 4965), bwi
> (Broadcom 43xx), and mwl (Marvell 88W8363). The iwn driver is
> unfinished; it should support 802.11n but progress has been slow
> due to poor vendor involvement. The bwi driver is experimental and
> folks are encouraged to help sephe get it into shape for commit (it
> currently is not ready CVS). mwl is provided as an example of a
> working 11n driver; I'm not aware of any cardbus/pci retail products
> that use this part and firmware is presently unavailable (we could
> get firmware but since all applications are presently embedded
> anyone that would want firmware already has it). Finally, wi users
> should note there is a rewrite of the driver that now works properly
> with wpa_supplicant and supports WPA (both in station and ap modes)
> with Intersil Prism cards and rev 1.7.0 and later firmware. (But
> the flip side is that Symbol card support was dropped and some older
> cards may not work well w/o fixups.)
Buffalo Tech appears to have made a cardbus product that used the 88W8363 part
but their wireless products have been halted due to litigation. If one were to
find such a card on the grey market, is there still an issue with getting the
firmware or is it bundled? What about harvesting a mini-pci part from one of
their wireless APs using the same chipset? I've been holding off on buying 11n
parts until there was driver support for them and it appears that mwl is the
only driver that supports hostap and 11n at this time.
Thanks,
Yuri
===> malo (all)
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE
-std=c99 -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include
/tmp/obj/usr/src/sys/main-color-console/opt_global.h -I. -I@
-I@/contrib/altq -finline-limit=8000 --param inline-unit-growth=100
--param large-function-growth=1000 -fno-common -g
-fno-omit-frame-pointer -I/tmp/obj/usr/src/sys/main-color-console
-mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx
-mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding
-Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef
-Wno-pointer-sign -fformat-extensions -c
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c
cc1: warnings being treated as errors
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c: In function
'malo_bar0_write4':
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:172: warning: format
'%x' expects type 'unsigned int', but argument 3 has type 'bus_size_t'
*** Error code 1
Stop in /usr/src/sys/modules/malo.
*** Error code 1
Stop in /usr/src/sys/modules.
*** Error code 1
Stop in /tmp/obj/usr/src/sys/main-color-console.
*** Error code 1
Stop in /usr/src.
*** Error code 1
Stop in /usr/src.
acer#
==============
trough 12 hour I can test build GENERIC kernel.
Good night! =)
What platform? Compare to the code in CVS; I may have missed
integrating a build fix for 64bit platforms.
Sam
Stop in /usr/src/sys/modules/malo.
*** Error code 1
Stop in /usr/src/sys/modules.
*** Error code 1
Stop in /tmp/obj/usr/src/sys/GENERIC.
*** Error code 1
Stop in /usr/src.
*** Error code 1
Stop in /usr/src.
acer# uname -a
FreeBSD acer.lissyara.int.otradno.ru 8.0-CURRENT FreeBSD 8.0-CURRENT #0:
Mon Apr 7 23:36:27 MSD 2008
liss...@acer.lissyara.int.otradno.ru:/tmp/obj/usr/src/sys/main-color-console
amd64
acer#
Sam
Stop in /usr/src/sys/modules/malo.
*** Error code 1
Stop in /usr/src/sys/modules.
*** Error code 1
Stop in /tmp/obj/usr/src/sys/GENERIC.
*** Error code 1
Stop in /usr/src.
*** Error code 1
Stop in /usr/src.
acer#
Stop in /usr/src.
acer#
acer# tail -2 /usr/src/sys/amd64/conf/GENERIC
nodevice malo
when installing kernel:
===> malo (install)
install -o root -g wheel -m 555 if_malo.ko /boot/kernel
install: if_malo.ko: No such file or directory
*** Error code 71 (ignored)
install -o root -g wheel -m 555 if_malo.ko.symbols /boot/kernel
install: if_malo.ko.symbols: No such file or directory
*** Error code 71 (ignored)
==========
and I not have new kernel modules =)
acer# cd /boot/kernel
acer# ls | grep if_b
if_bce.ko
if_bce.ko.symbols
if_bfe.ko
if_bfe.ko.symbols
if_bge.ko
if_bge.ko.symbols
if_bridge.ko
if_bridge.ko.symbols
acer#
man for device exists (installed today with world)
acer# man bwi
Formatting page, please wait...Done.
BWI(4) FreeBSD Kernel Interfaces Manual
BWI(4)
NAME
bwi -- Broadcom AirForce IEEE 802.11 wireless network device
===========
some idea? =)))
# nice -n 20 make buildkernel
--------------------------------------------------------------
>>> Kernel build for main-color-console started on Mon Apr 21 22:38:17
MSD 2008
--------------------------------------------------------------
===> main-color-console
mkdir -p /usr/obj/usr/src/sys
--------------------------------------------------------------
>>> stage 1: configuring the kernel
--------------------------------------------------------------
cd /usr/src/sys/amd64/conf;
PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/usr/sbin:/usr/obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin
config -d /usr/obj/usr/src/sys/main-color-console
/usr/src/sys/amd64/conf/main-color-console
../../conf/options: Duplicate option MALO_DEBUG.
*** Error code 1
Stop in /usr/src.
*** Error code 1
Stop in /usr/src.
#