summaryrefslogtreecommitdiffstats
path: root/wifi/1.3/default/wifi_chip.cpp
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2019-02-14 09:43:43 -0800
committerRoshan Pius <rpius@google.com>2019-02-26 07:11:40 -0800
commit3b6705fb20afe97c2c53fd8385599dde3cafa9a3 (patch)
tree1b1ab0aac8878f4ce97d8b74c52179c33d0118e1 /wifi/1.3/default/wifi_chip.cpp
parent99dab386d38cf39fe2352c1743a66aa26bf6983d (diff)
downloadandroid_hardware_interfaces-3b6705fb20afe97c2c53fd8385599dde3cafa9a3.tar.gz
android_hardware_interfaces-3b6705fb20afe97c2c53fd8385599dde3cafa9a3.tar.bz2
android_hardware_interfaces-3b6705fb20afe97c2c53fd8385599dde3cafa9a3.zip
wifi(implementation): Set randomized MAC address for AP
Add the plumbing required for setting a random MAC address on AP startup. The random MAC address is created once for the lifetime of the daemon and then reused for any further AP creation. This would ensure that the MAC address is changed on every reboot. The feature is turned on by default, devices will need to set the |WIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION| in their .mk file to disable the feature at compile time. Bug: 78353419 Test: ./hardware/interfaces/wifi/1.3/default/tests/runtests.sh Change-Id: I054d5249c20cc582b76966313135295873cd0b61
Diffstat (limited to 'wifi/1.3/default/wifi_chip.cpp')
-rw-r--r--wifi/1.3/default/wifi_chip.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/wifi/1.3/default/wifi_chip.cpp b/wifi/1.3/default/wifi_chip.cpp
index 9640a61a8..906f14a1c 100644
--- a/wifi/1.3/default/wifi_chip.cpp
+++ b/wifi/1.3/default/wifi_chip.cpp
@@ -777,7 +777,8 @@ std::pair<WifiStatus, sp<IWifiApIface>> WifiChip::createApIfaceInternal() {
return {createWifiStatus(WifiStatusCode::ERROR_NOT_AVAILABLE), {}};
}
std::string ifname = allocateApOrStaIfaceName();
- sp<WifiApIface> iface = new WifiApIface(ifname, legacy_hal_, iface_util_);
+ sp<WifiApIface> iface =
+ new WifiApIface(ifname, legacy_hal_, iface_util_, feature_flags_);
ap_ifaces_.push_back(iface);
for (const auto& callback : event_cb_handler_.getCallbacks()) {
if (!callback->onIfaceAdded(IfaceType::AP, ifname).isOk()) {