Skip to content

Fix spurious link up/down when AP IP address range change #11748

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

Merged

Conversation

cydriftcloud
Copy link
Contributor

@cydriftcloud cydriftcloud commented Oct 25, 2019

Description

Fixed additional link notification in whd_wifi_link_state_change_handler by checking additional conditions during the link state transition.

Pull request type

[x] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

Reviewers

Release Notes

…hanges

Fixed additional link down/up events in whd_wifi_link_state_change_handler by checking additional condition during the transition.
@ciarmcom ciarmcom requested review from maclobdell and a team October 25, 2019 03:00
@ciarmcom
Copy link
Member

@cydriftcloud, thank you for your changes.
@maclobdell @ARMmbed/mbed-os-ipcore @ARMmbed/mbed-os-maintainers please review.

@ciarmcom ciarmcom requested a review from a team October 25, 2019 03:00
@kjbracey
Copy link
Contributor

Seems possibly plausible, but just to be clear - the Mbed OS network status events are intended to indicate things that applications may need to be aware of, like the device's assigned IP addresses changing. If we got a new DHCP address, for example, I'd expect another "GLOBAL_UP" event (without a "DOWN" first).

Repeated "ups" can be used to signal "something may have changed", giving the application the option to take action.

Although that doesn't seem to have reached documentation in https://os.mbed.com/docs/mbed-os/v5.14/apis/network-status.html

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 25, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Oct 25, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 1
Build artifacts

@cydriftcloud
Copy link
Contributor Author

Seems possibly plausible, but just to be clear - the Mbed OS network status events are intended to indicate things that applications may need to be aware of, like the device's assigned IP addresses changing. If we got a new DHCP address, for example, I'd expect another "GLOBAL_UP" event (without a "DOWN" first).

This fix deals with how that "GLOBAL_UP" event is generated based on the underlying whd event. During the deauth and re-join process, the underlying whd will go through multiple states. We do not intend to generate multiple "GLOBAL_UP" events as this should be considered as a single disconnect->connect event.

Copy link
Contributor

@kjbracey kjbracey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, as long as you're still generating at least one event when the IP address changes, that's fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants