Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Changes between Version 4 and Version 5 of HAL_v2

Author:
mrenzmann (IP: 0.0.0.0)
Timestamp:
10/20/06 12:23:05 (11 years ago)
Comment:

Rewrite of HAL-FAQ moved to HAL?, so this page is no longer needed. Now just redirects to HAL?.

Legend:

Unmodified
Added
Removed
Modified
  • HAL_v2

    v4 v5  
    1 [[PageOutline(2)]] 
    2  
    3 = The MADWiFi HAL = 
    4  
    5 == What is the HAL? == 
    6  
    7 HAL is short for Hardware Access Layer. Think of it being something like the firmware of the card, with the only difference that it isn’t stored inside the card. Instead, the HAL is a kernel module which implements an API to present the hardware to the driver in a nice, uniform fashion. It is not exactly like firmware, because ‘firmware’ is a term which generally refers to code executed by an onboard microcontroller or DSP in other pieces of hardware). And yes, the HAL is closed source and only available as ready compiled binary for a bunch of different architectures. 
    8  
    9 To easily see architectures the HAL is built for, see: source:/trunk/hal/public 
    10  
    11 If the version you need isn’t there, then consider asking (nicely) on the madwifi-devel list. 
    12  
    13 == Why is the HAL closed source? == 
    14  
    15 The Atheros chipsets can tune to a wide range of frequencies, part of them being outside the bands that are permitted for unlicensed use (ISM-bands). Non-ISM-frequencies are licensed by various regulatory agencies for different purposes, such as military or civil radar use, military communications, wireless local loop installations, and so on. Furthermore, there may be regulations on the allowed transmission power on different frequencies, and on conditions such as indoor or outdoor use. 
    16  
    17 The Atheros chipsets are capable of operating on frequencies outside those that are licensed, or legal to use without a license, and can vary the transmission power on these frequencies. So there must be some mechanism for enforcing the frequencies that are used. The limitations in regards to legal frequencies and transmission power change depending on the given region (such as Japan, UK, USA, etc), thus the HAL changes its behaviour depending on the 'regdomain' and country code. 
    18  
    19 At least the USA Federal Communications Commission (FCC) requires that any manufactured products have a mechanism for limiting transmission power and frequencies, and that these mechanisms are not easily modifiable by the consumer. If you are in a region that limits the number of frequencies, say, Japan, it is illegal to broadcast out of those assigned channels, even though the chip is capable of operating outside of the limited frequency band assigned by Japan. 
    20  
    21 == Isn't binary-only code EVIL? == 
    22  
    23 The Free Software and Open Source movements have good reasons for there philosophies and ideologies and you can read about them on their websites. However, due to regulations by regulatory authorities for the airwaves, Atheros is unable to release open specifications and/or code to set frequencies and transmission powers. 
    24  
    25 Thankfully, Atheros and Sam Leffler have shown a lot of commitment to the Linux platform, so most of us are happy to have Atheros cards in our computers.  
    26  
    27 == Should I be worried that if Atheros goes out of business that the HAL will no longer be available? == 
    28  
    29 The HAL will always be available, as long as you have a copy of it. But it might well be that it won’t be developed further in this case, but that’s the same problem you’ll face with virtually any other vendor. I.e. if Prism were to go out of business the firmware for their cards would no longer be actively developed, but would still be available on the net. 
    30  
    31 == What licensing issues are there in having non-free software in Linux (the kernel)? == 
    32  
    33 If you want to see Linus’ view on firmware vs binary drivers, [http://people.redhat.com/arjanv/COPYING.modules here's] a collection of his e-mail on the subject. Interestingly, Linus says: You just can’t make a binary module for Linux, and claim that that module isn’t derived from the kernel. Because it generally is - the binary module not only included header files, but more importantly it clearly is _not_ a stand-alone work any more. So even if you made your own prototypes and tried hard to avoid kernel headers, it would _still_ be connected and dependent on the kernel. 
    34  
    35 MadWifi gets around this by applying orthogonality to the problem. Rather than use a single precompiled binary module, the HAL module is split into two sections, the precompiled binary and ah_osdep.c which acts as an intermediary between the kernel and the binary HAL. The two sections are linked, and together they become the LKM (loadable kernel module) ath_hal.o. 
    36  
    37 This design orthogonality means that the HAL binary is able to work without modification on any version of the linux kernel, as well as the BSDs, and a few other embedded projects. All that needs modifying is the ah_osdep.c, which must map HAL and kernel function calls to one another. 
    38  
    39 So, to conclude, hal.o (the binary module) is not a derived work of the linux (or any other) kernel, however {{{ath_hal.o}}} (the fully built and linked module) is, because the file ah_osdep.o does all of the OS specific mapping. 
    40  
    41 == What kind of access does the HAL have to my system's internals? == 
    42  
    43 Because the HAL is a kernel module it runs in kernel space. It can therefore do anything it wants to any of the system's internals. However, all access to and from the HAL is done through the OS dependent wrapper, at least, as far is verifiable. However, standard problems with pointers and memory access in low-level languages remain. 
    44  
    45 == What does 'ath0: HAL ABI mismatch' mean? == 
    46  
    47 This message occurs when the actual HAL interface doesn’t match the interface that the driver is expecting. It generally happens when there was a cvs checkout problem, or you try to use an old HAL with the driver. If you have updated the source by doing 
    48 {{{ 
    49 svn update 
    50 }}} 
    51 in the madwifi-ng source directory you should be sure to do 
    52 {{{ 
    53 make clean 
    54 }}} 
    55 this way ath_hal.ko will be updated and built also. 
    56  
    57 == I still don't like it. Are there alternatives? == 
    58  
    59 In terms of functionality there is not yet an equivalent alternative to the Atheros HAL. But at least two projects exist which aim at reverse-engineering the HAL in order to make a complete open source solution: 
    60  
    61  * http://ath-driver.org/ - a new linux driver with a reverse-engineered HAL, which uses the native linux ieee80211 stack 
    62  * the ath driver from http://openbsd.org/ with the infamous OpenHAL 
    63  * the OpenHAL ported to MADWiFi at http://pdos.csail.mit.edu/~jbicket/openhal/ 
    64  
    65 == Page Contributors == 
    66  * Alvin Oga 
    67  * Bob Lockie (supplier of questions) 
    68  * Gerald Britton 
    69  * Jim Thompson 
    70  * Larry Bakst 
    71  * Matt Foster (previous maintainer) 
    72  * Michael Renzmann 
    73  * Michael Schwingen 
    74  * Per Bjornsson 
    75  * Silas Bennett 
    76  * John Clark 
    77  * Thorsten von Eicken 
    78  * Matthew W. S. Bell (maintainer) 
    79  
    80 Please note that all information is entirely fictional; There is no relation to real people or events, implied or otherwise. 
     1[[redirect(wiki:HAL)]]