Skip to content

Commit 2e687fe

Browse files
committed
rp2,extmod/cyw43: Move the LWIP responder fix into common CYW43 config.
This means the fix from dd1465e 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>
1 parent 9b1f0ab commit 2e687fe

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

extmod/cyw43_config_common.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,4 +124,20 @@ static inline void cyw43_delay_ms(uint32_t ms) {
124124

125125
#endif
126126

127+
#if LWIP_MDNS_RESPONDER == 1
128+
129+
// Hook for any additional TCP/IP initialization than needs to be done.
130+
// Called after the netif specified by `itf` has been set up.
131+
#ifndef CYW43_CB_TCPIP_INIT_EXTRA
132+
#define CYW43_CB_TCPIP_INIT_EXTRA(self, itf) mdns_resp_add_netif(&self->netif[itf], mod_network_hostname_data)
133+
#endif
134+
135+
// Hook for any additional TCP/IP deinitialization than needs to be done.
136+
// Called before the netif specified by `itf` is removed.
137+
#ifndef CYW43_CB_TCPIP_DEINIT_EXTRA
138+
#define CYW43_CB_TCPIP_DEINIT_EXTRA(self, itf) mdns_resp_remove_netif(&self->netif[itf])
139+
#endif
140+
141+
#endif
142+
127143
#endif // MICROPY_INCLUDED_EXTMOD_CYW43_CONFIG_COMMON_H

ports/rp2/cyw43_configport.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,4 @@ uint cyw43_get_pin_wl(cyw43_pin_index_t pin_id);
103103
#define cyw43_free m_tracked_free
104104
#endif
105105

106-
#if LWIP_MDNS_RESPONDER == 1
107-
108-
// Hook for any additional TCP/IP initialization than needs to be done.
109-
// Called after the netif specified by `itf` has been set up.
110-
#ifndef CYW43_CB_TCPIP_INIT_EXTRA
111-
#define CYW43_CB_TCPIP_INIT_EXTRA(self, itf) mdns_resp_add_netif(&self->netif[itf], mod_network_hostname_data)
112-
#endif
113-
114-
// Hook for any additional TCP/IP deinitialization than needs to be done.
115-
// Called before the netif specified by `itf` is removed.
116-
#ifndef CYW43_CB_TCPIP_DEINIT_EXTRA
117-
#define CYW43_CB_TCPIP_DEINIT_EXTRA(self, itf) mdns_resp_remove_netif(&self->netif[itf])
118-
#endif
119-
120-
#endif
121-
122106
#endif // MICROPY_INCLUDED_RP2_CYW43_CONFIGPORT_H

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy