yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Android Development] thracemerin:
Yes, it would appear that CM reverted the ARP offload stuff (not particularly surprising). Arcee can push directly to git so his changes often bypass gerrit since he'd just post to gerrit and approve it anyway.

As for the flash order, if you want to continue to use this fix the order remains nightly -> v6 -> franco.
[Nexus 4 Android Development] DenyDarko:
Thracemerin is possible to upload your kernel with the latest wlan driver from master? :D

Sent from my Nexus 4 using Forum Runner
[Nexus 4 Android Development] thracemerin:
Sure, I'll have to rebuild it because apparently I obliterated the version I was using :silly:

I'll try to get it done and posted later today.
[Nexus 4 Android Development] thracemerin:
OK, here's the latest build with Prima v3.2.3.108:

Download: hsic_fix_nexus4_wlan_prima_323108.zip

MD5: d70d5a7a059dc29ad5ed5b9a27890de5

Note: In my testing this driver continued to exhibit the MAC address problem that is discussed all over this thread, so I recommend using v6 instead, but since people asked I have decided to post it. Other than to test whether or not the MAC address problem was fixed I haven't really used this kernel or done any extensive testing, there could be issues that I am unaware of, you have been warned.

Note 2: This is not an official release, as I said I am only providing it because people asked, no support will be provided for it unless the zip doesn't flash at all, if the kernel itself doesn't work properly, go back to v6.
[Nexus 4 Android Development] -Asskicker-:
Still on V6 here, I was wondering if it's possible to UV? I would just like to do a tiny amount of UV. :)
[Nexus 4 Android Development] sigma392:
Is it possible to "merge" the fixes with another Kernel?

EDIT: The latest download fixed my WiFi connectivity problems. Now I can connect to routers I couldn't before.
[Nexus 4 Android Development] DenyDarko:
Thank you !

It works like a charm :)

Sent from my Nexus 4 using Forum Runner
[Nexus 4 Android Development] thracemerin:
The kernel author would have to merge the prima driver that I used (v3.2.3.108), it's not possible to add it after the fact.
[Nexus 4 Android Development] markd0wn:
Master branch updated yet again (3.2.3.109). Some wlan changes but none of them seem to be ARP-related.

Independent basic service set (IBSS) support added -- ability to set up an ad-hoc network of client devices without a controlling access point. The network is ad hoc because it does not rely on a preexisting infrastructure, such as routers in wired networks or access points in managed (infrastructure) wireless networks. Instead, each node participates in routing by forwarding data for other nodes, so the determination of which nodes forward data is made dynamically on the basis of network connectivity.

Other changes seem small, and then there's one general fix:
[Nexus 4 Android Development] thracemerin:
Yeah, looks like nothing that would help us.

I think I'm going to switch the Prima driver builds to a module based system where all that I'll build is a new wlan.ko every time CAF updates, since the base kernel stays the same, but this requires a few changes, mainly I need to get my stock ramdisk to support init.d. This method would only work for those who have busybox installed, but those that don't probably shouldn't be messing with the experimental drivers anyway :)
[Nexus 4 Android Development] markd0wn:
Sounds good, thanks!

Also, looks like they're on a roll today over there... just updated again to 3.2.3.110 with a bunch of other fixes, including a "UDP packet delay fix", and "LFR2.0 Host Driver Changes - Master Gerrit for WLAN_FEATURE_ROAM_SCAN_OFFLOAD. Includes all the Host Driver Changes."

Again probably nothing major/helpful to us, but if they keep up this rate, maybe we'll get lucky..
[Nexus 4 Android Development] thracemerin:
They're not pushing new Firmware (firmware_bin/WCNSS_cfg.dat), it was last updated 3/11/13. I think they need a new version of that or possibly something even lower level to actually fix the problem.
[Nexus 4 Android Development] thracemerin:
A bunch of stuff that got added in 109 seems to have been partly reverted in 110 which makes 110 not build, I have no clue what's going on so I'm going to leave this to Codeaurora to figure out what the heck happened, until then you'll have to be satisfied with 108.

I did sort the module thing out I think, we'll see on the next release.

Edit: It looks like someone committed some stuff without rebasing first and nobody noticed :)
[Nexus 4 Android Development] klickig:
Did cm revert the patch wich was causing this bug?

I'm on the newest nightly and when I use airdroid to transfer data to the nexus and the screen turns off, no data is transferring anymore.

Do I need your patch?

