diff options
| author | David Su <dysu@google.com> | 2018-10-02 15:14:29 -0700 |
|---|---|---|
| committer | David Su <dysu@google.com> | 2018-10-08 13:26:31 -0700 |
| commit | 61ea307b1479302c05b5c02169099ad1db0cf0b2 (patch) | |
| tree | c2f34a14cff02f0427b557c09b94bdea0abb907e /ap_interface_impl.cpp | |
| parent | 13ea48a21e748ef99cd504639a159994025c7123 (diff) | |
| download | platform_system_connectivity_wificond-61ea307b1479302c05b5c02169099ad1db0cf0b2.tar.gz platform_system_connectivity_wificond-61ea307b1479302c05b5c02169099ad1db0cf0b2.tar.bz2 platform_system_connectivity_wificond-61ea307b1479302c05b5c02169099ad1db0cf0b2.zip | |
Migrate MAC Addresses and BSSIDs from std::vector to std::array
Since MAC Addresses and BSSIDs are fixed size, it would be more
efficient to use a fixed length array to store them. Also, bugs
causing MAC Addresses to have the wrong size can be caught
more promptly than before.
Bug: 36974160
Fix: 36974160
Test: system/connectivity/wificond/runtests.sh
Test: manual - flash onto device and try connecting to Wifi
Change-Id: Iefab0b3bbfd286c135b10ccc4fa946faaad86ce4
Diffstat (limited to 'ap_interface_impl.cpp')
| -rw-r--r-- | ap_interface_impl.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ap_interface_impl.cpp b/ap_interface_impl.cpp index 5700b20..f39e9c1 100644 --- a/ap_interface_impl.cpp +++ b/ap_interface_impl.cpp @@ -25,10 +25,10 @@ using android::net::wifi::IApInterface; using android::wifi_system::InterfaceTool; +using std::array; using std::endl; using std::string; using std::unique_ptr; -using std::vector; using namespace std::placeholders; @@ -80,8 +80,9 @@ void ApInterfaceImpl::Dump(std::stringstream* ss) const { *ss << "------- Dump End -------" << endl; } -void ApInterfaceImpl::OnStationEvent(StationEvent event, - const vector<uint8_t>& mac_address) { +void ApInterfaceImpl::OnStationEvent( + StationEvent event, + const array<uint8_t, ETH_ALEN>& mac_address) { if (event == NEW_STATION) { LOG(INFO) << "New station " << LoggingUtils::GetMacString(mac_address) |
