Sam Leffler, maintainer of the binary HAL that is also used in MadWifi releases, has released the source code for his HAL variant under ISC license.
It is available through a Subversion repository (web interface), which is also be used actively for development and further improvements.