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

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

Merged

Conversation

@cydriftcloud
Copy link
Contributor

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 ARMmbed/mbed-os-maintainers Oct 25, 2019
@ciarmcom

This comment has been minimized.

Copy link
Member

ciarmcom commented Oct 25, 2019

@ciarmcom ciarmcom requested a review from ARMmbed/mbed-os-ipcore Oct 25, 2019
@kjbracey-arm

This comment has been minimized.

Copy link
Contributor

kjbracey-arm commented Oct 25, 2019

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

This comment has been minimized.

Copy link
Member

0xc0170 commented Oct 25, 2019

CI started

@mbed-ci

This comment has been minimized.

Copy link

mbed-ci commented Oct 25, 2019

Test run: SUCCESS

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

@cydriftcloud

This comment has been minimized.

Copy link
Contributor Author

cydriftcloud commented Oct 25, 2019

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-arm left a comment

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

@0xc0170 0xc0170 merged commit 98072b2 into ARMmbed:master Oct 28, 2019
26 checks passed
26 checks passed
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
jenkins-ci/build-ARM Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(-72 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARM Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Success!
Details
travis-ci/docs Success!
Details
travis-ci/doxy-spellcheck Success!
Details
travis-ci/events Success! Runtime is 8658 cycles.
Details
travis-ci/gitattributestest Success!
Details
travis-ci/include_check Success!
Details
travis-ci/licence_check Success!
Details
travis-ci/littlefs Success! Code size is 8420B.
Details
travis-ci/psa-autogen Success!
Details
travis-ci/tools-py2.7 Success!
Details
travis-ci/tools-py3.5 Success!
Details
travis-ci/tools-py3.6 Success!
Details
travis-ci/tools-py3.7 Success!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.