From: erikarn Date: Sun, 10 Mar 2013 05:46:54 +0000 (-0800) Subject: Created Overview (markdown) X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6f53ae5e09976d2605b570ddcd6965899d5eb3da;p=librecmc%2Fopen-ath9k-htc-firmware.wiki.git Created Overview (markdown) --- diff --git a/Overview.md b/Overview.md new file mode 100644 index 0000000..a26f312 --- /dev/null +++ b/Overview.md @@ -0,0 +1,26 @@ +The firmware and source tree are organised in a handful of functional units. + +The overview: + +* There's a simple bootstrap routine in ROM. More information is needed. +* There's a bunch of code that sits in ROM. This is primarily to save space in RAM/flash. Currently this is the bootstrap, some common OS routines, the HIF/USB interface glue, and a bunch of other stuff I haven't really gone digging into just yet. +* The main firmware sits in RAM and is loaded during USB host attach. + +Now, the firmware is broken up into a few specific chunks: + +* There's the athos/xtos runtime, which is a simple executive providing a single-threaded execution environment for the firmware. There's interrupt handling and some basic primitives. +* There's the USB/HTC target code, which provides a USB implementation of the Atheros transport-independent communication layer. The host creates a few HTC channels to the firmware for control, register access, TX and RX services. +* There's the wlan code, which is a very simple cut down version of ye olde familiar ath/hal driver code from Madwifi. (Seriously. Go look at it.) + +The wifi code is pretty simple: + +* There's the TX and RX descriptor handling code from the Ar5416 HAL - TX and RX is done by handling the receive/transmit interrupt locally, parsing the descriptors and then gluing that to the relevant HTC channel. +* There's the interrupt handling code (again from the AR5416 HAL) - for general interrupt handling services. Anything that's not handled locally is pushed up to the host device. +* The RX side looks a lot like the madwifi ath RX loop - it reads descriptors, pushes them into the RX HTC channel, then pushes more buffers to the hardware. +* The TX side is more complicated - the TX side implements rate control and software retransmission of frames when doing 802.11n aggregation. + +Ok, so where's this all live: + +* target_firmware/wlan - is the wlan side of things. It's a very cut down version of the madwifi device attach, TX, RX, rate control, interrupt handling and software transmit code. +* if_owl.c has the software retransmit and software queue handling code. +* target_firmware/magpie_fw_dev/ - has all of the non-wifi stuff. So, athos/xtos lives here, the USB HTC/WMI handling code and build interface.