mirror of
https://github.com/esphome/esphome.git
synced 2026-02-08 00:31:58 +00:00
[wifi] Save 112 bytes BSS on ESP8266 by calling SDK directly for BSSID
This commit is contained in:
@@ -878,10 +878,9 @@ network::IPAddress WiFiComponent::wifi_soft_ap_ip() {
|
|||||||
|
|
||||||
bssid_t WiFiComponent::wifi_bssid() {
|
bssid_t WiFiComponent::wifi_bssid() {
|
||||||
bssid_t bssid{};
|
bssid_t bssid{};
|
||||||
uint8_t *raw_bssid = WiFi.BSSID();
|
struct station_config conf;
|
||||||
if (raw_bssid != nullptr) {
|
if (wifi_station_get_config(&conf)) {
|
||||||
for (size_t i = 0; i < bssid.size(); i++)
|
std::copy_n(conf.bssid, bssid.size(), bssid.begin());
|
||||||
bssid[i] = raw_bssid[i];
|
|
||||||
}
|
}
|
||||||
return bssid;
|
return bssid;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user