Skip to content

Commit 5396482

Browse files
committed
removed superfluous check of self->ap_mode - esp_wifi_ap_get_sta_list will return an error if we're not in AP mode, which is sufficient
1 parent c5151a4 commit 5396482

File tree

1 file changed

+2
-3
lines changed
  • ports/espressif/common-hal/wifi

1 file changed

+2
-3
lines changed

ports/espressif/common-hal/wifi/Radio.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,16 +258,15 @@ mp_obj_t common_hal_wifi_radio_get_stations_ap(wifi_radio_obj_t *self) {
258258
if (result != ESP_OK) {
259259
return mp_const_none;
260260
}
261-
261+
262262
esp_netif_pair_mac_ip_t mac_ip_pair[esp_sta_list.num];
263263
for (int i = 0; i < esp_sta_list.num; i++) {
264264
memcpy(mac_ip_pair[i].mac, esp_sta_list.sta[i].mac, MAC_ADDRESS_LENGTH);
265265
mac_ip_pair[i].ip.addr = 0;
266266
}
267267

268268
result = esp_netif_dhcps_get_clients_by_mac(self->ap_netif, esp_sta_list.num, mac_ip_pair);
269-
270-
if (!self->ap_mode || result != ESP_OK) {
269+
if (result != ESP_OK) {
271270
return mp_const_none;
272271
}
273272

0 commit comments

Comments
 (0)