Or is it useless because cm did the same thing?
[Nexus 4 Android Development] thracemerin:
CM reverted their fix, their WiFi now acts like stock again.

You can try flashing v6 and see if it fixes the problem for you.
[Nexus 4 Android Development] buckweet:
My apologies if this has already been discussed.. but I'm having a hard time sifting through 65 pages to find my answer :)

Originally when this thread started it was about the msm_hsic_host wake lock issues which I have, but my confusion is that the thread has seemed to morph into a wifi driver resolution for the ARP bug. I am hitting both issues actually. Firstly the wakelock, when my phone wifi is turned off it will never go into standby unless I hit the power button. I believe it is because of my exchange sync app running which is triggering the wakelock issues. When wifi is enabled it will go into standby with no issues. The ARP issue I've worked around by doing a static ARP entry on my networking gear. I just upgraded (??) from a Galaxy Nexus which had no issues going into standby. On the Nexus 4 I have standby issues on both stock software and CM 10.1

What I have concluded is that these issues are firmware level and no kernel driver mods can fix it, we just have to wait on google/qualcomm?? And that probably won't come until after Google I/O announces the next version of Android?

Any input clearing my confusion up would be welcomed. Thanks in advance.
[Nexus 4 Android Development] thracemerin:
There are 2 issues here:

1) msm_hsic_host: This is the USB host that controls the 3G modem in the device, this has to be awake for you to receive 3G data and to a lesser extent the data related to tower connections for voice, etc... The problem was that this USB host wasn't going back into suspend correctly and thus staying awake for far too long when it was woken up to perform operations on the 3G modem. I have introduced patches to reduce the issue, but you can't reduce it to 0 without disabling the USB host itself and no USB host = no cellular network connectivity. That being said, the more you are on 3G and the more things that use 3G data are active on your phone, the more you will have this wakelock, it is not completely avoidable, what you want is for the msm_hsic_host and radio_interface wakelocks to be roughly equal, this means that the USB host is suspending quickly when the radio interface is done.

2) Prima WiFi drivers/ARP issues: The stock wlan driver that comes with android for mako does not handle ARP requests at all, as a result once the OS goes into deep sleep ARP packets are just dropped, this results in delayed notifications since your WiFi router can't determine where to send the packets that contain the notification data. Now, the new Prima drivers kind of solve this problem, but they introduce other issues with WiFi direct, etc... Why? because these drivers are not for the N4, they are for the Qualcomm atheros testing platform which includes a slightly different version of the atheros WiFi chip, as a result our chip would need a firmware update on a level that is not possible without the intervention of Google, LG and/or Qualcomm. The v6 version that is in Post 1 is a potential workaround to this problem for most, though not necessarily all, it retains the stock wifi driver with a slight modification to a firmware file, for me this works 100%, for others they report that it has problems as well. Either way, there is nothing that can be done before I/O, hopefully Google will solve the problem for us and we can move on with a fully working device.
[Nexus 4 Android Development] thesebastian:
I have a doubt. Will that prima project be used (partially at least) by Google when compiling next Android version?

Or Google will just use another totally different secret project for N4? (Assuming that Google will fix this on next release).

Maybe that prima project is not directly compatible with any prima phone. But it will be used anyway in future updates.
[Nexus 4 Android Development] thracemerin:
To be honest, I don't know.

What I do know is this, the prima driver that is on the codeaurora forums is a generic driver for the Qualcomm testing platform, that driver is then taken by the vendors (in this case Google and LG) and modified as appropriate to function with their hardware. Now, there are multiple branches on CAF, the jb-mr1-dev branch is the one that is currently used by the N4, that branch has been essentially frozen since the 4.2.2 release, but the 3.2.2.7 version of the prima driver is in a branch called jb-mr2-dev and by Google's standard numbering of releases, that would be 4.3 which it seems is more and more likely to be what is announced at I/O, this leads me to believe that that is the driver that will be used in 4.3, but that driver has the same problem as the one on master with bad MAC, since I can say with 99.9% certainty that this will require some sort of firmware update on the chip itself (something that we don't have access to), hopefully this means that Google is in the process of putting something together to do that with 4.3, but we'll see.
[Nexus 4 Android Development] buckweet:
Does google even acknowledge that these issues exist? From the code.google.com bugs i've seen they have marked them as fixed or not even acknowledge them.
[Nexus 4 Android Development] darkamikaze:
Not many people notice the issue so I don't think it will be fixed tbh.. I'm losing hope.
[Nexus 4 Android Development] MotoRaph:
This kernel (v6) is still the best solution for me! Thanks!

