Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "wifi: Scan for networks every time the supplicant state changes" #1

Merged
merged 1 commit into from
Nov 12, 2019
Merged

Revert "wifi: Scan for networks every time the supplicant state changes" #1

merged 1 commit into from
Nov 12, 2019

Conversation

jyoung8607
Copy link
Contributor

@jyoung8607 jyoung8607 commented Nov 4, 2019

This reverts commit a8fbd07. The commit acts as described, performing a full WiFi scan every time there is a SupplicantStartedState change. Unfortunately, one of those state changes is "just finished a scan", so it loops performing active scans forever. The beginning of each active scan can be seen immediately in "logcat", it happens every five seconds.

2019-11-03_17-58-46

The continuous scanning will make EON chew through battery much faster than it needs to, and I think it may be impairing WiFi throughput. When the WiFi adapter is asked to scan for networks, those can be on other channels and bands, and it has to multitask by briefly pausing normal transmit/receive activity when it goes off-channel. I tried to perform a comparative throughput test, but I would have to backrev NEOS to earlier than v8 and my EON doesn't seem to want to go there.

The stated purpose of a8fbd07 is to make EON connect to local WiFi faster after booting up. If that's still a problem, deep in the Android framework is not the correct place to fix it. As an example, we could give it a one-time startup nudge from something application-level, perhaps in manager.py.

@rbiasini
Copy link

rbiasini commented Nov 4, 2019

@jyoung8607 , seems like a change we support, thanks! would be nice to see if wifi throughput increases. Why is an A-B test not possible just by comparing throughput before and after this change?
Also, do you think it Is regressing to connect to local wifi slower after booting?

@jyoung8607
Copy link
Contributor Author

jyoung8607 commented Nov 4, 2019

Why is an A-B test not possible just by comparing throughput before and after this change?

[and]

Also, do you think it Is regressing to connect to local wifi slower after booting?

I'd love to test both of the above, but I couldn't find a reasonable way to rebuild this component locally.

There is no public working NEOS builder, and while I was able to manually backrev from prebuilt NEOS version 12 to version 10, my EON/recovery chokes in some manner when asked to flash back to a version predating this August 2018 commit. I'm not sure those versions know what a LeEco phone is anyway.

I'd be more than happy to be the guinea-pig if someone at Comma can generate a test build with this commit reverted.

@rbiasini
Copy link

rbiasini commented Nov 4, 2019

ops, sorry, forgot we made eon-neos-builder repo private.
Ok, we can take over from here and also send a build with the change to you in case you want to run some tests as well. Thanks!

@pd0wm
Copy link
Contributor

pd0wm commented Nov 12, 2019

This seems to solve the slow download speed issues! We'll ship this change with the next NEOS.

@pd0wm pd0wm merged commit aee3908 into commaai:master Nov 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants