[wlan][hw-sim] Send probe responses

Our mock AP is hardcoded as channel 1. Beacons are only sent when the hw-sim changes channel to the AP's channel (channel 1). Probe responses are never sent out, so we're wholly reliant on the beacons.

Usually, when a passive scan happens, the channel is tuned to channel 1 as part of the scan and then the beacon is sent.

It appears that sometimes, the Phy gets tuned to channel 1 prior to a scan. I think this happens when there was an association attempt earlier in the test. In those cases, the hw-sim is already on channel 1 when the scan starts, so no channel change happens, so no beacons are sent (and the test fails because we don't find an AP).

I tried to spelunk and find what  exactly causes the channel to be tuned, but it seems like something within SoftMAC and I hit a wall. It's not very important for the real world, it's only here in the hw-sim where the act of changing channels is the trigger for a beacon to be sent...

To fix this, we can change the hw-sim so that it responds to probe requests -- this means that when the hw-sim does an active scan, it'll find the AP, even if we were already on the same channel. There's probably other ways to fix it too, but this works in my testing.

Multiply: fuchsia-pkg://fuchsia.com/wlan-hw-sim-test#meta/reconnect-to-wpa2-network.cm: 200
Multiply: fuchsia-pkg://fuchsia.com/wlan-hw-sim-test#meta/connect-to-all-modern-bss-protections.cm: 200
Test: fx test wlan-hw-sim-test wlan-hw-sim-test-legacy-privacy
Bug: 101944
Bug: 101141
Change-Id: I573989e4f7bfb29b80e91eadc6c4d4a5b4519178
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/689148
Commit-Queue: Marc Khouri <mnck@google.com>
Reviewed-by: Dylan Swiggett <swiggett@google.com>
3 files changed
tree: 63530c45ef64070354d6e0306a20c66bd8d75b6a
  1. boards/
  2. build/
  3. bundles/
  4. docs/
  5. examples/
  6. products/
  7. scripts/
  8. sdk/
  9. src/
  10. third_party/
  11. tools/
  12. zircon/
  13. .clang-format
  14. .clang-tidy
  15. .editorconfig
  16. .git-blame-ignore-revs
  17. .gitattributes
  18. .gitignore
  19. .gn
  20. .style.yapf
  21. analysis_options.yaml
  22. AUTHORS
  23. BUILD.gn
  24. CODE_OF_CONDUCT.md
  25. CONTRIBUTING.md
  26. LICENSE
  27. OWNERS
  28. PATENTS
  29. pyrightconfig.json
  30. README.md
  31. rustfmt.toml
README.md

Fuchsia

What is Fuchsia?

Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.

We expect everyone interacting with our project to respect our code of conduct.

Read more about Fuchsia's principles.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.