[lowpan][lowpan-spinel-driver] Reset the send window before calling open.

This change fixes a race condition in `SpinelDeviceSink::open` that
could cause the send window to be reset after the Spinel device had
already (re)opened and sent us a `OnReadyForSendFrames`. This would
cause the send window to remain at zero, resulting in no frames being
able to be sent to the device.

Aside from correcting what is a clear logic error, writing a unit test
for this change that would have failed previously but will now succeed
is tricky. The issue was discovered when testing on real hardware, and
manual verification indicates that this change does address the
problem. Existing tests continue to pass.

Test: fx test lowpan-tests
Change-Id: I933c7ba50f29357ac7b83a155e941ab8ff246a4b
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/401679
Commit-Queue: Robert Quattlebaum <rquattle@google.com>
Testability-Review: Jiaming (Charlie) Wang <jiamingw@google.com>
Reviewed-by: Jiaming (Charlie) Wang <jiamingw@google.com>
1 file changed
tree: b471f39645e48ba40c2aa6a8e8e9272e36f3befb
  1. boards/
  2. build/
  3. bundles/
  4. cts/
  5. docs/
  6. examples/
  7. garnet/
  8. products/
  9. scripts/
  10. sdk/
  11. src/
  12. third_party/
  13. tools/
  14. zircon/
  15. .clang-format
  16. .clang-tidy
  17. .gitattributes
  18. .gitignore
  19. .gn
  20. .style.yapf
  21. AUTHORS
  22. BUILD.gn
  23. CODE_OF_CONDUCT.md
  24. CONTRIBUTING.md
  25. LICENSE
  26. OWNERS
  27. PATENTS
  28. README.md
  29. rustfmt.toml
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.