wcn36xx is a mac80211 driver for wcn3660 and wcn3680 chips found from Qualcomm SoC.
- Supported chips
- Available devices
- Device firmware
Currently wcn36xx only compiles with msm kernels and backports infrastructure is needed to get latest cfg80211 and mac80211.
So far wcn36xx driver supports only WCN3660 but in nearest future it will WCN3680 as well.
wcn36xx was tested on Google Nexus 4(Mako) and Sony Xperia T(Mint). Basically, wcn36xx can support all MSM based devices.
As a general rule for this section, don't list every tiny detail, just the most important things one should know about.
list wireless features that your driver supports, e.g. station mode, access point mode etc
- 11b, 11g, 11n, 11a
- HW rate control
- hardware encryption(TKIP, CCMP, WEP)
- HW connection monitoring
- aggregation (Immediate BA only)
- Beacon filtering
- power save
- AP mode support
- 11s mesh
Not working (yet)
list features that could be supported but are not yet
- ARP offloading
- Bluetooth coexistence
- Multicast filtering
- Recovery(In case of chip hanging, wcn36xx must restart it)
- list important features that the device will not support
The sources are available from github:
The latest greatest firmware can be found on here https://www.codeaurora.org/cgit/external/hisense/platform/vendor/qcom-opensource/wlan/prima/tree/firmware_bin?h=8130_CS
wcn36xx loads WCNSS_qcom_wlan_nv.bin file and sends it to the hardware.
There's an IRC channel #wcn36xx at Freenode.
Go to working directory
Change to a directory where you'll keep your git repositories like ~/git/
git clone git://github.com/hauke/backports.git
git clone --no-checkout git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
The –no-checkout is there to save space since backports will pickout the relevant stuff anyway.
git clone git://github.com/KrasnikovEugene/wcn36xx.git
Checkout wcn36xx from upstream or your own branch
Generate a build tree
Make sure you have "coccinelle" installed otherwise gentree will fail. Do a git log, find the first commit that says something like: "refresh on next-20131122". Then execute the command:
cd packports ./gentree.py --verbose --clean --git-revision next-20131122 ../linux-next/ ../backport-wcn
This command will create the folder ../backport-wcn where it will put all the necessary linux stuff from linux-next. It will also apply a number of patches, if any of these fail you must sort it out otherwise the build folder will not be ready.
Time to build
This sets up some links to your cm build:
export CM_BUILD=mako export CM_ROOT=~/mako/cm-10.1
This executes the defconfig for the environment:
make KLIB=$CM_ROOT/out/target/product/$CM_BUILD/obj/KERNEL_OBJ \ KLIB_BUILD=$CM_ROOT/out/target/product/$CM_BUILD/obj/KERNEL_OBJ \ ARCH=arm \ CROSS_COMPILE=$CM_ROOT/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi- \ defconfig-wcn36xx
Builds the module and all necessary compat/cfg80211/mac80211 modules as well:
make KLIB=$CM_ROOT/out/target/product/$CM_BUILD/obj/KERNEL_OBJ \ KLIB_BUILD=$CM_ROOT/out/target/product/$CM_BUILD/obj/KERNEL_OBJ \ ARCH=arm \ CROSS_COMPILE=$CM_ROOT/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
Build platform driver wcn36xx_msm
cd drivers/net/wireless/ath/wcn36xx/wcn36xx_msm/ make KLIB=$CM_ROOT/out/target/product/$CM_BUILD/obj/KERNEL_OBJ \ KLIB_BUILD=$CM_ROOT/out/target/product/$CM_BUILD/obj/KERNEL_OBJ \ ARCH=arm \ CROSS_COMPILE=$CM_ROOT/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
NOTES FOR OSX
To make this run on OSX (Mountain Lion) I had to do some changes. 1) The make commands shall not use the same path for the CROSS_COMPILE option. "linux-x86" must be replaced with "darwin-x86".
2) The Makefile in backport-wcn must be modified.
- The comment on line 101 looking like this:
- # RHEL as well, sadly we need to grep for it ;\
3) You must modify the kconf/Makefile
- To the first line in this file (beginning with CFLAGS) add -DKBUILD_NO_NLS to the end. Otherwise you will get a lkc.h error when building.
Mako on CM 10.1
- Compile wcn36xx as per instructions above. No need to set CM_BUILD and CM_ROOT variables, brunch does that automatically.
- Create new file device/lge/mako/init.mako.wcn36xx.sh:
#!/system/bin/sh /system/bin/insmod /system/lib/modules/wcn36xx_msm.ko /system/bin/insmod /system/lib/modules/compat.ko /system/bin/insmod /system/lib/modules/cfg80211.ko /system/bin/insmod /system/lib/modules/mac80211.ko /system/bin/insmod /system/lib/modules/wcn36xx.ko
- Edit device/lge/mako/device.mk and add init.mako.wcn36xx.sh to PRODUCT_COPY_FILES:
PRODUCT_COPY_FILES += \ device/lge/mako/init.mako.bt.sh:system/etc/init.mako.bt.sh \ device/lge/mako/init.mako.wcn36xx.sh:system/etc/init.mako.wcn36xx.sh
- Edit device/lge/mako/init.mako.rc and comment out section 'service p2p_supplicant'. Then copy 'service wpa_supplicant' and rename that to 'service p2p_supplicant'.
- Add to the end of device/lge/mako/init.mako.rc:
service wcn36xx /system/bin/sh /system/etc/init.mako.wcn36xx.sh class main user root oneshot
Compile new images and flash them according to CyanogenMod instructions.
- Install kernel modules to the device:
adb root adb remount cd ../backports-output adb push compat/compat.ko /system/lib/modules/ adb push net/wireless/cfg80211.ko /system/lib/modules/ adb push net/mac80211/mac80211.ko /system/lib/modules/ adb push drivers/net/wireless/ath/wcn36xx/wcn36xx.ko /system/lib/modules/ adb push drivers/net/wireless/ath/wcn36xx/wcn36xx_msm/wcn36xx_msm.ko /system/lib/modules/
- Reboot the device and now you should be able to use wcn36xx from GUI.
Mint on CM 10.1
Follow instructions (http://wiki.cyanogenmod.org/w/Build_for_mint) do download and build CM sources.
In case of build error "No such file or directory: 'vendor/sony/blue-common/proprietary/boot/RPM.bin'" download file RPM.bin from https://github.com/TheMuppets/proprietary_vendor_sony and put it to the folder 'vendor/sony/blue-common/proprietary/boot'
Flash built image to the phone as described here http://www.xperiablog.net/2012/12/04/how-to-install-cyanogenmod-10-on-your-sony-xperia-t-guide/