Closed Bug 903859 Opened 9 years ago Closed 9 years ago

[WiFi] setWifiEnabled tries to configure the WiFi operation mode before any driver being loaded

Categories

(Firefox OS Graveyard :: Wifi, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gerard-majax, Assigned: vchang)

Details

Attachments

(1 file)

While trying to make run B2G on HTC Desire Z, and more precisely getting WiFi to work, I came across this:

https://mxr.mozilla.org/mozilla-central/source/dom/wifi/WifiWorker.js#1228

In this code, one can see that the prepareForStartup() function calls setWifiOperationMode() prior to loading the driver in loadDriver(). The setWifiOperationMode() will obviously fail if there is no driver loaded.

Switching both, i.e., calling loadDriver() and then calling setWifiOperationMode() fixes the issue on my Desire Z.
Vincent, can you confirm that I'm right ?
Flags: needinfo?(vchang)
FYI, as far as I can say and test, this does not break anything on Inari with Gecko master: WiFi still works well.
Summary: [WiFi] setWifiEnabled tries configure the WiFi operation mode before any driver being loaded → [WiFi] setWifiEnabled tries to configure the WiFi operation mode before any driver being loaded
As far as I could compare, the ndc/netd set behave differently.
Assignee: nobody → vchang
Flags: needinfo?(vchang)
We should always load the wifi driver before modifying the operation mode.
Attachment #788791 - Flags: review?(mrbkap)
(In reply to Vincent Chang[:vchang] from comment #4)
> Created attachment 788791 [details] [diff] [review]
> Patch for mc v1.0
> 
> We should always load the wifi driver before modifying the operation mode.
This patch fixes wifi issue due to changes in bug 887485 on our reference hardware as well!
Comment on attachment 788791 [details] [diff] [review]
Patch for mc v1.0

r=me for an obviously correct change to fix wifi bustage.
Attachment #788791 - Flags: review+
We have a really cool tree for B2G landings now called b2g-inbound, btw :)
https://hg.mozilla.org/integration/b2g-inbound/
Comment on attachment 788791 [details] [diff] [review]
Patch for mc v1.0

Sorry for missing this on the first go-around.
Attachment #788791 - Flags: review?(mrbkap) → review+
https://hg.mozilla.org/mozilla-central/rev/c9f93acbf43a
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.