Closed Bug 938044 Opened 11 years ago Closed 11 years ago

B2G: data connection not automatically reconnected after wifi is disconnected

Categories

(Firefox OS Graveyard :: Wifi, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:1.3+, firefox28 fixed)

RESOLVED FIXED
1.3 Sprint 6 - 12/6
blocking-b2g 1.3+
Tracking Status
firefox28 --- fixed

People

(Reporter: jessica, Assigned: chucklee)

References

Details

(Keywords: regression, Whiteboard: [xfail])

Attachments

(2 files, 3 obsolete files)

I found this issue using latest master branch.

STR:
1. Turn on data connection
2. Turn on wifi and connect to an AP
  (After wifi is successfully connected, data connection will be disconnected)
3. Turn off wifi

Expected results:
data connection should be automatically reconnected

Actual results:
data connection not reconnected
Attached file bug-938044.log
Looks like NetworkManager is not receiving the NETWORK_STATE_DISCONNECTED event from wifi after turning it off.
Hi, could this be related to the fix in Bug 921620?
Flags: needinfo?(chulee)
Seems related. Thanks.
Assignee: nobody → chulee
Flags: needinfo?(chulee)
Comment on attachment 831447 [details] [diff] [review]
WIP - When disabling wifi, change to DISCONNECT state first.

Review of attachment 831447 [details] [diff] [review]:
-----------------------------------------------------------------

Let's try to come out a better solution, r- for now.

::: dom/wifi/WifiWorker.js
@@ +904,5 @@
>      } else {
>        // Note these following calls ignore errors. If we fail to kill the
>        // supplicant gracefully, then we need to continue telling it to die
>        // until it does.
> +      notifyStateChange({ state: "DISCONNECTED", BSSID: null, id: -1 });

It looks like a hack solution here. Can we have other way to fix this ? The bug here is because we block the state change event when we are in "UNINITIALIZED" and "DISABLING" state. Any reason why should we block the state change event ?
Attachment #831447 - Flags: feedback?(vchang) → feedback-
blocking-b2g: --- → 1.3?
Keywords: regression
Blocks: 921620
Whiteboard: [xfail]
(In reply to Vincent Chang[:vchang] from comment #5)
> Comment on attachment 831447 [details] [diff] [review]
> WIP - When disabling wifi, change to DISCONNECT state first.
> 
> Review of attachment 831447 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Let's try to come out a better solution, r- for now.
> 
> ::: dom/wifi/WifiWorker.js
> @@ +904,5 @@
> >      } else {
> >        // Note these following calls ignore errors. If we fail to kill the
> >        // supplicant gracefully, then we need to continue telling it to die
> >        // until it does.
> > +      notifyStateChange({ state: "DISCONNECTED", BSSID: null, id: -1 });
> 
> It looks like a hack solution here. Can we have other way to fix this ? The
> bug here is because we block the state change event when we are in
> "UNINITIALIZED" and "DISABLING" state. Any reason why should we block the
> state change event ?

I only want to block state change from those two states.
Blocking the event is a side effect.
Change order of sending disconnect event to prevent race condition.
Attachment #8335045 - Attachment is obsolete: true
Attachment #8335045 - Flags: feedback?(vchang)
Attachment #8336659 - Flags: review?(vchang)
Change commit summary.
Attachment #8336659 - Attachment is obsolete: true
Attachment #8336659 - Flags: review?(vchang)
Attachment #8336660 - Flags: review?(vchang)
It is an critical regression.
blocking-b2g: 1.3? → 1.3+
Comment on attachment 8336660 [details] [diff] [review]
When disabling wifi, change to DISCONNECT state first. V3.1

Review of attachment 8336660 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for your patch. It looks good.
Attachment #8336660 - Flags: review?(vchang) → review+
https://hg.mozilla.org/mozilla-central/rev/7c8fd7cafb8b
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.3 Sprint 6 - 12/6
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: