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

BLE: fix scan timeout being called from interrupt #10219

Merged
merged 3 commits into from Mar 27, 2019

Conversation

Projects
None yet
5 participants
@paul-szczepanek-arm
Copy link
Member

commented Mar 25, 2019

Description

Legacy scanning uses a timer to simulate a scan timeout event which causes the timeout to be called from the timer interrupt. This posts the call in the event queue.

Pull request type

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

Reviewers

@pan-

Release Notes

@paul-szczepanek-arm paul-szczepanek-arm force-pushed the paul-szczepanek-arm:fix-legacy-scan-timeout branch from 69ee5b3 to 3b515e4 Mar 25, 2019

@pan-
Copy link
Member

left a comment

Thanks @paul-szczepanek-arm ; the change looks good but can be improved a bit.

_event_queue.post(
mbed::callback(
this,
&GenericGap<

This comment has been minimized.

Copy link
@pan-

pan- Mar 25, 2019

Member

What's wrong with &GenericGap:: process_legacy_scan_timeout ?

@@ -3263,6 +3280,7 @@ ble_error_t GenericGap<PalGapImpl, PalSecurityManager, ConnectionEventMonitorEve

_scan_timeout.detach();
if (duration.value()) {
/**/

This comment has been minimized.

Copy link
@pan-

pan- Mar 25, 2019

Member

I'm not sure that is required.

@pan-

pan- approved these changes Mar 25, 2019

@ciarmcom ciarmcom requested review from pan- and ARMmbed/mbed-os-maintainers Mar 25, 2019

@ciarmcom

This comment has been minimized.

Copy link
Member

commented Mar 25, 2019

@paul-szczepanek-arm, thank you for your changes.
@pan- @ARMmbed/mbed-os-pan @ARMmbed/mbed-os-maintainers please review.

@pan-

pan- approved these changes Mar 26, 2019

@paul-szczepanek-arm

This comment has been minimized.

Copy link
Member Author

commented Mar 26, 2019

I don't understand the astyle failure

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2019

@paul-szczepanek-arm Sorry about that. We did some astyle work after finding out the current job was over-excluding files, but the fixes ended up over-including files.

Problems appear to have been fixed with #10222.

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2019

Info: This PR has now been rebased.

If this was made in error, feel free to force-push your local branch to restore the PR.

@cmonr cmonr force-pushed the paul-szczepanek-arm:fix-legacy-scan-timeout branch from e5bef89 to 82112b6 Mar 26, 2019

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2019

CI started

@cmonr

cmonr approved these changes Mar 26, 2019

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2019

Making a note for future me.

New function added, but appears to be needed due to legacy callback reasons. Appears fine for patch.

@cmonr cmonr added needs: CI and removed needs: review labels Mar 26, 2019

cmonr added a commit to cmonr/mbed-os that referenced this pull request Mar 26, 2019

Merge pull request ARMmbed#10219 from paul-szczepanek-arm/fix-legacy-…
…scan-timeout

BLE: fix scan timeout being called from interrupt
@mbed-ci

This comment has been minimized.

Copy link

commented Mar 26, 2019

Test run: SUCCESS

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

@cmonr cmonr added ready for merge and removed needs: CI labels Mar 26, 2019

@cmonr

This comment has been minimized.

Copy link
Contributor

commented Mar 27, 2019

@pan- A hunch, but before we merge this, would y'all mind testing this against the CY8CKIT_062_BLE target?

I was doing some testing to make sure all PRs RfM or in CI were alright with eachother, and found that this target was not liking one of the PRs. Logs for reference: https://mbed-os.mbedcloudtesting.com/job/mbed-os-ci_greentea-test/1612/#showFailuresLink|

(Sorry, no S3 links. As of right now, the job is still in progress.)

@cmonr cmonr added needs: review and removed ready for merge labels Mar 27, 2019

@pan-

This comment has been minimized.

Copy link
Member

commented Mar 27, 2019

@cmonr The CY8CKIT_062_BLE doesn't even support BLE (yes, that is counter intuitive); code is this PR is not compiled in for that target. Your issue might be something else.

@cmonr cmonr added ready for merge and removed needs: review labels Mar 27, 2019

@cmonr cmonr merged commit 4cdc3b7 into ARMmbed:master Mar 27, 2019

28 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-ARMC5 Success
Details
jenkins-ci/build-ARMC6 Success
Details
jenkins-ci/build-GCC_ARM Success
Details
jenkins-ci/build-IAR8 Success
Details
jenkins-ci/cloud-client-test Success
Details
jenkins-ci/dynamic-memory-usage RTOS ROM(+0 bytes) RAM(+0 bytes)
Details
jenkins-ci/exporter Success
Details
jenkins-ci/greentea-test Success
Details
jenkins-ci/mbed2-build-ARMC5 Success
Details
jenkins-ci/mbed2-build-ARMC6 Success
Details
jenkins-ci/mbed2-build-GCC_ARM Success
Details
jenkins-ci/mbed2-build-IAR8 Success
Details
jenkins-ci/unittests Success
Details
travis-ci/astyle Local astyle testing has passed
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/doxy-spellcheck Local doxy-spellcheck testing has passed
Details
travis-ci/events Passed, runtime is 9169 cycles (+70 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/include_check Local include_check testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 8408B (+0.00%)
Details
travis-ci/psa-autogen Local psa-autogen testing has passed
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details
travis-ci/tools-py3.5 Local tools-py3.5 testing has passed
Details
travis-ci/tools-py3.6 Local tools-py3.6 testing has passed
Details
travis-ci/tools-py3.7 Local tools-py3.7 testing has passed
Details

@cmonr cmonr removed the ready for merge label Mar 27, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.