If I use the _m+ kernel (with the modification "gEnableSuspend=2") I get delayed notifications, grey wifi bars and data drops. I dont know why...

It should have the same results like v6 from here, right?
[Nexus 4 Android Development] buckweet:
I don't have much battery issues.. The only issue I'm having is that my screen won't go off when on cell.. Turn on wifi and it goes away.. I'm pretty sure it has to do with my Touchdown exchange email app, but looking at the wakelock times and such Touchdown never is high on the list if present at all. I think it delegates some functions to other tasks (if that's possible).

I was hoping android 4.3 was going to be announced this week at I/O, but doesn't look like that is the case?
[Nexus 4 Android Development] rodries:
I have the same issue
[Nexus 4 Android Development] thracemerin:
Weird, it should work the same on both, I know it does for me.

That's pretty weird too, never experienced this, I'd say it has something to do with an app or setting you've changed.

Rumor has it 4.3 will be announced with the White N4 on June 10th now, but the rumors also said it would be announced at I/O so who knows.
[Nexus 4 Android Development] meangreenie:
probably need to set permissions correctly and reboot.. some file explorers mess with permissions when you save (old version es explorer for example)
[Nexus 4 Android Development] buckweet:
The issue happened on the stock image and CM 10.1, so I don't believe its any settings I've changed.. I've uninstalled the APP and re-installed and the issue comes back.. Many folks in my company use this app on their Samsung/Motorola devices and have no issues..

It's rather frustrating as there is no way I can prove/disprove it's this app :(
[Nexus 4 Android Development] AcmE85:
So I compared v6 WCNSS_qcom_cfg.ini with cm10.1 and stock android.

CM and stock are identical.

stock differs from v6 in some points:

different values in stock:

# Enable Firmware RSSI monitoring for roaming

gEnableFWRssiMonitoring=1

# AP MAc addr (obsolete)

gAPMacAddr=000AF58989EF

# Enable/Disable UAPSD for SoftAP

gEnableApUapsd=1

# CCX Support and fast transition
FastTransitionEnabled=1

gNeighborLookupThreshold=76

gNeighborReassocThreshold=81

# Legacy (non-CCX, non-802.11r) Fast Roaming Support

# To enable, set FastRoamEnabled=1, gEnableFWRssiMonitoring=1, FastTransitionEnabled=1

# To disable, set FastRoamEnabled=0, gEnableFWRssiMonitoring=0, FastTransitionEnabled=0

FastRoamEnabled=1

#Check if the AP to which we are roaming is better than current AP in terms of RSSI.

#Checking is disabled if set to Zero.Otherwise it will use this value as to how better

#the RSSI of the new/roamable AP should be for roaming

RoamRssiDiff=3

#Configure the RSSI gap that will be used to partition/categorize width of

#each individual category (aka bucket).

gRssiCatGap=5

#Beacon Early Termination (1 = enable the BET feature, 0 = disable)

enableBeaconEarlyTermination=1

beaconEarlyTerminationWakeInterval=11

gChannelBondingMode5GHz=0

missing in v6:

# Enable Random BSSID

gEnableApRandomBssid=1

#Forced Device Listen Interval in multiples of DTIM Period aligned to DTIM

gEnableModulatedDTIM=3

Did you take the ini from prima?

Maybe some of these values are the reason why the fix in v6 does not work with other kernels when adding

gEnableSuspend=2

Right now I am testing your latest m+ WIP Kernel + WCNSS_qcom_cfg.ini pulled from v6.

Ping does respond everytime and notifications do come in quicker, though sometimes with a short delay (2-3 minutes) which is ok.

But after a longer period, the nexus 4 tends to lose the wifi connection completely. After screen on, there is no connected wifi.

I have to manully disable/enable wifi to make it work again.
[Nexus 4 Android Development] thracemerin:
There aren't any firmware files packed with _m+, so they should be coming from your ROM or possibly as remnants of a previous kernel. I suggest trying to dirty flash your ROM then flash just the _m+ and make the modification manually.

I use CM10.1 and just flash it, then the _m+ and modify the WCNSS_qcom_cfg.ini file myself, works fine for me.
[Nexus 4 Android Development] AcmE85:
Yes I know that, I just wanted to point out that the WCNSS_qcom_cfg.ini which is packed in your hsic_v6 is different than the stock/cm WCNSS_qcom_cfg.ini (not only gEnableSuspend=2).

Some users reported that your v6 fixes their wifi issues, whereas _m+ with added gEnableSuspend=2 does not for them.

Might be because of the other different values in the hsic_v6 ini. As always this seems to be highly router-dependent.

The comparison above was made with extracted ini files straight from latest cm.zip, stock4.2.2 and your hsic_v6.zip.

Right now I am testing the way you described in the quote. btw Thanks for all your efforts here on XDA!
[Nexus 4 Android Development] Proda:
So this WiFi fix is or isn't included in m+ kernel?

I'm confused :confused:
[Nexus 4 Android Development] AcmE85:
It is not. You have to set the correct value manually.
[Nexus 4 Android Development] thracemerin:
For those of you missing the crack flashing and wanting the latest prima stuff, look here: http://goo.im/devs/thracemerin/mako/hsic_fix

Note: I still think that v6 is a much better option than any new Prima drivers given the issues that the Prima updates seem to cause, but I know there are those of you who prefer this option, so enjoy.

Happy Flashing :victory:
[Nexus 4 Android Development] markd0wn:
Thanks for this, been waiting for something like that with newest (3.2.3.119) version, which according to filename I see that version is exactly that :)

A few questions though:

If I remember correctly, V6 is basically stock drivers + genablesuspend=2, so I assume the new version is simply newest prima drivers with the default .ini settings that come with it, correct?

And the more important thing - I assume it's back to the 'pick your poison' option in terms of 'which is better'. If my 'poison' is highest priority on quickest notifications, while not caring about possible WiFi bugs like Air Droid etc (as in, a basic working WiFi + quick notifications will suffice), what is the better option in that case? stock with suspend=2, or newest prima with default settings? Again, 'best' means best for me specifically and possibly not in general.

Also, is there a difference in battery life? because if battery is the same with newest drivers/default settings and stock with suspend=2, for me the only consideration is the notifications.

Finally, is the flashing process identical (with custom kernel) whether I use v6 or latest prima (or even switching between them)? As in, rom -> fix -> franco?
[Nexus 4 Android Development] thracemerin:
V6 is just stock with the change to the .ini file, yes.

The zip that's in the folder in the link contains the .119 version of Prima including the appropriate firmware files to go along with it.

If you want instant notifications probably prima .119 is the best option, but keep in mind that some people are reporting that depending on their network setup that WiFi completely dies after some time until you reboot your device, this means no connection at all not just no notifications.

I haven't tested .119 really at all, I can't say if there is a battery effect or not, the gEnableSuspend=2 method results in a minimally increased battery drain.

If you want to use the v6 fix you can flash ROM->v6->other kernel, you can't do this with the new Prima versions as they require a full kernel.
[Nexus 4 Android Development] thesebastian:
Installed 119 over 108 and failed to enable WiFi.

I only did 1 reboot and went back to 108.

Anyone have 119 working?
[Nexus 4 Android Development] thracemerin:
Yeah, it's not now, I was sure it was working before, same with the 3.2.2.7 version, let me look into it.
[Nexus 4 Android Development] thracemerin:
Ok, for some reason I still had it set to build Prima as a module, which is great and all but since I didn't include the module....well you get the idea.

Should be fixed now, might take a few mins for goo.im to update.

Edit: goo.im synced, try the download again :)
[Nexus 4 Android Development] thesebastian:
Haha thanks I will try

