OSDN Git Service

Use AP bssid for GetPacketCounters()
authorNingyuan Wang <nywang@google.com>
Wed, 20 Sep 2017 21:34:02 +0000 (14:34 -0700)
committerNingyuan Wang <nywang@google.com>
Fri, 22 Sep 2017 16:21:37 +0000 (09:21 -0700)
we should use AP bssid instead of local interface mac address
for NL80211_CMD_GET_STATION. Local interface mac address only
works for some devices.

Bug: 66218880
Test: compile, unit tests
Test: run the following CTS test:
cts-tradefed run cts -m CtsNetTestCases -t
    android.net.wifi.cts.WifiManagerTest#testWifiWatchdog

Change-Id: I8852ab5085d186ee3f1e5b81abbf4c1d2500b9fa

client_interface_impl.cpp

index 974ff17..b6f0171 100644 (file)
@@ -188,7 +188,7 @@ bool ClientInterfaceImpl::DisableSupplicant() {
 bool ClientInterfaceImpl::GetPacketCounters(vector<int32_t>* out_packet_counters) {
   StationInfo station_info;
   if (!netlink_utils_->GetStationInfo(interface_index_,
-                                      interface_mac_addr_,
+                                      bssid_,
                                       &station_info)) {
     return false;
   }