Thursday, November 21, 2024

youtube

   
Text Size

MadWiFi Driver

Since we started working on open source drivers we realized that there is no organized documentation that would give a clear and sufficient information in the field. Questions as "Which part of the MAC protocol is controlled by the driver" or "What are the differences between the available open source drivers?" were not easy to be answered in the beginning. Later, more advanced questions such as "How does rate adaptation work in MadWifi?" or "How can I implement QoS schemes in the driver" came into the picture.

Therefore, we decided to build a tutorial that would organize in a systematic way the information that someone needs to know in order to work on the implementation of wireless protocols using open source drivers. Through this tutorial we intend to give the appropriate information to guide a researcher from simple introductory concepts to more and more advanced issues. We cover issues related to drivers programming in general, as well as MadWifi-specific documentation. This information is based on our own experience and we hope that it will help others to understand the whole concept.

Introduction to Device Driver Programming

A device driver is a computer program which allows a higher level computer program to interact with a device. It simplifies programming by acting as a translator between a device and the applications or operating systems that use it. Device drivers are device dependent software programs.

A classic reference for device driver programming is Linux Device Drivers, Third Edition by Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman.

For more in depth knowledge go through the following books which are a great complement to Linux Device Drivers:
The Linux Kernel by David A. Rusling and Understanding Linux Network Internals by Christian Benvenuti

Also see: Device Drivers - A short tutorial on device drivers.

MadWiFi - General Description

A general description of transmission and reception procedure in MadWiFi driver in a state-diagram form is provided in the following link:

MafWiFi-Summary.pdf

A users guide regarding configuration of MadWiFi using Wireless Extensions is provided in the following link:

MafWiFi-Users-Guide.pdf

MadWiFi - specific tutorials

In order to understand MadWifi, you need to go through the basics of the transmission and reception procedure, as well as the basic structures used in MadWifi. You can start by reading the following document which contains the common notation you'll encounter in the MadWifi code:

Then it would be wise to have a look at sk_buff, which is probably the most important data structure in the code. The following document describes the main members and functions of this structure:

After that you should get into the details of the transmission procedure. The documents below describe the three most important functions in transmission, which always starts by calling the function ath_hardstart.

The reception procedure should then be the object of your focus. Reception in MadWifi starts by a call to ath_rx_tasklet, which then calls other reception-related functions either directly or not.

Also take a look at the following document, which gathers some of the main functions in transmission and reception.

Who's Online

We have 54 guests and no members online

VIDEO DEMONSTRATIONS