---------- Post added at 09:12 PM ---------- Previous post was at 08:50 PM ----------

Now its working great! Asap notifications and all good!

---------- Post added at 09:31 PM ---------- Previous post was at 09:12 PM ----------

One question. I was setting up my Vibration from 70 to 100.

For this i was using "Trickster MOD" or "Franco Kernel Updater App" etc etc.

Now i decided to uninstall "Trickster MOD" and do it manually (every time i boot up my N4...manually editing de "amp" file).

is there a way to automate "vibration 100" without installing a new app?

(I never installed BusyBox before...had it on Gingerbread old Smartphone, is BusyBox the only way to create scripts?)
[Nexus 4 Android Development] Fr33L4nc3r:
There is a commit including what's called "MakoParts" (ie, hardware device specific stuff) : http://review.cyanogenmod.org/#/c/31039/

There are few builds floating around or you can build yours with this cherry-pick.
[Nexus 4 Android Development] thesebastian:
I'm using stock ROM with this Kernel. No CM here!
[Nexus 4 Android Development] Zaldi00:
I'm on cm with v6,exist new version with mako parts?

Enviado desde mi Nexus 4 usando Tapatalk 2
[Nexus 4 Android Development] Nark.GA60:
I'm not sure if it's the thing to do, but you could put a script into init.d?

