Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CFT: 802.11 vap code

4 views
Skip to first unread message

Sam Leffler

unread,
Apr 13, 2008, 7:20:19 PM4/13/08
to
A patch to integrate my multi-bss (aka vap) support for wireless can be
found here:

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"

David Wolfskill

unread,
Apr 13, 2008, 11:49:07 PM4/13/08
to

--GUPx2O/K0ibUojHx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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--

Alex Keda

unread,
Apr 14, 2008, 1:30:06 PM4/14/08
to
Sam Leffler пишет:

> A patch to integrate my multi-bss (aka vap) support for wireless can be
> found here:
>
> 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
> 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
buildworld:
(cd /usr/src/rescue/rescue/../../sbin/ifconfig && make -DRESCUE
CRUNCH_CFLAGS=-DRESCUE DIRPRFX=rescue/rescue/ifconfig/ depend && make
-DRESCUE CRUNCH_CFLAGS=-DRESCUE DIRPRFX=rescue/rescue/ifconfig/
ifconfig.o af_link.o af_inet.o af_inet6.o af_atalk.o ifclone.o ifmac.o
ifmedia.o ifvlan.o ifieee80211.o regdomain.o ifcarp.o ifgroup.o
ifpfsync.o ifbridge.o iflagg.o af_ipx.o)
rm -f .depend
mkdep -f .depend -a -DRESCUE /usr/src/sbin/ifconfig/ifconfig.c
/usr/src/sbin/ifconfig/af_link.c /usr/src/sbin/ifconfig/af_inet.c
/usr/src/sbin/ifconfig/af_inet6.c /usr/src/sbin/ifconfig/af_atalk.c
/usr/src/sbin/ifconfig/ifclone.c /usr/src/sbin/ifconfig/ifmac.c
/usr/src/sbin/ifconfig/ifmedia.c /usr/src/sbin/ifconfig/ifvlan.c
/usr/src/sbin/ifconfig/ifieee80211.c /usr/src/sbin/ifconfig/regdomain.c
/usr/src/sbin/ifconfig/ifcarp.c /usr/src/sbin/ifconfig/ifgroup.c
/usr/src/sbin/ifconfig/ifpfsync.c /usr/src/sbin/ifconfig/ifbridge.c
/usr/src/sbin/ifconfig/iflagg.c /usr/src/sbin/ifconfig/af_ipx.c
echo ifconfig: /usr/obj/usr/src/tmp/usr/lib/libc.a
/usr/obj/usr/src/tmp/usr/lib/libbsdxml.a
/usr/obj/usr/src/tmp/usr/lib/libsbuf.a
/usr/obj/usr/src/tmp/usr/lib/libipx.a >> .depend
cc -O2 -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings
-Wnested-externs -DRESCUE -Wno-pointer-sign -c
/usr/src/sbin/ifconfig/ifconfig.c
cc -O2 -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings
-Wnested-externs -DRESCUE -Wno-pointer-sign -c
/usr/src/sbin/ifconfig/af_link.c
cc -O2 -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings
-Wnested-externs -DRESCUE -Wno-pointer-sign -c
/usr/src/sbin/ifconfig/af_inet.c
cc -O2 -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings
-Wnested-externs -DRESCUE -Wno-pointer-sign -c
/usr/src/sbin/ifconfig/af_inet6.c
cc -O2 -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings
-Wnested-externs -DRESCUE -Wno-pointer-sign -c
/usr/src/sbin/ifconfig/af_atalk.c
cc -O2 -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings
-Wnested-externs -DRESCUE -Wno-pointer-sign -c
/usr/src/sbin/ifconfig/ifclone.c
cc -O2 -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings
-Wnested-externs -DRESCUE -Wno-pointer-sign -c
/usr/src/sbin/ifconfig/ifmac.c
cc -O2 -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings
-Wnested-externs -DRESCUE -Wno-pointer-sign -c
/usr/src/sbin/ifconfig/ifmedia.c
cc -O2 -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings
-Wnested-externs -DRESCUE -Wno-pointer-sign -c
/usr/src/sbin/ifconfig/ifvlan.c
cc -O2 -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings
-Wnested-externs -DRESCUE -Wno-pointer-sign -c
/usr/src/sbin/ifconfig/ifieee80211.c
cc -O2 -pipe -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings
-Wnested-externs -DRESCUE -Wno-pointer-sign -c
/usr/src/sbin/ifconfig/regdomain.c
/usr/src/sbin/ifconfig/regdomain.c:662: error: redefinition of 'rcsid'
/usr/src/sbin/ifconfig/regdomain.c:26: error: previous definition of
'rcsid' was here
/usr/src/sbin/ifconfig/regdomain.c:686: error: redefinition of 'struct
mystate'
/usr/src/sbin/ifconfig/regdomain.c:698: error: redefinition of 'struct
ident'
/usr/src/sbin/ifconfig/regdomain.c:701: error: redeclaration of
enumerator 'DOMAIN'
/usr/src/sbin/ifconfig/regdomain.c:65: error: previous definition of
'DOMAIN' was here
/usr/src/sbin/ifconfig/regdomain.c:701: error: redeclaration of
enumerator 'COUNTRY'
/usr/src/sbin/ifconfig/regdomain.c:65: error: previous definition of
'COUNTRY' was here
/usr/src/sbin/ifconfig/regdomain.c:701: error: redeclaration of
enumerator 'FREQBAND'
/usr/src/sbin/ifconfig/regdomain.c:65: error: previous definition of
'FREQBAND' was here
/usr/src/sbin/ifconfig/regdomain.c:706: error: redefinition of
'start_element'
/usr/src/sbin/ifconfig/regdomain.c:70: error: previous definition of
'start_element' was here
/usr/src/sbin/ifconfig/regdomain.c:800: error: redefinition of 'decode_flag'
/usr/src/sbin/ifconfig/regdomain.c:164: error: previous definition of
'decode_flag' was here
/usr/src/sbin/ifconfig/regdomain.c:850: error: redefinition of 'end_element'
/usr/src/sbin/ifconfig/regdomain.c:214: error: previous definition of
'end_element' was here
/usr/src/sbin/ifconfig/regdomain.c:989: error: redefinition of 'char_data'
/usr/src/sbin/ifconfig/regdomain.c:353: error: previous definition of
'char_data' was here
/usr/src/sbin/ifconfig/regdomain.c:1007: error: redefinition of 'findid'
/usr/src/sbin/ifconfig/regdomain.c:371: error: previous definition of
'findid' was here
/usr/src/sbin/ifconfig/regdomain.c:1021: error: redefinition of
'lib80211_regdomain_readconfig'
/usr/src/sbin/ifconfig/regdomain.c:385: error: previous definition of
'lib80211_regdomain_readconfig' was here
/usr/src/sbin/ifconfig/regdomain.c:1103: error: redefinition of
'cleanup_bands'
/usr/src/sbin/ifconfig/regdomain.c:467: error: previous definition of
'cleanup_bands' was here
/usr/src/sbin/ifconfig/regdomain.c:1119: error: redefinition of
'lib80211_regdomain_cleanup'
/usr/src/sbin/ifconfig/regdomain.c:483: error: previous definition of
'lib80211_regdomain_cleanup' was here
/usr/src/sbin/ifconfig/regdomain.c:1156: error: redefinition of
'lib80211_alloc_regdata'
/usr/src/sbin/ifconfig/regdomain.c:520: error: previous definition of
'lib80211_alloc_regdata' was here
/usr/src/sbin/ifconfig/regdomain.c:1206: error: redefinition of
'lib80211_free_regdata'
/usr/src/sbin/ifconfig/regdomain.c:570: error: previous definition of
'lib80211_free_regdata' was here
/usr/src/sbin/ifconfig/regdomain.c:1216: error: redefinition of
'lib80211_regdomain_findbysku'
/usr/src/sbin/ifconfig/regdomain.c:580: error: previous definition of
'lib80211_regdomain_findbysku' was here
/usr/src/sbin/ifconfig/regdomain.c:1231: error: redefinition of
'lib80211_regdomain_findbyname'
/usr/src/sbin/ifconfig/regdomain.c:595: error: previous definition of
'lib80211_regdomain_findbyname' was here
/usr/src/sbin/ifconfig/regdomain.c:1246: error: redefinition of
'lib80211_country_findbycc'
/usr/src/sbin/ifconfig/regdomain.c:610: error: previous definition of
'lib80211_country_findbycc' was here
/usr/src/sbin/ifconfig/regdomain.c:1261: error: redefinition of
'lib80211_country_findbyname'
/usr/src/sbin/ifconfig/regdomain.c:625: error: previous definition of
'lib80211_country_findbyname' was here
*** Error code 1

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

