Skip to content

Commit 0e33da2

Browse files
committed
WiFi: allow status() to be called before begin()
1 parent 9218cd5 commit 0e33da2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libraries/SocketWrapper/WiFi.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ class WiFiClass : public NetworkInterface {
8080
}
8181

8282
int status() {
83+
sta_iface = net_if_get_wifi_sta();
84+
netif = sta_iface;
8385
if (net_mgmt(NET_REQUEST_WIFI_IFACE_STATUS, netif, &sta_state,
8486
sizeof(struct wifi_iface_status))) {
8587
return WL_NO_SHIELD;

0 commit comments

Comments
 (0)