summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Ravi <sunilravi@google.com>2022-03-01 22:57:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-03-01 22:57:20 +0000
commite2d8efbde2e0523b717d2d9724ba9622b75542a1 (patch)
tree6373ecdfbcd22be322d543d5c7f9d2a6a7fc2b31
parent8eaccb726f2c75257695b966c62de73c06e05e00 (diff)
parent07b464d9bd2db22a12d86329559c41c9d3475e30 (diff)
downloadwificond-e2d8efbde2e0523b717d2d9724ba9622b75542a1.tar.gz
Merge "wificond: Update BandWiphyIndexMap when country code changed" into tm-dev
-rw-r--r--server.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/server.cpp b/server.cpp
index e47c98b..1c40185 100644
--- a/server.cpp
+++ b/server.cpp
@@ -495,7 +495,12 @@ void Server::OnRegDomainChanged(uint32_t wiphy_index, std::string& country_code)
<< " on wiphy_index: " << wiphy_index;
BroadcastRegDomainChanged(country_code);
}
- UpdateBandWiphyIndexMap(wiphy_index);
+ // Sometimes lower layer sends stale wiphy index when there are no
+ // interfaces. So update band - wiphy index mapping only if an
+ // interface exists
+ if (!hasNoIfaceForWiphyIndex(wiphy_index)) {
+ UpdateBandWiphyIndexMap(wiphy_index);
+ }
LogSupportedBands(wiphy_index);
}