Cubietruck/AP6210

= AMPAK AP6210 Wifi and Bluetooth driver for Linux-Sunxi = Linux-Sunxi's latest 3.4 kernel does not include a build-in driver for the Wifi and Bluetooth module found on the CubieTruck. The way the module is implemented in the CubieTruck make it incompatible with the BCMDHD driver included with the kernel. To make things worst, the day CubieTech implemented their own version of the BCMDHD driver made it incompatible with the latest kernel.

This driver solve theses problems, all the modifications to the linux kernel and BCMDHD driver have been merge into a single module which can be loaded at runtime or linked with the kernel.

Integrate the driver into sunxi-3.4
The driver is avalable as two patches the first one (ap6210_module.patch) is the actual driver, the second patch (ap6210_defconfig.patch) disable the BCMDHD driver and configure the AP6210 driver instead. If you also use an USB Wifi module that need the BCMDHD driver, you can re-enable it. Here's how to get the official sunxi-3.4 source and integrate the patch :

git clone https://github.com/linux-sunxi/linux-sunxi.git cd linux-sunxi wget https://raw.githubusercontent.com/EddyBeaupre/ap6210/master/ap6210_module.patch wget https://raw.githubusercontent.com/EddyBeaupre/ap6210/master/ap6210_defconfig.patch patch -p1 < ap6210_module.patch patch -p1 < ap6210_defconfig.patch

An already patched version of the linux-sunxi code is also avalable on my git repository, but since it is where i develop the driver and other things, it may not always be useable :

https://github.com/EddyBeaupre/linux-sunxi-ap6210.git

Compile the kernel
Once the kernel has been patch, you can follow the regular kernel building instructions to compile your new kernel, see the Linux Kernel howto for a complete guide on how to build a kernel.

Enabling the module
To enable the module add the ap6210 module to /etc/modules. You can also enable ap mode by adding op_mode=2 to the module line.

Bugs and caveas
Presently, the module cannot be reloaded once it has been unloaded (rmmod), since the rfkill interface was not developped to be a module, but integrated into the architecture specific part of the kernel. This is not a problem for normal usage since the module can be turn on/off with iwconfig like any other wifi module.

= External links =
 * Official linux-sunxi git repository
 * Unofficial linux-sunxi git repository with the driver already integrated
 * AP6210 driver git repository

= References =