[Nexus 5 Q&A, Help & Troubleshooting] laxor:
Hey guys,

have you noticed that your device uses up a lot more battery on certain wifi networks (e.g. at work or university)? It is probably caused by the wlan_rx_wake wakelock.

From the wakelocks database:

So apparently some other device in the network keeps waking up the Nexus. If the problem occurs in your home network you can easily find out which device is causing the problem by using Shark and Wireshark. You'll get a log that shows every network activity.

Here are some tips from a similiar thread at the SGSII-forums (thanks!):

use a static IP instead of DHCP (you may have to set a static IP every time you sign up in that particular network)

disable IPv6 protocol on your phone - see below

update your router firmware

buy a gaming adapter for your Wifi network that gets the DHCP IP adress, but gives your phone a static IP

optimise router settings: click

Windows network is causing the problem - solution here: click

Change wireless network encryption method, change wifi channel, instead of using auto baseband use only 2.4 or 5GHz baseband (Wi - Fi - advanced - Wi - Fi frequency band)

turn off uPNP in router/AP

t urn off netbios in windows network ("Go to Network and Sharing Center then change adapter settings. Right click on your wireless and select Properties.

Click on the ipv4 and then the properties button. Select Advanced, go to the Wins tab and disable tcp over netbios.")

Thoravukk FAQ tells you: Q. My device not entering deep sleep if i use Wifi?

A: That's not a Kernel issue! It's a Router and (Windows 7) Network problem. Disable IPv6, IP Helper service, shell hardware detection service and the Windows Media Player Network Sharing Service. Source: here

Other apps and devices that can cause the wakelock:

TP Link routers: disable the print server in USB settings

Asus routers: disable AiCloud

disable Dropbox Lan Sync

disable wireless on (HP) printers

disable Canon network scan utility.

Using another kernel might also help to solve this problem: but I haven't tried that yet.

Try out the Franco kernel: http://xdaforums.com/showthread.php?t=2508284

He has merged some wifi driver patches which should adress this problem. It reduced the wakelocks for me to 1 min in over 8 hours on my home network and to 3 min in one hour ony my university network!

So it should be possible to get rid of this problem in your home network.

But what about work or university networks? There are even more devices connected so the problem gets even worse. In Europe we have the Eduroam wifi network at many universities. If I'm connected to this network I get about 20 min wakeup time in one hour. There are a lot of ARP, DHCP and IPv6 request from different sources. Unfortunately you can't change anything about the configuration on your university/school/work network, so we need to find a solution to block these requests on our phone.

A solution for the IPv6 requests might be to disable IPv6 on your phone if you don't use it. In terminal:

echo 1 > /proc/sys/net/ipv6/conf/wlan0/disable_ipv6

Change the 1 to a 0 if you want to reactivate IPv6. Android resets this setting every time you connect to a network, so you might try Tasker to do this.

I still haven't found a solution for the ARP and DHCP requests though. Any help or input would be appreciated.

Thanks

edit (05/14/14): updated OP with other tips you mentioned