Last Updated: 20080408003159
This page documents the current state of the WPI driver for FreeBSD, the driver supports the Intel 3945ABG Wireless driver. Note: As of 2007/11/09 the wpi driver is in 8.0-Current, aka FreeBSD src CVS. AND linked to the build. As of 2007/12/8 wpi is also in RELENG_7.
Note: If you have the Intel 4965AGN card try the Iwn page.
If you try this driver and find it works/doesn’t work causes errors, hangs your system or something else. Please let me know – just email: mailto:benjsc@FreeBSD.org
An up to date commentary on what I’m working on can often be found in my blog and this is a wiki page so you can check the page history for what has changed
Details on how to help debug the driver are in README file that’s in the download package.
For those of you wanting to try the perforce version of the driver, the script Media:P4fetch.rb will help you easily obtain the files. The script was provided by Tom Evans (see Image:P4fetch.rb for Tom’s details)
Contents[hide] |
History
- In development on Wolf (Ben’s Laptop)
- Bugfixing
- Perforce Version (Not yet tarballed – available here)
- Locking fixes
- driver cleanups
- Supporting Firmware resets correctly
- Supporting turning on the card’s hw switch
- FreeBSD CVS (HEAD/RELENG_7)
- REL 20071127
- WEP Fixes
- Missed Beacon Fixes
- Disabling
- 20071102
- NOTE: You really should use the version in FreeBSD CVS NOW
- A few locking fixes
- A fix for rate control panics
- A few minor other changes
- Fix for crashes under heavy load (makes large transfers reliable!)
- Fix for panic in wpi_ioctl
- Various callout_fixes
- Various cleanups
- Fix for panic in wpi_detach whilst still scanning
- 20070923 (Please Note this driver is intended for 7-PRE / 8.0-Current)
- Fixed could not setup MRR.. errors, this should fix scanning
- Other scanning fixes
- Fixed rx buffer allocation issues
- Fixed a few compile issues ppl were experiencing
- Fixed a few panics due to sleeping with locked mutex issues
- Fixed a panic at unload
- 20070829 (Please Note this driver is intended for 7-PRE / 8.0-Current)
- Fix RBuf overflow (Thanks to OpenBSD)
- Implement auto firmware reload on a firmware failure
- Watchdog timer
- Memory leak fixes
- code cleanup
- panic fixes
- printf cleanups
- 200700715 (Please Note this driver is intended for 7-PRE / 8.0-Current)
- 80211a/b/g scanning now works
- Association might work 🙂
- The driver has been updated to the new net80211 framework
- Association works!
- The hangs previously experienced have been solved
- Sending data now works, though don’t push it too hard 🙂
- 20070615 (This tarball has been removed as it wasn’t 6.x compatiable but claimed to be)
- Various things required to easily sync the driver with -current
- LEGAL integration
- Basic Man Page
- New firmware loading code (with bugs)
- Upgrade firmware port to v2.14.1
- Fix a memory free bug which caused a panic if the firmware failed to load
- Update comments to indicate how the card works
- Add finer grain debugging
- Updates to TXPOWER command
- Updates to the MRR command
- Updates to debugging
- Lots of update due to firmware changes
- Lots of code changes to scanning and device config
- Comment updates
- Fix the size of the tx_data struct, should hopefully reduce the amount of crashed
- Modifications to ring alignment to make the hw happier / FreeBSD happier
- Removal of the svc ring – wasn’t used
- TX Power support from OpenBSD
- Sync based mrr support from OpenBSD
- 20070131 (This version driver should partially work under 6.x)
- Fix firmware port compilation/installation – this should fix firmware issues:
firmware_get: failed to load firmware image wpi_fw wpi0: could not load firmware image 'wpi_fw'
- 20070125
- Bring the driver up to date with the code from OpenBSD(r1.38) & NetBSD(r.16)
- Free up some resources correctly on unload
- Handle a few error conditions better
- You can now toggle the hardware switch with the driver crashing!
- 20070107
- Integrate Changes from Sam & Kip
- 20070106
- Initial Port of Damien’s Driver
Download
The current public version of the driver is always available at (things are now on the FreeBSD cluster for speed reasons): http://people.freebsd.org/~benjsc/downloads/wpi/
The current development version of the driver is always available in perforce at:
http://perforce.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/user/benjsc/wpi
Installation/Testing Instructions
At present installation of the driver is very much hands on.
To install the driver:
- Download the latest tarball (see downloads above)
- Extract the tarball
- Read the README file
FAQ / Build Issues
Error ic_scan_start not found
If you get this error:
free# make Warning: Object directory not changed from original /root/20070923-freebsd-wpi/sys/modules/wpi cc -O2 -fno-strict-aliasing -pipe -g -DWITNESS -DINVARIANT_SUPPORT -DINVARIANTS -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I- -I/root/20070923-freebsd-wpi/sys/modules/wpi/../../ -I. -I@ -I@/contrib/altq -I@/../include -finline-limit=8000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -std=c99 -c /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:104:42: net80211/ieee80211_regdomain.h: No such file or directory In file included from /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:113: /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpivar.h:22:36: dev/wpi/ieee80211_amrr.h: No such file or directory In file included from /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:113: /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpivar.h:129: error: field `amn' has incomplete type /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpivar.h:154: error: field `amrr' has incomplete type /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c: In function `wpi_load_firmware': /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:345: warning: assignment discards qualifiers from pointer target type /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c: In function `wpi_unload_firmware': /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:488: warning: passing arg 1 of `firmware_put' discards qualifiers from pointer target type /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:539:2: #error "Sorry, this driver is not yet ready for FreeBSD < 7.0" /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c: In function `wpi_attach': /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:717: error: structure has no member named `ic_scan_start' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:718: error: structure has no member named `ic_scan_end' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:719: error: structure has no member named `ic_set_channel' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:720: error: structure has no member named `ic_scan_curchan' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:721: error: structure has no member named `ic_scan_mindwell' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c: In function `wpi_dma_contig_alloc': /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:856: warning: implicit declaration of function `bus_get_dma_tag' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:856: warning: nested extern declaration of `bus_get_dma_tag' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:860: warning: passing arg 1 of `bus_dma_tag_create' makes pointer from integer without a cast /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c: In function `wpi_alloc_tx_ring': /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:1180: warning: nested extern declaration of `bus_get_dma_tag' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:856: warning: redundant redeclaration of 'bus_get_dma_tag' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:856: warning: previous implicit declaration of 'bus_get_dma_tag' was here /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:1182: warning: passing arg 1 of `bus_dma_tag_create' makes pointer from integer without a cast /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c: In function `wpi_rx_intr': /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:1822: error: too many arguments to function `ieee80211_input' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c: In function `wpi_scan': /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:2896: error: structure has no member named `ic_des_ssid' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:2897: error: structure has no member named `ic_des_ssid' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:2898: error: structure has no member named `ic_des_ssid' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:2902: error: structure has no member named `ic_des_ssid' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:2903: error: structure has no member named `ic_des_ssid' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:2927: warning: passing arg 1 of `ieee80211_chan2mode' from incompatible pointer type /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:2927: error: too few arguments to function `ieee80211_chan2mode' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:2961: error: structure has no member named `ic_des_ssid' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c: In function `wpi_config': /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:3098: error: `IEEE80211_M_WDS' undeclared (first use in this function) /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:3098: error: (Each undeclared identifier is reported only once /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:3098: error: for each function it appears in.) /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c: In function `wpi_iter_func': /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:3465: warning: implicit declaration of function `ieee80211_amrr_choose' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:3465: warning: nested extern declaration of `ieee80211_amrr_choose' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c: In function `wpi_newassoc': /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:3476: warning: implicit declaration of function `ieee80211_amrr_node_init' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:3476: warning: nested extern declaration of `ieee80211_amrr_node_init' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c: In function `wpi_read_eeprom_channels': /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:3571: error: structure has no member named `ic_nchans' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:3579: error: structure has no member named `ic_ieee' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:3584: error: structure has no member named `ic_ieee' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:3600: error: structure has no member named `ic_ieee' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:3611: error: structure has no member named `ic_nchans' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c: In function `wpi_ops': /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:3938: warning: implicit declaration of function `ieee80211_scan_next' /root/20070923-freebsd-wpi/sys/modules/wpi/../../dev/wpi/if_wpi.c:3938: warning: nested extern declaration of `ieee80211_scan_next' *** Error code 1
Or something similar, it means your trying to compile the driver on FreeBSD 6.x. At present the driver is being developed for 7+ and when stable will be backported to 6.x.
When will the driver be stable
- Q: When will the driver be stable
- A: It is! As of 2007/12/09 The driver is in RELENG_7
When will there be a backport to 6.x / When will it be available
- Q: Will there be a backport of wpi to 6.x
- A: Yes, When the driver becomes stable in -CURRENT & 7.x
- A: The decision has been made not to backport this driver to 6.x – there’s just too much which has changed between 6 -> 7
- Q: When will the backport be available
- A: As soon as I get the driver stable
- A: The backport has been cancelled.
Outstanding issues
- B support missing after merging Sam’s patch – Missing flag
- ‘bus_dmamem_alloc failed to align memory properly’ occurs at driver load, seem to not affect the driver, 4k is not 0x4000
- Changing authmode on the interface causes a firmware error
- led method does nothing (at least on my laptop)
- turning off the transmitter (hw switch) whilst scanning causes a timeout in the tx ring (seems not to affect the driver) – Fixed
- WPA authentication doesn’t seem to work:
- hostap mode not available
- firmware error at driver startup with WPA enabled, could be a keying issue as in iwi – Fixed
- Device Detection often fails
- This is due to bugs in the pci-pci bus not reporting the correct memory range. Work to fix this is ongoing but slow.