Skip to content

Commit

Permalink
Use 5GHz for client simulated network (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
guhetier authored Jun 13, 2022
1 parent d74cbee commit 97498da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Networks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct FakeBss
{
BssCapability capabilities = BssCapability::Ess;
int32_t rssi = -50;
uint32_t channelCenterFreq = 2432000; // 2.4GHz by default
uint32_t channelCenterFreq = 5240000; // 5GHz by default
uint16_t beaconInterval = 0;
Bssid bssid{};
Ssid ssid;
Expand All @@ -43,7 +43,7 @@ struct ScannedBss
Ssid ssid;
uint16_t capabilities = 0;
int32_t rssi = -50;
uint32_t channelCenterFreq = 2432000; // 2.4GHz by default
uint32_t channelCenterFreq = 5240000; // 5GHz by default
uint16_t beaconInterval = 0;
std::vector<uint8_t> ies;
};
Expand Down
2 changes: 2 additions & 0 deletions test/TestOpHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ TEST_CASE("Process a scan requests", "[wlansvcOpHandler]")
reinterpret_cast<uint8_t*>(&scanResponse->bss[0]) + scanResponse->bss[0].ie_offset, scanResponse->bss[0].ie_size};
CHECK(std::search(ie.begin(), ie.end(), ssid.value().begin(), ssid.value().end()) != ie.end());
CHECK(std::search(ie.begin(), ie.end(), Mock::c_wpa2pskRsnIe.begin(), Mock::c_wpa2pskRsnIe.end()) != ie.end());
// Client networks are simulated using 5GHz
CHECK(scanResponse->bss[0].channel_center_freq == 5240000);
}
}

Expand Down

0 comments on commit 97498da

Please sign in to comment.