This is rather off topic, though.
[Nexus 4 Android Development] thesebastian:
IDK WTF "UpperMAC" means for Qualcomm.

But maybe this has something to do with MAC Address?

https://www.codeaurora.org/gitweb/e...it;h=81b2426e07ec89064a7f1651ff5a102a5cae73f3

I don't think i have that folder...that's the question...

"The only way to have init.d (Stock ROM) is install Buxybox?"
[Nexus 4 Android Development] thracemerin:
Don't know, but I put a v3.2.3.120 build on goo.im, test it for yourself :)
[Nexus 4 Android Development] apex88:
Just tried it with stock rom, seems to fix the notification delay issue, i had like 1 min notification delay on wifi with stock kernel, now i get instant notification.

Checked some benchmarks, with stock kernel im getting 17K - antutu, 4.8K - quadrant, with the custom kernel i had 15K - antutu, 4K - quadrant, didnt noticed and performance decrease while using the phone.

Will try it with CM10.1 later on, anyone tried it ?

Is it possible to apply these changes on franco kernel or other custom kernels?

Update:

Just tried CM10.1 with this kernel and it seems to work and notifications arrive instantly.

btw on stock after few minutes it got back to the delayed notification for some reason...

Update 2:

Well I have tried it further more and still there is a delay, if the phone is untouched for like 10 min and then it try to send a message i dont receive it even when i unlock the phone, only when i enter whatsapp for example i receive the message...
[Nexus 4 Android Development] -sandro-:
Hello

I have a quick question, I don't have Nexus 4 but a Galaxy I9305 that apparently has a Qualcomm modem.

I have the same wakelocks problem while on 3G keeping the phone awake more than it should but the name is msm_hsic_pc0 instead of msm_hsic_host. Do you think it's the same cause?
[Nexus 4 Android Development] thesebastian:
Edit
[Nexus 4 Android Development] -sandro-:
I'm talking about the battery drain on 3G...maybe wrong thread? :D
[Nexus 4 Android Development] thesebastian:
Sorry my mistake. .. You were talking about 3G modem and I was talking about WiFi Modem. Haha
[Nexus 4 Android Development] thracemerin:
Is the I9305 the Exynos Octa version or the Snapdragon version?
[Nexus 4 Android Development] -sandro-:
I think you're confusing it with the s4, the i9305 is the s3 LTE
[Nexus 4 Android Development] thracemerin:
Oops, haha.

So it's the Exynos 4 quad version then?
[Nexus 4 Android Development] -sandro-:
yes but I have a "qualcomm 4G" sticker on it that's why I thought of the connection with this problem
[Nexus 4 Android Development] thracemerin:
The fix I used is for MSM (qualcomm snapdragon) boards, the Exynos chips are usually on Samsung Exynos boards which would be incompatible.
[Nexus 4 Android Development] markd0wn:
.54 radio is out, could this affect WiFi notifications in any way when using default WCNSS_qcom_cfg.ini settings? or will it only impact mobile connectivity?

Didn't check it myself yet, but wondering if it technically can impact the issue or if it won't matter anyway. Supposedly we'll get a .74 radio as well soon when Android 4.3 is out.

*** EDIT:

Flashed the .54 radio, then re-flashed CM10.1 nightly, while skipping the v6 fix this time, so after the ROM flash, I only flashed franco and gapps.

I then pulled the .ini after to check the settings that it had by default without applying the fix (CM10.1 nightly) -- gEnableSuspend=3, McastBcastFilter=3, hostArpOffload=0.

Unplugged the phone from charging, and tried the ping check (start ping when screen is on, let the screen turn off, see what happens when it goes to sleep). Left the ping running for 5 minutes while screen is off, and always got a response - no timeout.

Does this mean something is fixed, or did I do the test wrong?

*** EDIT 2:

Tried starting the ping now after the screen is off for a while, without leaving a ping on from when the screen was on. This time the result is 'Destination Host Unreachable'. Then did 'arp -a' and the phone didn't even appear in the list. Sent myself an email from a computer, and the notification got to the phone about 80 seconds after it was sent. A WhatsApp notification was received instantly or semi-instantly (less than 20 seconds after it was sent, for sure)

[MENTION=4303511]thracemerin[/MENTION], any idea if the new radio 'officially' solves anything?