Android Mac80211

=Summary=

This page contains information for bringing up MAC80211 based TI WLAN driver on Android.

=WLAN Driver build instruction=

We use compat-wireless mechanism to build WLAN driver files.

OMAP5 sEVM + wl18xx
Follow the procedure below to generated required kernel module files for OMAP5 sEVM platform

wl18xx is the default connectivity hardware in this platform.

cd $MYDROID/hardware/ti/wlan/mac80211/compat_wl18xx export KLIB=/path/to/kernel export KLIB_BUILD=/path/to/kernel export ARCH=arm export CROSS_COMPILE=arm-none-linux-gnueabi- make

The above step will produce compat.ko, cfg80211.ko, mac80211.ko, ,wlcore.ko, wl12xx.ko, wl18xx.ko, wlcore_sdio.ko which needs to be copied to target file system.

Blaze/Tablet + wl128x
Follow the procedure below to generated required kernel module files for OMAP4 Blaze/Tablet platforms

wl128x is the default connectivity hardware in this platform.

cd $MYDROID/hardware/ti/wlan/mac80211/compat_wl12xx export KLIB=/path/to/kernel export KLIB_BUILD=/path/to/kernel export ARCH=arm export CROSS_COMPILE=arm-none-linux-gnueabi- make

The above step will produce compat.ko, cfg80211.ko, mac80211.ko, wl12xx.ko, wl12xx_sdio.ko which needs to be copied to target file system.



=Target file system setup=

We need to copy two explicit things to target file system for WLAN


 * Driver modules and
 * Firmware files

WLAN Driver modules
Copy the driver files built from steps mentioned above along with the firmware files to target file system

The driver module files are expected in following location of target file system /system/lib/modules

cd $OUT mkdir system/lib/modules cd $MYDROID/hardware/ti/wlan/mac80211/compat_wl12xx cp ./compat/compat.ko $OUT/system/lib/modules/ cp ./net/wireless/cfg80211.ko $OUT/system/lib/modules/ cp ./net/mac80211/mac80211.ko $OUT/system/lib/modules/ cp ./drivers/net/wireless/wl12xx/wl12xx.ko $OUT/system/lib/modules/ cp ./drivers/net/wireless/wl12xx/wl12xx_sdio.ko $OUT/system/lib/modules/
 * Blaze/Tablet + wl128x

cd $OUT mkdir system/lib/modules cd $MYDROID/hardware/ti/wlan/mac80211/compat_wl18xx cp ./compat/compat.ko $OUT/system/lib/modules/ cp ./net/wireless/cfg80211.ko $OUT/system/lib/modules/ cp ./net/mac80211/mac80211.ko $OUT/system/lib/modules/ cp ./drivers/net/wireless/ti/wlcore/wlcore.ko $OUT/system/lib/modules/ cp ./drivers/net/wireless/ti/wl12xx/wl12xx.ko $OUT/system/lib/modules/ cp ./drivers/net/wireless/ti/wl12xx/wl18xx.ko $OUT/system/lib/modules/ cp ./drivers/net/wireless/ti/wl12xx/wlcore_sdio.ko $OUT/system/lib/modules/
 * OMAP5 sEVM + wl18xx

WLAN firmware
Firmware files go to following location on target file system. /system/etc/firmware/ti-connectivity/

Blaze/Tablet
The default connectivity chip in blaze and tablet is wl1283.

The corresponding firmware files are now part of repo and gets copied as part of Android File System Build.



OMAP5 sEVM
The default connectivity chip in OMAP5 sEVM is wl18xx.

The corresponding firmware files is not part of repo at this point because of licensing restrictions.

But we have the firmware files as part of OMAP5 daily build artifacts (starting from DB151)



To get the firmware files do the following,

To enable connectivity do the following,

- Boot your board - Make sure adb is set up - Untar wilink_fw.tgz package and run Install_Connectivity.sh script file



=WLAN Calibration Instruction=

NOTE: For WL18xx or COM8 module (Default connectivity module in OMAP5 sEVM) we  don't need  Calibration

NOTE: For WL1283 chip, we have also placed a calibration script file now to calibrate in Android. Just run wifical.sh on your target shell@android:/ # cd /system/bin shell@android:/ # wifical.sh

Manual Procedure to calibrate

 * Make sure Wi-Fi is turned off before proceeding with calibration


 * Copy the default calibration file /system/etc/firmware/ti-connectivity/wl1271-nvs.bin from file system for back-up.


 * For any reason Wi-Fi calibration fails and Wi-Fi becomes unusable,copy back the original calibration file wl1271-nvs.bin file to /system/etc/firmware/ti-connectivity/ location on target to restore Wi-Fi


 * Follow the procedure below on target device to calibrate Wi-Fi

1) Mount system partition as writable mount -o remount rw /system 2) Remove old NVS file rm /system/etc/firmware/ti-connectivity/wl1271-nvs.bin 3) Set the following parameters:

For WL1283 chip export TARGET_FW_DIR=/system/etc/firmware/ti-connectivity export TARGET_NVS_FILE=$TARGET_FW_DIR/wl1271-nvs.bin export WL12xx_MODULE=/system/lib/modules/wl12xx_sdio.ko export TARGET_INI_FILE=/system/etc/wifi/TQS_D_1.7.ini For WL1271 chip

Please make sure we have the ini file: /system/etc/wifi/TQS_S_2.6.ini.

If not present please copy it from hardware/ti/wlan/mac80211/ti-utils/ini_files/127x/ folder of the ICS repo. export TARGET_FW_DIR=/system/etc/firmware/ti-connectivity export TARGET_NVS_FILE=$TARGET_FW_DIR/wl1271-nvs.bin export WL12xx_MODULE=/system/lib/modules/wl12xx_sdio.ko export TARGET_INI_FILE=/system/etc/wifi/TQS_S_2.6.ini

4) Execute Calibrator command
 * 1) calibrator plt autocalibrate    [ ]
 * 2) dev: Device name. i.e. wlan0
 * 3) module path: Full path to wl12xx_sdio.ko kernel module
 * 4) ini file: Full path to Radio param ini file i.e. TQS_S_2.6.ini in this case
 * 5) nvs file: Full path of nvs file. i.e. wl1271-nvs.bin. Must be the real path as wl12xx will load it
 * 6) mac addr: MAC address to program into the NVS file [optional]

calibrator plt autocalibrate wlan0 $WL12xx_MODULE $1TARGET_INI_FILE $TARGET_NVS_FILE or calibrator plt autocalibrate wlan0 $WL12xx_MODULE $1TARGET_INI_FILE $TARGET_NVS_FILE 08:00:12:34:56:78