This is an existing ROM with much problems like wifi sound d-pad
wifi can be fixed like this
For wifi make sure the module is loading correctly, that bit is fairly simple.
Assuming the module loads, your problem is probably wpa_supplicant. There are a few ways to set it up, if you do it the way I did it will create a socket on /data somewhere. Were the bits on /data go varies between codeaurora and aosp, so where it is will depend on what your rom is based on. The correct directories need to be created and permissions set in init (take a look at init.qcom.rc from one of my roms as a reference). Cyanogenmod complicates it a bit more by using part of codeaurora and part of aosp and needs a symlink to fix it.
Once that bit is done wpa_supplicant should at least start. Using the wext driver it will fail as the ar6000 driver doesn't implement the changes android has made to wpa_supplicant. You can get wext to work by reseting a return code at the point it fails, but that not really a nice fix. I used the awext driver (google it or look at wpa_supplicant from the pulse-android-dev git). You should be able to pull the pulse-android-dev wpa_supplicant from github and then just change the driver in BoardConfig to AWEXT and modify the init for wpa_supplicant to use the awext driver.
Hope that helps.
Source: modaco by TOM
Samsing galaxy s4 i9505 (now using)
Xperia Z (worst choice ever!!!)(being sold)
samsung galaxy s2 (Best pof its time)(sold)
Vodafone 845 (sold)
ROMS for Vodafone 845 (SOLD)