Skip to content

ports/rp2: Fix rp2 mDNS issue via new cyw43 driver hooks. #17057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions ports/rp2/cyw43_configport.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "py/mphal.h"
#include "py/runtime.h"
#include "extmod/modnetwork.h"
#include "lwip/apps/mdns.h"
#include "pendsv.h"

#define CYW43_INCLUDE_LEGACY_F1_OVERFLOW_WORKAROUND_VARIABLES (1)
Expand Down Expand Up @@ -167,4 +168,19 @@ static inline void cyw43_delay_ms(uint32_t ms) {

#define CYW43_EVENT_POLL_HOOK mp_event_handle_nowait()

#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
Loading