summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2025-04-08 10:23:11 +1000
committerAngus Gratton <angus@redyak.com.au>2025-05-08 15:32:05 +1000
commitd00eab4a3056ebaf47a1d2fdf8c21d132c465055 (patch)
tree8f14301b41cd3b6c130bf6073d6349dfa09d198b
parentb2cda6c6046132738fdf7d354b811f216c91bf52 (diff)
rp2,extmod/cyw43: Move the LWIP responder fix into common CYW43 config.
This means the fix from dd1465e7 will also apply to stm32 and mimxrt ports that use CYW43. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
-rw-r--r--extmod/cyw43_config_common.h16
-rw-r--r--ports/rp2/cyw43_configport.h16
2 files changed, 16 insertions, 16 deletions
diff --git a/extmod/cyw43_config_common.h b/extmod/cyw43_config_common.h
index 091b6d3e6..595af37d7 100644
--- a/extmod/cyw43_config_common.h
+++ b/extmod/cyw43_config_common.h
@@ -107,4 +107,20 @@ static inline void cyw43_delay_ms(uint32_t ms) {
}
}
+#if LWIP_MDNS_RESPONDER == 1
+
+// Hook for any additional TCP/IP initialization than needs to be done.
+// Called after the netif specified by `itf` has been set up.
+#ifndef CYW43_CB_TCPIP_INIT_EXTRA
+#define CYW43_CB_TCPIP_INIT_EXTRA(self, itf) mdns_resp_add_netif(&self->netif[itf], mod_network_hostname_data)
+#endif
+
+// Hook for any additional TCP/IP deinitialization than needs to be done.
+// Called before the netif specified by `itf` is removed.
+#ifndef CYW43_CB_TCPIP_DEINIT_EXTRA
+#define CYW43_CB_TCPIP_DEINIT_EXTRA(self, itf) mdns_resp_remove_netif(&self->netif[itf])
+#endif
+
+#endif
+
#endif // MICROPY_INCLUDED_EXTMOD_CYW43_CONFIG_COMMON_H
diff --git a/ports/rp2/cyw43_configport.h b/ports/rp2/cyw43_configport.h
index ef35cfafc..2da0b1f8a 100644
--- a/ports/rp2/cyw43_configport.h
+++ b/ports/rp2/cyw43_configport.h
@@ -103,20 +103,4 @@ uint cyw43_get_pin_wl(cyw43_pin_index_t pin_id);
#define cyw43_free m_tracked_free
#endif
-#if LWIP_MDNS_RESPONDER == 1
-
-// Hook for any additional TCP/IP initialization than needs to be done.
-// Called after the netif specified by `itf` has been set up.
-#ifndef CYW43_CB_TCPIP_INIT_EXTRA
-#define CYW43_CB_TCPIP_INIT_EXTRA(self, itf) mdns_resp_add_netif(&self->netif[itf], mod_network_hostname_data)
-#endif
-
-// Hook for any additional TCP/IP deinitialization than needs to be done.
-// Called before the netif specified by `itf` is removed.
-#ifndef CYW43_CB_TCPIP_DEINIT_EXTRA
-#define CYW43_CB_TCPIP_DEINIT_EXTRA(self, itf) mdns_resp_remove_netif(&self->netif[itf])
-#endif
-
-#endif
-
#endif // MICROPY_INCLUDED_RP2_CYW43_CONFIGPORT_H