Skip to content

Commit f8070d2

Browse files
committed
Change comment, and logic on dhcpserver
1 parent 44d5326 commit f8070d2

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,11 @@ void common_hal_wifi_radio_start_station(wifi_radio_obj_t *self) {
155155

156156
void common_hal_wifi_radio_stop_station(wifi_radio_obj_t *self) {
157157

158-
// <strike>This is wrong</strike> This is fine.
159158
cyw43_wifi_leave(&cyw43_state, CYW43_ITF_STA);
159+
// This is wrong, but without this call the state of ITF_STA is still
160+
// reported as CYW43_LINK_JOIN (by wifi_link_status) and CYW43_LINK_UP
161+
// (by tcpip_link_status). However since ap disconnection isn't working
162+
// either, this is not an issue.
160163
cyw43_wifi_leave(&cyw43_state, CYW43_ITF_AP);
161164

162165
bindings_cyw43_wifi_enforce_pm();

shared/netutils/dhcpserver.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,9 +265,9 @@ static void dhcp_server_process(void *arg, struct udp_pcb *upcb, struct pbuf *p,
265265
d->lease[yi].expiry = (mp_hal_ticks_ms() + DEFAULT_LEASE_TIME_S * 1000) >> 16;
266266
dhcp_msg.yiaddr[3] = DHCPS_BASE_IP + yi;
267267
opt_write_u8(&opt, DHCP_OPT_MSG_TYPE, DHCPACK);
268-
printf("DHCPS: client connected: MAC=%02x:%02x:%02x:%02x:%02x:%02x IP=%u.%u.%u.%u\n",
268+
LWIP_DEBUGF(DHCP_DEBUG, ("DHCPS: client connected: MAC=%02x:%02x:%02x:%02x:%02x:%02x IP=%u.%u.%u.%u\n",
269269
dhcp_msg.chaddr[0], dhcp_msg.chaddr[1], dhcp_msg.chaddr[2], dhcp_msg.chaddr[3], dhcp_msg.chaddr[4], dhcp_msg.chaddr[5],
270-
dhcp_msg.yiaddr[0], dhcp_msg.yiaddr[1], dhcp_msg.yiaddr[2], dhcp_msg.yiaddr[3]);
270+
dhcp_msg.yiaddr[0], dhcp_msg.yiaddr[1], dhcp_msg.yiaddr[2], dhcp_msg.yiaddr[3]));
271271
break;
272272
}
273273

0 commit comments

Comments
 (0)