wl12xx

Driver for Texas Instruments' Wilink(tm) combo devices WL1271/3 and WL1281/3

Overview

The WL1271x and WL128x chipsets support both single band (2.4GHz) and dual band (2.4GHz and 5GHz) modes. WL127x is a combo chip comprises of WLAN, Bluetooth(tm) and FM Rx/Tx technologies. WL128x adds a GPS core to it. The open source driver supports the standard mac80211 full MAC architecture.

Driver supported features

  • 802.11 a/b/g/n
  • STA, AP and P2P modes
  • 11n block acknowledgment
  • SDIO runtime PM
  • Scheduled scan

Under development

  • Advanced scan features for further host offloading
  • Throughput optimizations
  • Further power scheme optimizations

Get the latest wl12xx driver

If you need the latest version, it can be downloaded from:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git

The latest stable version can be found in Linus' Linux tree.

Firmware

The firmware for WL12xx chipset is available under the Linux firmware license on git tree at:

git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

The firmware is accompanied by an NVS file that is required for the proper operation of the WL127x device. Those binaries need to be placed under /lib/firmware/ti-connectivity/ on Linux systems and under /etc/firmware on Android systems. Please note that the NVS file is only an example for development use. You must create a real NVS using the calibration tool for production use. The NVS also contains the mac address.

Note: There is a different firmware file for station and for access-point modes. Make sure you pick the right one (or both).

Calibration

Please refer to the calibration page for detailed information on the calibration process and the NVS file

Calibration is a process in which specific radio configuration parameters are generated and saved into the NVS file, later to be used by the wl12xx driver upon initialization.

The calibrator tool can be downloaded here:

git clone git://github.com/TI-OpenLink/ti-utils.git

Porting wl12xx

Porting the wl12xx driver to a new hardware platform requires following these steps:

  1. Modify or create the board-specific configuration. An example on how this should be done can be found under arch/arm/mach-omap2/board-zoom-peripherals.c for the TI Zoom reference boards. This is where you need to set the right mmc port, assign the gpios, adjust the reference clock information, etc.

  2. Apply the SDIO and PM patches described below, if using kernels earlier than 2.6.37.
  3. Use compat-wireless that is right to your kernel version.
  4. Download the firmware and NVS files and place them under the correct folder.

Notes about using compat-wireless on older kernels

Porting using compat-wireless

Using compat-wireless the wl12xx driver and its dependencies can be compiled for kernels >= 2.6.30.

Note: For very old kernels you may also need a few patches to your kernel. Here follows a few hints for old kernels.

Kernel 2.6.36 and older

  1. SDIO runtime PM support - here

  2. Lenient generic runtime pm callbacks - here

  3. Add platform data passing support - here

Kernel 2.6.33 and older

  • workqueue: flush_delayed_work: keep the original workqueue for re-queueing (47dd5b from Linus' tree)

Kernel 2.6.32 and older

If you are porting the wl12xx driver with mac80211 specifically to Kernel version 2.6.32, there are a few additional patches are not part of the compat-wireless but would be mandatory for proper operations. These patches need to be applied after applying the patches described above.

  1. PM: allow for usage_count > 0 in pm_runtime_get() - here

  2. PM: Use pm_runtime_put_sync in system resume - here

  3. PM: Provide generic subsystem-level callbacks - here

  4. SDIO: fix nasty oops in mmc_sdio_detect - here

  5. netlink: remove subscriptions check on notifier (649300 from Linus' tree)

Additional support

  • Through the linux-wireless mailing list.
  • On IRC at freenode.net. You can find us on the #linux-wireless channel and on the #wl12xx channel, a dedicated channel for wl12xx related discussions.

Hardware Information

Please refer to the hardware specifications page for more information

HACKS

Here you can find a collection of hacks that can be used with the wl12xx driver code, but which are not good for upstreaming.

SDIO performance test module

We had a test module in the kernel that could run some throughput tests in order to check the performance of the SDIO bus, using the wl12xx chip as the remote side. This module doesn't have anything to do with the wl12xx chip itself, except that it is used as the remote side of the SDIO transactions. The module boots the wl12xx chip up, loads the firmware into the host's memory (just as a set of random data) and writes and reads this data continuously in order to check the SDIO performance.

Since this module was a very rarely used ugly hack and was causing some unnecessary maintenance work, it has been removed from the main kernel tree. If you still want to use you can get it from here: wl12xx_sdio_test.tar.gz

Just untar it on top of your kernel and do the necessary merges. If you used this module, you do so at your own risk without any support.

If someone wants to clean it up and tidy the code so that it looks nice and causes little maintenance work, feel free to do so and send RFC patches to the linux-wireless@vger.kernel.org mailing list. We may include it back if someone is willing to take the responsibility for maintaining it properly.