Yuri Lukin

unread,
Apr 14, 2008, 2:26:44 PM4/14/08
to
On Sun, 13 Apr 2008 16:18:58 -0700, Sam Leffler wrote

> A patch to integrate my multi-bss (aka vap) support for wireless can
> be found here:
>
> http://www.freebsd.org/~sam/vap-2008051300.sh.gz
>

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

Alex Keda

unread,
Apr 14, 2008, 7:03:24 PM4/14/08
to
Sam Leffler пишет:

> A patch to integrate my multi-bss (aka vap) support for wireless can be
> found here:
>
> http://www.freebsd.org/~sam/vap-2008051300.sh.gz
After remove all src and cvsup again I successfully build world.
But,on build kernel I have:

===> 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! =)

Sam Leffler

unread,
Apr 14, 2008, 7:23:02 PM4/14/08
to
Alex Keda wrote:
> Sam Leffler пишет:

What platform? Compare to the code in CVS; I may have missed
integrating a build fix for 64bit platforms.

Sam

Alex Keda

unread,
Apr 15, 2008, 2:40:50 PM4/15/08
to
===> mac_test (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/GENERIC/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/GENERIC -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/mac_test/../../security/mac_test/mac_test.c
ld -d -warn-common -r -d -o mac_test.ko.debug mac_test.o
:> export_syms
awk -f /usr/src/sys/modules/mac_test/../../conf/kmod_syms.awk
mac_test.ko.debug export_syms | xargs -J% objcopy % mac_test.ko.debug
objcopy --only-keep-debug mac_test.ko.debug mac_test.ko.symbols
objcopy --strip-debug --add-gnu-debuglink=mac_test.ko.symbols
mac_test.ko.debug mac_test.ko

===> 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/GENERIC/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/GENERIC -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/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 Leffler

unread,
Apr 15, 2008, 2:45:48 PM4/15/08
to
Remove malo from your config or fix the code (s/%x/%zx).

Sam

Alex Keda

unread,
Apr 15, 2008, 4:11:10 PM4/15/08
to
===> 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/GENERIC/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/GENERIC -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_attach':
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:226: warning: format
'%zx' expects type 'size_t', but argument 2 has type 'int'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:226: warning: format
'%zx' expects type 'size_t', but argument 4 has type 'int'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:226: warning: format
'%zx' expects type 'size_t', but argument 7 has type 'int'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:226: warning: format
'%zx' expects type 'size_t', but argument 10 has type 'uint32_t'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:226: warning: format
'%zx' expects type 'size_t', but argument 13 has type 'uint32_t'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c: In function 'malo_intr':
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:421: warning: format
'%zx' expects type 'size_t', but argument 3 has type 'uint32_t'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:440: warning: format
'%zx' expects type 'size_t', but argument 3 has type 'uint32_t'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c: In function
'malo_printtxbuf':
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:919: warning: format
'%zx' expects type 'size_t', but argument 3 has type 'int'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c: In function
'malo_tx_start':
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:1177: warning: format
'%zx' expects type 'size_t', but argument 5 has type 'int'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:1238: warning: format
'%zx' expects type 'size_t', but argument 3 has type 'int'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c: In function 'malo_init':
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:1505: warning: format
'%zx' expects type 'size_t', but argument 3 has type 'int'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c: In function
'malo_stop_locked':
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:1686: warning: format
'%zx' expects type 'size_t', but argument 4 has type 'int'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c: In function
'malo_updateslot':
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:1781: warning: format
'%zx' expects type 'size_t', but argument 4 has type 'uint32_t'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c: In function
'malo_newstate':
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:1820: warning: format
'%zx' expects type 'size_t', but argument 9 has type 'int'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c: In function
'malo_chan_set':
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:1987: warning: format
'%zx' expects type 'size_t', but argument 4 has type 'uint32_t'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c: In function
'malo_rx_proc':
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:2063: warning: format
'%zx' expects type 'size_t', but argument 4 has type 'uint32_t'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c: In function
'malo_detach':
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:2245: warning: format
'%zx' expects type 'size_t', but argument 3 has type 'int'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c: In function
'malo_suspend':
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:2293: warning: format
'%zx' expects type 'size_t', but argument 3 has type 'int'
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c: In function
'malo_resume':
/usr/src/sys/modules/malo/../../dev/malo/if_malo.c:2304: warning: format
'%zx' expects type 'size_t', but argument 3 has type 'int'
*** 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/GENERIC.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
acer#

Alex Keda

unread,
Apr 15, 2008, 4:50:24 PM4/15/08
to

Stop in /usr/src.
acer#

acer# tail -2 /usr/src/sys/amd64/conf/GENERIC
nodevice malo

Alex Keda

unread,
Apr 15, 2008, 6:30:05 PM4/15/08
to
I build kernel with ignoring errors:
make -i buildkernel && make -i installkernel

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? =)))

Kip Macy

unread,
Apr 15, 2008, 6:31:17 PM4/15/08
to
post your config

Alex Keda

unread,
Apr 16, 2008, 1:59:23 AM4/16/08
to
Kip Macy пишет:
> post your config
>
sorry - previous mail not right
Generic with added options
nodevice malo
nodevice iwn
==========
with config from previous mail kernel file not build

Alex Keda

unread,
Apr 16, 2008, 2:00:08 AM4/16/08
to
Kip Macy пишет:
> post your config
>
GENERIC with add to end:
nodevice malo
nodevice iwn
device bwi
device bwifw
device firmware

Alex Keda

unread,
Apr 21, 2008, 2:42:24 PM4/21/08
to
Alex Keda пишет:

> Kip Macy пишет:
>> post your config
>>
> GENERIC with add to end:
> nodevice malo
> nodevice iwn
> device bwi
> device bwifw
> device firmware
=============
cannot build with today updated sourses
(when I apply patchset - many questions...)

# 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.
#

0 new messages