[HTC Desire C] munjeni:
Thanks, but dude, first, we speaking here about CM9 android, not about stock android. I speaking here about enabling wifi under CM9 only! But about stock rom and wifi you no need to hack kernel in order to change version, you have a better way to do that, you just need to edit golfu_defconfig, change version string, and you can compile kernel that will have the version like stock kernel...its not problem...I know that allready! But wifi under cm9 not working now! Problem is why these wifi libs/firmwares/modules is hardcoded and why missing from public kernel source! It mean its not part of the golfu kernel, its part of compat wireless source and wifi module is compiled from there!!! I tried many compact wifi modules to compile from source but still no one working... unable to enable wifi from android settings menu... I think there is something hardcoded in ramdisk init (binary) because cm9 init binary could not giving cm9 rom to boot! So "init" is allso hardcoded! I got wifi (not stock modules) working but only manualy init! Still wifi enabled from android settings menu could not be enabled and I have no idea why! I found ideal kernel wifi "sdio bassed" source for our desire c but these kernel is 3.6 and ath6kl module reguire a lot of works if we want to port it to our kernel, still unable to compile! But I found compat wireless but on my look into source I am unable to find compatible ath6kl source for example I am unable to find sdio bassed source "ath6kl_sdio" that have definitions "path to firmwares" inside core.h:

/* AR6003 3.0 definitions */
#define AR6003_HW_2_1_1_VERSION 0x30000582
#define AR6003_HW_2_1_1_FW_DIR	"ath6k/AR6003/hw2.1.1"
#define AR6003_HW_2_1_1_OTP_FILE	"otp.bin"
#define AR6003_HW_2_1_1_FIRMWARE_FILE	"athwlan.bin"
#define AR6003_HW_2_1_1_TCMD_FIRMWARE_FILE	"athtcmd_ram.bin"
#define AR6003_HW_2_1_1_UTF_FIRMWARE_FILE	"utf.bin"
#define AR6003_HW_2_1_1_TESTSCRIPT_FILE	"nullTestFlow.bin"
#define AR6003_HW_2_1_1_PATCH_FILE	"data.patch.bin"
#define AR6003_HW_2_1_1_BOARD_DATA_FILE AR6003_HW_2_1_1_FW_DIR "/bdata.bin"
#define AR6003_HW_2_1_1_DEFAULT_BOARD_DATA_FILE	\
AR6003_HW_2_1_1_FW_DIR "/bdata.SD31.bin"

If you help me to find compat wireless source that have definitions for path to firmwares than I will maybe fix wifi! I no want "stock" files, I just want to compile custom from source!

Other problem:

Android source code (cm9, jelly bean) allso mising something about ath6kl thing! For example, found all references about ath6kl with "all paths to"... see here -> http://paste.ubuntu.com/1187235/ ...expecialy this line:

/./system/lib/libhardware_legacy.so:ath6kl_sdio

so what these LINE mean? These line mean that ath6kl is referenced too in android source code (libhardware_legacy folder !) and allso hardcoded for our desire c because libhardware_legacy inside CM* android source code missing these ath6kl things! So we have BOOTH problem/missing source code for ath6kl_sdio in android and in kernel for our desire c wifi :( and we first need to find them, import them into android source, import them into kernel source, and finaly compile...

About audio:

I have absolutely no idea which source code is used for compilation for desire c :( ... its like another hardcode :( We probably can use audio libs from stock rom and fix some errors/mising lines in cm9 framework to get these libs working, now I have "SIGSEGV" with these libs! I have no idea, generic audio libs compiled from from cm9 source code not working, I am unable to fix it, its very annoying and hard ! :(

Edit:

Possible solution for android only -> https://github.com/vegaics/libhardware_legacy/blob/master/wifi/wifi.c this need to be modified for Golfu;)