summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Astone <ales.astone@gmail.com>2019-09-10 23:51:12 +0200
committerBruno Martins <bgcngm@gmail.com>2019-10-05 00:48:40 +0100
commita0f54ed82c65070673990f32a3c17b9772cf1cb3 (patch)
tree30b7cdd28a43da728fd71f7d7c526cdd24cd4995
parent0173b7b191e28999e081dd50161ad11a7d719ad0 (diff)
downloadhardware_lineage_interfaces-a0f54ed82c65070673990f32a3c17b9772cf1cb3.tar.gz
hardware_lineage_interfaces-a0f54ed82c65070673990f32a3c17b9772cf1cb3.tar.bz2
hardware_lineage_interfaces-a0f54ed82c65070673990f32a3c17b9772cf1cb3.zip
wifi: error out when asked for factory mac address
* In Android 10, every time a wifi connection is to be established the mac address is reset to factory. This was introduced to play with "Connected MAC randomization". * InterfaceTool::GetFactoryMacAddress fetches the factory mac address by dispatching a SIOCETHTOOL ETHTOOL_GPERMADDR ioctl. On our legacy wifi drivers it returns 00:00:00:00:00:00, and android proceeds to set it as wlan0's mac address causing the connection to fail. * Hard code an ERROR_NOT_SUPPORTED return status to get around it. Change-Id: I1afb3d7ed0ad745da9828db0074caa970407bdc5
-rw-r--r--wifi/1.0-legacy/wifi_sta_iface.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/wifi/1.0-legacy/wifi_sta_iface.cpp b/wifi/1.0-legacy/wifi_sta_iface.cpp
index a6539e5..2d8f029 100644
--- a/wifi/1.0-legacy/wifi_sta_iface.cpp
+++ b/wifi/1.0-legacy/wifi_sta_iface.cpp
@@ -635,9 +635,8 @@ WifiStatus WifiStaIface::setMacAddressInternal(
std::pair<WifiStatus, std::array<uint8_t, 6>>
WifiStaIface::getFactoryMacAddressInternal() {
- std::array<uint8_t, 6> mac =
- iface_util_.lock()->getFactoryMacAddress(ifname_);
- return {createWifiStatus(WifiStatusCode::SUCCESS), mac};
+ std::array<uint8_t, 6> mac;
+ return {createWifiStatus(WifiStatusCode::ERROR_NOT_SUPPORTED), mac};
}
} // namespace implementation